Sign In to Follow Application
View All Documents & Correspondence

Method And Apparatus For Processing Video Signal

Abstract: An image decoding method according to the present invention can comprise the steps of: acquiring residual 5 coefficients of a current block; dequantizing the residual coefficients; performing secondary inverse transformation on the dequantized residual coefficients; and performing primary inverse transformation on the performance result of the secondary inverse 10 transformation. The secondary inverse transformation can be performed for a partial region of the current block. To be Published With Figure 9

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
16 September 2025
Publication Number
42/2025
Publication Type
INA
Invention Field
ELECTRONICS
Status
Email
Parent Application

Applicants

KT CORPORATION
90, Buljeong-ro, Bundang-gu Seongnam-si Gyeonggi-do 13606, Republic of Korea

Inventors

1. LEE, Bae Keun
90, Buljeong-ro, Bundang-gu Seongnam-si Gyeonggi-do 13606, Republic of Korea

Claims

1. A method of decoding an image, the method comprising: 5 obtaining (S1010) residual coefficients of a current block; performing (S1020) inverse-quantization for the residual coefficients; performing (S1040) a secondary inverse-transform 10 for the current block; performing (S1050) a primary inverse-transform on a result of performing the secondary inverse-transform; and obtaining reconstruction samples of the current 15 block based on residual samples resulting from the primary inverse-transform, wherein the secondary inverse-transform is performed for inverse-quantized residual coefficients, resultant from the inverse-quantization, included in a 20 partial region of the current block, wherein the secondary inverse-transform is performed by using an inverse-transform matrix and an input matrix, the input matrix being generated by arranging the inverse quantized residual coefficients of 25 a two-dimensional form in the partial region in a one- dimensional form, and wherein a number of rows or columns of the inverse-transform matrix is greater than a number of the inverse-quantized residual coefficients included in the 30 partial region.

2. The method as claimed in claim 1, wherein a 71 size of the partial region is adaptively determined based on a size of the current block.

3. The method as claimed in claim 1, wherein a 5 transform type for the primary inverse transform is determined based on index information signaled through a bitstream.

4. The method as claimed in claim 3, wherein the 10 index information specifies any one of a plurality of transform sets, wherein a first transform type candidate included in the transform set is determined as a horizontal directional transform type of the current block, and 15 wherein a second transform type candidate included in the transform set is determined as a vertical directional transform type of the current block.

5. The method as claimed in claim 1, wherein a 20 transform type for the primary inverse transform is determined by comparing a width of the current block or a height of the current block with a threshold value.

6. A method of encoding an image, the method 25 comprising: obtaining residual samples of a current block by subtracting prediction samples from original samples; performing (S920) a primary transform on the residual samples of the current block; 30 performing (S930) a secondary transform for the current block; 72 quantizing (S950) transform coefficients generated as a result of the secondary transform; and encoding (S960) quantized transform coefficients, wherein the secondary transform is performed for 5 intermediate transform coefficients, resultant from the primary transform, included in a partial region of the current block, wherein the secondary transform is performed by using a transform matrix and an input matrix, the input 10 matrix being generated by arranging the intermediate transform coefficients of a two-dimensional form in a one-dimensional form, and wherein a number of rows or columns of the transform matrix is less than a number of the 15 intermediate transform coefficients included in the partial region.

7. A device for transmitting compressed video data, comprising: 20 a processor configured to obtain the compressed video data; and a transmitter configured to transmit the compressed video data, wherein obtaining the compressed video data 25 comprises: obtaining residual samples of a current block by subtracting prediction samples from original samples; performing a primary transform on the residual samples of the current block; 30 performing a secondary transform for the current block; 73 quantizing transform coefficients generated as a result of the secondary transform; and encoding quantized transform coefficients, wherein the secondary transform is performed for 5 intermediate transform coefficients, resultant from the primary transform, included in a partial region of the current block, wherein the secondary transform is performed by using a transform matrix and an input matrix, the input 10 matrix being generated by arranging the intermediate transform coefficients of a two-dimensional form in a one-dimensional form, and wherein a number of rows or columns of the transform matrix is less than a number of the 15 intermediate transform coefficients included in the partial region. 74 Date 16 September 2025 PULKIT DOGER IN/PA-4369 Agent for the Applicant To, The Controller of Patents The Patent Office at New Delhi ABSTRACT METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNAL An image decoding method according to the present invention can comprise the steps of: acquiring residual 5 coefficients of a current block; dequantizing the residual coefficients; performing secondary inverse transformation on the dequantized residual coefficients; and performing primary inverse transformation on the performance result of the secondary inverse 10 transformation. The secondary inverse transformation can be performed for a partial region of the current block. To be Published With Figure 9 75 , Claims:I/We Claim:

1. A method of decoding an image, the method comprising: 5 obtaining (S1010) residual coefficients of a current block; performing (S1020) inverse-quantization for the residual coefficients; performing (S1040) a secondary inverse-transform 10 for the current block; performing (S1050) a primary inverse-transform on a result of performing the secondary inverse-transform; and obtaining reconstruction samples of the current 15 block based on residual samples resulting from the primary inverse-transform, wherein the secondary inverse-transform is performed for inverse-quantized residual coefficients, resultant from the inverse-quantization, included in a 20 partial region of the current block, wherein the secondary inverse-transform is performed by using an inverse-transform matrix and an input matrix, the input matrix being generated by arranging the inverse quantized residual coefficients of 25 a two-dimensional form in the partial region in a one- dimensional form, and wherein a number of rows or columns of the inverse-transform matrix is greater than a number of the inverse-quantized residual coefficients included in the 30 partial region.

2. The method as claimed in claim 1, wherein a size of the partial region is adaptively determined based on a size of the current block.

3. The method as claimed in claim 1, wherein a 5 transform type for the primary inverse transform is determined based on index information signaled through a bitstream.

4. The method as claimed in claim 3, wherein the 10 index information specifies any one of a plurality of transform sets, wherein a first transform type candidate included in the transform set is determined as a horizontal directional transform type of the current block, and 15 wherein a second transform type candidate included in the transform set is determined as a vertical directional transform type of the current block.

5. The method as claimed in claim 1, wherein a 20 transform type for the primary inverse transform is determined by comparing a width of the current block or a height of the current block with a threshold value.

6. A method of encoding an image, the method 25 comprising: obtaining residual samples of a current block by subtracting prediction samples from original samples; performing (S920) a primary transform on the residual samples of the current block; 30 performing (S930) a secondary transform for the current block; quantizing (S950) transform coefficients generated as a result of the secondary transform; and encoding (S960) quantized transform coefficients, wherein the secondary transform is performed for 5 intermediate transform coefficients, resultant from the primary transform, included in a partial region of the current block, wherein the secondary transform is performed by using a transform matrix and an input matrix, the input 10 matrix being generated by arranging the intermediate transform coefficients of a two-dimensional form in a one-dimensional form, and wherein a number of rows or columns of the transform matrix is less than a number of the 15 intermediate transform coefficients included in the partial region.

7. A device for transmitting compressed video data, comprising: 20 a processor configured to obtain the compressed video data; and a transmitter configured to transmit the compressed video data, wherein obtaining the compressed video data 25 comprises: obtaining residual samples of a current block by subtracting prediction samples from original samples; performing a primary transform on the residual samples of the current block; 30 performing a secondary transform for the current block; quantizing transform coefficients generated as a result of the secondary transform; and encoding quantized transform coefficients, wherein the secondary transform is performed for 5 intermediate transform coefficients, resultant from the primary transform, included in a partial region of the current block, wherein the secondary transform is performed by using a transform matrix and an input matrix, the input 10 matrix being generated by arranging the intermediate transform coefficients of a two-dimensional form in a one-dimensional form, and wherein a number of rows or columns of the transform matrix is less than a number of the 15 intermediate transform coefficients included in the partial region.

Specification

