Video decoding method and device
The video decoding method optimizes transform type determination based on block parameters, enhancing compression performance by addressing the inefficiencies in existing codecs for high-resolution video.
Patent Information
- Application Number
- JP2025046893
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-25
- Filing Date
- 2025-03-21
- Publication Date
- 2025-11-17
- Estimated Expiration
- 2040-12-16
AI Technical Summary
The increasing demand for high-resolution and high-quality video has led to a need for improved video coding technologies, as existing codecs like HEVC face challenges in efficiently managing multiple transform types during decoding, necessitating a method to determine the optimal transform type for each block.
A video decoding method that determines the transform type based on parameters such as block size and applicability of Multiple Transform Sets (MTS), setting zero-out regions, and performing inverse transforms accordingly.
This approach enhances compression performance by optimizing the decoding process for each block, improving efficiency in video coding.
Smart Images

Figure 0007771453000007 
Figure 0007771453000008 
Figure 0007771453000009
Abstract
Description
[Technical Field]
[0001] The present invention relates to a video coding technology, and more particularly to a method for determining a type of primary transform of a block to be decoded during a video decoding process. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality video such as HD (High Definition) video and UHD (Ultra High Definition) video has been increasing in various fields. As the video data becomes higher in resolution and quality, the amount of information or bits to be transmitted increases relatively compared to existing video data, and therefore, when video data is stored using a medium such as an existing wired or wireless broadband line, transmission costs and storage costs increase.
[0003] Since the establishment of the High Efficiency Video Coding (HEVC) video codec in 2013, the spread of immersive video and virtual reality services using 4K and 8K video has led to the standardization of Versatile Video Coding (VVC), a next-generation video codec that aims to achieve more than twice the performance improvement over HEVC. Standardization work is currently underway. VVC is being developed by the Joint Video Exploration Team (JVET), a joint effort of the ISO / ICE Moving Picture Experts Group (MPEG) and the ITU-T Video Coding Experts Group (VCEG), two video coding standardization groups, with the goal of achieving more than twice the coding compression performance compared to HEVC. A call for proposals for VVC standardization was announced at the 121st Gwangju MPEG and 9th JVET meetings in January 2018. Full-scale video standardization began with a total of 23 organizations proposing video codec technologies at the 122nd San Diego MPEG and 10th JVET meetings. At the 122nd MPEG and 10th JVET meetings, technical reviews, objective compression performance, and subjective image quality evaluations were conducted on the video codec technologies proposed by each organization, and some of the many technologies were adopted to announce Working Draft (WD) 1.0 and video reference software VTM (VVC Test Mode) 1.0. After the 127th MPEG and 15th JVET meetings concluded in July 2019, a Committee Draft (CD) of the VVC standard was completed, and standardization is currently underway with the goal of establishing a Final Draft International Standard (FDIS) in October 2020.
[0004] While HEVC's conventional coding structure uses a hierarchical division technique called a quadtree, VVC employs a division block structure that combines a quadtree binary tree (QTBT) and a ternary tree (TT). This allows for more flexible generation and processing of prediction residual signals than HEVC, resulting in improved compression performance. In addition to this basic block structure, VVC also employs new standard technologies not used in existing codecs, such as the adaptive loop filter (ALF) technology, affine motion prediction (AMP) technology, and decoder-side motion vector refinement (DMVR) technology. The DCT-II transform kernel, commonly used in existing video codecs, continues to be used for transform and quantization, but the applicable block size has been expanded to accommodate larger block sizes. In addition, the DST-7 kernel, which has been applied to small transform blocks such as 4x4 in the existing HEVC, has been expanded to larger transform blocks, and a new transform kernel, DCT-8, has also been added as a transform kernel.
[0005] On the other hand, in the HEVC standard, when encoding or decoding video, conversion is performed using a single transform type, so there was no need to transmit information about the transform type for the video.However, with the new technology, multiple transform selection using DCT-II, DCT-8, and DCT-7 can be applied, so there is a need for technology to define whether to apply MTS and what primary transform type to apply when decoding. Summary of the Invention [Problem to be solved by the invention]
[0006] The technical object of the present invention is to perform inverse transformation in a predetermined manner under specific conditions.
[0007] Another technical object of the present invention is to perform decoding by applying a transform type optimized for the block to be decoded. [Means for solving the problem]
[0008] According to one aspect of the present invention, there is provided a video decoding method performed by a video decoding device, the video decoding method including the steps of: acquiring information on a parameter indicating whether a Multiple Transform Set (MTS) is applicable to a block to be decoded, a width of the block to be decoded, and a height of the block to be decoded; determining a transform type of the block to be decoded based on at least one of the parameter indicating whether a Multiple Transform Set (MTS) is applicable to the block to be decoded, the width of the block to be decoded, and the height of the block to be decoded; setting a zero-out region of the block to be decoded based on at least one of the parameter indicating whether a Multiple Transform Set is applicable to the block to be decoded, the width of the block to be decoded, and the height of the block to be decoded; and performing an inverse transform of the block to be decoded based on a result of the determination of the zero-out region and the transform type of the block to be decoded.
[0009] According to another aspect of the present invention, in the step of determining the transformation type of the block to be decoded, if at least one of the width or height of the block to be decoded has a value greater than 32, it is determined that the block to be decoded has been transformed using a default transformation.
[0010] According to another aspect of the present invention, in the step of setting a zero-out area of the block to be decoded, if one of the width or height of the block to be decoded has a value greater than 32, the area of the block to be decoded whose width or height is greater than 32 is set as the zero-out area.
[0011] According to yet another aspect of the present invention, the parameter indicating whether or not a multiple transform set is applicable to the block to be decoded is sps_mts_enabled_flag.
[0012] According to another aspect of the present invention, there is provided a video decoding method performed by a video decoding device, the video decoding method including the steps of: acquiring at least one of information on whether a multiple transform set is applied to a block to be decoded, information on a prediction mode, information on whether a secondary transform is applied, information on whether a matrix-based prediction is applied, and information on a size of the block to be decoded; determining whether an implicit multiple transform set is applied to the block to be decoded based on at least one of the information on whether a multiple transform set is applied to the block to be decoded, information on the prediction mode, information on whether a secondary transform is applied, and information on whether a matrix-based prediction is applied; acquiring information on a transform type based on the information on whether an implicit multiple transform set is applied to the block to be decoded and the information on the size of the block to be decoded; and performing an inverse transform based on the information on the transform type.
[0013] According to another aspect of the present invention, the step of determining whether the implicit multiple transform set is applied determines whether the implicit multiple transform set is applied using information regarding whether the multiple transform set is applied to the block to be decoded, information regarding the prediction mode, information regarding whether a secondary transform is applied, and information regarding whether prediction using a matrix is applied.
[0014] According to yet another aspect of the present invention, the set of implicit multiple transforms includes one default transform and at least one extra transform.
[0015] According to another aspect of the present invention, the step of obtaining information about the transform type based on information about the size of the block to be decoded includes, if the horizontal axis lengths of the block to be decoded are all between 4 and 16, applying at least one of extra transform types to the block to be decoded in the horizontal axis direction.
[0016] According to another aspect of the present invention, the step of obtaining information about the transformation type based on information about the size of the block to be decoded includes applying at least one additional transformation type to the block to be decoded in the vertical axis direction if the vertical axis lengths of the block to be decoded are all greater than or equal to 4 and less than or equal to 16.
[0017] According to another aspect of the present invention, the information on whether the multiple transform set of the block to be decoded is applied includes at least one of sps_mts_enabled_flag and sps_explicit_mts_intra_enabled_flag.
[0018] According to yet another aspect of the present invention, the information about the prediction mode includes CuPredMode.
[0019] According to another aspect of the present invention, the information regarding whether the secondary transformation is applied includes lfnst_idx.
[0020] According to another aspect of the present invention, the information on whether to apply prediction using a matrix includes intra_mip_flag.
[0021] According to another aspect of the present invention, the information on the transformation type of the block to be decoded includes information on a horizontal axis transformation type and information on a vertical axis transformation type.
[0022] According to yet another aspect of the present invention, the step of determining whether an implicit multiple transform set is applied to the block to be decoded is obtained by further checking whether the block to be decoded is a luma block.
[0023] According to another aspect of the present invention, there is provided a video decoding device including a memory and at least one processor, the video decoding device including the at least one processor including an inverse transform unit that acquires at least one of information on whether a multiple transform set is applied to a block to be decoded, information on a prediction mode, information on whether a secondary transform is applied, information on whether a matrix-based prediction is applied, and information on a size of the block to be decoded, determines whether an implicit multiple transform set is applied to the block to be decoded based on at least one of the information on whether a multiple transform set is applied to the block to be decoded, information on the prediction mode, information on whether a secondary transform is applied, and information on whether a matrix-based prediction is applied, acquires information on a transform type based on the information on whether the implicit multiple transform set is applied to the block to be decoded and the information on the size of the block to be decoded, and performs an inverse transform based on the information on the transform type. [Effects of the Invention]
[0024] According to the present invention, it is possible to perform inverse transformation in a predetermined manner under specific conditions.
[0025] Furthermore, by performing decoding by applying a transform type optimized for the block to be decoded, it is possible to expect an improvement in compression performance. [Brief explanation of the drawings]
[0026] [Figure 1]1 is a diagram schematically illustrating a configuration of a video encoding device to which the present invention is applied. [Figure 2] FIG. 1 is a diagram illustrating an example of a video encoding method performed by a video encoding device. [Figure 3] 1 is a diagram schematically showing the configuration of a video decoding device to which the present invention is applied; [Figure 4] FIG. 1 is a diagram illustrating an example of a video decoding method performed by a decoding device. [Figure 5] FIG. 1 illustrates the scanning order of sub-blocks and coefficients for a diagonal scan scheme. [Figure 6] FIG. 10 is a diagram illustrating an example of a 32×32 encoding target block after quantization. [Figure 7] FIG. 10 is a diagram showing the remaining zero-out region excluding m×n in the region of an M×N block to be decoded. [Figure 8] FIG. 1 illustrates a method for determining whether to apply an implicit MTS feature according to an embodiment of the present invention. [Figure 9] 10 illustrates a method for deriving transformation information according to the width and height of the block of an implicit MTS according to an embodiment of the present invention. [Figure 10] FIG. 2 illustrates a method for performing an inverse transformation based on transformation-related parameters according to an embodiment of the present invention. [Figure 11] FIG. 10 is a diagram showing a valid MTS area marked with a bold line within a 32×32 block to be decoded. [Figure 12] FIG. 1 illustrates a method for determining a valid MTS according to an embodiment of the present invention. [Figure 13] FIG. 10 illustrates a method for determining a valid MTS according to another embodiment of the present invention. [Figure 14] FIG. 10 is a diagram illustrating a method for determining a valid MTS according to another embodiment of the present invention. [Figure 15] FIG. 10 illustrates a method for determining whether to apply an explicit MTS feature according to an embodiment of the present invention. [Figure 16]FIG. 10 illustrates a method for performing an inverse transformation based on transformation-related parameters according to another embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0027] Because the present invention may be modified in various ways and may have various embodiments, specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to the specific embodiments. The terms used in this specification are used merely to describe specific embodiments and are not intended to limit the technical spirit of the present invention. The singular expressions include the plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprise" or "have" and the like are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0028] Meanwhile, each component in the drawings described in the present invention is shown independently for the convenience of describing separate characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components may be combined to form a single component, or one component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included within the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0029] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components will be omitted.
[0030] Meanwhile, the present invention relates to video / image coding. For example, the methods / embodiments disclosed in the present invention may be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or next generation video / image coding standards (e.g., H.267, H.268, etc.).
[0031] In this specification, a picture generally refers to a unit representing one image in a specific time period, and a slice is a unit constituting a part of a picture in coding. One picture may be composed of multiple slices, and pictures and slices may be mixed together as necessary.
[0032] A pixel or a pel may refer to the smallest unit that constitutes a picture (or image). A "sample" may also be used as a term corresponding to a pixel. A sample generally refers to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luminance (luma) component, or may refer to only a pixel / pixel value of a chroma component.
[0033] A unit refers to a basic unit of video processing. A unit may include at least one of a specific region of a picture and information about the region. The term unit may be mixed with terms such as block or area depending on the situation. In a general case, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows.
[0034] FIG. 1 is a diagram showing a schematic configuration of a video encoding device to which the present invention is applied.
[0035] 1, a video encoding device 100 may include a picture partitioning unit 105, a prediction unit 110, a residual processing unit 120, an entropy encoding unit 130, an adder 140, a filter unit 150, and a memory 160. The residual processing unit 120 may include a subtraction unit 121, a transform unit 122, a quantization unit 123, a realignment unit 124, an inverse quantization unit 125, and an inverse transformation unit 126.
[0036] The picture division unit 105 divides an input picture into at least one processing unit.
[0037] For example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) using a quad-tree binary-tree (QTBT) structure. For example, one coding unit may be divided into multiple nodes at a deeper depth based on a quad-tree structure and / or a binary tree structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure may be applied. Alternatively, the binary tree structure may be applied first. A coding procedure according to the present invention may be performed based on a final coding unit that is not further divided. In this case, based on coding efficiency according to video characteristics, the largest coding unit may be immediately used as the final coding unit, or, if necessary, the coding unit may be recursively divided into coding units at a lower depth, and a coding unit with an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.
[0038] As another example, the processing unit may include a coding unit (CU), a prediction unit (PU), or a transform unit (TU). The coding units may be split into lower-depth coding units using a quadtree structure, starting from the largest coding unit (LCU). In this case, based on coding efficiency according to video characteristics, the largest coding unit may be directly used as the final coding unit, or the coding unit may be recursively split into lower-depth coding units as needed, and the coding unit with the optimal size may be used as the final coding unit. When a smallest coding unit (SCU) is set, the coding unit is not split into coding units smaller than the smallest coding unit. Here, the final coding unit refers to a coding unit that serves as a basis for partitioning or dividing into prediction units or transform units. The prediction unit is a unit partitioned from the coding unit and may be a unit of sample prediction. In this case, the prediction unit may be divided into subblocks. The transform unit may be divided from the coding unit using a quadtree structure and may be a unit that derives transform coefficients and / or a unit that derives a residual signal from the transform coefficients. Hereinafter, the coding unit may be referred to as a coding block (CB), the prediction unit may be referred to as a prediction block (PB), and the transform unit may be referred to as a transform block (TB). A prediction block or a prediction unit refers to a specific region in a block form within a picture and may include an array of prediction samples.A transform block or transform unit also refers to a specific region in block form within a picture, and may include an array of transform coefficients or residual samples.
[0039] The prediction unit 110 performs prediction on a current block to be processed (hereinafter, referred to as a current block) and generates a predicted block including prediction samples for the current block. The unit of prediction performed by the prediction unit 110 may be a coding block, a transform block, or a prediction block.
[0040] The prediction unit 110 determines whether intra prediction or inter prediction is applied to the current block. For example, the prediction unit 110 determines whether intra prediction or inter prediction is applied to the current block on a CU basis.
[0041] In intra prediction, the predictor 110 may derive a prediction sample for a current block based on a reference sample outside the current block within a picture to which the current block belongs (hereinafter referred to as the current picture). In this case, the predictor 110 may (i) derive a prediction sample based on an average or interpolation of neighboring reference samples of the current block, or (ii) derive a prediction sample based on a reference sample that exists in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. (i) is referred to as a non-directional mode or a non-angular mode, and (ii) is referred to as a directional mode or an angular mode. Prediction modes in intra prediction may include, for example, 33 directional prediction modes and at least two non-directional modes. The non-directional modes may include a DC prediction mode and a planar mode. The predictor 110 may determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.
[0042] In the case of inter prediction, the predictor 110 may derive a predicted sample for a current block based on a sample identified by a motion vector on a reference picture. The predictor 110 may derive a predicted sample for the current block by applying any one of a skip mode, a merge mode, and a motion vector prediction (MVP) mode. In the skip mode and the merge mode, the predictor 110 may use motion information of a neighboring block as motion information of the current block. Unlike the merge mode, the skip mode does not transmit a difference (residual) between a predicted sample and an original sample. In the MVP mode, the motion vector of the current block may be derived by using the motion vector of the neighboring block as a motion vector predictor.
[0043] In the case of inter prediction, neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in a reference picture. The reference picture including the temporal neighboring blocks may be called a collocated picture (colPic). Motion information may include a motion vector and a reference picture index. Information such as prediction mode information and motion information may be (entropy) encoded and output in the form of a bitstream.
[0044] When motion information of temporally neighboring blocks is used in skip mode and merge mode, the top picture on a reference picture list may be used as a reference picture. Reference pictures included in the reference picture list may be sorted based on the difference in picture order count (POC) between the current picture and the reference picture. POC corresponds to the display order of pictures and may be distinguished from the coding order.
[0045] The subtractor 121 generates residual samples, which are the differences between the original samples and the predicted samples. When the skip mode is applied, the residual samples do not need to be generated as described above.
[0046] The transform unit 122 transforms residual samples in units of transform blocks to generate transform coefficients. The transform unit 122 may perform the transform according to the size of the transform block and the prediction mode applied to a coding block or a prediction block spatially overlapping with the transform block. For example, if intra prediction is applied to the coding block or the prediction block overlapping with the transform block and the transform block is a 4x4 residual array, the residual samples are transformed using a Discrete Sine Transform (DST) transform kernel; otherwise, the residual samples are transformed using a Discrete Cosine Transform (DCT) transform kernel.
[0047] The quantization unit 123 quantizes the transform coefficients to generate quantized transform coefficients.
[0048] The rearrangement unit 124 rearranges the quantized transform coefficients. The rearrangement unit 124 can rearrange the quantized transform coefficients in block form into a one-dimensional vector form using a coefficient scanning method. Here, the rearrangement unit 124 has been described as a separate component, but it may also be a part of the quantization unit 123.
[0049] The entropy encoding unit 130 performs entropy encoding on the quantized transform coefficients. The entropy encoding may include encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 130 may encode information required for video reconstruction (e.g., syntax element values) together with or separately from the quantized transform coefficients. The entropy-encoded information may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) units.
[0050] The inverse quantization unit 125 inversely quantizes the values (quantized transform coefficients) quantized by the quantization unit 123, and the inverse transform unit 126 inversely transforms the values inversely quantized by the inverse quantization unit 125 to generate residual samples.
[0051] The adder 140 reconstructs a picture by combining residual samples and prediction samples. The residual samples and prediction samples are added in block units to generate reconstructed blocks. Although the adder 140 has been described as a separate component, it may be part of the prediction unit 110. Meanwhile, the adder 140 may also be referred to as a reconstruction unit or a reconstructed block generation unit.
[0052] The filter unit 150 may apply a deblocking filter and / or a sample adaptive offset to the reconstructed picture. The deblocking filtering and / or the sample adaptive offset may correct artifacts at block boundaries in the reconstructed picture and distortions in the quantization process. The sample adaptive offset may be applied on a sample-by-sample basis or may be applied after the deblocking filtering process is completed. The filter unit 150 may also apply an adaptive loop filter (ALF) to the reconstructed picture. The ALF may be applied to the reconstructed picture after the deblocking filtering and / or the sample adaptive offset have been applied.
[0053] The memory 160 stores a reconstructed picture (decoded picture) or information required for encoding / decoding. Here, the reconstructed picture may be a reconstructed picture that has undergone a filtering procedure by the filter unit 150. The stored reconstructed picture may be used as a reference picture for (inter) prediction of another picture. For example, the memory 160 may store (reference) pictures used for inter prediction. In this case, the pictures used for inter prediction may be specified by a reference picture set or a reference picture list.
[0054] FIG. 2 illustrates an example of a video encoding method performed by a video encoding device. Referring to FIG. 2, the video encoding method may include block partitioning, intra / inter prediction, transform, quantization, and entropy encoding processes. For example, a current picture may be divided into a plurality of blocks, a prediction block of the current block may be generated by intra / inter prediction, and a residual block of the current block may be generated by subtracting an input block of the current block from the prediction block. Subsequently, a coefficient block, i.e., a transform coefficient of the current block, may be generated by transforming the residual block. The transform coefficients may be quantized and entropy encoded before being stored in a bitstream.
[0055] FIG. 3 is a diagram for explaining the outline of the configuration of a video decoding device to which the present invention is applied.
[0056] 3, a video decoding device 300 may include an entropy decoding unit 310, a residual processing unit 320, a prediction unit 330, an addition unit 340, a filter unit 350, and a memory 360. Here, the residual processing unit 320 may include a realignment unit 321, an inverse quantization unit 322, and an inverse transform unit 323.
[0057] When a bitstream containing video information is input, the video decoding device 300 can restore the video in accordance with the process by which the video information was processed in the video encoding device.
[0058] For example, the video decoding device 300 may perform video decoding using a processing unit applied in a video encoding device. Accordingly, a processing unit block for video decoding may be a coding unit, for example, or a coding unit, a prediction unit, or a transform unit, for example. The coding units may be divided into a quad tree structure and / or a binary tree structure from the largest coding unit.
[0059] A prediction unit and a transform unit may also be used depending on the case, in which case a prediction block may be a block derived or partitioned from a coding unit and may be a unit of sample prediction. In this case, the prediction unit may be divided into sub-blocks. The transform unit may be divided from the coding unit using a quadtree structure and may be a unit for deriving transform coefficients or a unit for deriving a residual signal from the transform coefficients.
[0060] The entropy decoding unit 310 parses the bitstream and outputs information necessary for video or picture reconstruction. For example, the entropy decoding unit 310 may decode information in the bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements necessary for video reconstruction and quantized values of transform coefficients for residuals.
[0061] More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element from a bitstream, determines a context model using information on the syntax element to be decoded and decoding information on adjacent and current blocks or information on symbols / bins decoded in a previous step, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. After determining the context model, the CABAC entropy decoding method can update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.
[0062] Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to the prediction unit 330, and the residual values entropy decoded by the entropy decoding unit 310, i.e., the quantized transform coefficients, are input to the reordering unit 421.
[0063] The rearrangement unit 321 rearranges the quantized transform coefficients into a two-dimensional block format. The rearrangement unit 321 may perform rearrangement in accordance with the coefficient scanning performed in the encoding device. Here, although the rearrangement unit 321 has been described as a separate component, it may also be a part of the inverse quantization unit 322.
[0064] The inverse quantization unit 322 may inversely quantize the quantized transform coefficients based on the (inverse) quantization parameter and output the transform coefficients. In this case, information for deriving the quantization parameter may be signaled from the encoding device.
[0065] The inverse transform unit 323 may inverse transform the transform coefficients to derive residual samples.
[0066] The prediction unit 330 may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The unit of prediction performed by the prediction unit 330 may be a coding block, a transform block, or a prediction block.
[0067] The prediction unit 330 determines whether to apply intra prediction or inter prediction based on the information related to the prediction. In this case, the unit for determining whether to apply intra prediction or inter prediction is different from the unit for generating prediction samples. In addition, the unit for generating prediction samples in inter prediction and intra prediction is also different. For example, whether to apply inter prediction or intra prediction can be determined on a CU basis. Furthermore, for example, in inter prediction, a prediction mode may be determined on a PU basis to generate prediction samples, and in intra prediction, a prediction mode may be determined on a PU basis to generate prediction samples on a TU basis.
[0068] In the case of intra prediction, the prediction unit 330 may derive a prediction sample for the current block based on neighboring reference samples in the current picture. The prediction unit 330 may derive a prediction sample for the current block by applying a directional mode or a non-directional mode based on the neighboring reference samples of the current block. In this case, the prediction mode to be applied to the current block may be determined using the intra prediction mode of the neighboring block. Meanwhile, matrix-based intra prediction (MIP) that performs prediction based on a pre-trained matrix may be used. In this case, the number of MIP modes and the size of the matrix are defined for each block size, and the reference sample is downsampled according to the size of the matrix, multiplied by a matrix determined according to the mode number, and interpolated according to the size of the prediction block to generate a prediction value.
[0069] In the case of inter prediction, the predictor 330 may derive a prediction sample for the current block based on a sample identified on the reference picture by a motion vector on the reference picture. The predictor 330 may derive a prediction sample for the current block by applying any one of a skip mode, a merge mode, and an MVP mode. In this case, motion information required for inter prediction of the current block provided from the video encoding device, such as information on a motion vector, a reference picture index, etc., may be obtained or induced based on the information on the prediction.
[0070] In the skip mode and merge mode, motion information of neighboring blocks may be used as motion information of the current block, and the neighboring blocks may include spatial neighboring blocks and temporal neighboring blocks.
[0071] The predictor 330 may construct a merge candidate list using motion information of available neighboring blocks and use information indicated by a merge index on the merge candidate list as the motion vector of the current block. The merge index may be signaled from the encoding device. The motion information may include a motion vector and a reference picture. In skip mode and merge mode, when motion information of temporally neighboring blocks is used, the top picture on the reference picture list may be used as the reference picture.
[0072] In skip mode, unlike merge mode, the difference (residual) between predicted samples and original samples is not transmitted.
[0073] In the MVP mode, the motion vector of the current block may be derived using the motion vector of a neighboring block as a motion vector predictor, where the neighboring block may include a spatial neighboring block and a temporal neighboring block.
[0074] For example, when a merge mode is applied, a merge candidate list may be generated using the motion vectors of the reconstructed spatially neighboring blocks and / or the motion vector corresponding to the Col block, which is a temporally neighboring block. In the merge mode, the motion vector of a candidate block selected from the merge candidate list is used as the motion vector of the current block. The prediction information may include a merge index indicating a candidate block having an optimal motion vector selected from the candidate blocks included in the merge candidate list. In this case, the prediction unit 330 may derive the motion vector of the current block using the merge index.
[0075] As another example, when the Motion Vector Prediction (MVP) mode is applied, a motion vector predictor candidate list may be generated using the motion vector of a reconstructed spatial neighboring block and / or the motion vector corresponding to a Col block, which is a temporal neighboring block. That is, the motion vector of a reconstructed spatial neighboring block and / or the motion vector corresponding to a Col block, which is a temporal neighboring block, may be used as a motion vector candidate. The prediction information may include a predicted motion vector index indicating an optimal motion vector selected from the motion vector candidates included in the list. In this case, the prediction unit 330 may select a predicted motion vector for the current block from the motion vector candidates included in the motion vector candidate list using the motion vector index. A prediction unit of the encoding device calculates a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encodes it, and outputs it in the form of a bitstream. That is, the MVD is calculated by subtracting the motion vector predictor from the motion vector of the current block. In this case, the prediction unit 330 may obtain a motion vector differential included in the prediction information and derive the motion vector of the current block by adding the motion vector differential and the motion vector predictor. The prediction unit may also obtain or induce a reference picture index indicating a reference picture from the prediction information.
[0076] The adder 340 reconstructs a current block or a current picture by adding residual samples and predicted samples. The adder 340 may reconstruct a current picture by adding residual samples and predicted samples in block units. When skip mode is applied, the residual is not transmitted, and therefore the predicted samples become reconstructed samples. Although the adder 340 is described as a separate component here, it may be part of the prediction unit 330. Meanwhile, the adder 340 may also be referred to as a reconstruction unit or a reconstructed block generation unit.
[0077] The filter unit 350 may apply deblocking filtering, sample adaptive offset, and / or ALF to the reconstructed picture. In this case, the sample adaptive offset may be applied on a sample-by-sample basis or may be applied after deblocking filtering. The ALF may be applied after deblocking filtering and / or sample adaptive offset.
[0078] The memory 360 stores reconstructed pictures (decoded pictures) or information required for decoding. Here, the reconstructed pictures may be reconstructed pictures that have undergone a filtering procedure by the filter unit 350. For example, the memory 360 may store pictures used for inter prediction. In this case, the pictures used for inter prediction may be specified by a reference picture set or a reference picture list. The reconstructed pictures may be used as reference pictures for other pictures. The memory 360 may also output the reconstructed pictures in an output order.
[0079] FIG. 4 illustrates an example of an image decoding method performed by a decoding device. Referring to FIG. 4, the image decoding method may include entropy decoding, inverse quantization, inverse transform, and intra / inter prediction processes. For example, the decoding device may perform the inverse process of the encoding method. Specifically, quantized transform coefficients may be obtained by entropy decoding a bitstream, and a coefficient block, i.e., transform coefficients, of a current block may be obtained by inverse quantization of the quantized transform coefficients. A residual block of the current block may be derived by inverse transforming the transform coefficients, and a reconstructed block of the current block may be derived by adding the residual block to a prediction block of the current block derived by intra / inter prediction.
[0080] On the other hand, the operator in the embodiments described below may be defined as follows in the following table.
[0081]
Table 1
[0082] Referring to Table 1, Floor(x) indicates the largest integer value less than or equal to x, Log2(u) indicates the logarithm value of u with base 2, and Ceil(x) indicates the smallest integer value greater than or equal to x. For example, in the case of Floor(5.93), the largest integer value less than or equal to 5.93 is 5, so it indicates 5.
[0083] Also, referring to Table 1, x>>y indicates an operator that right-shifts x by y bits, and x<<y indicates an operator that left-shifts x by y bits.
[0084] <Introduction> The HEVC standard generally uses DCT, which is one type of transform type. Therefore, there is no need to transmit a separate determination process for the transform type and information regarding the determined transform type. However, currently, when the size of the luma block is 4x4 and intra prediction is performed, the DST transform type is used exceptionally.
[0085] Among the quantized coefficients that have undergone the transformation and quantization process, the information representing the positions of non-zero coefficients can be broadly classified into three types.
[0086] 1. Position (x, y) of the last significant coefficient: The position of the lowest-rank non-zero coefficient (hereinafter defined as the last position) in the scan order within the block to be coded
[0087] 2. Coded sub-block flag: A flag indicating whether the block to be coded is divided into multiple sub-blocks and whether each sub-block contains one or more non-zero coefficients (or whether all sub-blocks contain zero coefficients).
[0088] 3. Significant coefficient flag: A flag that indicates whether each coefficient in a sub-block is non-zero or zero.
[0089] Here, the position of the last significant coefficient is expressed as an x-axis component and a y-axis component, and each component is expressed as a prefix and a suffix. That is, the syntax for notifying the non-zero position of the quantized coefficient includes the following six syntaxes:
[0090] 1.last_sig_coeff_x_prefix 2.last_sig_coeff_y_prefix 3.last_sig_coeff_x_suffix 4.1ast_sig_coeff_y_suffix 5. coded_sub_block_flag 6.sig_coeff_flag
[0091] The last_sig_coeff_x_prefix indicates the prefix of the x-axis component indicating the position of the last significant coefficient, the last_sig_coeff_y_prefix indicates the prefix of the y-axis component indicating the position of the last significant coefficient, the last_sig_coeff_x_suffix indicates the suffix of the x-axis component indicating the position of the last significant coefficient, and the last_sig_coeff_y_suffix indicates the suffix of the y-axis component indicating the position of the last significant coefficient.
[0092] Meanwhile, coded_sub_block_flag is set to "0" if all coefficients in the sub-block are all zero, and set to "1" if there is one or more non-zero coefficients. sig_coeff_flag is set to "0" for a zero coefficient and set to "1" for a non-zero coefficient. Considering the position of the last significant coefficient in the block to be coded, coded_sub_block_flag syntax is transmitted only for sub-blocks that exist earlier in the scanning order. If coded_sub_block_flag is set to "1", i.e., if there is one or more non-zero coefficients, sig_coeff_flag syntax is transmitted for each of the coefficients in the sub-block.
[0093] The HEVC standard supports three types of scanning for coefficients:
[0094] 1) Upright diagonal 2) horizontal 3) vertical
[0095] If the block to be coded is coded using inter-picture prediction, the coefficients of the block are scanned in an upright diagonal manner, and if the block is coded using intra-picture prediction, one of the three types is selected depending on the intra-picture prediction mode to scan the coefficients of the block.
[0096] That is, when a video encoding device encodes a current block using inter-frame prediction, the coefficients of the current block are scanned in an upright diagonal manner, whereas when an intra-frame prediction is used in encoding the current block, the video encoding device selects one of the three types of formats according to the intra-frame prediction mode to scan the coefficients of the current block. The scanning may be performed by the reordering unit 124 in the video encoding device of FIG. 1, and may convert coefficients in a two-dimensional block format into a one-dimensional vector format through the scanning.
[0097] FIG. 5 is a diagram illustrating the scanning order of sub-blocks and coefficients for the diagonal scanning method.
[0098] 5, when the blocks of FIG. 5 are scanned by the reordering unit 124 of the video encoding device in a diagonal scan manner, scanning is performed downward and diagonally upward from the subblock No. 1, which is the upper leftmost subblock, and finally scanning the 16th subblock at the bottom right. That is, the reordering unit 124 scans the subblocks in the order of 1, 2, 3, ..., 14, 15, and 16 to reorder the quantized transform coefficients in a two-dimensional block format into a one-dimensional vector format. Similarly, the reordering unit 124 of the video encoding device scans the coefficients in each subblock in the same diagonal scan manner as the subblock scanning method. For example, within the first subblock, scanning is performed in the order of coefficients No. 0, 1, 2, ..., 13, 14, and 15.
[0099] However, when the scanned coefficients are stored in the bitstream, they are stored in the reverse order of the scan order. That is, when the block in Figure 10 is scanned by the reordering unit 124 of the video encoding device, the coefficients are scanned in the order of 0 to 255, but the pixels are stored in the bitstream in the order of pixel position 255 to 0.
[0100] FIG. 6 illustrates an example of a 32×32 block to be coded after quantization by a video coding apparatus. The 32×32 block illustrated in FIG. 6 may be scanned diagonally by the video coding apparatus. In FIG. 6, pixels marked with diagonal lines indicate non-zero coefficients, and pixels marked with an x indicate the last significant coefficient. All other white coefficients have a value of zero. Substituting the coded_sub_block_flag syntax into the block illustrated in FIG. 6 requires coded_sub_block_flag information for 24 sub-blocks located before the last sub-block in the scanning order, i.e., the sub-blocks marked with bold lines in FIG. 6, out of a total of 64 sub-blocks. The coded_sub_block_flag values for the first sub-block containing a DC value and the 24th sub-block containing the last coefficient are set to "1," and the coded_sub_block_flag values for the remaining 22 sub-blocks are transmitted to the video decoding apparatus via a bitstream. In this case, if one of the 22 sub-blocks contains one or more non-zero coefficients, the video encoding device sets the coded_sub_block_flag value to '1.' In Figure 6, of the 22 sub-blocks excluding the 1st and 24th sub-blocks, the coded_sub_block_flag values of the 4th, 5th, 11th, and 18th sub-blocks, which contain pixels marked in gray, are set to '1.'
[0101] 1. How to determine the primary transformation type of the block to be decoded This specification discloses a method for determining the type of primary transform of a block to be decoded during video decoding. That is, when a block to be decoded is decoded by a video decoding device, a process of determining the type of transform used for primary transform encoding in the transform process by the video encoding device is required. The primary transform type is composed of one default transform and multiple additional transforms. The block to be decoded may use the default transform or a multiple transform set including the default transform and additional transforms depending on conditions. That is, the block to be decoded may be transformed using only the default transform in the transform process, or may be transformed using a multiple transform set including the default transform and additional transforms. Conversely, from the perspective of the video decoding device, decoding may be performed by determining whether the block to be decoded uses only the default transform or a multiple transform set including the default transform and additional transforms. When the block to be decoded uses MTS, information about the transform actually used among multiple transforms is transmitted or guided. Here, the information about the transform actually used may separately include a horizontal axis transform type and a vertical axis transform type. That is, when the block to be decoded is transformed using MTS, the video decoding device may receive or determine which transform type, out of multiple transform types, was used for the transformation and then perform decoding.
[0102] According to an embodiment, DCT-II may be set as the default transform, and DST-7 and DCT-8 may be set as additional transforms. In this case, the maximum supported size of the default DCT-II is 64×64, and the maximum supported sizes of the additional DST-7 and DCT-8 transforms are 32×32. For example, if the size of the block to be decoded is 64×64, a single 64×64 DCT-II is applied to the transform process. That is, if at least one of the width and height of the block to be decoded is greater than 32 (exceeds 32), the default transform (*) is immediately applied without applying the MTS. That is, from the perspective of the video decoding device, it is sufficient to determine whether the block to be decoded has been transformed using the MTS only if both the horizontal and vertical dimensions of the block to be decoded are 32 or less. On the other hand, if either the horizontal or vertical dimensions of the block to be decoded is greater than 32, it may be determined that the default transform has been applied. In this way, if the block to be decoded has been transformed using the default transform, no syntax information is transmitted in association with the MTS. For convenience, in this invention, the transform type value of DCT-II is set to "0", the transform type value of DCT-7 is set to "1", and the transform type value of DCT-8 is set to "2", but is not limited thereto. Table 2 below defines the transform types assigned to each value of the trType syntax.
[0103] [Table 2]
[0104] Tables 3 and 4 show examples of transform kernels for DST-7 and DCT-8 when the size of the block to be decoded is 4×4.
[0105] Table 3 shows the coefficient values of the transform kernel when tyType is "1" (DST-7) and the size of the block to be decoded is 4x4, and Table 4 shows the coefficient values of the transform kernel when tyType is "2" (DCT-8) and the size of the block to be decoded is 4x4.
[0106] [Table 3]
[0107] [Table 4]
[0108] The entire transform region of the block to be decoded may include a zero-out region. The transform converts pixel domain values into frequency domain values. The upper left frequency region is referred to as the low-frequency region, and the lower right frequency region is referred to as the high-frequency region. The low-frequency components reflect the general (average) characteristics of the block, while the high-frequency components reflect the sharp (unique) characteristics of the block. Therefore, the low-frequency components have many large values, while the high-frequency components have a few small values. After the transform, the few small values in the high-frequency region are mostly zeroed through a quantization process. Here, in addition to the low-frequency region located in the upper left, the remaining region that is mostly zeroed is referred to as the zero-out region, and the zero-out region may be excluded during the signaling process. The region of the block to be decoded excluding the zero-out region is referred to as the valid region.
[0109] FIG. 7 is a diagram showing the remaining zero-out region excluding m×n in the region of the M×N block to be decoded.
[0110] Referring to FIG. 7, the gray area on the upper left side indicates the low frequency area, and the white area indicates the high frequency zero-out.
[0111] As another example, if the block to be decoded is 64x64, the 32x32 area on the upper left side is the valid area, and the remaining area is the zero-out area and is not signaled.
[0112] Also, if the size of the block to be decoded is one of 64x64, 64x32, and 32x64, the 32x32 region in the upper left corner is the valid region, and the remaining part is the zero-out region. Since the decoder knows the block size when parsing the syntax for the quantized coefficients, the zero-out region is not signaled. That is, the region whose width or height of the block to be decoded is greater than 32 is set as the zero-out region. In this case, since the horizontal or vertical size of the block to be decoded is greater than 32, the transform used is the default transform, DCT-II. Since the maximum size of the additional transforms, DST-7 and DCT-8, is supported up to 32x32, MTS is not applied to the block of this size.
[0113] Furthermore, when the size of the block to be decoded is one of 32x32, 32x16, and 16x32, and MTS is applied to the block to be decoded (e.g., when DST-7 or DCT-8 is used), the 16x16 region in the upper left corner is the valid region, and the remaining part is set as a zero-out region. Here, the zero-out region may be signaled according to the position of the last valid coefficient and the scanning method. This is because the encoder signals the MTS index (mts_idx) value after completing signaling of the quantized coefficient-related syntax, and therefore, when the decoder parses the syntax for the quantized coefficients, information about the transform type is not known. When the zero-out region is signaled in this way, the decoder can ignore or remove the quantized coefficients corresponding to the zero-out region and then perform transform only on the valid region. Here, the information about the transform type actually used may separately include a horizontal axis transform type and a vertical axis transform type. For example, if the horizontal axis transform type of the block to be decoded is DST-7 or DCT-8, the horizontal axis (width) effective area of the block to be decoded is 16, and if the vertical axis transform type of the block to be decoded is DST-7 or DCT-8, the vertical axis (height) effective area of the block to be decoded is 16.
[0114] On the other hand, if the size of the block to be decoded is one of 32x32, 32x16, and 16x32, and MTS is not applied to the block to be decoded (for example, when the default transform DCT-II is used), all areas are valid areas, there are no zero-out areas, and the block is transformed using the default transform DCT-II. Here, information regarding the transform actually used may separately include a horizontal axis transform type and a vertical axis transform type. For example, if the horizontal axis transform type of the block to be decoded is DCT-II, the horizontal axis (width) valid area of the block to be decoded is the width of the block, and if the vertical axis transform type of the block to be decoded is DCT-II, the vertical axis (height) valid area of the block to be decoded is the height of the block. In other words, the entire area (width x height) of the block to be decoded is a valid area.
[0115] On the other hand, if the block to be decoded has a size smaller than 16, which is not defined above, all regions are valid regions and there are no zero-out regions. Whether MTS is applied to the block to be decoded and the transform type value are determined by implicit and / or explicit implementation.
[0116] In the present invention, the syntax for expressing the position of non-zero coefficients among quantized coefficients that have undergone transformation and quantization is the same as that of the HEVC format, except that the syntax name of coded_sub_block_flag is changed to sb_coded_flag. Also, the quantized coefficients are scanned using an upright diagonal method.
[0117] In the present invention, MTS may be applied to luma blocks (but not to chroma blocks). Also, a flag indicating whether MTS is used, i.e., sps_mts_enabled_flag, can be used to turn the MTS function on / off. When the MTS function is used, sps_mts_enabled_flag is set to on, and whether to use the explicit MTS function for each of intra prediction and inter prediction can be set. That is, a flag sps_explicit_mts_intra_enabled_flag indicating whether MTS is used during intra prediction and a flag sps_explicit_mts_inter_enabled_flag indicating whether MTS is used during inter prediction may be set separately. For convenience, this specification describes the values of the flags sps_mts_enabled_flag, sps_explicit_mts_intra_enabled_flag, and sps_explicit_mts_inter_enabled_flag indicating whether three types of MTS are used as being located in the sequence parameter set (SPS), but this is not limiting. That is, the three flags may be set in one or more positions of the decoding capability information (DCI), video parameter set (VPS), sequence parameter set (SPS), picture parameter set (PPS), picture header (PH), and slice header (SH). Furthermore, the flags indicating whether the three MTS are used may be defined as high level syntax (HLS).
[0118] The use of MTS can be divided into explicit and implicit methods. In the use of explicit MTS, a flag value indicating whether intra-frame and / or inter-frame MTS is used is set to on in the SPS, and MTS-related information (e.g., transformation information actually used) is transmitted when certain conditions are met. That is, a video decoder receives the MTS-related information, determines the transformation type used to transform the current block based on the received information, and performs decoding based on the transformation type. For example, in an environment where explicit MTS is used, the three flags may be set as follows:
[0119] 1.sps_mts_enabled_flag=on 2.sps_explicit_mts_intra_enabled_flag=on 3.sps_explicit_mts_inter_enabled_flag=on
[0120] The use of implicit MTS induces MTS-related information (e.g., actual conversion information) when the value of sps_mts_enabled_flag among the three flags in the SPS is set to on and certain conditions are met. For example, in an environment where implicit MTS is used, the three flags may be set as follows:
[0121] 1.sps_mts_enabled_flag=on 2.sps_explicit_mts_intra_enabled_flag=off 3.sps_explicit_mts_inter_enabled_flag=off (whether on or off)
[0122] In the following, an implicit MTS method and an explicit MTS method are described according to some embodiments.
[0123] 2. First embodiment (implicit MTS) The implicit MTS described in this embodiment may be used when a current block to be decoded is encoded using an intra-frame prediction method. That is, when a current block to be decoded is encoded by a video encoding device, if the current block is encoded using an intra-frame prediction method, the video encoding device and / or video decoding device may use an implicit MTS to encode and / or decode the current block to be decoded. Meanwhile, when decoding a current block to be decoded, whether or not to use an implicit MTS may be indicated by an implicitMtsEnabled parameter. The video decoding device may check the value of the implicitMtsEnabled parameter to determine whether or not to perform decoding using an implicit MTS. For example, if an implicit MTS is used for decoding, the implicitMtsEnable parameter may have a value of 1, and if not, the implicitMtsEnable parameter may have a value of 0. Meanwhile, in this specification, the implicitMtsEnabled may be represented as "implicit_MTS_enabled" depending on the case.
[0124] Regarding the HLS (high level syntax) conditions for applying such implicit MTS, sps_mts_enabled_flag is a flag indicating whether MTS is applied, regardless of whether it is implicit or explicit, and must be set to "on" for implicit MTS to be applied. On the other hand, implicit MTS is used when a block to be decoded is encoded using an intra-frame prediction method when encoded by a video encoding device. Therefore, a video decoding device can determine whether to use implicit MTS by checking the value of sps_explicit_mts_intra_enabled_flag. However, sps_explicit_mts_intra_enabled_flag is set to "on" when a block to be decoded is encoded using an intra-frame prediction method when encoded by a video encoding device and explicit MTS is applied. Therefore, when a block to be decoded is encoded using implicit MTS by a video encoding device, sps_explicit_mts_intra_enabled_flag is set to "off." On the other hand, as described above, the implicit MTS is used when the block to be decoded is encoded by the video encoding device using an intra-prediction method. Therefore, it is not important what value the sps_explicit_mts_inter_enabled_flag, which indicates the explicit MTS when the block to be decoded is encoded by the video encoding device using an intra-prediction method, has. On the other hand, the implicit MTS may be used when the block to be decoded is encoded by the video encoding device using an intra-prediction method, and therefore may be applied when CuPredMode has a value of MODE_INTRA.
[0125] In summary, the conditions for the current block to be decoded to be decoded by the video decoding device using implicit MTS can be listed as follows:
[0126] 1) sps_mts_enabled_flag is equal to 1 2) sps_explicit_mts_intra_enabled_flag is equal to 0 3) CuPredMode is equal to MODE_INTRA (intra-frame prediction method)
[0127] On the other hand, CuPredMode[0][xTbY][yTbY], which indicates the prediction mode of the current position in the luma block, may have the value MODE_INTRA.
[0128] Additional conditions under which implicit MTS can be used are:
[0129] 4)lfnst_idx is equal to 0 5) intra_mip_flag is equal to 0
[0130] Here, the lfnst_idx value indicates a secondary transform, and when lfnst_idx=0, it means that no secondary transform is used. The Intra_mip_flag value indicates whether or not a matrix-based intra prediction (mip), which is one of the intra prediction methods, is used. When intra_mip_flag=0, it means that no matrix-based prediction is used, and when intra_mip_flag=1, it means that matrix-based prediction is used.
[0131] That is, this embodiment describes a method for setting a primary transform type (or MTS) for a block to be decoded without using secondary transform while predicting using a general intra prediction method. If all the above five conditions are met, the implicit MTS function is activated (see FIG. 13).
[0132] 8 is a diagram illustrating a method for determining whether to apply an implicit MTS feature according to an embodiment of the present invention. Each step in FIG. 8 may be performed within a video decoder.
[0133] 8, the video decoder determines whether sps_mts_enable_flag has a value of 1, sps_explicit_mts_intra_enable_flag has a value of 0, and CuPredMode has a value of MODE_INTRA (S810). If all the conditions of S810 are met, the video decoder determines whether lfnst_idx has a value of 0 and intra_mip_flag has a value of 0 (S820). If both the conditions of S810 and S820 are met, the video decoder sets the implicit_MTS_enabled value to 1 (S830). On the other hand, if any of the conditions of S810 or S820 are not met, the video decoder sets the implicit_MTS_enabled value to 0 (S840).
[0134] When the implicit MTS function for the block to be decoded is activated (implicit_MTS_enabled=on), the MTS value (transform information actually used) is derived according to the width and height of the block (see FIG. 9). At this time, the transform must not be a sub-block transform (sbt), in which only a part of the block undergoes the transform process. That is, the cu_sbt_flag value of the block to be decoded is "0".
[0135] 9 is a diagram illustrating a method for deriving transformation information according to the width and height of the block of an implicit MTS according to an embodiment of the present invention. Each step in FIG. 9 may be performed within a video decoding device.
[0136] Referring to FIG. 9, the video decoding apparatus determines whether the implicit_MTS_enabled value is '1' (S910). At this time, although not shown, the video decoding apparatus may further check whether the cu_sbt_flag value is '0'. At this time, if the cu_sbt_flag has a value of '1', it indicates that the current block to be decoded has been transformed by a sub-block transform in which only a portion of the current block undergoes a transform process. On the other hand, if the cu_sbt_flag has a value of '0', it indicates that the current block to be decoded has not been transformed by a sub-block transform in which only a portion of the current block undergoes a transform process. Therefore, the operation according to FIG. 14 may be configured to operate only when the cu_sbt_flag has a value of '0'.
[0137] If the implicit_MTS_enabled value is 1, it is determined whether the value of nTbW is between 4 and 16 (S920), and if the implicit_MTS_enabled value is not 1, the operation ends. nTbW indicates the width of the transform block and is used to determine whether the DST-7 additional transform type is used in the horizontal direction.
[0138] If the determination result of step S920 shows that nTbW has a value between 4 and 16, trTypeHor is set to '1' (S930). If the value of nTbW is not between 4 and 16, trTypeHor is set to '0' (S940). Here, nTbW indicates the width of the transform block and is used to determine whether DST-7, an additional transform type, is used in the horizontal direction. If trTypeHor is set to '0', it can be determined that the transform block has been transformed in the horizontal direction using DCT-II, which is the default type transform. On the other hand, if trTypeHor is set to '1', it can be determined that the transform block has been transformed in the horizontal direction using DST-7, which is one of the additional transform types.
[0139] The video decoding apparatus also determines whether nTbH has a value between 4 and 16 (S950). If nTbH has a value between 4 and 16, it sets trTypeVer to '1' (S960). If nTbW does not have a value between 4 and 16, it sets trTypeVer to '0' (S970). nTbH indicates the height of the transform block and is used to determine whether DST-7, an additional transform type, is used in the vertical axis direction. If trTypeVer is set to '0', it can be determined that the transform block has been transformed in the vertical axis direction using DCT-II, which is the default type transform. On the other hand, if trTypeVer is set to '1', it can be determined that the transform block has been transformed in the vertical axis direction using DST-7, one of the additional transform types.
[0140] 10 is a diagram illustrating a method for performing an inverse transform based on transform-related parameters according to an embodiment of the present invention. Each step in FIG. 10 may be performed in a video decoding device, for example, in an inverse transform unit of the decoding device.
[0141] 10, the video decoding apparatus acquires sps_mts_enabled_flag, sps_explicit_mts_intra_enabled_flag, CuPredMode[0][xTbY][yTbY], lfnst_idx, IntraMipFlag[x0,Y0], NTbW, and nTbH (S1010). The meanings of sps_mts_enabled_flag, sps_explicit_mts_intra_enabled_flag, CuPredMode[0][xTbY][yTbY], lfnst_idx, and IntraMipFlag[x0,Y0] are described in detail in the related description of FIG. 8, and these parameters are used to determine whether implicit MTS can be applied to the block to be decoded. Furthermore, NTbW and nTbH indicate the width and height of the transform block, respectively, and are used to determine whether DST-7, an additional transform type, is used.
[0142] Next, the video decoding device sets implicit_MTS_enabled based on the values of sps_mts_enabled_flag, sps_explicit_mts_intra_enabled_flag, CuPredMode[0][xTbY][yTbY], Lfnst_idx, and IntraMipFlag[x0,Y0] (S1020). At this time, implicit_MTS_enable may be set by performing the process of FIG. 13.
[0143] Next, the video decoding apparatus sets trTypeHor and trTypeVer based on the values of implicit_MTS_enabled, nTbW, and nTbH (S1030). At this time, the trTypeHor and trTypeVer may be set by performing the process of FIG.
[0144] Next, the video decoding device performs inverse transform based on trTypeHor and trTypeVer (S1040). The inverse transform applied by trTypeHor and trTypeVer may be configured according to Table 2. For example, when trTypeHor is '1' and trTypeVer is '0', DST-7 may be applied to the horizontal axis direction and DST-II may be applied to the vertical axis direction.
[0145] On the other hand, although not shown, from the perspective of the video encoding device, sps_mts_enabled_flag, sps_explicit_mts_intra_enabled_flag, CuPredMode[0][xTbY][yTbY], lfnst_idx, IntraMipFlag[x0, Y0], NTbW, and nTbH may be set to determine whether or not to use implicit MTS.
[0146] 3. Second embodiment (explicit MTS) In this embodiment, a conversion method applied to a block to be decoded when the MTS function is explicitly activated in HLS (high level syntax) will be described. Looking at the HLS (high level syntax) conditions for applying explicit MTS, sps_mts_enabled_flag is a flag indicating whether MTS is applied, regardless of whether it is implicit or explicit, and therefore must be set to "on" to apply implicit MTS. On the other hand, explicit MTS may be applied when the block to be decoded is coded using both an intra-frame prediction method and an inter-frame prediction method, and therefore when explicit MTS is applied, sps_explicit_mts_intra_enabled_flag and / or sps_explicit_mts_intra_enabled_flag are all set to "on". In summary, the conditions can be listed as follows:
[0147] 1) sps_mts_enabled_flag=on 2) sps_explicit_mts_intra_enabled_flag=on 3) sps_explicit_mts_inter_enabled_flag=on
[0148] Here, if the block to be decoded is coded using an intra-frame prediction method, the condition sps_explicit_mts_intra_enabled_flag="on" is checked, and if the block to be decoded is coded using an inter-frame prediction method, the condition sps_explicit_mts_inter_enabled_flag="on" is checked.
[0149] Additional conditions under which explicit MTS may be used are as follows:
[0150] 4) lfnst_idx is equal to 0 (implicit MTS reference) 5) transform_skip_flag is equal to 0 6)intra_subpartitions_mode_flag is equal to 0 7) cu_sbt_flag is equal to 0 (implicit MTS reference) 8)valid MTS area 9) The width and height of the target block are 32 or less
[0151] Here, the lfnst_idx value indicates the secondary transformation, and when lfnst_idx=0, it means that the secondary transformation is not used.
[0152] The value of transform_skip_flag indicates that the transform process is skipped, and when transform_skip_flag=0, it indicates that the transform process is performed normally without skipping it. The value of intra_subpartitions_mode_flag indicates that, as one of the intra prediction methods, the current block is divided into multiple sub-blocks and then prediction, transform, and quantization processes are performed. That is, when the flag value (intra_subpartitions_mode_flag) is '0', it means that general intra prediction is performed without dividing the current block into sub-blocks. Meanwhile, the use of MTS may be restricted depending on the supported size of extra transforms (DST-7 and DCT-8) (up to 32x32 is supported, as described above). That is, MTS cannot be used unless the width and height of the current block are 32 or less. That is, if either the width or height exceeds 32, DCT-II, which is the default transform (*) (which does not allow the use of MTS), is performed.
[0153] cu_sbt_flag indicates whether the current block is a sub-block transform (sbt) in which only a portion of the current block undergoes a transformation process. That is, if the cu_sbt_flag value is '0', it means that the current block is not a sub-block transform in which only a portion of the current block undergoes a transformation process.
[0154] The effective region (hereinafter referred to as effective MTS region) will be described in detail below.
[0155] FIG. 11 is a diagram showing a valid MTS area marked with a thick line within a 32×32 block to be decoded.
[0156] Referring to FIG. 11, the 16×16 region in the upper left corner excluding the DC coefficient is the effective MTS region. That is, the 16×16 region in the upper left corner excluding the 1×1 (DC) region is the effective MTS region. For example, if all non-zero coefficients in a target block are located within the effective MTS region, MTS can be applied. If one or more non-zero coefficient values are outside the effective MTS region, MTS cannot be applied, and the default transform (*), DCT-II, is performed. This is the same concept as the zero-out region described above. That is, if a 32×32 target block uses MTS (i.e., DST-7 or DCT-8), the upper left 16×16 region is the effective region and the remaining portion is the zero-out region. Similarly, if all non-zero coefficients in a 32×32 target block are located within the upper left 16×16 region, MTS (i.e., DST-7 or DCT-8) can be applied. However, as an exception, if there is one non-zero coefficient in a block and its position is DC(1x1), MTS cannot be applied and DCT-II, which is the default transform (*), is performed.
[0157] As a result, in this embodiment, to determine whether MTS is applicable, the valid MTS region must be checked, and the following two conditions must be checked to check the valid MTS region.
[0158] (a) If there is one non-zero coefficient in the block, is its position DC(1x1)? (b) Are all non-zero coefficients in the block located in the upper left 16x16 region?
[0159] To verify the condition (a), information on the last position may be utilized. Here, the last position refers to the nonzero coefficient located last in the scan order of the current block, i.e., the position of the last significant coefficient. As an example, information on the last position, i.e., the last sub-block containing the last nonzero coefficient, may be utilized. For example, if the position of the last sub-block is not (0,0), the condition (a) can be satisfied. In other words, if the position of the last sub-block in the scan order of the sub-blocks in the current block is not "0" (i.e., is greater than 0), the condition (a) can be satisfied. Alternatively, if the position of the last sub-block is "0," information on the last scan position indicating the relative position of the last position within the sub-block may be utilized. For example, if the last scan position in the scan order of the coefficients within the sub-block is not "0" (i.e., is greater than 0), the condition (a) can be satisfied (see FIG. 12). As described above, the MTS of the present invention is applied to luma blocks.
[0160] To verify condition (b), information about a sub-block containing one or more non-zero coefficients may be used. Here, information about a sub-block containing one or more non-zero coefficients can be verified by the sb_coded_flag value of the sub-block. When the flag value is "1" (sb_coded_flag=1), it means that one or more non-zero coefficients are located in the sub-block. When the flag value is "0," it means that all coefficients in the sub-block are zero. That is, if all sub-blocks in the current block whose sb_coded_flag value is "1" are located within the range from (0,0) to (3,3), condition (b) can be satisfied. On the other hand, if even one sub-block in the current block whose sb_coded_flag value is "1" is located outside the range from (0,0) to (3,3), condition (b) cannot be satisfied. In other words, if any of the sub-blocks in the current block whose sb_coded_flag value is "1" has an x-coordinate or y-coordinate greater than 3, then condition (b) cannot be satisfied (see FIG. 18). In another embodiment, if the first sub-block in the current block whose sb_coded_flag value is "1" and whose x-coordinate or y-coordinate is greater than 3 is found in the scanning order of the sub-blocks, then condition (b) may be set to false, and the process of checking subsequent sub-blocks in the scanning order whose sb_coded_flag values are "1" may be omitted (see FIG. 13). Also, as described above, the MTS of the present invention is applied to luma blocks.
[0161] 12 is a diagram illustrating a method for determining a valid MTS according to an embodiment of the present invention. The embodiment of FIG. 12 relates to a method for checking condition (a) of the two conditions for checking a valid MTS field described above. Each step of FIG. 12 may be performed within a video decoding device.
[0162] Referring to FIG. 12, the video decoding apparatus sets MtsDcOnlyFlag to '1' (S1210). The MtsDcOnlyFlag may indicate whether there is one non-zero coefficient in a block and its position is DC. For example, if there is one non-zero coefficient in a block and its position is DC, the MtsDcOnlyFlag has a value of '1'; otherwise, the MtsDcOnlyFlag has a value of '0'. In this case, the video decoding apparatus may apply MTS if the MtsDcOnlyFlag value is '0'. The reason for setting MtsDcOnlyFlag to '1' in step S1210 is that if the block satisfies the condition that there is one non-zero coefficient in the following block and it is not in the DC position, the MtsDcOnlyFlag is reset to '0'; otherwise, MTS is not applied.
[0163] Next, the video decoding apparatus determines whether the current block is a luma block (S1220). The purpose of determining whether the current block is a luma block is because, as described above, MTS is only applied to luma blocks.
[0164] Next, the video decoding apparatus determines whether the last sub-block is greater than 0 (S1230), and if the last sub-block is greater than 0, sets MtsDcOnlyFlag to "0" (S1240), and ends the process.
[0165] If the result of the determination in step S1230 is that the last sub-block is not greater than 0, it is determined whether the last scan position is greater than 0 (S1250).
[0166] If the result of the determination in step S1250 is that the last scan position is greater than 0, MtsDcOnlyFlag is set to "0" (S1240), and the process ends.
[0167] If it is determined in step S1250 that the last scan position is not greater than 0, the process ends.
[0168] According to this embodiment, if the last sub-block is greater than 0 or the last scan position is greater than 0, then MtsDcOnlyFlag is set to "0", otherwise MtsDcOnlyFlag is set to "1".
[0169] Thereafter, when determining whether to apply MTS, MtsDcOnlyFlag is checked, and if it has a value of '1', the default transform, DCT-II, may be applied without applying MTS.
[0170] 13 is a diagram illustrating a method for determining a valid MTS region according to another embodiment of the present invention. The embodiment of FIG. 13 specifically illustrates a method for checking condition (b) of the two conditions for checking a valid MTS region described above. Each step of FIG. 13 may be performed within a video decoding device.
[0171] Referring to FIG. 13, the video decoding apparatus sets MtsZerooutFlag to '1' (S1305). MtsZerooutFlag indicates whether a non-zero coefficient in a block is in a zero-out region. For example, if at least one non-zero coefficient in a block is in a zero-out region, MtsZerooutFlag may have a value of '0'. If none of the non-zero coefficients in the block are in a zero-out region, MtsZerooutFlag may have a value of '1'. In this embodiment, assuming that all non-zero coefficients in a block are not in a zero-out region, the initial value of MtsZerooutFlag may be set to '1'. If both the zero-out region condition and the non-zero coefficient condition are satisfied, MtsZerooutFlag may be set to '0'. In this case, if MtsZerooutFlag with a value of '0' exists, explicit MTS may not be applied.
[0172] Next, the video decoding apparatus sets the initial value of variable i to the value of the last sub-block, subtracts 1 from the value of variable i, and repeats the following steps S1325 to S1350 until the value of variable i becomes 0 (S1320). The purpose of repeating the routine of step S1320 is to check the sb_coded_flag values of all sub-blocks from the last sub-block to the first sub-block. As described above, a flag value of '1' indicates that one or more non-zero coefficients exist in the sub-block, and a flag value of '0' indicates that no non-zero coefficients exist in the sub-block. Therefore, referring to FIG. 11, if all sub-blocks in the current block whose sb_coded_flag values are '1' are located only within the range (0,0) to (3,3), i.e., within the range 0 to 8 based on variable i, it may be determined that condition (b) for applying explicit MTS is satisfied.
[0173] Next, the video decoding apparatus determines whether the conditions that the variable i is smaller than the last sub-block (i<last sub-block) and greater than 0 (i>0) are simultaneously satisfied (S1325). For example, when the routine of step S1320 is executed for the first time, the initial value of the variable i is set to the same value as the last sub-block, and therefore the condition of step S1325 is not satisfied.
[0174] If the result of the determination in step S1325 is that the variable i is smaller than the last sub-block (i<last sub-block) and greater than 0 (i>0) simultaneously, sb_coded_flag is parsed (S1830). If both conditions are not met simultaneously, sb_coded_flag is set to "1" (S1835).
[0175] In this case, the parsed sb_coded_flag indicates whether the sub-block contains one or more non-zero coefficients. If the sub-block contains one or more non-zero coefficients, sb_coded_flag has a value of "1." If the sub-block does not contain any non-zero coefficients, sb_coded_flag has a value of "0."
[0176] On the other hand, step S1835 is performed only when i indicates the last sub-block and the first sub-block. That is, since the last sub-block contains the last position coefficient, the sb_coded_flag value is parsed as "1", and since the first sub-block contains a DC coefficient, the sb_coded_flag value is parsed as "1".
[0177] Next, the video decoding apparatus determines whether the current block is a luma block (S1340). The purpose of determining whether the current block is a luma block is because, as described above, MTS is only applied to luma blocks.
[0178] If the result of the determination in step S1340 is that the block is a luma block, it is determined whether the condition "sb_coded_flag && (xSb>3||ySb>3)" is met (S1845), and if the condition in step S1845 is met, MtsZerooutFlag is set to "0" (S1350).
[0179] According to this embodiment, if even one non-zero coefficient is found in a sub-block other than sub-block (3,3) within the current block, i.e., in the zero-out region, MtsZerooutFlag may be set to "0" and it may be determined that explicit MTS cannot be applied.
[0180] Figure 14 is a diagram illustrating a method for determining a valid MTS according to another embodiment of the present invention. The embodiment of Figure 14 specifically illustrates a method for checking condition (b) of the two conditions for checking a valid MTS field described above. However, while the embodiment of Figure 13 checks the sb_coded_flag of all sub-blocks to check the valid MTS field, the embodiment of Figure 14 differs in that if the first invalid MTS is found, it is not necessary to check the subsequent sb_coded_flag. Each step of Figure 14 may be performed within a video decoding device.
[0181] Referring to FIG. 14, the video decoding apparatus sets MtsZerooutFlag to '1' (S1405). MtsZerooutFlag indicates whether a non-zero coefficient in a block is in a zero-out region. For example, if at least one non-zero coefficient in a block is in a zero-out region, MtsZerooutFlag may have a value of '0'. If none of the non-zero coefficients in the block are in a zero-out region, MtsZerooutFlag may have a value of '1'. In this embodiment, assuming that all non-zero coefficients in a block are not in a zero-out region, the initial value of MtsZerooutFlag may be set to '1'. If both the zero-out region condition and the non-zero coefficient condition are satisfied, MtsZerooutFlag may be set to '0'. In this case, if MtsZerooutFlag with a value of '0' exists, explicit MTS may not be applied.
[0182] Next, the video decoding apparatus sets the initial value of variable i to the value of the last sub-block, subtracts 1 from the value of variable i, and repeats the following steps S1425 to S1450 until the value of variable i becomes 0 (S1420). The purpose of repeating the routine of step S1420 is to check the sb_coded_flag values of all sub-blocks from the last sub-block to the first sub-block. As described above, an sb_coded_flag value of '1' indicates that one or more non-zero coefficients exist in the sub-block, and an sb_coded_flag value of '0' indicates that no non-zero coefficients exist in the sub-block. Therefore, referring to FIG. 16, if all sub-blocks in the current block whose sb_coded_flag values are '1' are located only within the range (0,0) to (3,3), i.e., only within 0 to 8 based on variable i, it may be determined that condition (b) for applying explicit MTS is satisfied.
[0183] Next, the video decoding apparatus determines whether the conditions that the variable i is smaller than the last sub-block (i<last sub-block) and greater than 0 (i>0) are simultaneously satisfied (S1425). For example, when the routine of step S1920 is executed for the first time, the initial value of the variable i is set to the same value as the last sub-block, and therefore the condition of step S1425 is not satisfied.
[0184] If the result of the judgment in step S1425 is that the conditions that the variable i is smaller than the last sub-block (i<last sub-block) and the variable i is greater than 0 (i>0) are met simultaneously, sb_coded_flag is parsed (S1430), and if both conditions are not met simultaneously, sb_coded_flag is set to "1" (S1435).
[0185] In this case, the parsed sb_coded_flag indicates whether the sub-block contains one or more non-zero coefficients. If the sub-block contains one or more non-zero coefficients, sb_coded_flag has a value of "1." If the sub-block does not contain any non-zero coefficients, sb_coded_flag has a value of "0."
[0186] On the other hand, step S1435 is performed only when i indicates the last sub-block and the first sub-block. That is, since the last sub-block contains the last position coefficient, the sb_coded_flag value is parsed as "1", and since the first sub-block contains a DC coefficient, the sb_coded_flag value is parsed as "1".
[0187] Next, the video decoding apparatus determines whether the condition "MtsZerooutFlag && luma block" is satisfied (S1440).
[0188] If the result of the judgment in step S1440 is that the condition "MtsZerooutFlag && luma block" is met, it is further judged whether the condition "sb_coded_flag && (xSb>3 || ySb>3)" is met (S1445), and if the condition "sb_coded_flag && (xSb>3 || ySb>3)" is met, MtsZerooutFlag is set to "0" (S1450).
[0189] If the result of the determination in step S1440 is that the condition "MtsZerooutFlag && luma block" is not satisfied, the process for that sub-block ends.
[0190] According to this embodiment, if the variable i, i.e., the MtsZerooutFlag value is set to "0" even once in the sub-block, in the next routine, variable i-1, a False value is derived in step S1940, and there is no need to check the sb_coded_flag value any further.
[0191] On the other hand, if the block to be decoded satisfies both of the conditions (a) and (b), the use of explicit MTS is determined, and the transform information actually used for the block is transmitted in the form of an index (mts_idx). On the other hand, if all the conditions are not satisfied, the default transform (*), DCT-II, is used (see FIG. 15). Table 5 shows the transform types of the horizontal and vertical axes according to the mts_idx value.
[0192] [Table 5]
[0193] In Table 5, trTypeHor means the horizontal axis transformation type, and trTypeVer means the vertical axis transformation type. The transformation type values in Table 5 correspond to the trType values in Table 2. For example, if the mts_idx value is "2", DCT-8(2) should be used for the horizontal axis transformation and DST-7(1) should be used for the vertical axis transformation.
[0194] In the present invention, all cases where the above-mentioned default transform (*) DCT-II is used / executed / applied may be replaced with the expression "inducing the mts_idx value to '0'". That is, when the mts_idx value is '0', DCT-II(0) is set for both horizontal and vertical axis transforms.
[0195] In the present invention, the binarization method of mts_idx uses the TR (truncated rice) method, and the parameter value for TR, cMax value, is "4", and cRiceParam value is "0". Table 6 shows the codeword of the MTS index.
[0196] [Table 6]
[0197] Referring to Table 6, it can be seen that when the mts_idx value is '0', the corresponding codeword is '0', when the mts_idx value is '1', the corresponding codeword is '10', when the mts_idx value is '2', the corresponding codeword is '110', when the mts_idx value is '3', the corresponding codeword is '1110', and when the mts_idx value is '4', the corresponding codeword is '1111'.
[0198] 15 is a diagram illustrating a method for determining whether to apply an explicit MTS feature according to an embodiment of the present invention. Each step in FIG. 15 may be performed within a video decoder.
[0199] Referring to FIG. 15, the video decoding apparatus determines whether a condition '(sps_explicit_mts_intra_enabled_flag && CuPredMode=MODE_INTRA)||(sps_explicit_mts_inter_enabled_flag && CuPredMode=MODE_INTER)' is satisfied (S1510).
[0200] sps_explicit_mts_intra_enabled_flag is a flag indicating whether explicit MTS is used during intra prediction, and sps_explicit_mts_intra_enabled_flag is a flag indicating whether explicit MTS is used during inter prediction. sps_explicit_mts_intra_enabled_flag has a value of "1" when explicit MTS is used during intra prediction, and has a value of "0" otherwise. sps_explicit_mts_intra_enabled_flag has a value of "1" when explicit MTS is used during inter prediction, and has a value of "0" otherwise.
[0201] CuPredMode indicates which prediction method the current block has been coded with. If the current block has been coded with an intra prediction method, CuPredMode has a value of MODE_INTRA, and if the current block has been coded with an inter prediction method, CuPredMode has a value of MODE_INTER.
[0202] Therefore, when the block to be decoded uses intra prediction and explicit MTS, "sps_explicit_mts_intra_enabled_flag && CuPredMode=MODE_INTRA" has a value of "1," and when the block to be decoded uses inter prediction and explicit MTS, "sps_explicit_mts_inter_enabled_flag && CuPredMode=MODE_INTER" has a value of "1." Therefore, in step S2010, it is possible to determine whether the block to be decoded uses explicit MTS by checking the values of sps_explicit_mts_intra_enabled_flag, sps_explicit_mts_inter_enabled_flag, and CuPredMode.
[0203] If the condition of step S1510 is satisfied, the video decoding device determines whether the condition "lfnst_idx=0 && transform_skip_flag=0 && cbW<32 && cbH<32 && intra_subpartitions_mode_flag=0 && cu_sbt_flag=0" is satisfied (S1520).
[0204] Here, the lfnst_idx value indicates the secondary transformation, and when lfnst_idx=0, it means that the secondary transformation is not used.
[0205] The transform_skip_flag value indicates whether transform skip is applied to the current block, i.e., whether the transform process is skipped for the current block. If transform_skip_flag=0, it indicates that transform skip is not applied to the current block.
[0206] cbW and cbH indicate the width and height of the current block, respectively. As mentioned above, the maximum size supported for the default transform, DCT-II, is 64x64, and the maximum size supported for the additional transforms, DCT-7 and DCT-8, is 32x32. For example, if the size of the block to be decoded is 64x64, one 64x64 DCT-II is applied to the transformation process. That is, if one or more of the width and height of the block to be decoded is greater than 32, the default transform (*) is applied immediately without applying MTS. Therefore, in order for MTS to be applied, the values of cbW and cbH must all be 32 or less.
[0207] The intra_subpartitions_mode_flag indicates whether an intra subpartition mode is applied. The intra subpartition mode is one of intra prediction methods, and indicates that a current block is divided into multiple sub-blocks and then subjected to prediction, transformation, and quantization processes. That is, when the flag value (intra_subpartitions_mode_flag) is '0', this means that general intra prediction is performed without dividing the current block into sub-blocks.
[0208] cu_sbt_flag indicates whether sub-block transform, in which only a portion of the current block undergoes a transform process, is applied. That is, if the cu_sbt_flag value is '0', it means that sub-block transform, in which only a portion of the current block undergoes a transform process, is not applied.
[0209] Therefore, whether explicit MTS can be applied to the block to be decoded may be determined depending on whether the condition in step S1520 is satisfied.
[0210] If the condition of step S1510 is not met, the video decoding apparatus sets the value of mts_idx to "0" (S1530) and ends the process.
[0211] If the condition of step S1520 is met, the video decoding device determines whether the condition "MtsZeroOutFlag=1 && MtsDcOnlyFlag=0" is met (S1540).
[0212] The MtsZerooutFlag indicates whether a non-zero coefficient in a block is in a zero-out region. If at least one non-zero coefficient in a block is in a zero-out region, MtsZerooutFlag may have a value of "0." If all non-zero coefficients in a block are not in a zero-out region, MtsZerooutFlag may have a value of "1." In this case, the value of MtsZerooutFlag may be determined by performing the process of FIG. 13 or FIG. 14.
[0213] MtsDcOnlyFlag indicates whether there is one non-zero coefficient in a block and its position is DC. If there is one non-zero coefficient in a block and its position is DC, MtsDcOnlyFlag has a value of "1", otherwise MtsDcOnlyFlag has a value of "0". In this case, the value of MtsDcOnlyFlag may be determined by performing the process of FIG. 17.
[0214] On the other hand, if the condition of step S1520 is not met, the video decoding apparatus sets the value of mts_idx to "0" (S1530) and ends the process.
[0215] If the condition of step S1540 is satisfied, the video decoding apparatus parses mts_idx (S1550) and ends the process. At this time, the horizontal and vertical axis transform types according to the value of mts_idx may be assigned according to Table 5. At this time, the transform type values in Table 5 refer to the trType values in Table 2. For example, if the mts_idx value is "2", DCT-8 may be applied for horizontal axis transform and DST-7 may be applied for vertical axis transform.
[0216] Also, if the condition in step S1540 is not met, the video decoding apparatus sets the value of mts_idx to "0" (S1530) and ends the process.
[0217] 16 is a diagram illustrating a method for performing an inverse transform based on transform-related parameters according to another embodiment of the present invention. Each step in FIG. 16 may be performed in a video decoding device, for example, in an inverse transform unit of the decoding device.
[0218] 16, the video decoding apparatus acquires values of sps_explicit_mts_intra_enable_flag, sps_explicit_mts_inter_enable_flag, CuPredMode, lfnst_idx, transform_skip_flag, cbW, cbH, intra_subpartitions_mode_flag, and cu_sbt_flag (S1610). At this time, what each of sps_explicit_mts_intra_enable_flag, sps_explicit_mts_inter_enable_flag, CuPredMode, lfnst_idx, transform_skip_flag, cbW, cbH, intra_subpartitions_mode_flag, and cu_sbt_flag indicates is explained in detail in the related description of FIG. 15, and the parameters are used to determine whether explicit MTS can be applied to the block to be decoded.
[0219] Next, the video decoding device obtains the values of MtsZerooutFlag and MtsDcOnlyFlag (S1620). At this time, the MtsZerooutFlag can be obtained by performing the process of Fig. 13 or 14, and the MtsDcOnlyFlag can be obtained by performing the process of Fig. 12.
[0220] Next, the video decoding device obtains an mts_idx value based on the parameters obtained in steps S1610 and S1620 (S1630). That is, the video decoding device obtains the mts_idx value based on sps_explicit_mts_intra_enable_flag, sps_explicit_mts_inter_enable_flag, CuPredMode, lfnst_idx, transform_skip_flag, cbW, cbH, intra_subpartitions_mode_flag, cu_sbt_flag, MtsZerooutFlag, and MtsDcOnlyFlag. At this time, mts_idx may be obtained by performing the process of FIG. 15.
[0221] Next, the video decoding apparatus performs inverse transform based on mts_idx (S1640). The inverse transform applied according to the mts_idx value may be configured according to Table 5 and Table 2. For example, when the mts_idx value is "2", DCT-8 may be applied in the horizontal axis direction and DST-7 may be applied in the vertical axis direction.
[0222] Meanwhile, although not shown, from the perspective of the video encoding device, the following flags may be set to determine whether or not to use explicit MTS: sps_explicit_mts_intra_enable_flag, sps_explicit_mts_inter_enable_flag, CuPredMode, lfnst_idx, transform_skip_flag, cbW, cbH, intra_subpartitions_mode_flag, cu_sbt_flag, MtsZerooutFlag, and MtsDcOnlyFlag. In the above-described embodiments, the method is described based on a flowchart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps different from those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowcharts are not exclusive, and other steps may be included, or one or more steps of the flowcharts may be deleted without affecting the scope of the present invention.
[0223] The embodiments described in this document may be implemented and performed on a processor, microprocessor, controller, or chip. For example, the functional units shown in the figures may be implemented and performed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., instruction information) or algorithms for implementation may be stored on a digital storage medium.
[0224] In addition, the decoding device and encoding device to which the present invention is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT video (Over-the-Top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a transportation terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process a video signal or a data signal. For example, OTT video (Over-the-Top video) devices include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.
[0225] Furthermore, a processing method according to the present invention may be produced in the form of a computer-executable program and stored in a computer-readable storage medium. Multimedia data having a data structure according to the present invention may also be stored in a computer-readable storage medium. The computer-readable storage medium includes any type of storage device or distributed storage device in which computer-readable data is stored. The computer-readable storage medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable storage medium may also include media implemented in the form of a carrier wave (e.g., transmission via the Internet). The bitstream generated by the encoding method may be stored in a computer-readable storage medium or transmitted via a wired or wireless communication network.
[0226] Furthermore, embodiments of the present invention may be implemented in a computer program product by program code, which may be executed by a computer in accordance with embodiments of the present invention. The program code may be stored on a computer-readable carrier.
Claims
1. A video decoding method performed by a video decoding device, comprising: obtaining, from the bitstream, a parameter relating to whether a Multiple Transform Set (MTS) is applicable to the block to be decoded; determining a transform type to be applied to the block to be decoded based on at least one of a parameter relating to whether a set of multiple transforms is applicable to the block to be decoded and a size of the block to be decoded; setting a valid region including non-zero coefficients of the block to be decoded based on at least one of a parameter relating to whether a multiple transformation set for the block to be decoded is applicable or not and a size of the block to be decoded; and reconstructing the block to be decoded based on a transform type applied to the block to be decoded and a valid region including non-zero coefficients of the block to be decoded; When the size of the block to be decoded is one of 64 width × 64 height, 64 width × 32 height, and 32 width × 64 height, a valid area including non-zero coefficients of the block to be decoded is set to a 32 width × 32 height area including an upper left sample in the block to be decoded, regardless of a value of a parameter related to whether a multiple transform set is applicable to the block to be decoded; When the size of the block to be decoded is one of 32 width x 32 height, 32 width x 16 height, and 16 width x 32 height, a valid area including non-zero coefficients of the block to be decoded is set to an area having a different size according to a value of the parameter related to whether a multiple transformation set for the block to be decoded is applicable, the transformation type is one of a first transformation type and a second transformation type, the first transformation type including a type instructing the same transformation kernel in a vertical direction and a horizontal direction, and the second transformation type including a type instructing different transformation kernels in a vertical direction and a horizontal direction; 10. The video decoding method, wherein when the size of the block to be decoded is 32 width by 32 height, a transform type applied to the block to be decoded is a first transform type.
2. A video encoding method performed by a video encoding device, comprising: determining a type of transform to be applied to the block to be coded based on whether a Multiple Transform Set (MTS) is applicable to the block to be coded; generating transform coefficients by performing a transform corresponding to a transform type on the current block to be coded based on a valid area including non-zero coefficients for the current block to be coded, the valid area being determined in consideration of the transform type to be applied to the current block to be coded; generating a bitstream including at least one of a parameter relating to whether a multiple transform set is applicable to the block to be coded, a parameter indicating a transform type to be applied to the block to be coded, and the transform coefficients; when the size of the block to be coded is any one of 64 width × 64 height, 64 width × 32 height, and 32 width × 64 height, a valid region including non-zero coefficients of the block to be coded is a 32 width × 32 height region including an upper left sample within the block to be coded, When the size of the block to be coded is one of 32 width x 32 height, 32 width x 16 height, and 16 width x 32 height, a valid region including non-zero coefficients of the block to be coded is determined by a value of a parameter related to whether a multiple transformation set is applicable, the transformation type is one of a first transformation type and a second transformation type, the first transformation type including a type instructing the same transformation kernel in a vertical direction and a horizontal direction, and the second transformation type including a type instructing different transformation kernels in a vertical direction and a horizontal direction; 10. A video coding method, comprising: when the size of the block to be coded is 32 width by 32 height, a first transform type is applied to the block to be coded.
3. 3. A method for transmitting a bitstream encoded by the video encoding method of claim 2, the method comprising the step of transmitting the bitstream.
Citation Information
Patent Citations
Method for encoding / decoding video signals and apparatus therefor
WO2020060364A1
Transform-based image coding method, and device therefor
WO2021066616A1
Methods and apparatus on transform and coefficient signaling
WO2021102424A1
Coding concepts for a transformed representation of a sample block
WO2021105255A1