Description:5 Technical Field
[0001] The present invention relates to a method
and an apparatus for processing video signal.
Background Art
10 [0002] Recently, demands for high-resolution and
high-quality images such as high definition (HD) images
and ultra-high definition (UHD) images have increased
in various application fields. However, higher
resolution and quality image data has increasing
15 amounts of data in comparison with conventional image
data. Therefore, when transmitting image data by using
a medium such as conventional wired and wireless
broadband networks, or when storing image data by using
a conventional storage medium, costs of transmitting
20 and storing increase. In order to solve these problems
occurring with an increase in resolution and quality of
image data, high-efficiency image encoding/decoding
techniques may be utilized.
[0003] Image compression technology includes
25 various techniques, including: an inter-prediction
technique of predicting a pixel value included in a
current picture from a previous or subsequent picture
of the current picture; an intra-prediction technique
of predicting a pixel value included in a current
30 picture by using pixel information in the current
picture; an entropy encoding technique of assigning a
short code to a value with a high appearance frequency
and assigning a long code to a value with a low
2
This is a Divisional Application of Indian Application 202318017488 Dated 15
March 2023
appearance frequency; etc. Image data may be
effectively compressed by using such image compression
technology, and may be transmitted or stored.
[0004] In the meantime, with demands for high-
5 resolution images, demands for stereographic image
content, which is a new image service, have also
increased. A video compression technique for
effectively providing stereographic image content with
high resolution and ultra-high resolution is being
10 discussed.
Disclosure
Technical Problem
[0005] An object of the present invention is to
15 provide a method and an apparatus for encoding/decoding
residual data based on a plurality of transformations.
[0006] An object of the present invention is to
provide a method and an apparatus for performing the
secondary transformation on a partial region of a block
20 on which the primary transformation has been performed.
[0007] The technical objects to be achieved by the
present invention are not limited to the above-mentioned
technical problems. And, other technical problems that
are not mentioned will be apparently understood to those
25 skilled in the art from the following description.
Technical Solution
[0008] A video signal decoding method and apparatus
according to the present invention may acquire residual
30 coefficients of a current block, inverse quantize the
residual coefficients, perform a secondary inverse
transformation on the inverse quantized residual
coefficients, and perform a primary inverse
transformation on a result of performing the secondary
35 inverse transformation. In this case, the secondary
inverse transformation is performed on a partial region
3
of the current block.
[0009] A video signal encoding method and apparatus
according to the present invention may perform a primary
transformation on residual samples, perform a secondary
5 transformation on primary transform coefficients
generated as a result of the primary transformation,
quantize secondary transform coefficients generated as
a result of the secondary transformation, and encode the
quantized transform coefficients. In this case, the
10 secondary transformation is performed on a partial
region of a current block.
[0010] In the method and apparatus for
encoding/decoding a video signal according to the
present invention, the secondary transformation/inverse
15 transformation is performed using a transform matrix and
a one-dimensional matrix generated by arranging the
inverse quantized residual coefficients included in the
partial region in one dimension.
[0011] In the method and apparatus for
20 encoding/decoding a video signal according to the
present invention, a number of rows or columns of the
transform matrix is smaller than a number of samples
included in the partial region.
[0012] In the method and apparatus for
25 encoding/decoding a video signal according to the
present invention, a size or shape of the partial region
is determined based on a size or shape of the current
block.
[0013] In the method and apparatus for
30 encoding/decoding a video signal according to the
present invention, a transform/inverse transform type for
the primary inverse transformation is determined based
on index information signaled through a bitstream.
[0014] In the method and apparatus for
35 encoding/decoding a video signal according to the
present invention, the index information specifies any
4
one of a plurality of transform sets, a first transform
type candidate included in the transform set is
determined as a horizontal direction transform type of
the current block, and a second transform type candidate
5 included in the transform set is determined as a vertical
direction transform type of the current block.
[0015] In the method and apparatus for
encoding/decoding a video signal according to the
present invention, a transform type for the primary
10 transformation/inverse transformation is determined
based on a result of comparing a width of the current
block and a height of the current block.
[0016] The features briefly summarized above for the
present invention are only illustrative aspects of the
15 detailed description of the invention that follows, but
do not limit the scope of the invention.
Advantageous Effects
[0017] According to the present invention,
20 encoding/decoding efficiency of residual data can be
improved by performing a plurality of transformations on
the residual data.
[0018] According to the present invention,
encoding/decoding efficiency can be improved by
25 performing the secondary transformation on a partial
region of a block on which the primary transformation
has been performed.
[0019] The effects obtainable by the present
invention are not limited to the above-mentioned
30 effects, and other effects not mentioned can be clearly
understood by those skilled in the art from the
description below.
Description of Drawings
35 [0020] FIG. 1 is a block diagram illustrating a
5
device for encoding a video according to an embodiment
of the present invention.
[0021] FIG. 2 is a block diagram illustrating a
device for decoding a video according to an embodiment
5 of the present invention.
[0022] FIG. 3 is a diagram illustrating partition
mode candidates that can be applied to a coding block
when the coding block is encoded by inter prediction.
[0023] FIG. 4 is a diagram illustrating an example
10 of hierarchically partitioning a coding block based on
a tree structure according to an embodiment of the
present invention.
[0024] FIG. 5 is a diagram illustrating a partition
type in which binary tree-based partitioning is allowed
15 according to an embodiment of the present invention.
[0025] FIG. 6 is a diagram illustrating a triple
tree-based partitioning type.
[0026] FIG. 7 is a diagram illustrating an example
in which only a specific type of binary tree-based
20 partitioning is allowed.
[0027] FIG. 8 is a diagram illustrating an example
in which information related to the allowed number of
binary tree-based partitioning is encoded/decoded as an
embodiment to which the present invention is applied.
25 [0028] FIG. 9 is a flowchart illustrating an
encoding process of residual samples as an embodiment
to which the present invention is applied.
[0029] FIG. 11 is a diagram illustrating whether a
transform set in a vertical direction and a transform
30 set in a horizontal direction are the same for 33 intra
prediction modes.
[0030] FIG. 12 is a diagram illustrating a
performing region of a secondary transformation.
35 Mode for Invention
[0031] A variety of modifications may be made to
6
the present invention and there are various embodiments
of the present invention, examples of which will now be
provided with reference to drawings and described in
detail. However, the present invention is not limited
5 thereto, and the exemplary embodiments can be construed
as including all modifications, equivalents, or
substitutes in a technical concept and a technical scope
of the present invention. The similar reference
numerals refer to the similar element in described the
10 drawings.
[0032] Terms used in the specification, ‘first’,
‘second’, etc. can be used to describe various
components, but the components are not to be construed
as being limited to the terms. The terms are only used
15 to differentiate one component from other components.
For example, the ‘first’ component may be named the
‘second’ component without departing from the scope of
the present invention, and the ‘second’ component may
also be similarly named the ‘first’ component. The
20 term ‘and/or’ includes a combination of a plurality of
items or any one of a plurality of terms.
[0033] It will be understood that when an element
is simply referred to as being ‘connected to’ or
‘coupled to’ another element without being ‘directly
25 connected to’ or ‘directly coupled to’ another element
in the present description, it may be ‘directly
connected to’ or ‘directly coupled to’ another element
or be connected to or coupled to another element, having
the other element intervening therebetween. In
30 contrast, it should be understood that when an element
is referred to as being ‘directly coupled’ or ‘directly
connected’ to another element, there are no intervening
elements present.
[0034] The terms used in the present specification
35 are merely used to describe particular embodiments, and
are not intended to limit the present invention. An
7
expression used in the singular encompasses the
expression of the plural, unless it has a clearly
different meaning in the context. In the present
specification, it is to be understood that terms such
5 as ‘including’, ‘having’, etc. are intended to indicate
the existence of the features, numbers, steps, actions,
elements, parts, or combinations thereof disclosed in
the specification, and are not intended to preclude the
possibility that one or more other features, numbers,
10 steps, actions, elements, parts, or combinations
thereof may exist or may be added.
[0035] Hereinafter, preferred embodiments of the
present invention will be described in detail with
reference to the accompanying drawings. Hereinafter,
15 the same constituent elements in the drawings are
denoted by the same reference numerals, and a repeated
description of the same elements will be omitted.
[0036]
[0037] FIG. 1 is a block diagram illustrating a
20 device for encoding a video according to an embodiment
of the present invention.
[0038] Referring to FIG. 1, the device 100 for
encoding a video may include: a picture partitioning
module 110, prediction modules 120 and 125, a transform
25 module 130, a quantization module 135, a rearrangement
module 160, an entropy encoding module 165, an inverse
quantization module 140, an inverse transform module
145, a filter module 150, and a memory 155.
[0039] The constitutional parts shown in FIG. 1 are
30 independently shown so as to represent characteristic
functions different from each other in the device for
encoding a video. Thus, it does not mean that each
constitutional part is constituted in a constitutional
unit of separated hardware or software. In other words,
35 each constitutional part includes each of enumerated
constitutional parts for convenience. Thus, at least
8
two constitutional parts of each constitutional part
may be combined to form one constitutional part or one
constitutional part may be divided into a plurality of
constitutional parts to perform each function. The
5 embodiment where each constitutional part is combined
and the embodiment where one constitutional part is
divided are also included in the scope of the present
invention, if not departing from the essence of the
present invention.
10 [0040] Also, some of constituents may not be
indispensable constituents performing essential
functions of the present invention but be selective
constituents improving only performance thereof. The
present invention may be implemented by including only
15 the indispensable constitutional parts for implementing
the essence of the present invention except the
constituents used in improving performance. The
structure including only the indispensable constituents
except the selective constituents used in improving
20 only performance is also included in the scope of the
present invention.
[0041] The picture partitioning module 110 may
partition an input picture into one or more processing
units. Here, the processing unit may be a prediction
25 unit (PU), a transform unit (TU), or a coding unit (CU).
The picture partitioning module 110 may partition one
picture into combinations of multiple coding units,
prediction units, and transform units, and may encode
a picture by selecting one combination of coding units,
30 prediction units, and transform units with a
predetermined criterion (e.g., cost function).
[0042] For example, one picture may be partitioned
into multiple coding units. A recursive tree
structure, such as a quad tree structure, may be used
35 to partition a picture into coding units. A coding
unit which is partitioned into other coding units with
9
one picture or a largest coding unit as a root may be
partitioned with child nodes corresponding to the
number of partitioned coding units. A coding unit which
is no longer partitioned by a predetermined limitation
5 serves as a leaf node. That is, when it is assumed
that only square partitioning is possible for one coding
unit, one coding unit may be partitioned into four other
coding units at most.
[0043] Hereinafter, in the embodiment of the
10 present invention, the coding unit may mean a unit
performing encoding, or a unit performing decoding.
[0044] A prediction unit may be one of partitions
partitioned into a square or a rectangular shape having
the same size in a single coding unit, or a prediction
15 unit may be one of partitions partitioned so as to have
a different shape / size in a single coding unit.
[0045] When a prediction unit subjected to intra
prediction is generated based on a coding unit and the
coding unit is not the smallest coding unit, intra
20 prediction may be performed without partitioning the
coding unit into multiple prediction units NxN.
[0046] The prediction modules 120 and 125 may
include an inter prediction module 120 performing inter
prediction and an intra prediction module 125
25 performing intra prediction. Whether to perform inter
prediction or intra prediction for the prediction unit
may be determined, and detailed information (e.g., an
intra prediction mode, a motion vector, a reference
picture, etc.) according to each prediction method may
30 be determined. Here, the processing unit subjected to
prediction may be different from the processing unit
for which the prediction method and detailed content is
determined. For example, the prediction method, the
prediction mode, etc. may be determined by the
35 prediction unit, and prediction may be performed by the
transform unit. A residual value (residual block)
10
between the generated prediction block and an original
block may be input to the transform module 130. Also,
prediction mode information, motion vector information,
etc. used for prediction may be encoded with the
5 residual value by the entropy encoding module 165 and
may be transmitted to a device for decoding a video.
When a particular encoding mode is used, it is possible
to transmit to a device for decoding video by encoding
the original block as it is without generating the
10 prediction block through the prediction modules 120 and
125.
[0047] The inter prediction module 120 may predict
the prediction unit based on information of at least
one of a previous picture or a subsequent picture of
15 the current picture, or may predict the prediction unit
based on information of some encoded regions in the
current picture, in some cases. The inter prediction
module 120 may include a reference picture
interpolation module, a motion prediction module, and
20 a motion compensation module.
[0048] The reference picture interpolation module
may receive reference picture information from the
memory 155 and may generate pixel information of an
integer pixel or less then the integer pixel from the
25 reference picture. In the case of luma pixels, an 8-
tap DCT-based interpolation filter having different
filter coefficients may be used to generate pixel
information of an integer pixel or less than an integer
pixel in units of a 1/4 pixel. In the case of chroma
30 signals, a 4-tap DCT-based interpolation filter having
different filter coefficient may be used to generate
pixel information of an integer pixel or less than an
integer pixel in units of a 1/8 pixel.
[0049] The motion prediction module may perform
35 motion prediction based on the reference picture
interpolated by the reference picture interpolation
11
module. As methods for calculating a motion vector,
various methods, such as a full search-based block
matching algorithm (FBMA), a three step search (TSS),
a new three-step search algorithm (NTS), etc., may be
5 used. The motion vector may have a motion vector value
in units of a 1/2 pixel or a 1/4 pixel based on an
interpolated pixel. The motion prediction module may
predict a current prediction unit by changing the motion
prediction method. As motion prediction methods,
10 various methods, such as a skip method, a merge method,
an AMVP (Advanced Motion Vector Prediction) method, an
intra block copy method, etc., may be used.
[0050] The intra prediction module 125 may generate
a prediction unit based on reference pixel information
15 neighboring to a current block which is pixel
information in the current picture. When the
neighboring block of the current prediction unit is a
block subjected to inter prediction and thus a reference
pixel is a pixel subjected to inter prediction, the
20 reference pixel included in the block subjected to inter
prediction may be replaced with reference pixel
information of a neighboring block subjected to intra
prediction. That is, when a reference pixel is not
available, at least one reference pixel of available
25 reference pixels may be used instead of unavailable
reference pixel information.
[0051] Prediction modes in intra prediction may
include a directional prediction mode using reference
pixel information depending on a prediction direction
30 and a non-directional prediction mode not using
directional information in performing prediction. A
mode for predicting luma information may be different
from a mode for predicting chroma information, and in
order to predict the chroma information, intra
35 prediction mode information used to predict luma
information or predicted luma signal information may be
12
utilized.
[0052] In performing intra prediction, when the
size of the prediction unit is the same as the size of
the transform unit, intra prediction may be performed
5 on the prediction unit based on pixels positioned at
the left, the top left, and the top of the prediction
unit. However, in performing intra prediction, when
the size of the prediction unit is different from the
size of the transform unit, intra prediction may be
10 performed using a reference pixel based on the transform
unit. Also, intra prediction using NxN partitioning
may be used for only the smallest coding unit.
[0053] In the intra prediction method, a prediction
block may be generated after applying an AIS (Adaptive
15 Intra Smoothing) filter to a reference pixel depending
on the prediction modes. The type of the AIS filter
applied to the reference pixel may vary. In order to
perform the intra prediction method, an intra
prediction mode of the current prediction unit may be
20 predicted from the intra prediction mode of the
prediction unit neighboring to the current prediction
unit. In prediction of the prediction mode of the
current prediction unit by using mode information
predicted from the neighboring prediction unit, when
25 the intra prediction mode of the current prediction
unit is the same as the intra prediction mode of the
neighboring prediction unit, information indicating
that the prediction modes of the current prediction
unit and the neighboring prediction unit are equal to
30 each other may be transmitted using predetermined flag
information. When the prediction mode of the current
prediction unit is different from the prediction mode
of the neighboring prediction unit, entropy encoding
may be performed to encode prediction mode information
35 of the current block.
[0054] Also, a residual block including information
13
on a residual value which is a different between the
prediction unit subjected to prediction and the
original block of the prediction unit may be generated
based on prediction units generated by the prediction
5 modules 120 and 125. The generated residual block may
be input to the transform module 130.
[0055] The transform module 130 may transform the
residual block including the information on the
residual value between the original block and the
10 prediction unit generated by the prediction modules 120
and 125 by using a transform method, such as discrete
cosine transform (DCT), discrete sine transform (DST),
and KLT. Whether to apply DCT, DST, or KLT in order to
transform the residual block may be determined based on
15 intra prediction mode information of the prediction
unit used to generate the residual block.
[0056] The quantization module 135 may quantize
values transformed to a frequency domain by the
transform module 130. Quantization coefficients may
20 vary depending on the block or importance of a picture.
The values calculated by the quantization module 135
may be provided to the inverse quantization module 140
and the rearrangement module 160.
[0057] The rearrangement module 160 may rearrange
25 coefficients of quantized residual values.
[0058] The rearrangement module 160 may change a
coefficient in the form of a two-dimensional block into
a coefficient in the form of a one-dimensional vector
through a coefficient scanning method. For example,
30 the rearrangement module 160 may scan from a DC
coefficient to a coefficient in a high frequency domain
using a zigzag scanning method so as to change the
coefficients to be in the form of one-dimensional
vectors. Depending on the size of the transform unit
35 and the intra prediction mode, vertical direction
scanning where coefficients in the form of two-
14
dimensional blocks are scanned in the column direction
or horizontal direction scanning where coefficients in
the form of two-dimensional blocks are scanned in the
row direction may be used instead of zigzag scanning.
5 That is, which scanning method among zigzag scanning,
vertical direction scanning, and horizontal direction
scanning is used may be determined depending on the
size of the transform unit and the intra prediction
mode.
10 [0059] The entropy encoding module 165 may perform
entropy encoding based on the values calculated by the
rearrangement module 160. Entropy encoding may use
various encoding methods, for example, exponential
Golomb coding, context-adaptive variable length coding
15 (CAVLC), and context-adaptive binary arithmetic coding
(CABAC).
[0060] The entropy encoding module 165 may encode
a variety of information, such as residual value
coefficient information and block type information of
20 the coding unit, prediction mode information, partition
unit information, prediction unit information,
transform unit information, motion vector information,
reference frame information, block interpolation
information, filtering information, etc. from the
25 rearrangement module 160 and the prediction modules 120
and 125.
[0061] The entropy encoding module 165 may entropy
encode the coefficients of the coding unit input from
the rearrangement module 160.
30 [0062] The inverse quantization module 140 may
inversely quantize the values quantized by the
quantization module 135 and the inverse transform
module 145 may inversely transform the values
transformed by the transform module 130. The residual
35 value generated by the inverse quantization module 140
and the inverse transform module 145 may be combined
15
with the prediction unit predicted by a motion
estimation module, a motion compensation module, and
the intra prediction module of the prediction modules
120 and 125 such that a reconstructed block can be
5 generated.
[0063] The filter module 150 may include at least
one of a deblocking filter, an offset correction unit,
or an adaptive loop filter (ALF).
[0064] The deblocking filter may remove block
10 distortion that occurs due to boundaries between the
blocks in the reconstructed picture. In order to
determine whether to perform deblocking, the pixels
included in several rows or columns in the block may be
a basis of determining whether to apply the deblocking
15 filter to the current block. When the deblocking filter
is applied to the block, a strong filter or a weak
filter may be applied depending on required deblocking
filtering strength. Also, in applying the deblocking
filter, horizontal direction filtering and vertical
20 direction filtering may be processed in parallel.
[0065] The offset correction module may correct
offset with the original picture in units of a pixel in
the picture subjected to deblocking. In order to
perform the offset correction on a particular picture,
25 it is possible to use a method of applying offset in
consideration of edge information of each pixel or a
method of partitioning pixels of a picture into the
predetermined number of regions, determining a region
to be subjected to perform offset, and applying the
30 offset to the determined region.
[0066] Adaptive loop filtering (ALF) may be
performed based on the value obtained by comparing the
filtered reconstructed picture and the original
picture. The pixels included in the picture may be
35 divided into predetermined groups, a filter to be
applied to each of the groups may be determined, and
16
filtering may be individually performed for each group.
Information on whether to apply ALF and a luma signal
may be transmitted by coding units (CU). The shape and
filter coefficient of a filter for ALF may vary
5 depending on each block. Also, the filter for ALF in
the same shape (fixed shape) may be applied regardless
of characteristics of the application target block.
[0067] The memory 155 may store the reconstructed
block or picture calculated through the filter module
10 150. The stored reconstructed block or picture may be
provided to the prediction modules 120 and 125 in
performing inter prediction.
[0068]
[0069] FIG. 2 is a block diagram illustrating a
15 device for decoding a video according to an embodiment
of the present invention.
[0070] Referring to FIG. 2, the device 200 for
decoding a video may include: an entropy decoding module
210, a rearrangement module 215, an inverse
20 quantization module 220, an inverse transform module
225, prediction modules 230 and 235, a filter module
240, and a memory 245.
[0071] When a video bitstream is input from the
device for encoding a video, the input bitstream may be
25 decoded according to an inverse process of the device
for encoding a video.
[0072] The entropy decoding module 210 may perform
entropy decoding according to an inverse process of
entropy encoding by the entropy encoding module of the
30 device for encoding a video. For example,
corresponding to the methods performed by the device
for encoding a video, various methods, such as
exponential Golomb coding, context-adaptive variable
length coding (CAVLC), and context-adaptive binary
35 arithmetic coding (CABAC) may be applied.
[0073] The entropy decoding module 210 may decode
17
information on intra prediction and inter prediction
performed by the device for encoding a video.
[0074] The rearrangement module 215 may perform
rearrangement on the bitstream entropy decoded by the
5 entropy decoding module 210 based on the rearrangement
method used in the device for encoding a video. The
rearrangement module may reconstruct and rearrange the
coefficients in the form of one-dimensional vectors to
the coefficient in the form of two-dimensional blocks.
10 The rearrangement module 215 may receive information
related to coefficient scanning performed in the device
for encoding a video and may perform rearrangement via
a method of inversely scanning the coefficients based
on the scanning order performed in the device for
15 encoding a video.
[0075] The inverse quantization module 220 may
perform inverse quantization based on a quantization
parameter received from the device for encoding a video
and the rearranged coefficients of the block.
20 [0076] The inverse transform module 225 may perform
the inverse transform, i.e., inverse DCT, inverse DST,
and inverse KLT, which is the inverse process of
transform, i.e., DCT, DST, and KLT, performed by the
transform module on the quantization result by the
25 device for encoding a video. Inverse transform may be
performed based on a transfer unit determined by the
device for encoding a video. The inverse transform
module 225 of the device for decoding a video may
selectively perform transform schemes (e.g., DCT, DST,
30 and KLT) depending on multiple pieces of information,
such as the prediction method, the size of the current
block, the prediction direction, etc.
[0077] The prediction modules 230 and 235 may
generate a prediction block based on information on
35 prediction block generation received from the entropy
decoding module 210 and previously decoded block or
18
picture information received from the memory 245.
[0078] As described above, like the operation of
the device for encoding a video, in performing intra
prediction, when the size of the prediction unit is the
5 same as the size of the transform unit, intra prediction
may be performed on the prediction unit based on the
pixels positioned at the left, the top left, and the
top of the prediction unit. In performing intra
prediction, when the size of the prediction unit is
10 different from the size of the transform unit, intra
prediction may be performed using a reference pixel
based on the transform unit. Also, intra prediction
using NxN partitioning may be used for only the smallest
coding unit.
15 [0079] The prediction modules 230 and 235 may
include a prediction unit determination module, an
inter prediction module, and an intra prediction
module. The prediction unit determination module may
receive a variety of information, such as prediction
20 unit information, prediction mode information of an
intra prediction method, information on motion
prediction of an inter prediction method, etc. from the
entropy decoding module 210, may divide a current coding
unit into prediction units, and may determine whether
25 inter prediction or intra prediction is performed on
the prediction unit. By using information required in
inter prediction of the current prediction unit
received from the device for encoding a video, the inter
prediction module 230 may perform inter prediction on
30 the current prediction unit based on information of at
least one of a previous picture or a subsequent picture
of the current picture including the current prediction
unit. Alternatively, inter prediction may be performed
based on information of some pre-reconstructed regions
35 in the current picture including the current prediction
unit.
19
[0080] In order to perform inter prediction, it may
be determined for the coding unit which of a skip mode,
a merge mode, an AMVP mode, and an inter block copy
mode is used as the motion prediction method of the
5 prediction unit included in the coding unit.
[0081] The intra prediction module 235 may generate
a prediction block based on pixel information in the
current picture. When the prediction unit is a
prediction unit subjected to intra prediction, intra
10 prediction may be performed based on intra prediction
mode information of the prediction unit received from
the device for encoding a video. The intra prediction
module 235 may include an adaptive intra smoothing (AIS)
filter, a reference pixel interpolation module, and a
15 DC filter. The AIS filter performs filtering on the
reference pixel of the current block, and whether to
apply the filter may be determined depending on the
prediction mode of the current prediction unit. AIS
filtering may be performed on the reference pixel of
20 the current block by using the prediction mode of the
prediction unit and AIS filter information received
from the device for encoding a video. When the
prediction mode of the current block is a mode where
AIS filtering is not performed, the AIS filter may not
25 be applied.
[0082] When the prediction mode of the prediction
unit is a prediction mode in which intra prediction is
performed based on the pixel value obtained by
interpolating the reference pixel, the reference pixel
30 interpolation module may interpolate the reference
pixel to generate the reference pixel of an integer
pixel or less than an integer pixel. When the
prediction mode of the current prediction unit is a
prediction mode in which a prediction block is generated
35 without interpolation the reference pixel, the
reference pixel may not be interpolated. The DC filter
20
may generate a prediction block through filtering when
the prediction mode of the current block is a DC mode.
[0083] The reconstructed block or picture may be
provided to the filter module 240. The filter module
5 240 may include the deblocking filter, the offset
correction module, and the ALF.
[0084] Information on whether or not the deblocking
filter is applied to the corresponding block or picture
and information on which of a strong filter and a weak
10 filter is applied when the deblocking filter is applied
may be received from the device for encoding a video.
The deblocking filter of the device for decoding a video
may receive information on the deblocking filter from
the device for encoding a video, and may perform
15 deblocking filtering on the corresponding block.
[0085] The offset correction module may perform
offset correction on the reconstructed picture based on
the type of offset correction and offset value
information applied to a picture in performing
20 encoding.
[0086] The ALF may be applied to the coding unit
based on information on whether to apply the ALF, ALF
coefficient information, etc. received from the device
for encoding a video. The ALF information may be
25 provided as being included in a particular parameter
set.
[0087] The memory 245 may store the reconstructed
picture or block for use as a reference picture or
block, and may provide the reconstructed picture to an
30 output module.
[0088] As described above, in the embodiment of the
present invention, for convenience of explanation, the
coding unit is used as a term representing a unit for
encoding, but the coding unit may serve as a unit
35 performing decoding as well as encoding.
[0089] In addition, a current block may represent
21
a target block to be encoded/decoded. And, the current
block may represent a coding tree block (or a coding
tree unit), a coding block (or a coding unit), a
transform block (or a transform unit), a prediction
5 block (or a prediction unit), or the like depending on
an encoding/decoding step. In this specification,
'unit' represents a basic unit for performing a specific
encoding/decoding processes, and 'block' may represent
a sample array of a predetermined size. If there is no
10 distinguish between them, the terms 'block' and 'unit'
may be used interchangeably. For example, in the
embodiments described below, it can be understood that
a coding block and a coding unit have mutually
equivalent meanings.
15 [0090]
[0091] A picture may be encoded/decoded by divided
into base blocks having a square shape or a non-square
shape. At this time, the base block may be referred to
as a coding tree unit. The coding tree unit may be
20 defined as a coding unit of the largest size allowed
within a sequence or a slice. Information regarding
whether the coding tree unit has a square shape or has
a non-square shape or information regarding a size of
the coding tree unit may be signaled through a sequence
25 parameter set, a picture parameter set, or a slice
header. The coding tree unit may be divided into
smaller size partitions. At this time, if it is assumed
that a depth of a partition generated by dividing the
coding tree unit is 1, a depth of a partition generated
30 by dividing the partition having depth 1 may be defined
as 2. That is, a partition generated by dividing a
partition having a depth k in the coding tree unit may
be defined as having a depth k+1.
[0092] A partition of arbitrary size generated by
35 dividing a coding tree unit may be defined as a coding
unit. The coding unit may be recursively divided or
22
divided into base units for performing prediction,
quantization, transformation, or in-loop filtering, and
the like. For example, a partition of arbitrary size
generated by dividing the coding unit may be defined as
5 a coding unit, or may be defined as a transform unit or
a prediction unit, which is a base unit for performing
prediction, quantization, transformation or in-loop
filtering and the like.
[0093] Alternatively, a prediction block having the
10 same size as the coding block or smaller than the coding
block may be determined through predictive partitioning
of the coding block. For predictive partitioning of the
coding block, one of partition mode (Part_mode)
candidates may be specified. Information for
15 determining a partition index indicating one of the
partition mode candidates may be signaled via
bitstream. Alternatively, a partition index of the
coding block may be determined based on at least one of
a size, shape or encoding mode of the current block. A
20 size or shape of a prediction block may be determined
based on a partition mode specified by the partition
index. The partition mode candidates may include an
asymmetric partition type (for example, nLx2N, nRx2N,
2NxnU, 2NxnD). The number or type of asymmetric
25 partition mode candidates available to the coding block
may be determined based on a size, shape or encoding
mode of the current block.
[0094] FIG. 3 illustrates partition mode candidates
that can be applied to a coding block when the coding
30 block is encoded by inter prediction.
[0095] When the coding block is encoded using inter
prediction, any one of eight partition mode candidates
shown in FIG. 3 is applied to the coding block.
[0096] Conversely, when the coding block is encoded
35 using intra prediction, only partitioning of a square-
shape partition is applied to the coding block. That
23
is, when the coding block is encoded using intra
prediction, a partition mode PART_2Nx2N or PART_NxN is
applied to the coding block.
[0097] The partition mode PART_NxN is applied when
5 the coding block is in a minimum size. Herein, the
minimum size of the coding block may be predefined in
the encoder and the decoder. Alternatively,
information on the minimum size of the coding block may
be signaled through a bitstream. For example, the
10 minimum size of the coding block may be signaled through
a slice header. Accordingly, different minimum sizes
of the coding block may be determined for respective
slices.
[0098] As another example, partition mode
15 candidates that the coding block is able to use may be
set different according to at least one among the size
and the shape of the coding block. For example, the
numbers or types of partition mode candidates that the
coding block is able to use may be set different
20 according to at least one among the size and the shape
of the coding block.
[0099] Alternatively, on the basis of the size or
the shape of the coding block, types or the number of
asymmetric partition mode candidates that the coding
25 block is able to use may be determined. The number or
types of asymmetric partition mode candidates that the
coding block is able to use may be set different
according to at least one among the size and the shape
of the coding block. For example, when the coding block
30 is in a non-square shape of which the width is greater
than the height, at least one of partition modes
PART_2NxN, PART_2NxnU, or PART_2NxnD is not used as a
partition mode candidate of the coding block. When the
coding block is in a non-square shape of which the
35 height is greater than the width, at least one of
partitions modes PART_Nx2N, PART_nLx2N, or PART_nRx2N
24
is not used as a partition mode candidate of the coding
block.
[00100] In general, the size of the prediction block
ranges from a size of 64x64 to a size of 4x4. However,
5 in the case where the coding block is encoded using
inter prediction, in order to reduce the memory
bandwidth when performing motion compensation, a
prediction block is set not to be in a 4x4 size.
[00101] On the basis of the partition mode, the
10 coding block may be partitioned in a recursive manner.
That is, on the basis of a partition mode determined by
a partition index, the coding block may be partitioned,
and each partition generated as a result of partitioning
the coding block may be defined as a coding block.
15 [00102] Hereinafter, a method of partitioning the
coding unit will be described in more detail. In an
embodiment described later, a coding unit may refer to
a coding tree unit or a coding unit included in a coding
tree unit. In addition, the ‘partitions’ generated as
20 a result of partitioning the coding block may refer to
‘coding blocks’. The partitioning method described
below may be applied to partitioning the coding block
into a plurality of prediction blocks or a plurality of
transform blocks.
25 [00103] The coding unit may be partitioned by at
least one line. Herein, the angle of the line that
partitions the coding unit has a value within a range
from 0 degrees to 360 degrees. For example, the angle
of the horizontal line may be a 0 degree angle, the
30 angle of the vertical line may be a 90 degree angle,
the angle of the diagonal line in a right upward
direction may be a 45 degree angle, and the angle of
the diagonal line in a left upward direction may be a
135 degree angle.
35 [00104] When the coding unit is partitioned by
multiple lines, the multiple lines are at the same
25
angle. Alternatively, at least one of the multiple
lines may be at a different angle from another line.
Alternatively, the multiple lines that partition the
coding tree unit or the coding unit may have a
5 predefined difference in angle (for example, a 90 degree
angle).
[00105] Information on a line partitioning the
coding unit may be determined by a partition mode.
Alternatively, information on at least one among the
10 number of lines, a direction, an angle, and a position
of a line within a block may be encoded.
[00106] For convenience of description, in an
embodiment described later, it is assumed that a coding
unit is partitioned into multiple coding units by using
15 at least one among a vertical line and a horizontal
line.
[00107] The number of vertical lines or horizontal
lines that partition the coding unit may be at least
one. For example, the coding unit may be partitioned
20 into two partitions by using one vertical line or one
horizontal line. Alternatively, the coding unit may be
partitioned into three partitions by using two vertical
lines or two horizontal lines. Alternatively, by using
one vertical line and one horizontal line, the coding
25 unit may be partitioned into four partitions, wherein
each of the four partitions has the width and the height
that are 1/2 of those of the coding unit.
[00108] When the coding unit is partitioned into
multiple partitions by using at least one vertical line
30 or at least one horizontal line, the partitions are in
the uniform sizes. Alternatively, any one partition
may be in a different size from the other partitions,
or partitions may be in different sizes, respectively.
For example, when the coding unit is partitioned with
35 two horizontal lines or two vertical lines, the coding
unit is partitioned into three partitions. Herein, a
26
width ratio or a height ratio of the three partitions
may be n:2n:n, 2n:n:n, or n:n:2n.
[00109] In embodiments described later, partitioning
the coding unit into four partitions is referred to as
5 quad tree-based partitioning. In addition, partitioning
the coding unit into two partitions is referred to as
binary tree-based partitioning. In addition,
partitioning the coding unit into three partitions is
referred to as triple tree-based partitioning.
10 [00110] In the drawings described later, it is shown
that one vertical line and/or one horizontal line is
used to partition the coding unit. However, it is also
included in the scope of the present invention that by
using a larger number of vertical lines and/or
15 horizontal lines than the lines shown in the drawings,
the coding unit is partitioned into a larger or smaller
number of partitions than the partitions shown in the
drawings.
[00111] FIG. 4 is a diagram illustrating an example
20 of hierarchically partitioning a coding block based on
a tree structure according to an embodiment of the
present invention.
[00112] An input video signal is decoded in
predetermined block units. Such a default unit for
25 decoding the input video signal is a coding block. The
coding block may be a unit performing intra/inter
prediction, transformation, and quantization. In
addition, a prediction mode (e.g., intra prediction
mode or inter prediction mode) is determined in units
30 of a coding block, and the prediction blocks included
in the coding block may share the determined prediction
mode. The coding block may be a square or non-square
block having an arbitrary size in a range of 8x8 to
64x64, or may be a square or non-square block having a
35 size of 128x128, 256x256, or more.
[00113] Specifically, the coding block may be
27
hierarchically partitioned based on at least one of a
quad tree partitioning method, a binary tree
partitioning method, or a triple tree partitioning
method. The quad tree-based partitioning may mean that
5 a 2Nx2N coding block is partitioned into four NxN coding
blocks. The binary tree-based partitioning may mean
that one coding block is partitioned into two coding
blocks. The triple tree-based partitioning may mean
that one coding block is partitioned into three coding
10 blocks. Even if the binary tree-based partitioning or
the triple tree-based partitioning is performed, a
square-shaped coding block may exist in the lower depth.
[00114] The partitions generated through binary
tree-based partitioning may be in a symmetric shape or
15 an asymmetric shape. In addition, a coding block
resulting from binary tree-based partitioning may be a
square block or a non-square block (for example, a
rectangular block).
[00115] FIG. 5 is a diagram illustrating partition
20 types of a coding block based on binary-tree
partitioning. A partition shape of a coding block based
on binary-tree partitioning may include a symmetric
type, such as 2NxN (a horizontal non-square coding
unit), Nx2N (a vertical non-square coding unit), or the
25 like, or an asymmetric type, such as nLx2N, nRx2N,
2NxnU, 2NxnD, or the like. Any one among the symmetric
type or the asymmetric type is allowed as a partition
type of the coding block.
[00116] Triple tree-based partitioning type may
30 include at least one of a type in which a coding block
is partitioned by two vertical lines or a type in which
the coding block is partitioned by two horizontal lines.
Three non-square partitions may be generated by the
triple tree-based partitioning.
35 [00117] FIG. 6 is a diagram illustrating a triple
tree-based partitioning type.
28
[00118] The triple tree-based partitioning may
include a type of partitioning a coding block with two
horizontal lines or a type of partitioning a coding
block with two vertical lines. A width ratio or a height
5 ratio of partitions generated as a result of
partitioning the coding block may be n:2n:n, 2n:n:n, or
n:n:2n.
[00119] A position of a partition having the largest
width or height among three partitions may be predefined
10 in the encoder and decoder. Alternatively, information
indicating the partition having the largest width or
height among the three partitions may be signaled
through a bitstream.
[00120] Only partitioning in a square shape or a
15 non-square symmetric shape is allowed for the coding
unit. In this case, partitioning the coding unit into
square partitions may correspond to quad-tree CU
partitioning, and partitioning the coding unit into
symmetric non-square partitions may correspond to
20 binary-tree partitioning. Partitioning a coding tree
unit into square partitions and symmetric non-square
partitions may correspond to quad-tree and binary-tree
CU partitioning (QTBT).
[00121] Binary tree-based partitioning or triple
25 tree-based partitioning may be performed on a coding
block for which quad tree-based partitioning is no
longer performed. A coding block generated as a result
of binary tree-based partitioning or triple tree-based
partitioning may be partitioned into smaller coding
30 blocks. In this case, the coding block may be set so
that at least one of quad tree-based partitioning,
triple tree-based partitioning, or binary tree-based
partitioning is not applied to the coding block.
Alternatively, binary tree-based partitioning in a
35 predetermined direction or triple tree-based
partitioning in a predetermined direction may not be
29
allowed in the coding block. For example, quad tree-
based partitioning and triple tree-based partitioning
may not be allowed in a coding block generated as a
result of binary tree-based partitioning or triple
5 tree-based partitioning. Only binary tree-based
partitioning may be allowed in the coding block.
[00122] Alternatively, only a coding block having
the largest size among three coding blocks generated as
a result of triple tree-based partitioning may be
10 partitioned into coding blocks having a smaller size.
Alternatively, binary tree-based partitioning or triple
tree-based partitioning may be allowed only for the
coding block having the largest size among three coding
blocks generated as a result of the triple tree-based
15 partitioning.
[00123] In addition, a type of partitioning a child
depth partition may be determined dependently on a
partition type of a parent depth partition. For
example, when a parent partition and a child partition
20 are partitioned on the basis of a binary tree, only
binary tree-based partitioning of the same type as a
binary-tree partition type of a parent depth partition
is allowed in a child depth partition. For example,
when the binary-tree partition type of the parent depth
25 partition is a 2NxN type, the binary-tree partition
type of the child depth partition is also set to be a
2NxN type. Alternatively, when the binary-tree
partition type of the parent depth partition is an Nx2N
type, the partition type of the child depth partition
30 is also set to be an Nx2N type.
[00124] Alternatively, a partition with the largest
size among partitions generated as a result of triple
tree-based partitioning may be configured not to allow
binary tree-based partitioning in the same direction as
35 a partitioning direction of a parent depth partition or
triple tree-based partitioning in the same direction as
30
a partitioning direction of a parent depth partition.
[00125] Alternatively, a partition type of a child
depth partition may be determined considering a
partition type of a parent depth partition and a
5 partition type of a neighboring child depth partition.
Specifically, when a parent depth partition is
partitioned on the basis of a binary tree, a partition
type of a child depth partition is determined in such
a manner as not to generate the same result as a result
10 of partitioning the parent depth partition on the basis
of a quad tree. For example, when the partition type
of the parent depth partition is 2NxN and the partition
type of the neighboring child depth partition is Nx2N,
a partition type of a current child depth partition is
15 not set to Nx2N. This is because, when the partition
type of the current child depth partition is Nx2N, the
same result as a result of NxN-type quad-tree
partitioning the parent depth partition is caused.
When the partition type of the parent depth partition
20 is Nx2N and the partition type of the neighboring child
depth partition is 2NxN, a partition type of a current
child depth partition is not set to 2NxN. That is,
when a binary-tree partition type of a parent depth
partition is different from a binary-tree partition
25 type of a neighboring child depth partition, a binary-
tree partition type of a current child depth partition
is set the same as the binary-tree partition type of
the parent depth partition.
[00126] Alternatively, a binary-tree partition type
30 of a child depth partition may be set different from a
binary-tree partition type of a parent depth partition.
[00127] An allowable binary-tree partition type may
be determined on a per-sequence basis, a per-slice
basis, or a per-coding unit basis. For example, a
35 binary-tree partition type allowable for the coding
tree unit may be limited to a 2NxN or Nx2N type. The
31
allowable partition type may be predefined in the
encoder or the decoder. Alternatively, information on
an allowable partition type or an unallowable partition
type may be encoded and signaled through a bitstream.
5 [00128] FIG. 7 is a diagram illustrating an example
in which only a specific type of binary tree-based
partitioning is allowed.
[00129] (a) of FIG. 7 shows an example in which only
Nx2N type of binary tree-based partitioning is allowed,
10 and (b) of FIG. 7 shows an example in which only 2NxN
type of binary tree-based partitioning is allowed.
[00130] In order to represent various types of
partitioning, information on quad tree-based
partitioning, information on binary tree-based
15 partitioning, or information on triple tree-based
partitioning may be used. The information on quad tree-
based partitioning may include at least one of
information indicating whether quad tree-based
partitioning is performed or information on a
20 size/depth of a coding block in which quad tree-based
partitioning is allowed. The information on binary
tree-based partitioning may include at least one of
information indicating whether binary tree-based
partitioning is performed, information indicating
25 whether binary tree-based partitioning is performed in
a vertical direction or horizontal direction,
information on a size/depth of a coding block in which
binary tree-based partitioning is allowed, or
information on a size/depth of a coding block in which
30 binary tree-based partitioning is not allowed. The
information on triple tree-based partitioning may
include at least one of information indicating whether
triple tree-based partitioning is performed,
information indicating whether triple tree-based
35 partitioning is performed in a vertical direction or
horizontal direction, information on a size/depth of a
32
coding block in which triple tree-based partitioning is
allowed, or information on a size/depth of a coding
block in which triple tree-based partitioning is not
allowed. Information on a size of a coding block may
5 indicate a minimum value or a maximum value of at least
one of a width, a height, a product of a width and a
height, or a ratio of a width and height of the coding
block.
[00131] For example, when a width or height of a
10 coding block is less than a minimum size allowed for
binary tree-based partitioning, or when a partitioning
depth of a coding block is greater than a maximum depth
allowed for binary tree-based partitioning, binary
tree-based partitioning may not be allowed for the
15 coding block.
[00132] For example, when a width or height of a
coding block is less than a minimum size allowed for
triple tree-based partitioning, or when a partitioning
depth of a coding block is greater than a maximum depth
20 allowed for triple tree-based partitioning, triple
tree-based partitioning may not be allowed for the
coding block.
[00133] Information on an allowable condition for
binary tree-based or triple tree-based partitioning may
25 be signaled through a bitstream. The information may be
encoded in a unit of a sequence, picture, or fragment
image. The fragment image may mean at least one of a
slice, a tile group, a tile, a brick, a coding block,
a prediction block, or a transform block.
30 [00134] For example, through a bitstream, a syntax
‘max_mtt_depth_idx_minus1’ indicating a maximum depth
in which binary tree/triple tree partitioning is
allowed may be encoded/decoded through the bitstream.
In this case, max_mtt_depth_idx_minus1+1 may indicate
35 a maximum depth in which binary tree/triple tree
partitioning is allowed.
33
[00135] For example, at least one of the number of
times binary tree/triple tree partitioning is allowed,
a maximum depth that binary tree/triple tree
partitioning is allowed, or the number of depths allowed
5 for binary tree/triple tree partitioning is signaled at
a sequence or slice level. Accordingly, at least one of
the number of binary tree/triple tree partitioning
times, a maximum depth allowed for binary tree/triple
tree partitioning, or the number of depths allowed for
10 binary tree/triple tree partitioning of the first slice
and the second slice may be different. For example, in
the first slice, binary tree/triple tree partitioning
may be allowed in only one depth, whereas in the second
slice, binary tree/triple tree partitioning may be
15 allowed in two depths.
[00136] Referring to the example shown in FIG. 8, in
FIG. 8, the binary tree partitioning has been performed
for a coding unit having a depth of 2 and a coding unit
having a depth of 3. Accordingly, at least one of
20 information indicating the number of times the binary
tree partitioning in the coding tree unit has been
performed (i.e., 2 times), information indicating the
maximum depth of a partition which is generated by the
binary tree partitioning in the coding tree unit (i.e.,
25 depth 3), or the number of partition depths in which
the binary tree partitioning has been applied in the
coding tree unit (i.e., 2 (depth 2 and depth 3)) may be
encoded / decoded through a bitstream.
[00137] Alternatively, the number of times binary
30 tree/triple tree partitioning is allowed, a depth at
which binary tree/triple tree partitioning is allowed,
or the number of depths at which binary tree/triple
tree partitioning is allowed may be predefined in the
encoder and decoder. Alternatively, based on at least
35 one of an index of a sequence or slice or a size/shape
of a coding unit, the number of times binary tree/triple
34
tree partitioning is allowed, a depth at which binary
tree/triple tree partitioning is allowed, or the number
of depths at which binary tree/triple tree partitioning
is allowed may be determined. For example, in the first
5 slice, binary tree/triple tree partitioning may be
allowed for only one depth, while in the second slice,
binary tree/triple tree partitioning may be allowed for
two depths.
[00138] As another example, the number of times the
10 binary tree partitioning is permitted, the depth at
which the binary tree partitioning is allowed, or the
number of depths at which the binary tree partitioning
is allowed may be set differently according to a time
level identifier (TemporalID) of a slice or a picture.
15 Here, the temporal level identifier (TemporalID) is
used to identify each of a plurality of layers of video
having a scalability of at least one of view, spatial,
temporal or quality.
[00139] As shown in FIG. 4, the first coding block
20 300 with the partition depth (split depth) of k may be
partitioned into multiple second coding blocks based on
the quad tree. For example, the second coding blocks
310 to 340 may be square blocks having the half width
and the half height of the first coding block, and the
25 partition depth of the second coding block may be
increased to k+1.
[00140] The second coding block 310 with the
partition depth of k+1 may be partitioned into multiple
third coding blocks with the partition depth of k+2.
30 Partitioning of the second coding block 310 may be
performed by selectively using one of the quad tree and
the binary tree depending on a partitioning method.
Here, the partitioning method may be determined based
on at least one of the information indicating quad tree-
35 based partitioning or the information indicating binary
tree-based partitioning.
35
[00141] When the second coding block 310 is
partitioned based on the quad tree, the second coding
block 310 may be partitioned into four third coding
blocks 310a having the half width and the half height
5 of the second coding block, and the partition depth of
the third coding block 310a may be increased to k+2.
In contrast, when the second coding block 310 is
partitioned based on the binary tree, the second coding
block 310 may be partitioned into two third coding
10 blocks. Here, each of two third coding blocks may be
a non-square block having one of the half width and the
half height of the second coding block, and the
partition depth may be increased to k+2. The second
coding block may be determined as a non-square block of
15 a horizontal direction or a vertical direction
depending on a partitioning direction, and the
partitioning direction may be determined based on the
information on whether binary tree-based partitioning
is performed in a vertical direction or a horizontal
20 direction.
[00142] In the meantime, the second coding block 310
may be determined as a leaf coding block that is no
longer partitioned based on the quad tree or the binary
tree. In this case, the leaf coding block may be used
25 as a prediction block or a transform block.
[00143] Like partitioning of the second coding block
310, the third coding block 310a may be determined as
a leaf coding block, or may be further partitioned based
on the quad tree or the binary tree.
30 [00144] In the meantime, the third coding block 310b
partitioned based on the binary tree may be further
partitioned into coding blocks 310b-2 of a vertical
direction or coding blocks 310b-3 of a horizontal
direction based on the binary tree, and the partition
35 depth of the relevant coding blocks may be increased to
k+3. Alternatively, the third coding block 310b may be
36
determined as a leaf coding block 310b-1 that is no
longer partitioned based on the binary tree. In this
case, the coding block 310b-1 may be used as a
prediction block or a transform block. However, the
5 above partitioning process may be limitedly performed
based on at least one of the information on the
size/depth of the coding block that quad tree-based
partitioning is allowed, the information on the
size/depth of the coding block that binary tree-based
10 partitioning is allowed, or the information on the
size/depth of the coding block that binary tree-based
partitioning is not allowed.
[00145] The number of candidate sizes may be limited
to a predetermined number, or a size of a coding block
15 in a predetermined unit may have a fixed value. As an
example, the size of the coding block in a sequence or
in a picture may be forced to have one of 256x256,
128x128, or 32x32. Information indicating the size of
the coding block in the sequence or in the picture may
20 be signaled through a sequence header or a picture
header.
[00146] As a result of partitioning based on a quad
tree and a binary tree, a coding unit may be represented
as square or rectangular shape of an arbitrary size.
25 [00147] As shown in FIG. 4, the first coding block
300 with the partition depth (split depth) of k may be
partitioned into multiple second coding blocks based on
the quad tree. For example, the second coding blocks
310 to 340 may be square blocks having the half width
30 and the half height of the first coding block, and the
partition depth of the second coding block may be
increased to k+1.
[00148] The second coding block 310 with the
partition depth of k+1 may be partitioned into multiple
35 third coding blocks with the partition depth of k+2.
Partitioning of the second coding block 310 may be
37
performed by selectively using one of the quad tree and
the binary tree depending on a partitioning method.
Here, the partitioning method may be determined based
on at least one of the information indicating quad tree-
5 based partitioning or the information indicating binary
tree-based partitioning.
[00149] When the second coding block 310 is
partitioned based on the quad tree, the second coding
block 310 may be partitioned into four third coding
10 blocks 310a having the half width and the half height
of the second coding block, and the partition depth of
the third coding block 310a may be increased to k+2.
In contrast, when the second coding block 310 is
partitioned based on the binary tree, the second coding
15 block 310 may be partitioned into two third coding
blocks. Here, each of two third coding blocks may be
a non-square block having one of the half width and the
half height of the second coding block, and the
partition depth may be increased to k+2. The second
20 coding block may be determined as a non-square block of
a horizontal direction or a vertical direction
depending on a partitioning direction, and the
partitioning direction may be determined based on the
information on whether binary tree-based partitioning
25 is performed in a vertical direction or a horizontal
direction.
[00150] In the meantime, the second coding block 310
may be determined as a leaf coding block that is no
longer partitioned based on the quad tree or the binary
30 tree. In this case, the leaf coding block may be used
as a prediction block or a transform block.
[00151] Like partitioning of the second coding block
310, the third coding block 310a may be determined as
a leaf coding block, or may be further partitioned based
35 on the quad tree or the binary tree.
[00152] In the meantime, the third coding block 310b
38
partitioned based on the binary tree may be further
partitioned into coding blocks 310b-2 of a vertical
direction or coding blocks 310b-3 of a horizontal
direction based on the binary tree, and the partition
5 depth of the relevant coding blocks may be increased to
k+3. Alternatively, the third coding block 310b may be
determined as a leaf coding block 310b-1 that is no
longer partitioned based on the binary tree. In this
case, the coding block 310b-1 may be used as a
10 prediction block or a transform block. However, the
above partitioning process may be limitedly performed
based on at least one of the information on the
size/depth of the coding block that quad tree-based
partitioning is allowed, the information on the
15 size/depth of the coding block that binary tree-based
partitioning is allowed, or the information on the
size/depth of the coding block that binary tree-based
partitioning is not allowed.
[00153] The number of candidate sizes may be limited
20 to a predetermined number, or a size of a coding block
in a predetermined unit may have a fixed value. As an
example, the size of the coding block in a sequence or
in a picture may be forced to have one of 256x256,
128x128, or 32x32. Information indicating the size of
25 the coding block in the sequence or in the picture may
be signaled through a sequence header or a picture
header.
[00154] As a result of partitioning based on a quad
tree and a binary tree, a coding unit may be represented
30 as square or rectangular shape of an arbitrary size.
[00155] As a result of partitioning based on a quad
tree, a binary tree, or triple tree, a coding block
that is no longer partitioned may be used as a
prediction block or a transform block. That is, it may
35 be used as a coding block generated as a result of quad-
tree partitioning or binary-tree partitioning, a
39
prediction block or a transform block. For example, a
prediction image may be generated on a per-coding block
basis, and a residual signal that is a difference
between an original image and a prediction image may be
5 transformed on a per-coding block basis. In order to
generate a prediction image on a per-coding block basis,
motion information may be determined on the basis of a
coding block, or an intra prediction mode may be
determined on the basis of a coding block. Accordingly,
10 the coding block may be encoded using at least one among
a skip mode, intra prediction, or inter prediction.
[00156] Alternatively, a plurality of coding blocks
generated by partitioning a coding block may be
configured to share at least one of motion information,
15 merge candidates, reference samples, reference sample
lines, or intra prediction modes. As an example, when
a coding block is partitioned by triple tree-based
partitioning, partitions generated by partitioning the
coding block may share at least one of motion
20 information, merge candidates, reference samples,
reference sample lines, or intra prediction modes
according to a size or shape of the coding block.
Alternatively, only some of a plurality of coding blocks
may be set to share the information, and the other
25 coding blocks may be set not to share the information.
[00157] As another example, by partitioning the
coding block, a prediction block or a transform block
that is in a size smaller than that of the coding block
may be used.
30 [00158] Hereinafter, a method of performing a
transform on a coding block or a transform block
generated by partitioning a coding block will be
described in detail. In an embodiment to be described
later, a current block may represent a transform block
35 or a coding block as a basic unit in which
transformation and quantization are performed.
40
[00159]
[00160] FIG. 9 is a flowchart illustrating an
encoding process of residual samples as an embodiment
to which the present invention is applied.
5 [00161] A residual sample may be obtained by
subtracting a prediction sample from an original
sample.
[00162] When a residual sample is obtained, it may
be determined whether to skip a transformation for the
10 obtained residual sample (S910). The encoder may encode
information indicating whether a transformation for a
current block is skipped. As an example,
‘transform_skip_flag’ indicates whether the
transformation for the current block is skipped. A value
15 of transform_skip_flag of 1 indicates that the
transformation for the current block is skipped, and a
value of transform_skip_flag of 0 indicates that the
transformation for the current block is not skipped.
[00163] The encoder may encode information for
20 determining a size of a block allowed to skip a
transformation. For
example,'log2_transform_skip_max_size_minus2'
represents a maximum size of a block allowed to skip a
transformation. The encoder may encode the
25 transform_skip_flag only when a current block is smaller
than or equal to a maximum size allowed to skip a
transformation.
[00164] Alternatively, it may be determined whether
to skip a transformation for each of a horizontal
30 direction and a vertical direction. The encoder may
encode at least one of information on whether to skip a
transformation for a horizontal direction or information
indicating whether to skip a transformation for a
vertical direction. For example, at least one of
35 'hor_transform_skip_flag' indicating whether to skip a
transformation for a horizontal direction or
41
'ver_transform_skip_flag' indicating whether to skip a
transformation for a vertical direction may be encoded.
[00165] When it is determined that transform skip is
not applied to the current block, a primary
5 transformation may be performed on the current block
(S920). The primary transformation may be performed
based on a transformation core such as DCT or DST. The
transformation core may be determined based on a
transform type of a current block. The encoder may encode
10 information for determining the transform type of the
current block. Alternatively, the transform type of the
current block may be implicitly derived according to a
predetermined rule in the encoder and the decoder. For
example, based on at least one of a size of a current
15 block, a shape of the current block, an encoding mode of
the current block, or an intra prediction mode of the
current block, the transform type of the current block
may be determined.
[00166] A secondary transformation may be performed
20 on primary transformed transform coefficients (S930).
Only when a primary transformation is performed on a
current block, the secondary transformation may be
selectively performed. Whether to perform the secondary
transformation may be determined based on at least one
25 of a size, shape, transform type, encoding mode, or intra
prediction mode of the current block. Alternatively, the
encoder may encode information indicating whether to
perform the secondary transformation.
[00167] A secondary transformation may be performed
30 on a partial region of a current block. A location and/or
size of a region where the secondary transformation is
performed may be predefined in the encoder and the
decoder. Alternatively, information indicating a
performing region of the secondary transformation may be
35 encoded in a bitstream. Alternatively, based on at least
one of a size, shape, encoding mode, or intra prediction
42
mode of the current block, the performing region of the
secondary transformation may be determined.
[00168] When it is determined that a transformation
for a current block is skipped, a residual sample of the
5 current block may be scaled (S940). The scaling may be
performed using a scaling parameter. The scaling
parameter may be determined based on a width, height, or
size of the current block.
[00169] Transform coefficients generated by
10 transforming a residual coefficient or a scaled residual
coefficient generated by scaling the residual
coefficient may be quantized (S950). The residual
coefficients generated as a result of quantization may
be arranged in one dimension, and the residual
15 coefficients may be encoded (S960). An arrangement order
of the residual coefficients may follow at least one of
a diagonal scan, a zigzag scan, an up-right scan, a
vertical scan, or a horizontal scan.
[00170] FIG. 10 is a flowchart illustrating a process
20 of decoding a residual sample according to an embodiment
to which the present invention is applied.
[00171] First, a residual coefficient of a current
block may be obtained (S1010). The decoder may obtain
the residual coefficient through coefficient scanning.
25 The coefficient scanning may be performed based on at
least one of a diagonal scan, a zigzag scan, an up-right
scan, a vertical scan, or a horizontal scan. A scan order
of the current block may be determined based on at least
one of a size, a shape, an encoding mode, or an intra
30 prediction mode of the current block. As a result of the
coefficient scanning, a residual coefficient in a form
of a two-dimensional block may be obtained.
[00172] Inverse quantization may be performed on a
residual coefficient of a current block (S1020).
35 [00173] It may be determined whether to skip an
inverse transformation in an inverse quantized residual
43
coefficient of a current block (S1030). Information
indicating whether an inverse transformation for a
current block is skipped may be signaled through a
bitstream. For example, 'transform_skip_flag' indicates
5 whether the inverse transformation for the current block
is skipped. A value of transform_skip_flag of 1 indicates
that the inverse transformation for the current block is
skipped, and a value of transform_skip_flag of 0
indicates that the inverse transformation of the current
10 block is not skipped.
[00174] Information for determining a size of a block
allowed to skip an inverse transformation may be signaled
through a bitstream. As an example,
'log2_transform_skip_max_size_minus2' represents a
15 maximum size of a block allowed to skip an inverse
transformation is allowed. The transform_skip_flag may
be encoded only when the current block is smaller than
or equal to the maximum size allowed to skip the inverse
transformation. When encoding of the transform_skip_flag
20 is omitted, a value of transform_skip_flag may be derived
as a predefined value. The predefined value may be 0.
Accordingly, when a size of the current block is larger
than the maximum size allowed to skip the inverse
transformation, the inverse transformation may be
25 performed on the current block.
[00175] Alternatively, it may be determined whether
to skip the inverse transformation for each of a
horizontal direction and a vertical direction. At least
one of information indicating whether to skip the inverse
30 transformation for the horizontal direction or
information indicating whether to skip the inverse
transformation for the vertical direction may be
signaled through a bitstream. For example, at least one
of 'hor_transform_skip_flag' indicating whether to skip
35 the inverse transformation for the horizontal direction
or 'ver_transform_skip_flag' indicating whether to skip
44
the inverse transformation for the vertical direction
may be signaled through the bitstream.
[00176] The hor_transform_skip_flag and the
ver_transform_skip_flag may be encoded only when the
5 current block is smaller than a maximum size allowed to
skip the inverse transformation. As an example, the
hor_transform_skip_flag may be encoded only when a width
of the current block is smaller than the maximum size
allowed to skip the inverse transformation. In addition,
10 the ver_transform_skip_flag may be encoded only when a
height of the current block is smaller than the maximum
size allowed to skip the inverse transformation.
[00177] Alternatively, it may be determined whether
to encode the hor_transform_skip_flag and the
15 ver_transform_skip_flag based on a shape of the current
block. As an example, the hor_transform_skip_flag may be
encoded only when the current block is a non-square block
having a width greater than a height. In addition, the
ver_transform_skip_flag may be encoded only when the
20 current block is a non-square block having a height
greater than a weight.
[00178] When encoding of information is omitted, a
value of the information may be derived as a predefined
value. The predefined value may be 0.
25 [00179] When it is determined that an inverse
transformation is performed on a current block, an
inverse quantized residual coefficient of the current
block may be inversely transformed (S1040, S1050). The
inverse transformation may be performed in an order of
30 a secondary inverse transformation and a primary inverse
transformation. The secondary inverse transformation may
be performed on a partial region of the current block.
A transform matrix for the secondary inverse
transformation may be determined based on a size of a
35 region to which the secondary inverse transformation is
applied.
45
[00180] A secondary inverse transformation may be
selectively performed. In other words, it is possible to
perform a primary inverse transformation while omitting
the secondary inverse transformation. Whether the
5 secondary inverse transformation is performed may be
determined based on at least one of a size, a shape, a
transform type, an encoding mode, or an intra prediction
mode of the current block. Alternatively, information
indicating whether the secondary inverse transformation
10 is performed may be signaled through a bitstream.
[00181] The primary inverse transformation may be
performed based on a transformation core such as DCT or
DST. The encoder may encode information for determining
a transform type of a current block. Alternatively, the
15 transform type of the current block may be determined
according to a rule predetermined by the encoder and the
decoder. For example, based on at least one of a size of
a current block, a shape of the current block, an
encoding mode of the current block, or an intra
20 prediction mode of the current block, the transform type
of the current block may be determined.
[00182] As a result of performing the inverse
transformation, a residual sample of the current block
may be obtained.
25 [00183] When it is determined that an inverse
transformation is skipped in the current block, an
inverse quantized residual coefficient of the current
block may be scaled (S1060). The scaling may be performed
using a scaling parameter. The scaling parameter may be
30 determined based on a width, height, or size of the
current block. A residual coefficient of the current
block may be obtained by scaling the inverse quantized
residual coefficient based on the scaling parameter.
[00184]
35 [00185] Transformation in at least one of a vertical
direction or a horizontal direction may be skipped. When
46
transform skip is applied only in the horizontal
direction, the transform may not be performed in the
horizontal direction, but may be performed in the
vertical direction. When the transform skip is applied
5 only in the vertical direction, the transform may not be
performed in the vertical direction, but may be performed
in the horizontal direction.
[00186] It may be determined whether or not a
transform skip technique for the current block can be
10 used according to the partitioning type of a parent node
block. For example, when a current block is generated
through binary tree-based partitioning, the transform
skip technique may not be allowed for the current block.
That is, when the current block is generated through
15 binary tree-based partitioning, a residual sample of the
current block may be obtained by transforming an inverse
quantized residual coefficient. When the current block
is generated through binary tree-based partitioning,
encoding/decoding of information indicating whether
20 transformation is skipped (e.g., at least one of
transform_skip_flag, hor_transform_skip_flag, or
ver_transform_skip_flag) may be omitted.
[00187] Alternatively, when a current block is
generated through binary tree-based partitioning, a
25 transform skip technique may be allowed only in a
horizontal direction or a vertical direction. A
direction in which the transform skip technique is not
allowed may be determined based on at least one of
information signaled through a bitstream, a size of the
30 current block, a shape of the current block, or an intra
prediction mode of the current block. As an example,
when the current block has a non-square shape whose width
is greater than the height, the transform skip technique
may be allowed only in a vertical direction. That is,
35 when the current block is in a form of 2NxN,
transformation may be performed in a horizontal
47
direction and may be selectively performed in a vertical
direction. Alternatively, when the current block is a
non-square shape whose height is greater than the width,
the transform skip technique may be allowed only in a
5 horizontal direction. That is, when the current block is
in a form of Nx2N, transformation may be performed in a
vertical direction and may be selectively performed in
a horizontal direction. Contrary to the above example,
when the current block is a non-square block whose width
10 is greater than the height, the transform skip technique
is allowed only in the horizontal direction, and when
the current block is a non-square block whose height is
greater than the width, the transform skip technique is
allowed only in the vertical direction.
15 [00188] Alternatively, whether to skip transformation
of the current block may be determined according to a
partitioning type of a parent node block. As an example,
when the current block is generated by binary tree-based
partitioning, transformation in a horizontal direction
20 or a vertical direction may be omitted. That is, if the
current block is generated by binary tree-based
partitioning, transformation in at least one of a
horizontal direction or a vertical direction of the
current block may be skipped without encoding/decoding
25 information indicating whether the transformation of the
current block is skipped (e.g., transform_skip_flag,
hor_transform_skip_flag, ver_transform_skip_flag).
[00189]
[00190] Hereinafter,a primary transformation/inverse
30 transformation and a secondary transformation/inverse
transformation will be described in detail. Hereinafter,
matters described focusing on the primary transformation
and the secondary transformation may be extendedly
applied to the primary inverse transformation and the
35 secondary inverse transformation.
48
[00191] A primary transformation may be performed
based on a transformation core such as DCT or DST. As an
example, Equation 1 represents a transformation matrix
A4 based on DST-VII. An inverse transformation based on
5 DST-VII may be performed based on A4T.
[00192] 【Equation 1】
[00193] Equation 2 represents a transform matrix T8
based on DCT-II. Inverse transformation based on DCT-II
10 may be performed based on T8T.
[00194] 【Equation 2】
[00195] A transformation core of a current block may
be determined based on a transform type of the current
15 block. The transform type of the current block may be
explicitly determined based on information signaled
through a bitstream. The information may be index
information indicating a transform type for a horizontal
direction and a transform type for a vertical direction.
20 Table 1 shows an example in which a transform type of a
horizontal direction and a transform type of a vertical
direction are determined based on the index information.
[00196] 【Table 1】
Transform set Index HorTrType VerTrType
0 DST-VII DST-VII
1 DCT-II DCT-II
2 DCT-VII DCT-II
3 DCT-II DCT-VII
4 DCT-VII DCT-VII
49
[00197] In Table 1, HorTrType represents a transform
type of a horizontal direction, and VerTrType represents
a transform type of a vertical direction.
[00198] Information indicating whether index
5 information for determining a transform type for a
horizontal direction and a vertical direction is
signaled may be encoded. The information may be signaled
through a picture parameter set or a sequence parameter
set. When the index information is not signaled, a
10 transform type for a horizontal direction and a vertical
direction may be implicitly determined based on at least
one of a size, a shape, or an intra prediction mode of
a current block.
[00199] For example, when a current block is encoded
15 by inter prediction, a transform type of a horizontal
direction and a vertical direction may be determined
based on a size or shape of the current block.
Specifically, when the current block is a non-square
shape whose width is greater than the height and the
20 width of the current block is included in a predefined
range, the transform type of the horizontal direction of
the current block may be determined as DCT-II. If the
above condition is not satisfied, the transform type of
the horizontal direction of the current block may be
25 determined as DST-VII. In addition, when the current
block is a non-square shape whose height is greater than
the width and the height of the current block is included
in a predefined range, the transform type of the vertical
direction of the current block may be determined as DCT-
30 II. If the above condition is not satisfied, the
transform type of the vertical direction of the current
block may be determined as DST-VII. The predefined range
may be defined as N or more and/or M or less. N and M
are different natural numbers and may be 4, 8, 16 or 32.
35 [00200] When a current block is encoded by intra
prediction, a transform type of a horizontal direction
50
and a transform type of a vertical direction may be
determined based on at least one of a size, shape, or
intra prediction mode of the current block. For example,
when an intra prediction mode of a current block is a DC
5 mode, a transform type of a horizontal direction and a
transform type of a vertical direction of the current
block may be determined as DST-VII.
[00201] When an intra prediction mode of a current
block is a Planar mode, a transform type of a horizontal
10 direction and a transform type of a vertical direction
of the current block may be determined based on whether
a width and height of the current block are included in
a predefined range, respectively. For example, when the
width of the current block is included in the predefined
15 range, the transform type of the horizontal direction of
the current block may be determined as DCT-II. On the
other hand, when the width of the current block is not
included in the predefined range, the transform type of
the horizontal direction of the current block may be
20 determined as DST-VII. When the height of the current
block is included in the predefined range, the transform
type of the vertical direction of the current block may
be determined as DCT-II. On the other hand, when the
height of the current block is not included in the
25 predefined range, the transform type of the vertical
direction of the current block may be determined as DST-
VII.
[00202] When an intra prediction mode of a current
block is a directional mode of the first direction, a
30 transform type of a horizontal direction of the current
block may be determined as DST-VII. When the intra
prediction mode of the current block is the first
directional mode, a transform type of a vertical
direction of the current block may be determined as DST-
35 VII or DCT-II depending on whether a height of the
current block is included in a predefined range
51
[00203] When an intra prediction mode of a current
block is a directional mode of the second direction, a
transform type of a horizontal direction of the current
block may be determined as DST-VII or DCT-II depending
5 on whether a width of the current block is included in
a predefined range. When the intra prediction mode of
the current block is the second directional mode, a
transform type of a vertical direction of the current
block may be determined as DST-VII. The first direction
10 and the second direction may be different from each
other.
[00204]
[00205] Alternatively, the transform type of the
current block may be determined based on at least one of
15 a size, shape, encoding mode, or intra prediction mode
of the current block, but the transform type of the
vertical direction and the transform type of the
horizontal direction may be set to be the same.
[00206] As an example, when a current block is a 4x4
20 block coded in an intra mode, a DST (specifically, DST-
VII) based transform matrix may be used. If the current
block does not satisfy the above condition, a DCT
(specifically, DCT-II) based transform matrix may be
used.
25 [00207] Alternatively, a transform type of a current
block may be determined based on at least one of an intra
prediction mode of the current block or the number of
samples included in the current block. The number of
samples for determining the transform type may have a
30 value predefined by the encoder and the decoder.
Alternatively, information for determining the number of
samples may be signaled through a bitstream. The
information may be signaled through a block, a slice
header, or a picture parameter set.
35 [00208] When the number of samples represents 16, if
the current block is encoded by the intra prediction
52
mode and the number of samples included in the current
block is 16 or less, a DST-based transform matrix may be
applied to the current block. For example, a DST-based
transform matrix may be applied to a block having a size
5 of 4x4, 2x8, or 8x2 encoded by intra prediction. On the
other hand, when the current block does not satisfy the
above condition, a DCT-based transform matrix may be
used.
[00209] The condition for determining a transform
10 type may be set differently for each sequence, slice, or
block. As an example, in slice 0, when a transform block
encoded in an intra mode has a size of 4x4, DST may be
selected. On the other hand, in slice 1, when a transform
block encoded in the intra mode has a size of 8x8 or
15 less than 8x8, DST may be selected.
[00210] As another example, based on a transform set,
a transform type of a current block may be determined.
Index information specifying the transform type of the
current block may be signaled through a bitstream.
20 Alternatively, the transform type of the current block
may be determined based on at least one of a size, shape,
coding mode, or intra prediction mode of the current
block. The transform set may be determined for a coding
block or a transform block. Accordingly, transform sets
25 between the coding blocks and the transform blocks may
be different from each other. Alternatively, a plurality
of transform blocks may share one transform set. The
plurality of transform blocks may be included in a coding
block having a predetermined size or a predetermined
30 shape.
[00211] Table 2 illustrates a plurality of transform
sets.
[00212] 【Table 2】
Transform set Index
Transform
candidate 0
Transform
candidate 1
0 DST-VII DCT-II
53
1 DST-VII DST-I
2 DST-VII DCT-VIII
[00213] The transform set may include at least one
transform type candidate. At least one of the number of
transform type candidates or a type of the transform
type candidates included in each of a plurality of
5 transform sets may be different. That is, at least one
of the number of the transform type candidates or the
type of the transform type candidates included in one
transform set may be different from that of another
transform set.
10 [00214] Table 1 illustrates that each transform set
includes two transform type candidates. A transform set
including one, three, four, or more transform type
candidates may be defined. Alternatively, transform type
candidate 0 and transform type candidate 1 may define
15 the same transform set.
[00215] Alternatively, a maximum number of transform
type candidates included in a transform set may be
signaled through a bitstream. The number of transform
type candidates included in each transform set may be
20 less than or equal to the maximum number signaled through
the bitstream. The information may be signaled through
a slice header or a sequence header.
[00216] Any one of transform type candidates included
in a transform set may be determined as a transform type
25 of a current block. The transform type of the current
block may be determined based on at least one of a size,
shape, encoding mode, or intra prediction mode of the
current block. The intra prediction mode represents an
intra prediction mode of a prediction block or a coding
30 block corresponding to a transform block.
[00217] As an example, when a current block is a block
having a size of 4x4 encoded in an intra mode, a
transform type candidate 0 in a transform set may be
determined as a transform type of the current block. On
54
the other hand, when the current block does not satisfy
the above condition, a transform type candidate 1 in the
transform set may be determined as the transform type of
the current block.
5 [00218] As a specific example, when a transform set
index 0 is determined as a transform set of a current
block, if the current block is a 4x4 size block encoded
in an intra mode, a transformation may be performed based
on DST-VII. On the other hand, when the current block
10 does not satisfy the above condition, the transformation
may be performed based on DCT-II. When a transform set
index 2 is determined as the transform set of the current
block, if the current block is a 4x4 or 8x8 size block
encoded in an intra mode, the transformation may be
15 performed based on DST-VII. If the current block does
not satisfy the above condition, the transformation may
be performed based on DCT-VIII.
[00219] A selection condition for transform type
candidates may be determined based on at least one of a
20 size, shape, coding mode, or intra prediction mode of
the coding block. For example, when the size of the
coding block is less than or equal to 32x32, the
transform type candidate 0 may be applied only when the
transform block is encoded in an intra mode and the size
25 of the transform block is 4x4. On the other hand, when
the size of the coding block is larger than 32x32, the
transform type candidate 0 may be applied only when the
transform block is encoded in the intra mode and the
size of the transform block is 8x8 or less.
30 [00220] Alternatively, information for specifying any
one of a plurality of transform type candidates may be
signaled through a bitstream.
[00221] Transform skip may be set as a transform type
candidate. Whether transform skip can be used as a
35 transform type candidate may be determined based on
whether transform skip is allowed in the current block.
55
Depending on whether transform skip can be used as a
transform skip candidate, at least one of the type of
transform type candidates included or the number of
transform type candidates in the transform set may be
5 differently set.
[00222] Table 3 shows a plurality of transform sets
in which transform skip is set as a transform skip
candidate.
[00223] 【Table 3】
Transform set
Index
Transform
candidate 0
Transform
candidate 1
Transform
candidate 2
0 DST-VII DCT-II Transform skip
1 DST-VII DST-I Transform skip
2 DST-VII DCT-VIII Transform skip
10 [00224] When transform_skip_enabled_flag indicating
whether to allow transform skip within a predetermined
picture is 1, as shown in Table 3, a transform set
further including transform skip as a transform type
candidate may be used. On the other hand, when
15 transform_skip_enabled_flag is 0, as shown in Table 2,
a transform set that does not include transform skip as
a transform type candidate may be used.
[00225] A transform type for a horizontal direction
and a transform type for a vertical direction of the
20 current block may be set equally. For example, when the
transform type of the current block is determined, the
determined transform type may be applied to both the
determined horizontal transformation and the determined
vertical transformation. Alternatively, a transformation
25 type for a horizontal direction and a transformation
type for a vertical direction of the current block may
be set differently. For example, when a transform set of
the current block is determined, a transform type
candidate 0 may be determined as the transform type for
30 the horizontal direction, and a transform type candidate
1 may be determined as the transform type for the
vertical direction.
56
[00226] As another example, a transform set for a
horizontal direction and a transform set for a vertical
direction may be individually determined. For this, a
first transform set index for specifying the transform
5 set in the horizontal direction and a second transform
set index for specifying the transform set in the
vertical direction may be signaled through a bitstream.
Any one of the transform type candidates included in the
first transform set specified by the first transform set
10 index may be determined as the transform type in the
horizontal direction. Any one of the transform type
candidates included in the second transform set
specified by the second transform set index may be
determined as the transform type in the vertical
15 direction.
[00227] As an example, it is assumed that a transform
set corresponding to a transform set index 0 is
determined as a transform set of a horizontal direction,
and a transform set corresponding to a transform set
20 index 1 is determined as a transform set for the vertical
direction. When a current block is not encoded by intra
prediction or a size of the current block is not 4x4, a
transform type candidate 1 may be determined as a
transform type of the current block. That is, as for a
25 transform type of a vertical transformation, a transform
type candidate 1 (i.e., DCT-II) included in a transform
set index 0 is determined as the transformation type of
the horizontal direction, and a transform type candidate
1 included in a transform set index 1 (i.e., DST-I) may
30 be determined as the transform type of the vertical
direction.
[00228] The first transform set index and the second
transform set index may represent the same transform
set. Alternatively, the second transform set index may
35 specify one of the residual transform sets excluding the
transform set specified by the first transform set index.
57
[00229] Whether a transform set for a horizontal
direction and a transform set for a vertical direction
are the same may be determined based on at least one of
a size, shape, encoding mode, or intra prediction mode
5 of a current block. For convenience of explanation, a
transform set for a horizontal transform is defined as
a horizontal direction transform set, and a transform
set for a vertical transform is defined as a vertical
direction transform set. For example, when an intra
10 prediction mode of a current block is an intra prediction
mode similar to a horizontal direction or an intra
prediction mode similar to a vertical direction, the
horizontal direction transform set and the vertical
direction transform set may be different from each other.
15 Herein, the intra prediction mode similar to the
horizontal direction may mean an intra prediction mode
in which the difference in a mode value from a horizontal
direction or a horizontal direction intra prediction
mode is within a predefined value. In addition, the intra
20 prediction mode similar to the vertical direction may
mean an intra prediction mode in which the difference in
a mode value from a vertical direction or a vertical
direction intra prediction mode is within a predefined
value.
25 [00230] On the other hand, when an intra prediction
mode of a current block is a non-directional mode or a
directional mode that does not satisfy the above
condition, a horizontal direction transform set and a
vertical direction transform set may be the same. When
30 the horizontal direction transform set and the vertical
direction transform set are set to be the same, at least
one of the first index information for specifying the
horizontal direction transform set or the second index
information for specifying the vertical direction
35 transform set may be omitted.
58
[00231] Alternatively, when an intra prediction mode
of a current block is a non-directional mode, it is
possible to set a horizontal direction transform set and
a vertical direction transform set of the current block
5 differently from each other.
[00232] FIG. 11 is a diagram illustrating whether a
transform set in a vertical direction and a transform
set in a horizontal direction are the same for 33 intra
prediction modes.
10 [00233] In the example shown in FIG. 11, when an intra
prediction mode of a current block is included in a range
of 7-13 or 23-29, a horizontal direction transform set
and a vertical direction transform set are shown to be
different from each other. On the other hand, when the
15 intra prediction mode of the current block is a
directional mode not included in the range, it is shown
that the horizontal direction transform set and the
vertical direction transform set are the same.
[00234] When a block having the same intra prediction
20 mode as a current block in a predetermined block exists,
a transform set of the current block may be set equal to
a transform set of a block having the same intra
prediction mode as the current block. Herein, the
predetermined block may be a coding block, a coding tree
25 block, or a block having a predetermined size.
[00235] As an example, it is assumed that a direction
of an intra prediction mode corresponding to the first
transform block in a coding block is vertical(e.g., mode
number 26), a horizontal direction transform set is index
30 2, and a vertical direction transform set is index 0.
Herein, an order of transform blocks may be determined
according to a scan order of the coding block.
[00236] When a transform block having an intra
prediction mode of a vertical direction in a coding block
35 further exists, a transform set index value may not be
signaled to a newly scanned transform block. Instead, a
59
transform set of a transform block having an intra
prediction mode of a vertical direction may be applied
to a transform set of the newly scanned transform block.
That is, a horizontal direction transform set and a
5 vertical direction transform set of the newly scanned
transform block may be determined as index 2 and index
0, respectively.
[00237] As another example, when a block having an
intra prediction mode similar to a current block in a
10 predetermined block exists, a transform set of the
current block may be set equal to a transform set of the
block having the intra prediction mode similar to the
current block. Herein, the intra prediction mode similar
to the current block may refer to a standard intra
15 prediction mode or an intra prediction mode in which a
difference in a mode value from the standard intra
prediction mode is less than or equal to a predefined
value. The standard intra prediction mode may include an
intra prediction mode of a horizontal direction or an
20 intra prediction mode of a vertical direction.
[00238] As an example, it is assumed that a direction
of an intra prediction mode corresponding to a first
transform block in a coding block is vertical (e.g.,
mode number 26), a horizontal direction transform set is
25 index 2, and a vertical direction transform set is index
0.
[00239] When a transform block having an intra
prediction mode (e.g., mode number 27) similar to the
vertical direction in a coding block exists, a transform
30 set index value may not be signaled to a newly scanned
transform block. Instead, a transform set of a transform
block having an intra prediction mode similar to an intra
prediction mode of the current block may be applied to
the transform set of the newly scanned transform block.
35 That is, the horizontal direction transform set of the
newly scanned transform block may be determined as index
60
2, and the vertical direction transform set may be
determined as index 0.
[00240] Based on an intra prediction mode of a current
block, a transform set for a horizontal direction and/or
5 a transform set for a vertical direction may be
determined. Table 4 shows a horizontal direction
transform set and a vertical direction transform set
according to the intra prediction mode of the current
block.
10 [00241] 【Table 4】
Intra
Mode
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1
7
H 2 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 1
V 1 1 0 1 0 1 0 1 2 2 2 2 2 1 0 1 0 1
Intra
Mode
1
8
1
9
2
0
2
1
2
2
2
3
2
4
2
5
2
6
2
7
28 29 30 31 32 33 34
H 0 1 0 1 0 1 2 2 2 2 2 1 0 1 0 1 0
V 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0
[00242] When the current block is encoded by inter
prediction, the current block may use a predefined
transform set. The predefined transform set may be a
transform set having index 0.
15 [00243] Alternatively, when a coding block is encoded
by inter prediction, a transform set is selected for the
coding block, and transform blocks within the coding
block may use transform type candidates included in the
transform set of the coding block. In this case, the
20 transform type of each transform block may be determined
by a size and/or shape of the transform block, or
information for identifying a transform type selected by
each transform block may be signaled through a bitstream.
[00244] Selecting a transform type of a current block
25 from among a plurality of transform type candidates may
be defined as an adaptive multiple transform (AMT).
Whether the adaptive multiple transform is applied to
the current block may be determined based on at least
one of a size, a shape, an encoding mode, or an intra
61
prediction mode of the current block. Information for
determining at least one of a size or a shape of a block
in which adaptive multiple transform is allowed may be
signaled through a bitstream. The size information may
5 include at least one of a maximum size or a minimum size
in which multiple transform is allowed. A size of a block
in which multiple transform is allowed and/or
information for determining the size of the block may be
signaled through at least one of a block, a slice header,
10 or a sequence header.
[00245]
[00246] Next, a secondary transformation will be
described.
[00247] After performing a primary transformation on
15 a current block, the encoder may perform a secondary
transformation. After performing a secondary inverse
transform on the current block, the decoder may perform
a primary inverse transform.
[00248] Whether a secondary transformation is applied
20 to a current block may be determined based on at least
one of a size, a shape, a transform type, or a
quantization parameter size of the current block. For
example, when at least one of a width or height of the
current block is smaller than a predefined value, the
25 secondary transformation may not be performed on the
current block.
[00249] A secondary transformation may be performed
on an entire region of a current block or a partial
region of the current block. FIG. 12 is a diagram
30 illustrating a performing region of a secondary
transformation.
[00250] While a primary transformation is performed
on an entire region of a current block, a secondary
transformation may be performed on a partial region of
35 the current block.
62
[00251] The location and/or size of a region in which
a secondary transformation is performed may be
predefined in an encoder and a decoder. For example, the
region may have a size of MxN, and a location of an upper
5 left corner of the region may coincide with an upper
left corner of the current block. M and N may be 2, 4,
8 or 16. M and N may have the same value or different
values. For example, a secondary transformation may be
applied to a 4x4 block.
10 [00252] Alternatively, a location and/or size of a
region where a secondary transformation is performed may
be determined based on at least one of a size, shape,
transform type, size of a quantization parameter, or
whether residual flipping is performed of the current
15 block. For example, when at least one of a height or
width of the current block is equal to or smaller than
a threshold value, the secondary transformation may be
performed on a 4x4 block. When the height and width of
the current block are greater than the threshold value,
20 the secondary transformation may be performed on an 8x8
block. Herein, the threshold value may be a natural
number such as 4, 8, or 16.
[00253] Alternatively, information for determining a
location and/or size of a region in which a secondary
25 transformation is performed may be signaled through a
bitstream. The information may be signaled through a
slice, picture, or sequence.
[00254] A secondary transformation may be a separable
transformation (separable transform) or a non-separable
30 transformation (non-separable transform). The separable
transformation and the non-separable transformation may
be classified according to whether a transformation for
a horizontal direction and a transformation for a
vertical direction are performed separately when
35 performing a secondary transformation.
63
[00255] Specifically, the separable transformation
means that a transformation for a horizontal direction
and a transformation for a vertical direction are
separately performed for a block having a size of MxN.
5 The non-separable transformation means that the
transformation for the horizontal direction and the
transformation for the vertical direction are not
separated for the block having the size of MxN.
[00256] A non-separable transformation may be
10 performed based on a one-dimensional matrix in which a
transform matrix T and transform coefficients included
in a block having a size of MxN are arranged in one
dimension. Specifically, a (MxN)x1 matrix may be created
by arranging transform coefficients included in a block
15 of MxN size in one dimension, and transform coefficients
of size Kx1 may be generated by multiplying a transform
matrix T of size Kx(MxN) by the one-dimensional matrix.
The decoder may perform a secondary inverse transform
using a transform matrix TT.
20 [00257] A transform matrix T may be determined based
on a type of a secondary transformation. Information for
determining the type of the secondary transformation may
be signaled through a bitstream. Alternatively, the type
of the secondary transformation may be determined based
25 on at least one of a size, a width, an encoding mode, or
an intra prediction mode of a current block.
[00258] Equation 3 shows transform coefficients
included in a 4x4 block, and Equation 4 shows an example
in which transform coefficients included in a 4x4 block
30 are arranged in one dimension.
[00259] 【Equation 3】
[00260] 【Equation 4】
64
[00261] A matrix 𝑋
̃having a size of 16x1 may be
obtained by arranging transform coefficients included in
a block having a size of 4x4 in a line. An order of
5 arrangement of transform coefficients may follow a scan
order of a current block. That is, the order of
arrangement of the transform coefficients may follow at
least one of a vertical scan, a horizontal scan, a raster
scan, a zigzag scan, or a diagonal scan.
10 [00262] Equation 5 shows an example in which a
secondary transformation is performed based on a one-
dimensional matrix 𝑋
̃and a transform matrix T.
[00263] 【Equation 5】
15 [00264] When a size of the transform matrix T is
16x16, a matrix 𝐹
̃having a size of 16x1 may be generated
as a result of the secondary transformation.
[00265] Performing non-separable transformation on
only some regions of the transform block may be referred
20 to as sub-non-separable transform. Equation 6 shows the
sub-non-separable transform.
[00266] 【Equation 6】
[00267] T' represents a transform matrix, and Xi'
25 represents a matrix in which transform coefficients
included in a sub-block are arranged in one dimension.
Fi' represents non-separable transform coefficients
generated as a result of performing a non-separable
transformation. The non-separable transform coefficients
30 of a region where non-separable transformation is not
performed may be set to a predefined value. The
predefined value may be an integer including 0.
65
[00268] A size of each matrix may be determined based
on a size of a subblock on which non-separable
transformation is performed. As an example, it is assumed
that non-separable transformation is performed only in
5 a region corresponding to a 2x2 size subblock of a 4x4
size transform block. Xi' represents a 4x1 matrix in
which transform coefficients included in the 2x2
subblock are arranged in one dimension, and T' represents
a 16x4 transform matrix. Fi' represents a 16x1 transform
10 coefficient matrix generated as a result of performing
the non-separable transformation.
[00269] For example, it is assumed that a non-
separable transformation is performed only in a region
corresponding to an 8x4 size subblock of an 8x8 size
15 transform block. Xi' represents a 32x1 matrix in which
transform coefficients included in an 8x4 subblock are
arranged in one dimension, and T' represents a 64x32
transform matrix. Fi' represents a transform coefficient
matrix having a size of 64x1 generated as a result of
20 performing the non-separable transformation.
[00270] As an example, it is assumed that non-
separable transformation is performed only in a region
corresponding to a 4x4 size subblock of an 8x8 size
transform block. Xi' represents a 16x1 matrix in which
25 transform coefficients included in a 4x4 subblock are
arranged in one dimension, and T' represents a 64x16
transform matrix. Fi' represents a transform coefficient
matrix having a size of 64x1 generated as a result of
performing the non-separable transformation.
30 [00271] A region in which a secondary transformation
is performed does not necessarily have to be square. For
example, a non-square region having a size of 2x8 or 8x2
or a polygonal region in which three blocks having a
size of 4x4 are combined may be determined as a
35 performing region of a secondary transformation.
66
[00272] A size or region of a region in which a
secondary transformation is performed may be determined
according to a size, shape, encoding mode, or intra
prediction mode of a current block. For example, when
5 the current block is a square, the region in which the
secondary transformation is performed may be set to a
square. When the current block is a non-square, the
region in which the secondary transformation is
performed may be set to a non-square.
10 [00273] A non-separable transformation may be
composed of a plurality of sub non-separable
transformations. Equation 7 shows a plurality of non-
separable transformations.
[00274] 【Equation 7】
15
[00275] In Equation 7, Xn' represents a matrix in
which transform coefficients included in the N-th
subblock are arranged in one dimension. A non-separable
transform coefficient Fn' for the N-th sub-block may be
20 generated through sub non-separable transformation.
[00276] A set of non-separable transform coefficients
of each sub-block may be set as non-separable transform
coefficients of a current block. Equation 8 shows a non-
separable transform coefficient F of the current block.
25 [00277] 【Equation 8】
[00278] A size of a transform matrix T may be
determined based on a size of a region to which a
secondary transformation is applied. For example, when
30 the secondary transformation is applied to a 4x4 block,
a 16x16 transform matrix may be used, and when the
secondary transformation is applied to an 8x8 block, a
64x64 transform matrix may be used.
67
[00279] Alternatively, a reduced transform matrix in
which the number of rows or columns is smaller than the
number of samples included in a region to which a
secondary transformation is applied may be used. For
5 example, for a 4x4 block, the secondary transformation
may be performed using a 4x16 reduced transform matrix
instead of a 16x16 transform matrix. When the reduced
transform matrix is used, four transform coefficients
may be output as a result of performing the secondary
10 transformation. The four samples may be mapped to a block
having a size of 2x2 at an upper left of the block, and
transform coefficients of the residual region may be set
to 0.
[00280] Alternatively, for an 8x8 block, a secondary
15 transformation may be performed using a 16x64 reduced
transform matrix instead of a 64x64 transform matrix.
When the reduced transform matrix is used, 16 transform
coefficients may be output as a result of performing the
secondary transformation. The 16 samples may be mapped
20 to a block having a size of 4x4 at an upper left of the
block, and transform coefficients of the residual region
may be set to 0.
[00281] Information for determining a size of a
reduced transform matrix may be signaled through a
25 bitstream. The information may indicate a reducing
parameter. The number of columns or rows of the reduced
transform matrix may be determined by scaling the number
of samples included in a performing region of a secondary
transformation using the reducing parameter.
30 [00282] Whether a reduced transform matrix is applied
may be determined based on at least one of a size, shape,
coding mode, intra prediction mode, or transform mode of
a current block. For example, when at least one condition
of the case where a width and/or height of the current
35 block is greater than or equal to a threshold value or
the case where the current block is encoded by intra
68
prediction is satisfied, a secondary transformation
based on a reduced transform matrix may be allowed.
[00283] Alternatively, information indicating
whether the reduced transform matrix is allowed may be
5 signaled through a bitstream.
[00284] In the above-described embodiment, it has
been described that residual coefficients are encoded in
an order of a primary transformation, a secondary
transformation, and quantization. Unlike the described
10 example, the residual coefficients may be encoded in an
order of a primary transformation, quantization, and a
secondary transformation.
[00285]
[00286] The application of the embodiments described
15 focusing on the decode process or encoding process to
the encoding process or decoding process is included in
the scope of the present invention. The change of the
embodiments described in a predetermined order into a
different order is also included in the scope of the
20 present invention.
[00287] Although the above-described embodiments have
been described on the basis of a series of steps or
flowcharts, they do not limit the time-series order of
the invention, and may be performed simultaneously or in
25 different orders as necessary. Further, each of the
components (for example, units, modules, etc.)
constituting the block diagram in the above-described
embodiments may be implemented by a hardware device or
software, and a plurality of components. Or a plurality
30 of components may be combined and implemented by a single
hardware device or software. The above-described
embodiments may be implemented in the form of program
instructions that may be executed through various
computer components and recorded in a computer-readable
35 recording medium. The computer-readable recording medium
may include one of or combination of program commands,
69
data files, data structures, and the like. Examples of
computer-readable media include magnetic media such as
hard disks, floppy disks and magnetic tape, optical
recording media such as CD-ROMs and DVDs, magneto-
5 optical media such as floptical disks, media, and
hardware devices specifically configured to store and
execute program instructions such as ROM, RAM, flash
memory, and the like. The hardware device may be
configured to operate as one or more software modules
10 for performing the process according to the present
invention, and vice versa.
Industrial Applicability
[00288] The present invention may be applied to
15 electronic devices which is able to encode/decode a
video.
20
70
I/We Claim:
1. A method of decoding an image, the method
comprising:
5 obtaining (S1010) residual coefficients of a
current block;
performing (S1020) inverse-quantization for the
residual coefficients;
performing (S1040) a secondary inverse-transform
10 for the current block;
performing (S1050) a primary inverse-transform on
a result of performing the secondary inverse-transform;
and
obtaining reconstruction samples of the current
15 block based on residual samples resulting from the
primary inverse-transform,
wherein the secondary inverse-transform is
performed for inverse-quantized residual coefficients,
resultant from the inverse-quantization, included in a
20 partial region of the current block,
wherein the secondary inverse-transform is
performed by using an inverse-transform matrix and an
input matrix, the input matrix being generated by
arranging the inverse quantized residual coefficients of
25 a two-dimensional form in the partial region in a one-
dimensional form, and
wherein a number of rows or columns of the
inverse-transform matrix is greater than a number of the
inverse-quantized residual coefficients included in the
30 partial region.
2. The method as claimed in claim 1, wherein a
71
size of the partial region is adaptively determined based
on a size of the current block.
3. The method as claimed in claim 1, wherein a
5 transform type for the primary inverse transform is
determined based on index information signaled through
a bitstream.
4. The method as claimed in claim 3, wherein the
10 index information specifies any one of a plurality of
transform sets,
wherein a first transform type candidate included
in the transform set is determined as a horizontal
directional transform type of the current block, and
15 wherein a second transform type candidate
included in the transform set is determined as a vertical
directional transform type of the current block.
5. The method as claimed in claim 1, wherein a
20 transform type for the primary inverse transform is
determined by comparing a width of the current block or
a height of the current block with a threshold value.
6. A method of encoding an image, the method
25 comprising:
obtaining residual samples of a current block by
subtracting prediction samples from original samples;
performing (S920) a primary transform on the
residual samples of the current block;
30 performing (S930) a secondary transform for the
current block;
72
quantizing (S950) transform coefficients
generated as a result of the secondary transform; and
encoding (S960) quantized transform coefficients,
wherein the secondary transform is performed for
5 intermediate transform coefficients, resultant from the
primary transform, included in a partial region of the
current block,
wherein the secondary transform is performed by
using a transform matrix and an input matrix, the input
10 matrix being generated by arranging the intermediate
transform coefficients of a two-dimensional form in a
one-dimensional form, and
wherein a number of rows or columns of the
transform matrix is less than a number of the
15 intermediate transform coefficients included in the
partial region.
7. A device for transmitting compressed video data,
comprising:
20 a processor configured to obtain the compressed
video data; and
a transmitter configured to transmit the
compressed video data,
wherein obtaining the compressed video data
25 comprises:
obtaining residual samples of a current block by
subtracting prediction samples from original samples;
performing a primary transform on the residual
samples of the current block;
30 performing a secondary transform for the current
block;
73
quantizing transform coefficients generated as a
result of the secondary transform; and
encoding quantized transform coefficients,
wherein the secondary transform is performed for
5 intermediate transform coefficients, resultant from the
primary transform, included in a partial region of the
current block,
wherein the secondary transform is performed by
using a transform matrix and an input matrix, the input
10 matrix being generated by arranging the intermediate
transform coefficients of a two-dimensional form in a
one-dimensional form, and
wherein a number of rows or columns of the
transform matrix is less than a number of the
15 intermediate transform coefficients included in the
partial region.
74
Date 16 September 2025
PULKIT DOGER
IN/PA-4369
Agent for the Applicant
To,
The Controller of Patents
The Patent Office at New Delhi
ABSTRACT
METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNAL
An image decoding method according to the present
invention can comprise the steps of: acquiring residual
5 coefficients of a current block; dequantizing the
residual coefficients; performing secondary inverse
transformation on the dequantized residual coefficients;
and performing primary inverse transformation on the
performance result of the secondary inverse
10 transformation. The secondary inverse transformation can
be performed for a partial region of the current block.
To be Published With Figure 9
75
, Claims:I/We Claim:
1. A method of decoding an image, the method
comprising:
5 obtaining (S1010) residual coefficients of a
current block;
performing (S1020) inverse-quantization for the
residual coefficients;
performing (S1040) a secondary inverse-transform
10 for the current block;
performing (S1050) a primary inverse-transform on
a result of performing the secondary inverse-transform;
and
obtaining reconstruction samples of the current
15 block based on residual samples resulting from the
primary inverse-transform,
wherein the secondary inverse-transform is
performed for inverse-quantized residual coefficients,
resultant from the inverse-quantization, included in a
20 partial region of the current block,
wherein the secondary inverse-transform is
performed by using an inverse-transform matrix and an
input matrix, the input matrix being generated by
arranging the inverse quantized residual coefficients of
25 a two-dimensional form in the partial region in a one-
dimensional form, and
wherein a number of rows or columns of the
inverse-transform matrix is greater than a number of the
inverse-quantized residual coefficients included in the
30 partial region.
2. The method as claimed in claim 1, wherein a
size of the partial region is adaptively determined based
on a size of the current block.
3. The method as claimed in claim 1, wherein a
5 transform type for the primary inverse transform is
determined based on index information signaled through
a bitstream.
4. The method as claimed in claim 3, wherein the
10 index information specifies any one of a plurality of
transform sets,
wherein a first transform type candidate included
in the transform set is determined as a horizontal
directional transform type of the current block, and
15 wherein a second transform type candidate
included in the transform set is determined as a vertical
directional transform type of the current block.
5. The method as claimed in claim 1, wherein a
20 transform type for the primary inverse transform is
determined by comparing a width of the current block or
a height of the current block with a threshold value.
6. A method of encoding an image, the method
25 comprising:
obtaining residual samples of a current block by
subtracting prediction samples from original samples;
performing (S920) a primary transform on the
residual samples of the current block;
30 performing (S930) a secondary transform for the
current block;
quantizing (S950) transform coefficients
generated as a result of the secondary transform; and
encoding (S960) quantized transform coefficients,
wherein the secondary transform is performed for
5 intermediate transform coefficients, resultant from the
primary transform, included in a partial region of the
current block,
wherein the secondary transform is performed by
using a transform matrix and an input matrix, the input
10 matrix being generated by arranging the intermediate
transform coefficients of a two-dimensional form in a
one-dimensional form, and
wherein a number of rows or columns of the
transform matrix is less than a number of the
15 intermediate transform coefficients included in the
partial region.
7. A device for transmitting compressed video data,
comprising:
20 a processor configured to obtain the compressed
video data; and
a transmitter configured to transmit the
compressed video data,
wherein obtaining the compressed video data
25 comprises:
obtaining residual samples of a current block by
subtracting prediction samples from original samples;
performing a primary transform on the residual
samples of the current block;
30 performing a secondary transform for the current
block;
quantizing transform coefficients generated as a
result of the secondary transform; and
encoding quantized transform coefficients,
wherein the secondary transform is performed for
5 intermediate transform coefficients, resultant from the
primary transform, included in a partial region of the
current block,
wherein the secondary transform is performed by
using a transform matrix and an input matrix, the input
10 matrix being generated by arranging the intermediate
transform coefficients of a two-dimensional form in a
one-dimensional form, and
wherein a number of rows or columns of the
transform matrix is less than a number of the
15 intermediate transform coefficients included in the
partial region.

Documents

Application Documents

# Name Date
1 202518088212-STATEMENT OF UNDERTAKING (FORM 3) [16-09-2025(online)].pdf 2025-09-16
2 202518088212-REQUEST FOR EXAMINATION (FORM-18) [16-09-2025(online)].pdf 2025-09-16
3 202518088212-POWER OF AUTHORITY [16-09-2025(online)].pdf 2025-09-16
4 202518088212-FORM 18 [16-09-2025(online)].pdf 2025-09-16
5 202518088212-FORM 1 [16-09-2025(online)].pdf 2025-09-16
6 202518088212-DRAWINGS [16-09-2025(online)].pdf 2025-09-16
7 202518088212-DECLARATION OF INVENTORSHIP (FORM 5) [16-09-2025(online)].pdf 2025-09-16
8 202518088212-COMPLETE SPECIFICATION [16-09-2025(online)].pdf 2025-09-16
9 202518088212-Proof of Right [29-10-2025(online)].pdf 2025-10-29