KR20220054771A - A method and an apparatus for encoding/decoding a residual block based on quantization parameter - Google Patents

A method and an apparatus for encoding/decoding a residual block based on quantization parameter Download PDF

Info

Publication number
KR20220054771A
KR20220054771A KR1020220049380A KR20220049380A KR20220054771A KR 20220054771 A KR20220054771 A KR 20220054771A KR 1020220049380 A KR1020220049380 A KR 1020220049380A KR 20220049380 A KR20220049380 A KR 20220049380A KR 20220054771 A KR20220054771 A KR 20220054771A
Authority
KR
South Korea
Prior art keywords
transform
block
candidate set
current block
residual
Prior art date
Application number
KR1020220049380A
Other languages
Korean (ko)
Other versions
KR102525555B1 (en
Inventor
심동규
박시내
Original Assignee
한화테크윈 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020190079267A external-priority patent/KR102390733B1/en
Application filed by 한화테크윈 주식회사 filed Critical 한화테크윈 주식회사
Priority to KR1020220049380A priority Critical patent/KR102525555B1/en
Publication of KR20220054771A publication Critical patent/KR20220054771A/en
Priority to KR1020230052027A priority patent/KR20230058356A/en
Application granted granted Critical
Publication of KR102525555B1 publication Critical patent/KR102525555B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Abstract

An encoding/decoding apparatus according to the present invention derives a residual coefficient of a residual block from a bitstream, calculates a quantization parameter for the residual block, performs inverse quantization on the residual coefficient using the quantization parameter, and performs inverse quantization on the residual coefficient, and reconstructs residual samples of the residual block by performing inverse transformation on the residual coefficient.

Description

양자화 파라미터 기반의 잔차 블록 부호화/복호화 방법 및 장치{A METHOD AND AN APPARATUS FOR ENCODING/DECODING A RESIDUAL BLOCK BASED ON QUANTIZATION PARAMETER}Quantization parameter-based residual block encoding/decoding method and apparatus

본 발명은 비디오 신호를 부호화/복호화하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for encoding/decoding a video signal.

고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.The demand for high-resolution, high-quality images is increasing in various application fields. As the image data becomes higher resolution and higher quality, the amount of data relatively increases compared to the existing image data. The storage cost will increase. High-efficiency image compression techniques can be used to solve these problems that occur as image data becomes high-resolution and high-quality.

본 발명은 잔차 블록의 부호화/복호화 효율을 향상시키고자 한다. An object of the present invention is to improve the encoding/decoding efficiency of a residual block.

본 발명은, 적응적인 블록 분할을 통해서 부호화/복호화 효율을 향상시키고자 한다.An object of the present invention is to improve encoding/decoding efficiency through adaptive block division.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치는, 비트스트림으로부터 잔차 블록의 잔차 계수를 유도하고, 상기 잔차 블록에 대한 양자화 파라미터를 산출하며, 상기 산출된 양자화 파라미터를 이용하여, 상기 잔차 계수에 대해 역양자화를 수행하고, 상기 역양자화된 잔차 계수에 역변환을 수행하여, 상기 잔차 블록의 잔차 샘플을 복원할 수 있다.A video encoding/decoding method and apparatus according to the present invention derives a residual coefficient of a residual block from a bitstream, calculates a quantization parameter for the residual block, and uses the calculated quantization parameter for the residual coefficient A residual sample of the residual block may be reconstructed by performing inverse quantization and performing inverse transform on the inverse quantized residual coefficient.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치에 있어서, 상기 양자화 파라미터는, 양자화 파라미터 예측값 또는 양자화 파라미터 차분값 중 적어도 하나에 기초하여 유도될 수 있다.In the video encoding/decoding method and apparatus according to the present invention, the quantization parameter may be derived based on at least one of a quantization parameter predicted value and a quantization parameter difference value.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치에 있어서, 상기 양자화 파라미터 예측값은, 하나 또는 그 이상의 주변 블록의 양자화 파라미터에 기초하여 유도될 수 있다.In the video encoding/decoding method and apparatus according to the present invention, the predictive value of the quantization parameter may be derived based on quantization parameters of one or more neighboring blocks.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치에 있어서, 상기 주변 블록은 상기 잔차 블록에 공간적 및/또는 시간적으로 인접한 블록일 수 있다.In the video encoding/decoding method and apparatus according to the present invention, the neighboring block may be a block spatially and/or temporally adjacent to the residual block.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치에 있어서, 상기 양자화 파라미터 차분값은, 상기 양자화 파라미터 차분값의 시그날링이 허용되는 블록의 크기에 기초하여 결정될 수 있다.In the video encoding/decoding method and apparatus according to the present invention, the quantization parameter difference value may be determined based on a size of a block allowing signaling of the quantization parameter difference value.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치는, 소정의 양자화 파라미터 오프셋에 기반하여, 상기 유도된 양자화 파라미터를 보정할 수 있다.A video encoding/decoding method and apparatus according to the present invention may correct the derived quantization parameter based on a predetermined quantization parameter offset.

본 발명에 따른 비디오 부호화/복호화 방법 및 장치에 있어서, 상기 잔차 블록은 쿼드 트리, 바이너리 트리 또는 트리플 트리 중 적어도 하나에 기초하여 가변적인 크기/형태로 분할된 것일 수 있다.In the video encoding/decoding method and apparatus according to the present invention, the residual block may be divided into variable sizes/shapes based on at least one of a quad tree, a binary tree, and a triple tree.

본 발명에 따르면, 소정의 양자화 파라미터 예측값, 양자화 파라미터 차분값 또는 양자화 파라미터 오프셋 중 적어도 하나를 기반으로 잔차 블록의 부호화/복호화 효율을 향상시킬 수 있다.According to the present invention, it is possible to improve the encoding/decoding efficiency of a residual block based on at least one of a predetermined quantization parameter prediction value, a quantization parameter difference value, and a quantization parameter offset.

또한, 본 발명에 따르면, 트리 구조의 블록 분할을 통해 부호화/복호화 효율을 향상시킬 수 있다.In addition, according to the present invention, encoding/decoding efficiency can be improved through block division of a tree structure.

도 1은 본 발명의 일실시예로서, 부호화 장치의 개략적인 블록도를 도시한 것이다.
도 2는 본 발명의 일실시예로서, 복호화 장치의 개략적인 블록도를 도시한것이다.
도 3은 본 발명이 적용되는 일실시예로서, 블록 분할 타입을 도시한 것이다.
도 4는 본 발명이 적용되는 일실시예로서, 트리 구조 기반의 블록 분할 방법을 도시한 것이다.
도 5는 본 발명이 적용되는 일실시예로서, 잔차 샘플을 복원하는 방법을 도시한 것이다.
도 6은 본 발명이 적용되는 일실시예로서, 양자화 파라미터 예측값(QPpred)을 유도하는 방법을 도시한 것이다.
도 7은 본 발명이 적용되는 일실시예로서, 블록 T의 색차 성분에 관한 양자화 파라미터 예측값을 유도하는 방법을 도시한 것이다.
도 8은 본 발명이 적용되는 일실시예로서, 양자화 파라미터 차분값(deltaQP)의 시그날링 단위에 기반한 양자화 파라미터 유도 방법을 도시한 것이다.
도 9는 본 발명이 적용되는 일실시예로서, 잔차 계수의 역변환 과정을 도시한 것이다.
1 is a schematic block diagram of an encoding apparatus according to an embodiment of the present invention.
2 is a schematic block diagram of a decoding apparatus according to an embodiment of the present invention.
3 illustrates a block division type as an embodiment to which the present invention is applied.
4 illustrates a block partitioning method based on a tree structure as an embodiment to which the present invention is applied.
5 illustrates a method of reconstructing a residual sample according to an embodiment to which the present invention is applied.
6 illustrates a method of deriving a quantization parameter predicted value (QPpred) according to an embodiment to which the present invention is applied.
7 is a diagram illustrating a method of deriving a quantization parameter predicted value for a chrominance component of a block T as an embodiment to which the present invention is applied.
FIG. 8 illustrates a quantization parameter derivation method based on a signaling unit of a quantization parameter difference value deltaQP according to an embodiment to which the present invention is applied.
9 illustrates an inverse transformation process of residual coefficients as an embodiment to which the present invention is applied.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is understood that the other component may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is mentioned that a certain element is "directly connected" or "directly connected" to another element, it should be understood that no other element is present in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and repeated descriptions of the same components are omitted.

도 1은 본 발명의 일실시예로서, 부호화 장치의 개략적인 블록도를 도시한 것이다.1 is a schematic block diagram of an encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.Referring to FIG. 1 , the encoding apparatus 100 includes a picture division unit 110 , prediction units 120 and 125 , a transform unit 130 , a quantization unit 135 , a rearrangement unit 160 , and an entropy encoding unit 165 . ), an inverse quantization unit 140 , an inverse transform unit 145 , a filter unit 150 , and a memory 155 .

도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어로 이루어짐을 의미할 수 있다. 다만, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로, 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고, 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each of the components shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, which may mean that each component is made of separate hardware. However, each component is included in a list for convenience of description, and at least two components of each component are combined to form one component, or one component is divided into a plurality of components to perform a function, Integrated embodiments and separate embodiments of each of these components are also included in the scope of the present invention without departing from the essence of the present invention.

또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some of the components are not essential components for performing essential functions in the present invention, but may be optional components for merely improving performance. The present invention can be implemented by including only essential components to implement the essence of the present invention, except for components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement Also included in the scope of the present invention.

픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 블록으로 분할할 수 있다. 이때, 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree), 바이너리 트리(Biniary tree), 트리플 트리(Triple tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할하는 방식이다. 바이너리 트리에서는 상위 블록이 높이가 절반이 전술한 바이너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태를 가질 수 있다.The picture divider 110 may divide the input picture into at least one block. In this case, a block may mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU). The division may be performed based on at least one of a quadtree, a binary tree, and a triple tree. The quad tree divides the upper block into lower blocks whose width and height are half that of the upper block. Binary tree is a method of dividing the upper block into lower blocks whose either width or height is half that of the upper block. In a binary tree, a block may have a non-square shape as well as a square shape through the binary tree-based division in which the upper block is half the height.

이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in an embodiment of the present invention, a coding unit may be used as a unit for performing encoding or may be used as a meaning for a unit for performing decoding.

예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화 장치에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction units 120 and 125 may include an inter prediction unit 120 performing inter prediction and an intra prediction unit 125 performing intra prediction. Whether to use inter prediction or to perform intra prediction for a prediction unit may be determined, and specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. In this case, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific content are determined may be different. For example, a prediction method and a prediction mode may be determined in a prediction unit, and prediction may be performed in a transformation unit. A residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130 . Also, prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoder 165 together with the residual value and transmitted to the decoding apparatus. When a specific encoding mode is used, the original block may be encoded and transmitted to the decoder without generating the prediction block through the predictors 120 and 125 .

인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter prediction unit 120 may predict a prediction unit based on information on at least one of a picture before or after the current picture, and in some cases, prediction based on information of a partial region in the current picture that has been encoded Units can also be predicted. The inter prediction unit 120 may include a reference picture interpolator, a motion prediction unit, and a motion compensator.

참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of integer pixels or less in the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter in which filter coefficients are different to generate pixel information of integer pixels or less in units of 1/4 pixels may be used. In the case of the color difference signal, a DCT-based 4-tap interpolation filter in which filter coefficients are different to generate pixel information of integer pixels or less in units of 1/8 pixels may be used.

모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법 등 다양한 방법이 사용될 수 있다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolator. As a method for calculating the motion vector, various methods such as Full search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) may be used. The motion vector may have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel. The motion prediction unit may predict the current prediction unit by using a different motion prediction method. As the motion prediction method, various methods such as a skip method, a merge method, and an AMVP (Advanced Motion Vector Prediction) method may be used.

인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. When the neighboring block of the current prediction unit is a block on which inter prediction is performed, and thus the reference pixel is a pixel on which inter prediction is performed, the reference pixel included in the block on which the inter prediction is performed is a reference pixel of the block on which the intra prediction is performed. information can be used instead. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels.

인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction and a non-directional mode in which directional information is not used when prediction is performed. A mode for predicting luminance information and a mode for predicting chrominance information may be different, and intra prediction mode information used for predicting luminance information or predicted luminance signal information may be utilized to predict chrominance information.

인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.The intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to a reference pixel according to a prediction mode. The type of AIS filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit. When the prediction mode of the current prediction unit is predicted using mode information predicted from the neighboring prediction unit, if the intra prediction mode of the current prediction unit and the neighboring prediction unit is the same, the current prediction unit and the neighboring prediction unit are used using predetermined flag information It is possible to transmit information indicating that the prediction modes of , and if the prediction modes of the current prediction unit and the neighboring prediction units are different from each other, entropy encoding may be performed to encode the prediction mode information of the current block.

또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block including residual information that is a difference value from the original block of the prediction unit and the prediction unit in which prediction is performed based on the prediction unit generated by the prediction units 120 and 125 may be generated. The generated residual block may be input to the transform unit 130 .

변환부(130)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST 등과 같은 변환 타입을 사용하여 변환시킬 수 있다. 이때, 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드에 기반하여 결정될 수 있다. The transform unit 130 may transform the residual block including the residual data by using a transform type such as DCT or DST. In this case, the transform method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block.

양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantization unit 135 may quantize values transformed in the frequency domain by the transform unit 130 . The quantization coefficient may vary according to blocks or the importance of an image. The value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160 .

재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit 160 may rearrange the coefficient values on the quantized residual values.

재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 소정의 스캔 타입을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. The rearrangement unit 160 may change the two-dimensional block form coefficient into a one-dimensional vector form through a coefficient scanning method. For example, the reordering unit 160 may scan from DC coefficients to coefficients in a high frequency region using a predetermined scan type, and may change it into a one-dimensional vector form.

엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160 . For entropy encoding, various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.

엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoder 165 receives the residual value coefficient information, block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion of the coding unit from the reordering unit 160 and the prediction units 120 and 125 . Various information such as vector information, reference frame information, interpolation information of a block, and filtering information may be encoded.

엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.The entropy encoder 165 may entropy-encode the coefficient values of the coding units input from the reordering unit 160 .

역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다.The inverse quantizer 140 and the inverse transform unit 145 inversely quantize the values quantized by the quantizer 135 and inversely transform the values transformed by the transform unit 130 . The residual values generated by the inverse quantizer 140 and the inverse transform unit 145 are combined with the prediction units predicted through the motion estimation unit, the motion compensator, and the intra prediction unit included in the prediction units 120 and 125 and restored. You can create a Reconstructed Block.

필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 150 may include at least one of a deblocking filter, an offset correcting unit, and an adaptive loop filter (ALF).

디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter may remove block distortion caused by the boundary between blocks in the reconstructed picture. In order to determine whether to perform deblocking, it may be determined whether to apply the deblocking filter to the current block based on pixels included in several columns or rows included in the block. When a deblocking filter is applied to a block, a strong filter or a weak filter can be applied according to the required deblocking filtering strength. In addition, in applying the deblocking filter, horizontal filtering and vertical filtering may be concurrently processed when vertical filtering and horizontal filtering are performed.

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correcting unit may correct an offset from the original image in units of pixels with respect to the image on which the deblocking has been performed. In order to perform offset correction on a specific picture, a method of dividing pixels included in an image into a certain number of regions, determining the region to be offset and applying the offset to the region, or taking edge information of each pixel into account can be used to apply

ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive loop filtering (ALF) may be performed based on a value obtained by comparing the filtered reconstructed image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the corresponding group is determined, and filtering can be performed differentially for each group. As for information related to whether to apply ALF, the luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary according to each block. In addition, the ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the block to be applied.

메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.The memory 155 may store the reconstructed block or picture calculated through the filter unit 150 , and the stored reconstructed block or picture may be provided to the predictors 120 and 125 when inter prediction is performed.

도 2는 본 발명의 일실시예로서, 복호화 장치의 개략적인 블록도를 도시한것이다.2 is a schematic block diagram of a decoding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.Referring to FIG. 2 , the decoding apparatus 200 includes an entropy decoding unit 210 , a reordering unit 215 , an inverse quantization unit 220 , an inverse transform unit 225 , prediction units 230 and 235 , and a filter unit 240 . ), a memory 245 may be included.

도 2에 나타난 각 구성부들은 복호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어로 이루짐을 의미할 수 있다. 다만, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고, 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each of the constituent units shown in FIG. 2 is independently illustrated to represent different characteristic functions in the decoding apparatus, which may mean that each constituent unit is made of separate hardware. However, each component is listed as each component for convenience of description, and at least two components of each component are combined to form one component, or one component can be divided into a plurality of components to perform a function, such as Integrated embodiments and separate embodiments of each component are also included in the scope of the present invention without departing from the essence of the present invention.

엔트로피 복호화부(210)는 입력 비트스트림에 대해 엔트로피 복호화를 수행할 수 있다. 예를 들어, 엔트로피 복호화를 위해, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit 210 may perform entropy decoding on the input bitstream. For example, for entropy decoding, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied.

엔트로피 복호화부(210)에서는 부호화 장치에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed by the encoding apparatus.

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림에 대해 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화 장치에서 수행된 계수 스캐닝에 관련된 정보를 제공받고, 해당 부호화 장치에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.The reordering unit 215 may reorder the bitstream entropy decoded by the entropy decoding unit 210 . Coefficients expressed in the form of a one-dimensional vector may be restored and rearranged as coefficients in the form of a two-dimensional block. The reordering unit 215 may receive information related to coefficient scanning performed by the encoding apparatus, and may perform rearrangement by performing a reverse scanning method based on the scanning order performed by the encoding apparatus.

역양자화부(220)는 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter and the reordered coefficient values of the blocks.

역변환부(225)는 역양자화된 변환 계수를 소정의 변환 방법으로 역변환을 수행할 수 있다. 이때, 변환 방법은 예측 방법(인터/인트라 예측), 블록의 크기/형태, 인트라 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다.The inverse transform unit 225 may perform inverse transform on the inverse quantized transform coefficient using a predetermined transform method. In this case, the transformation method may be determined based on information about a prediction method (inter/intra prediction), a size/shape of a block, an intra prediction mode, and the like.

예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction units 230 and 235 may generate a prediction block based on the prediction block generation related information provided from the entropy decoding unit 210 and previously decoded block or picture information provided from the memory 245 .

예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고, 현재 부호화 단위(CU)에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 부호화 장치에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용하여, 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 230 and 235 may include a prediction unit determiner, an inter prediction unit, and an intra prediction unit. The prediction unit determining unit receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and selects a prediction unit from the current coding unit (CU). and whether the prediction unit performs inter prediction or intra prediction may be determined. The inter prediction unit 230 uses information necessary for inter prediction of the current prediction unit provided from the encoding apparatus, and based on information included in at least one of a picture before or after the current picture including the current prediction unit. Inter prediction may be performed on the current prediction unit. Alternatively, inter prediction may be performed based on information on a pre-restored partial region in the current picture including the current prediction unit.

인터 예측을 수행하기 위해 부호화 단위를 기준으로, 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode) 중 어떠한 방법인지 여부를 판단할 수 있다.In order to perform inter prediction, based on a coding unit, whether a method of predicting motion of a prediction unit included in a corresponding coding unit is one of a skip mode, a merge mode, and an AMVP mode can be judged

인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 부호화 장치에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로, 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 부호화 장치에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여, 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. When the prediction unit is a prediction unit on which intra prediction is performed, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the encoding apparatus. The intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can be applied by determining whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the encoding apparatus. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.

참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우, 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.When the prediction mode of the prediction unit is a prediction unit in which intra prediction is performed based on a pixel value obtained by interpolating the reference pixel, the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel of a pixel unit having an integer value or less. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The reconstructed block or picture may be provided to the filter unit 240 . The filter unit 240 may include a deblocking filter, an offset correcting unit, and an ALF.

부호화 장치로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 복호화 장치의 디블록킹 필터에서는 부호화 장치에서 제공된 디블록킹 필터 관련 정보를 제공받고, 복호화 장치에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter is applied to a corresponding block or picture and information on whether a strong filter or a weak filter is applied when the deblocking filter is applied may be provided from the encoding apparatus. The deblocking filter of the decoding apparatus may receive deblocking filter related information provided from the encoding apparatus, and the decoding apparatus may perform deblocking filtering on the corresponding block.

오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and information on the offset value.

ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.ALF may be applied to a coding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from the encoder. Such ALF information may be provided by being included in a specific parameter set.

메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다.The memory 245 may store the reconstructed picture or block to be used as a reference picture or reference block, and may also provide the reconstructed picture to an output unit.

도 3은 본 발명이 적용되는 일실시예로서, 블록 분할 타입을 도시한 것이다.3 illustrates a block division type as an embodiment to which the present invention is applied.

하나의 블록(이하, 제1 블록이라 함)은 수직 라인 또는 수평 라인 중 적어도 하나에 의해서 복수의 서브 블록(이하, 제2 블록이라 함)으로 분할될 수 있다. 상기 수직 라인과 수평 라인은 1개, 2개 또는 그 이상일 수 있다. 여기서, 제1 블록은 영상 부호화/복호화의 기본 단위인 코딩 블록(CU), 예측 부호화/복호화의 기본 단위인 예측 블록(PU), 또는 변환 부호화/복호화의 기본 단위인 변환 블록(TU)일 수 있다. 상기 제1 블록은 정방형 블록일 수도 있고, 비정방형 블록일 수도 있다.One block (hereinafter, referred to as a first block) may be divided into a plurality of sub-blocks (hereinafter, referred to as a second block) by at least one of a vertical line and a horizontal line. The vertical line and the horizontal line may be one, two or more. Here, the first block may be a coding block (CU), which is a basic unit of image encoding/decoding, a prediction block (PU), which is a basic unit of prediction encoding/decoding, or a transform block (TU), which is a basic unit of transform encoding/decoding. there is. The first block may be a square block or a non-square block.

상기 제1 블록의 분할은, 쿼드 트리(quad tree), 바이너리 트리(binary tree), 트리플 트리(triple tree) 등에 기초하여 수행될 수 있으며, 이하 도 3을 참조하여 자세히 살펴 보기로 한다.The division of the first block may be performed based on a quad tree, a binary tree, a triple tree, and the like, and will be described in detail below with reference to FIG. 3 .

도 3(a)는 쿼드 트리 분할(QT)을 도시한 것이다. QT는, 제1 블록을 4개의 제2 블록으로 사분할하는 분할 타입이다. 예를 들어, 2Nx2N의 제1 블록이 QT로 분할되는 경우, 제1 블록은 NxN 크기를 가진 4개의 제2 블록으로 사분할될 수 있다. QT는 정방형 블록에만 적용되도록 제한될 수 있으나, 비정방형 블록에 적용하는 것도 가능하다.Figure 3 (a) shows a quad tree partitioning (QT). QT is a division type in which a first block is divided into four second blocks. For example, when a first block of 2Nx2N is divided into QTs, the first block may be divided into four second blocks having a size of NxN. QT may be limited to be applied only to square blocks, but it is also possible to apply to non-square blocks.

도 3(b)는 수평 바이너리 트리(이하, Horizontal BT라 함) 분할을 도시한 것이다. Horizontal BT는, 1개의 수평 라인에 의해서 제1 블록이 2개의 제2 블록으로 이분할되는 분할 타입이다. 상기 이분할은 대칭 혹은 비대칭으로 수행될 수 있다. 예를 들어, 2Nx2N의 제1 블록이 Horizontal BT로 분할되는 경우, 제1 블록은 높이의 비율이 (a:b)인 2개의 제2 블록으로 분할될 수 있다. 여기서, a와 b는 동일한 값일 수도 있고, a는 b보다 크거나 작을 수도 있다.FIG. 3(b) shows the division of a horizontal binary tree (hereinafter referred to as Horizontal BT). Horizontal BT is a division type in which a first block is divided into two second blocks by one horizontal line. The dichotomy may be performed symmetrically or asymmetrically. For example, when a first block of 2Nx2N is divided into Horizontal BT, the first block may be divided into two second blocks having a height ratio of (a:b). Here, a and b may have the same value, and a may be larger or smaller than b.

도 3(c)는 수직 바이너리 트리(이하, Vertical BT라 함) 분할을 도시한 것이다. Vertical BT는, 1개의 수직 라인에 의해서 제1 블록이 2개의 제2 블록으로 이분할되는 분할 타입이다. 상기 이분할은 대칭 혹은 비대칭으로 수행될 수 있다. 예를 들어, 2Nx2N의 제1 블록이 Vertical BT로 분할되는 경우, 제1 블록은 너비의 비율이 (a:b)인 2개의 제2 블록으로 분할될 수 있다. 여기서, a와 b는 동일한 값일 수도 있고, a는 b보다 크거나 작을 수도 있다.FIG. 3( c ) illustrates partitioning of a vertical binary tree (hereinafter, referred to as Vertical BT). Vertical BT is a division type in which a first block is divided into two second blocks by one vertical line. The dichotomy may be performed symmetrically or asymmetrically. For example, when a first block of 2Nx2N is divided into vertical BT, the first block may be divided into two second blocks having a width ratio of (a:b). Here, a and b may have the same value, and a may be larger or smaller than b.

도 3(d)는 수평 트리플 트리(이하, Horizontal TT라 함) 분할을 도시한 것이다. Horizontal TT는, 2개의 수평 라인에 의해서 제1 블록이 3개의 제2 블록으로 삼분할되는 분할 타입이다. 예를 들어, 2Nx2N의 제1 블록이 Horizontal TT로 분할되는 경우, 제1 블록은 높이의 비율이 (a:b:c)인 3개의 제2 블록으로 분할될 수 있다. 여기서, a, b, c는 동일한 값일 수 있다. 또는, a와 c는 동일하고, b는 a보다 크거나 작을 수 있다.3( d ) is a diagram illustrating a horizontal triple tree (hereinafter referred to as Horizontal TT) partitioning. Horizontal TT is a division type in which a first block is divided into three second blocks by two horizontal lines. For example, when the first block of 2Nx2N is divided by Horizontal TT, the first block may be divided into three second blocks having a height ratio of (a:b:c). Here, a, b, and c may have the same value. Alternatively, a and c may be the same, and b may be greater than or less than a.

도 3(e)는 수직 트리플 트리(이하, Vertical TT라 함) 분할을 도시한 것이다. Vertical TT는, 2개의 수직 라인에 의해서 제1 블록이 3개의 제2 블록으로 삼분할되는 분할 타입이다. 예를 들어, 2Nx2N의 제1 블록이 Vertical TT로 분할되는 경우, 제1 블록은 너비의 비율이 (a:b:c)인 3개의 제2 블록으로 분할될 수 있다. 여기서, a, b, c는 동일한 값일 수도 있고, 서로 다른 값일 수도 있다. 또는, a와 c는 동일하고, b는 a보다 크거나 작을 수 있다. 또는, a와 b는 동일하고, c는 a보다 크거나 작을 수 있다. 또는, b와 c는 동일하고, a는 b보다 크거나 작을 수 있다.FIG. 3(e) illustrates a vertical triple tree (hereinafter referred to as Vertical TT) partitioning. Vertical TT is a division type in which a first block is divided into three second blocks by two vertical lines. For example, when the first block of 2Nx2N is divided by vertical TT, the first block may be divided into three second blocks having a width ratio of (a:b:c). Here, a, b, and c may have the same value or different values. Alternatively, a and c may be the same, and b may be greater than or less than a. Alternatively, a and b may be the same, and c may be greater than or less than a. Alternatively, b and c may be the same, and a may be greater than or less than b.

전술한 분할은, 부호화 장치로부터 시그날링되는 분할 정보에 기초하여 수행될 수 있다. 상기 분할 정보는, 분할 타입 정보, 분할 방향 정보 또는 분할 비율 정보 중 적어도 하나를 포함할 수 있다. The above-described division may be performed based on division information signaled from the encoding apparatus. The division information may include at least one of division type information, division direction information, and division ratio information.

상기 분할 타입 정보는, 부호화/복호화 장치에 기-정의된 분할 타입 중 어느 하나를 특정할 수 있다. 상기 기-정의된 분할 타입은, QT, Horizontal BT, Vertical BT, Horizontal TT, Vertical TT 또는 비분할 모드(No split) 중 적어도 하나를 포함할 수 있다. 또는, 상기 분할 타입 정보는, QT, BT 또는 TT가 적용되는지 여부에 관한 정보를 의미할 수도 있으며, 이는 플래그 혹은 인덱스의 형태로 부호화될 수 있다. 상기 분할 방향 정보는, BT 또는 TT의 경우, 수평 방향으로 분할되는지 아니면 수직 방향으로 분할되는지를 나타낼 수 있다. 상기 분할 비율 정보는, BT 또는 TT의 경우, 제2 블록의 너비 및/또는 높이의 비율을 나타낼 수 있다. The partition type information may specify any one of partition types pre-defined in the encoding/decoding apparatus. The pre-defined splitting type may include at least one of QT, Horizontal BT, Vertical BT, Horizontal TT, Vertical TT, and No split mode. Alternatively, the partition type information may mean information on whether QT, BT, or TT is applied, which may be encoded in the form of a flag or an index. The division direction information may indicate whether the division is divided in a horizontal direction or a vertical direction in the case of BT or TT. The division ratio information may indicate a ratio of a width and/or a height of the second block in the case of BT or TT.

도 4는 본 발명이 적용되는 일실시예로서, 트리 구조 기반의 블록 분할 방법을 도시한 것이다.4 illustrates a block partitioning method based on a tree structure as an embodiment to which the present invention is applied.

도 4에 도시된 블록(400)은 8Nx8N 크기이고, 분할 뎁스가 k인 정방형 블록(이하, 제1 블록이라 함)이라 가정한다. 제1 블록의 분할 정보가 QT 분할을 지시하는 경우, 제1 블록은 4개의 서브 블록(이하, 제2 블록이라 함)으로 사분할될 수 있다. 상기 제2 블록은 4Nx4N 크기이고, (k+1)의 분할 뎁스를 가질 수 있다.It is assumed that the block 400 illustrated in FIG. 4 is a square block (hereinafter, referred to as a first block) having a size of 8Nx8N and a division depth of k. When the partition information of the first block indicates QT partitioning, the first block may be divided into four sub-blocks (hereinafter, referred to as a second block). The second block may have a size of 4Nx4N and may have a division depth of (k+1).

상기 4개의 제2 블록은, QT, BT, TT 또는 비분할 모드 중 어느 하나에 기초하여 다시 분할될 수 있다. 예를 들어, 제2 블록의 분할 정보가 수평 방향으로의 바이너리 트리(Horizontal BT)를 나타내는 경우, 상기 제2 블록은 도 4의 제2 블록(410)과 같이 2개의 서브 블록(이하, 제3 블록이라 함)으로 이분할될 수 있다. 이때, 상기 제3 블록은, 4Nx2N 크기이고, (k+2)의 분할 뎁스를 가질 수 있다.The four second blocks may be divided again based on any one of QT, BT, TT, or non-split mode. For example, when the partition information of the second block indicates a binary tree (Horizontal BT) in the horizontal direction, the second block is divided into two sub-blocks (hereinafter, referred to as the third block 410 ) as in the second block 410 of FIG. 4 . It can be divided into blocks). In this case, the third block may have a size of 4Nx2N and may have a division depth of (k+2).

상기 제3 블록도 QT, BT, TT 또는 비분할 모드 중 어느 하나에 기초하여 다시 분할될 수 있다. 예를 들어, 상기 제3 블록의 분할 정보가 수직 방향으로의 바이너리 트리(Vertical BT)를 나타내는 경우, 상기 제3 블록은 도 4에 도시된 바와 같이 2개의 서브 블록(411, 412)으로 이분할될 수 있다. 이때, 상기 서브 블록(411, 412)은, 2Nx2N 크기이고, (k+3)의 분할 뎁스를 가질 수 있다. 또는, 상기 제3 블록의 분할 정보가 수평 방향으로의 바이너리 트리(Horizontal BT)를 나타내는 경우, 상기 제3 블록은 도 4에 도시된 바와 같이 2개의 서브 블록(413, 414)으로 이분할될 수 있다. 이때, 상기 서브 블록(413, 414)은, 4NxN 크기이고, (k+3)의 분할 뎁스를 가질 수 있다.The third block may also be divided again based on any one of QT, BT, TT, or non-split mode. For example, when the partition information of the third block indicates a binary tree (Vertical BT) in the vertical direction, the third block is divided into two sub-blocks 411 and 412 as shown in FIG. 4 . can be In this case, the sub-blocks 411 and 412 may have a size of 2Nx2N and may have a division depth of (k+3). Alternatively, when the partition information of the third block indicates a horizontal binary tree (Horizontal BT), the third block may be divided into two sub-blocks 413 and 414 as shown in FIG. 4 . there is. In this case, the sub-blocks 413 and 414 may have a size of 4NxN and may have a division depth of (k+3).

상기 분할은, 주변 블록과 독립적 혹은 병렬적으로 수행될 수도 있고, 소정의 우선순위에 따라 순차적으로 수행될 수도 있다. The division may be performed independently or in parallel with neighboring blocks, or may be performed sequentially according to a predetermined priority.

분할 대상인 현재 블록의 분할 정보는, 현재 블록의 상위 블록의 분할 정보 또는 주변 블록의 분할 정보 중 적어도 하나에 기초하여 종속적으로 결정될 수도 있다. 예를 들어, 상기 제2 블록이 Horizontal BT로 분할되고, 상단의 제3 블록이 Vertical BT로 분할된 경우, 하단의 제3 블록은 Vertical BT로 분할될 필요가 없다. 하단의 제3 블록이 Vertical BT로 분할될 경우, 이는 제2 블록이 QT로 분할되는 것과 동일한 결과가 나오기 때문이다. 따라서, 하단의 제3 블록의 분할 정보(특히, 분할 방향 정보)는 부호화가 생략될 수 있고, 복호화 장치는 하단의 제3 블록이 수평 방향으로 분할되도록 설정할 수 있다.The division information of the current block to be divided may be determined dependently based on at least one of the division information of the upper block of the current block and the division information of the neighboring blocks. For example, when the second block is divided into Horizontal BT and the upper third block is divided into Vertical BT, the third block at the bottom does not need to be divided into Vertical BT. This is because, when the lower third block is divided into vertical BT, the same result is obtained as the second block is divided into QT. Accordingly, the encoding of the partition information (particularly, the partition direction information) of the lower third block may be omitted, and the decoding apparatus may set the lower third block to be partitioned in the horizontal direction.

상기 상위 블록은 상기 현재 블록의 분할 뎁스보다 작은 분할 뎁스를 가진 블록을 의미할 수 있다. 예를 들어, 현재 블록의 분할 뎁스가 (k+2)인 경우, 상위 블록의 분할 뎁스는 (k+1)일 수 있다. 상기 주변 블록은, 현재 블록의 상단 혹은 좌측에 인접한 블록일 수 있다. 상기 주변 블록은, 현재 블록과 동일한 분할 뎁스를 가진 블록일 수 있다.The upper block may mean a block having a division depth smaller than a division depth of the current block. For example, when the division depth of the current block is (k+2), the division depth of the upper block may be (k+1). The neighboring block may be a block adjacent to the top or left side of the current block. The neighboring block may be a block having the same division depth as the current block.

전술한 분할은, 부호화/복호화의 최소 단위까지 반복적으로 수행될 수 있다. 최소 단위로 분할된 경우, 해당 블록에 대한 분할 정보는 부호화 장치로부터 더 이상 시그날링되지 아니한다. 상기 최소 단위에 대한 정보는, 최소 단위의 크기 또는 형태 중 적어도 하나를 포함할 수 있다. 상기 최소 단위의 크기는, 블록의 너비, 높이, 너비와 높이 중 최소값 혹은 최대값, 너비와 높이의 합, 픽셀 개수, 분할 뎁스 등으로 표현될 수 있다. 상기 최소 단위에 대한 정보는, 비디오 시퀀스, 픽쳐, 슬라이스 또는 블록 단위 중 적어도 하나에서 시그날링될 수 있다. 또는, 상기 최소 단위에 대한 정보는 부호화/복호화 장치에 기-약속된 값일 수도 있다. 상기 최소 단위에 대한 정보는, CU, PU, TU에 대해서 각각 시그날링될 수 있다. 하나의 최소 단위에 대한 정보가 CU, PU, TU에 동일하게 적용될 수도 있다.The aforementioned division may be repeatedly performed up to a minimum unit of encoding/decoding. In the case of splitting into the smallest unit, the splitting information on the corresponding block is no longer signaled from the encoding apparatus. The information on the minimum unit may include at least one of a size and a shape of the minimum unit. The size of the minimum unit may be expressed as a block width, a height, a minimum value or a maximum value among width and height, a sum of the width and height, the number of pixels, a division depth, and the like. The information on the minimum unit may be signaled in at least one of a video sequence, a picture, a slice, or a block unit. Alternatively, the information on the minimum unit may be a value pre-promised to the encoding/decoding apparatus. The information on the minimum unit may be signaled for each CU, PU, and TU. Information on one minimum unit may be equally applied to a CU, a PU, and a TU.

도 5는 본 발명이 적용되는 일실시예로서, 잔차 샘플을 복원하는 방법을 도시한 것이다.5 illustrates a method of reconstructing a residual sample according to an embodiment to which the present invention is applied.

도 5를 참조하면, 비트스트림으로부터 잔차 블록의 잔차 계수를 유도할 수 있다(S500).Referring to FIG. 5 , a residual coefficient of a residual block may be derived from a bitstream ( S500 ).

상기 유도는, 넌-제로 잔차 계수의 존부에 관한 정보, 부호화된 잔차 계수의 절대값(abs) 또는 부호(sign) 중 적어도 하나를 복호화하여 수행될 수 있다.The derivation may be performed by decoding at least one of information on the presence or absence of a non-zero residual coefficient and an absolute value (abs) or sign of the encoded residual coefficient.

상기 유도는, 잔차 블록 내 고주파 영역의 잔차 계수를 0으로 설정하는 과정을 더 포함할 수도 있다. 상기 고주파 영역은, 잔차 블록의 좌측에서부터 n개의 열(column) 또는 상단에서부터 m개의 행(row) 중 적어도 하나를 제외한 영역으로 정의될 수 있다. 상기 n, m은 부호화/복호화 장치에 기-약속된 값일 수도 있고, 잔차 블록의 크기/형태에 따라 가변적으로 결정될 수도 있다. 예를 들어, 잔차 블록이 64x32인 경우, 잔차 블록의 좌측에서부터 32개의 열(여기서, n=32, m=0)을 제외한 영역을 고주파 영역으로 정의할 수 있다. 잔차 블록이 32x64인 경우, 잔차 블록의 상단에서부터 32개의 행(여기서, n=0, m=32)을 제외한 영역을 고주파 영역으로 정의할 수 있다. 또는, 상기 n, m은, 고주파 영역을 특정하기 위해 부호화된 정보에 기초하여 유도될 수도 있다. The derivation may further include setting a residual coefficient of a high-frequency region in the residual block to 0. The high-frequency region may be defined as a region excluding at least one of n columns from the left or m rows from the top of the residual block. The n and m may be predetermined values to the encoding/decoding apparatus, or may be variably determined according to the size/shape of the residual block. For example, when the residual block is 64x32, a region excluding 32 columns (here, n=32, m=0) from the left side of the residual block may be defined as a high frequency region. When the residual block is 32x64, a region excluding 32 rows (here, n=0, m=32) from the upper end of the residual block may be defined as a high-frequency region. Alternatively, n and m may be derived based on encoded information to specify a high-frequency region.

또한, 상기 잔차 계수를 0으로 설정하는 과정은, 잔차 블록의 크기 또는 형태 중 적어도 하나를 고려하여 선택적으로 수행될 수 있다. 예를 들어, 상기 과정은, 잔차 블록의 크기가 소정의 문턱값보다 크거나 같은 경우에 한하여 적용될 수 있다. 상기 잔차 블록의 크기는 잔차 블록의 너비 또는 높이 중 적어도 하나로 표현될 수 있다. 상기 문턱값은, 잔차 계수를 0으로 설정하는 것이 허용되는 최소 크기를 의미할 수 있다. 상기 문턱값은, 부호화/복호화 장치에 기-약속된 값일 수도 있고, 부호화 장치에서 부호화되어 시그날링될 수도 있다. 상기 문턱값은 32, 64, 128, 256 또는 그 이상일 수 있다. Also, the process of setting the residual coefficient to 0 may be selectively performed in consideration of at least one of the size and shape of the residual block. For example, the above process may be applied only when the size of the residual block is greater than or equal to a predetermined threshold. The size of the residual block may be expressed by at least one of a width and a height of the residual block. The threshold value may mean a minimum size allowed to set the residual coefficient to 0. The threshold value may be a value pre-promised to the encoding/decoding apparatus, or may be encoded and signaled by the encoding apparatus. The threshold may be 32, 64, 128, 256 or more.

상기 잔차 계수를 0으로 설정하는 과정은 플래그 정보에 기초하여 선택적으로 수행될 수도 있다. 상기 플래그 정보는, 잔차 블록 내 고주파 영역의 잔차 계수를 0으로 설정하는지 여부를 나타낼 수 있다. 상기 플래그 정보는, 잔차 블록의 크기/형태에 기초하여 복호화 장치에서 유도될 수도 있고, 부호화 장치에서 부호화되어 시그날링될 수도 있다. 다만, 상기 과정은, 잔차 블록이 변환 스킵 모드로 부호화되지 않은 경우에 한하여 수행되도록 제한될 수도 있다. 따라서, 부호화 장치는, 잔차 블록이 변환 스킵 모드로 부호화되는 경우, 잔차 계수를 0으로 설정하기 위해 필요한 정보를 부호화하지 않을 수 있다.The process of setting the residual coefficient to 0 may be selectively performed based on flag information. The flag information may indicate whether a residual coefficient of a high-frequency region in a residual block is set to 0. The flag information may be derived from the decoding apparatus based on the size/shape of the residual block, or may be encoded and signaled by the encoding apparatus. However, the above process may be limited to be performed only when the residual block is not encoded in the transform skip mode. Accordingly, when the residual block is encoded in the transform skip mode, the encoding apparatus may not encode information necessary for setting the residual coefficient to 0.

도 5를 참조하면, 상기 잔차 블록에 대한 양자화 파라미터를 산출할 수 있다(S510).Referring to FIG. 5 , a quantization parameter for the residual block may be calculated ( S510 ).

양자화 파라미터는 양자화 파라미터 예측값(QPpred) 또는 양자화 파라미터 차분값(deltaQP) 중 적어도 하나를 이용하여 유도될 수 있다. 다시 말해, 양자화 파라미터는, 양자화 파라미터 예측값(QPpred)으로 설정될 수도 있고, 양자화 파라미터 예측값(QPpred)에 양자화 파라미터 차분값(deltaQP)을 가산하여 유도될 수도 있다. The quantization parameter may be derived using at least one of a quantization parameter predicted value (QPpred) and a quantization parameter difference value (deltaQP). In other words, the quantization parameter may be set as the quantization parameter predicted value QPpred, or may be derived by adding the quantization parameter difference deltaQP to the quantization parameter predicted value QPpred.

일예로, 머지 모드(merge mode), 스킵 모드(skip mode), 비-변환 모드(no-transform mode), PCM 모드, 넌-제로 계수가 존재하지 않는 경우(즉, coded block flag=0) 등과 같이 해당 블록에 대해 역양자화가 불필요한 경우, 양자화 파라미터 차분값(deltaQP)가 부호화되지 않을 수 있다. 이 경우, 양자화 파라미터 예측값(QPpred)이 양자화 파라미터로 설정될 수 있다.As an example, merge mode, skip mode, non-transform mode, PCM mode, when non-zero coefficients do not exist (ie, coded block flag=0), etc. Similarly, when inverse quantization is unnecessary for a corresponding block, the quantization parameter differential value deltaQP may not be encoded. In this case, the quantization parameter predicted value QPpred may be set as the quantization parameter.

상기 양자화 파라미터 예측값(QPpred)을 유도하는 방법에 대해서는 도 6 및 도 7을 참조하여 살펴 보기로 한다. 한편, 상기 양자화 파라미터 차분값(deltaQP)는 소정의 단위로 시그날링될 수 있으며, 양자화 파라미터 차분값(deltaQP)의 시그날링 단위에 기반한 양자화 파라미터 유도 방법에 대해서는 도 8을 참조하여 살펴 보도록 한다.A method of deriving the quantization parameter predicted value QPpred will be described with reference to FIGS. 6 and 7 . Meanwhile, the quantization parameter difference value deltaQP may be signaled in a predetermined unit, and a quantization parameter derivation method based on the signaling unit of the quantization parameter difference value deltaQP will be described with reference to FIG. 8 .

상기 양자화 파라미터의 산출은, 소정의 양자화 파라미터 오프셋(QPoffset)에 기반하여, 앞서 유도된 양자화 파라미터를 보정하는 과정을 더 포함할 수도 있다. The calculation of the quantization parameter may further include correcting the previously derived quantization parameter based on a predetermined quantization parameter offset (QPoffset).

상기 양자화 파라미터 오프셋(QPoffset)은, 부호화/복호화 장치에 기-약속된 고정된 값일 수도 있고, 부호화 장치에서 부호화되어 시그날링될 수도 있다. 상기 상기 양자화 파라미터 오프셋(QPoffset)은, 비디오 시퀀스, 픽쳐, 슬라이스, 타일 또는 블록 단위 중 적어도 하나의 레벨에서 시그날링될 수 있다. 상기 양자화 파라미터 오프셋이 시그날링되는 단위는, 양자화 파라미터 차분값이 시그날링되는 단위보다 클 수 있다. 상기 상기 양자화 파라미터 오프셋(QPoffset)의 값 및 개수는 블록 크기/형태, 분할 횟수, 예측 모드, 인트라 예측 모드, 성분 타입(e.g., 휘도, 색차) 등에 따라 적응적으로 결정될 수 있다.The quantization parameter offset QPoffset may be a fixed value pre-promised to the encoding/decoding apparatus, or may be encoded and signaled by the encoding apparatus. The quantization parameter offset (QPoffset) may be signaled at at least one level of a video sequence, a picture, a slice, a tile, or a block. A unit in which the quantization parameter offset is signaled may be larger than a unit in which a quantization parameter difference value is signaled. The value and number of the quantization parameter offset (QPoffset) may be adaptively determined according to block size/form, number of divisions, prediction mode, intra prediction mode, component type (e.g., luminance, chrominance), and the like.

상기 양자화 파라미터 오프셋의 개수는, 1개, 2개, 3개 또는 그 이상일 수 있다. 예를 들어, 양자화 파라미터 오프셋은, 픽쳐 레벨, 슬라이스 레벨 또는 블록 레벨 중 적어도 하나에서 정의될 수 있다. 상기 양자화 파라미터 오프셋은, 인트라 모드와 인터 모드 각각에 대해서 정의될 수도 있고, 휘도 성분과 색차 성분 각각에 대해서 정의될 수도 있다. 또는, 인트라 예측 모드 중 LM 모드를 위한 별도의 오프셋이 정의될 수도 있다. 여기서, LM 모드는, 색차 블록이 휘도 블록의 예측/복원 샘플을 이용하여 예측되는 모드를 의미할 수 있다.The number of quantization parameter offsets may be 1, 2, 3 or more. For example, the quantization parameter offset may be defined at at least one of a picture level, a slice level, and a block level. The quantization parameter offset may be defined for each of the intra mode and the inter mode, or may be defined for each of the luminance component and the chrominance component. Alternatively, a separate offset for the LM mode among the intra prediction modes may be defined. Here, the LM mode may mean a mode in which the chrominance block is predicted using prediction/reconstruction samples of the luminance block.

도 5를 참조하면, 산출된 양자화 파라미터를 이용하여 상기 잔차 계수에 대해 역양자화를 수행할 수 있다(S520).Referring to FIG. 5 , inverse quantization may be performed on the residual coefficient using the calculated quantization parameter ( S520 ).

구체적으로, 상기 역양자화는, 상기 양자화 파라미터 또는 소정의 레벨 스케일값(level scale value) 중 적어도 하나에 기초하여 수행될 수 있다. 상기 레벨 스케일값은, 부호화/복호화 장치에 기-약속된 값일 수도 있고, 부호화 장치에서 부호화되어 시그날링될 수도 있다. 상기 레벨 스케일값은, 1차원 배열의 k개 정수값으로 구성될 수 있다. 예를 들어, 상기 레벨 스케일값은 {40, 45, 51, 57, 64, 72}로 정의될 수 있다. 다만, 이는 레벨 스케일값의 개수 및 정수값을 한정하는 것은 아니다. 즉, 레벨 스케일값은 다른 값으로 정의될 수 있고, 레벨 스케일값의 개수는 4개, 5개, 7개, 8개 또는 그 이상으로 정의될 수도 있다.Specifically, the inverse quantization may be performed based on at least one of the quantization parameter and a predetermined level scale value. The level scale value may be a value pre-promised to the encoding/decoding apparatus, or may be encoded and signaled by the encoding apparatus. The level scale value may be composed of k integer values of a one-dimensional array. For example, the level scale value may be defined as {40, 45, 51, 57, 64, 72}. However, this does not limit the number of level scale values and integer values. That is, the level scale values may be defined as different values, and the number of level scale values may be defined as 4, 5, 7, 8 or more.

한편, 상기 역양자화의 결과값에 소정의 양자화 가중치(m)가 더 적용될 수도 있으며, 이러한 과정을 스케일링(Scaling)이라 부르기로 한다.Meanwhile, a predetermined quantization weight m may be further applied to the result of the inverse quantization, and this process will be referred to as scaling.

상기 양자화 가중치는, 부호화/복호화 장치에 기-약속된 고정된 값으로 유도될 수 있다(A 방법). 이때, 양자화 가중치는, 잔차 블록 내 잔차 계수의 위치에 관계없이 하나의 동일한 값일 수 있다. 또는, 상기 양자화 가중치는, 부호화/복호화 장치에 기-정의된 테이블 정보에 기초하여 유도될 수 있다(B 방법). 상기 테이블 정보는, 잔차 계수의 위치, 블록 크기, 성분 타입 또는 예측 모드 중 적어도 하나에 따른 양자화 가중치를 정의할 수 있다. 또는, 부호화 장치는 잔차 계수의 위치 별로 상기 양자화 가중치를 결정하고, 이를 부호화할 수 있다. 복호화 장치는, 상기 부호화된 양자화 가중치에 관한 정보를 복호화하여, 상기 양자화 가중치를 유도할 수 있다(C 방법). 이때, 부호화 장치는, 이전 위치의 양자화 가중치와 현재 위치의 양자화 가중치 간의 차이만을 부호화할 수 있다. 복호화 장치는, 복호화된 이전 위치의 양자화 가중치와 상기 부호화된 정보를 이용하여, 현재 위치의 양자화 가중치를 유도할 수 있다.The quantization weight may be derived as a fixed value pre-promised to the encoding/decoding apparatus (method A). In this case, the quantization weight may be one and the same value regardless of the position of the residual coefficient in the residual block. Alternatively, the quantization weight may be derived based on table information pre-defined in the encoding/decoding apparatus (method B). The table information may define a quantization weight according to at least one of a position of a residual coefficient, a block size, a component type, and a prediction mode. Alternatively, the encoding apparatus may determine the quantization weight for each position of the residual coefficient and encode the quantization weight. The decoding apparatus may decode the encoded information on the quantization weight to derive the quantization weight (method C). In this case, the encoding apparatus may encode only the difference between the quantization weight of the previous position and the quantization weight of the current position. The decoding apparatus may derive the quantization weight of the current position by using the decoded quantization weight of the previous position and the encoded information.

상기 잔차 블록의 양자화 가중치는, 전술한 A 방법 내지 C 방법 중 어느 하나를 선택하여 유도될 수 있다. 상기 선택은, 잔차 블록의 크기/형태, 분할 타입, 예측 모드, 성분 타입, 변환 타입 또는 소정의 플래그 정보 중 적어도 하나에 기초하여 수행될 수 있다. 상기 플래그 정보는, 양자화 가중치 적용 여부에 관한 플래그, 변환 스킵 여부에 관한 플래그 등을 포함할 수 있다.The quantization weight of the residual block may be derived by selecting any one of methods A to C described above. The selection may be performed based on at least one of a size/shape of a residual block, a partition type, a prediction mode, a component type, a transform type, and predetermined flag information. The flag information may include a flag regarding whether to apply a quantization weight or not, a flag regarding whether to skip transform, and the like.

전술한 A 방법 내지 C 방법에 있어서, 상기 스케일링 리스트의 양자화 가중치는, 휘도 블록과 색차 블록 각각에 대해서 결정될 수 있다. 예를 들어, 휘도 블록과 색차 블록 각각에 대한 스케일링 리스트가 시그날링될 수 있다. 또는, 색차 블록의 스케일링 리스트는, 상기 휘도 블록의 스케일링 리스트를 참조하여 결정될 수도 있다.In the aforementioned methods A to C, the quantization weight of the scaling list may be determined for each of the luminance block and the chrominance block. For example, a scaling list for each of the luminance block and the chrominance block may be signaled. Alternatively, the scaling list of the chrominance block may be determined with reference to the scaling list of the luminance block.

도 5를 참조하면, 역양자화된 잔차 계수에 역변환을 수행하여 잔차 샘플을 복원할 수 있다(S530).Referring to FIG. 5 , a residual sample may be reconstructed by performing an inverse transform on the inverse quantized residual coefficient ( S530 ).

상기 역변환은 소정의 변환 타입을 기반으로 수행되며, 상기 잔차 블록의 변환 타입은 변환 후보 세트에 기초하여 결정될 수 있다. 상기 변환 후보 세트는, n개의 변환 타입을 포함할 수 있다. 예를 들어, 상기 변환 후보 세트는, DCT-II, DCT-V, DCT-VIII, DST-I 또는 DST-VII 중 적어도 하나를 포함할 수 있다.The inverse transform is performed based on a predetermined transform type, and the transform type of the residual block may be determined based on a transform candidate set. The transform candidate set may include n transform types. For example, the transformation candidate set may include at least one of DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII.

부호화/복호화 장치에서, m개의 변환 후보 세트가 정의될 수 있다. 상기 m은 1, 2, 3 또는 그 이상일 수 있다. 상기 m개의 변환 후보 세트 중 어느 하나(이하, 제1 변환 후보 세트라 함)에 속한 변환 타입의 개수 및/또는 종류는 다른 하나(이하, 제2 변환 후보 세트라 함)와 상이할 수 있다. 예를 들어, 제1 변환 후보 세트는 p개의 변환 타입으로 구성되고, 제2 변환 후보 세트는 p보다 작은 q개의 변환 타입으로 구성될 수 있다. 또는, 제1 및 제2 변환 후보 세트가 동일한 개수의 변환 타입으로 구성된 경우라도, 제1 변환 후보 세트에 속한 적어도 하나의 변환 타입은, 제2 변환 후보 세트에 속한 변환 타입과 상이할 수 있다.In the encoding/decoding apparatus, m transform candidate sets may be defined. The m may be 1, 2, 3 or more. The number and/or type of transform types belonging to any one of the m transform candidate sets (hereinafter, referred to as a first transform candidate set) may be different from the other one (hereinafter, referred to as a second transform candidate set). For example, the first transform candidate set may include p transform types, and the second transform candidate set may include q transform types smaller than p. Alternatively, even when the first and second transform candidate sets include the same number of transform types, at least one transform type included in the first transform candidate set may be different from a transform type included in the second transform candidate set.

상기 m개의 변환 후보 세트 중 어느 하나가 선택적으로 이용될 수 있다. Any one of the m transform candidate sets may be selectively used.

상기 변환 후보 세트의 선택은, 잔차 블록의 크기에 기초하여 수행될 수 있다. 예를 들어, 잔차 블록의 크기가 문턱값보다 작거나 같은 경우, p개의 변환 타입으로 구성된 제1 변환 후보 세트가 선택되고, 그렇지 않은 경우, q개의 변환 타입으로 구성된 제2 변환 후보 세트가 선택될 수 있다. 상기 문턱값은, 32, 64, 128, 256 또는 그 이상일 수 있고, 상기 p는 q보다 큰 값일 수 있다. The selection of the transform candidate set may be performed based on the size of the residual block. For example, if the size of the residual block is less than or equal to the threshold, the first transform candidate set composed of p transform types is selected, otherwise, the second transform candidate set composed of q transform types is selected. can The threshold may be 32, 64, 128, 256 or more, and p may be a value greater than q.

또는, 상기 변환 후보 세트의 선택은, 부호화 장치로부터 시그날링되는 정보에 기초하여 수행될 수 있다. 상기 정보는, m개의 변환 후보 세트 중 어느 하나를 특정할 수 있다. 상기 정보는 픽쳐, 슬라이스 또는 블록 중 적어도 하나의 레벨에서 시그날링될 수 있다. Alternatively, the selection of the transformation candidate set may be performed based on information signaled from the encoding apparatus. The information may specify any one of the m transformation candidate sets. The information may be signaled at at least one level of a picture, a slice, or a block.

상기 선택된 변환 후보 타입이 복수의 변환 타입을 포함한 경우, 부호화 장치는 복수의 변환 타입 중 어느 하나를 특정하는 정보를 부호화할 수 있다. 복호화 장치는, 상기 부호화된 정보를 복호화하여 상기 잔차 블록의 변환 타입을 결정할 수 있다. When the selected transform candidate type includes a plurality of transform types, the encoding apparatus may encode information specifying any one of the plurality of transform types. The decoding apparatus may determine a transform type of the residual block by decoding the coded information.

한편, 상기 역변환은, 소정의 플래그에 기초하여 선택적으로 수행될 수도 있다. 여기서, 플래그는 잔차 블록에 대해 역변환이 스킵되는지 여부를 나타낼 수 있다. 예를 들어, 상기 플래그가 1인 경우, 잔차 블록에 대해 역변환이 수행되지 아니하고, 상기 플래그가 0인 경우, 상기 잔차 블록에 대해 역변환이 수행될 수 있다. 따라서, 상기 잔차 블록의 변환 타입은, 상기 플래그가 0인 경우에 한하여 유도될 수 있다. 또는, 상기 역변환은, 잔차 블록의 속성에 기초하여 선택적으로 수행될 수 있다. 복호화 장치는, 잔차 블록의 속성에 기반하여, 역변환이 스킵되는지 여부를 결정할 수도 있다. 상기 속성은, 잔차 블록의 크기/형태, 분할 타입, 예측 모드, 성분 타입, 기타 잔차 계수 관련 부호화 파라미터 등을 의미할 수 있다. Meanwhile, the inverse transform may be selectively performed based on a predetermined flag. Here, the flag may indicate whether the inverse transform is skipped for the residual block. For example, when the flag is 1, inverse transform may not be performed on the residual block, and when the flag is 0, inverse transform may be performed on the residual block. Accordingly, the transform type of the residual block can be derived only when the flag is 0. Alternatively, the inverse transform may be selectively performed based on the attribute of the residual block. The decoding apparatus may determine whether the inverse transform is skipped based on the attribute of the residual block. The attribute may mean a size/shape of a residual block, a partition type, a prediction mode, a component type, and other encoding parameters related to residual coefficients.

상기 역변환(이하, 제1 역변환) 외에 추가적인 역변환(이하, 제2 역변환이라 함)이 더 수행될 수도 있으며, 이는 도 9를 참조하여 살펴 보기로 한다.In addition to the inverse transform (hereinafter, referred to as a first inverse transform), an additional inverse transform (hereinafter, referred to as a second inverse transform) may be further performed, which will be described with reference to FIG. 9 .

도 6은 본 발명이 적용되는 일실시예로서, 양자화 파라미터 예측값(QPpred)을 유도하는 방법을 도시한 것이다.6 illustrates a method of deriving a quantization parameter predicted value (QPpred) according to an embodiment to which the present invention is applied.

도 6을 참조하면, 블록 T에 대한 양자화 파라미터 예측값(QPpred)은, 주변 블록의 양자화 파라미터에 기초하여 유도될 수 있다. 상기 블록 T는 NxM 크기의 블록이고, 정방형 또는 비정방형일 수 있다. Referring to FIG. 6 , a quantization parameter predicted value (QPpred) for a block T may be derived based on a quantization parameter of a neighboring block. The block T is a block of size NxM, and may be square or non-square.

상기 주변 블록은, 상기 블록 T에 공간적/시간적으로 인접한 블록으로서, 블록 T 이전에 기-복호화된 블록을 의미할 수 있다. 예를 들어, 상기 주변 블록은, 블록 T의 좌측 블록, 상단 블록, 좌상단 블록, 우상단 블록 또는 좌하단 블록 중 적어도 하나를 포함할 수 있다. 또는, 상기 주변 블록은, 상기 블록 T에 시간적으로 대응하는 콜 블록(collocated block)을 더 포함할 수도 있다. 상기 콜 블록은, 상기 블록 T와 다른 픽쳐에 속하는 블록으로서, 상기 블록 T의 좌상단 코너 샘플, 우하단 코너 샘플 또는 중앙 샘플 중 적어도 하나의 위치를 포함하는 블록으로 정의될 수 있다.The neighboring block is a block spatially/temporally adjacent to the block T, and may mean a block pre-decoded before the block T. For example, the neighboring block may include at least one of a left block, an upper block, an upper left block, an upper right block, or a lower left block of the block T. Alternatively, the neighboring block may further include a collocated block temporally corresponding to the block T. The collocated block is a block belonging to a different picture from the block T, and may be defined as a block including a position of at least one of an upper-left corner sample, a lower-right corner sample, or a center sample of the block T.

상기 주변 블록의 위치는, 부호화/복호화 장치에 기-약속된 위치일 수 있다. 예를 들어, 상기 기-약속된 위치는, 좌측 블록 및 상단 블록일 수도 있고, 좌측 블록, 상단 블록 및 좌상단 블록일 수도 있다. 다만, 이에 한정되지 아니하며, 좌하단 블록, 우상단 블록 등을 더 포함할 수도 있다. 상기 주변 블록의 위치는, 블록 T 또는 주변 블록 중 적어도 하나의 속성(e.g., 크기, 형태, 분할 뎁스, 분할 타입, 성분 타입 등)에 기초하여 가변적으로 결정될 수도 있다. 예를 들어, 상기 주변 블록은, 블록 T에 인접한 블록 중 가장 면적이 큰 블록으로 결정될 수도 있고, 상호 인접한 경계의 길이가 가장 긴 블록으로 결정될 수도 있다. 이는 블록 T의 상단 블록과 좌측 블록에 대해서 각각 수행될 수 있다.The position of the neighboring block may be a position pre-promised to the encoding/decoding apparatus. For example, the pre-promised position may be a left block and an upper block, or may be a left block, an upper block, and an upper left block. However, the present invention is not limited thereto, and may further include a lower left block, an upper right block, and the like. The position of the neighboring block may be variably determined based on attributes (eg, size, shape, division depth, division type, component type, etc.) of the block T or at least one of the neighboring blocks. For example, the neighboring block may be determined as a block having the largest area among blocks adjacent to the block T, or may be determined as a block having the longest length of an adjacent boundary. This may be performed for the upper block and the left block of block T, respectively.

또는, 상기 주변 블록의 위치를 특정하는 정보가 부호화 장치에서 부호화되어 시그날링될 수도 있다. 상기 정보는, 플래그, 인덱스 등의 형태로 부호화될 수 있다. 예를 들어, 상기 정보가 인덱스 0인 경우, 블록 T의 양자화 파라미터 예측값(QPpred)은 좌측 블록의 양자화 파라미터를 이용하여 유도될 수 있다. 상기 정보가 인덱스 1인 경우, 블록 T의 양자화 파라미터 예측값(QPpred)은 상단 블록의 양자화 파라미터를 이용하여 유도될 수 있다.Alternatively, information specifying the position of the neighboring block may be encoded and signaled by the encoding apparatus. The information may be encoded in the form of a flag, an index, or the like. For example, when the information is index 0, the quantization parameter predicted value (QPpred) of the block T may be derived using the quantization parameter of the left block. When the information is index 1, the quantization parameter predicted value (QPpred) of the block T may be derived using the quantization parameter of the upper block.

상기 주변 블록의 개수는 n개이며, 여기서 n은 1, 2, 3, 4 또는 그 이상의 자연수일 수 있다. 상기 개수는, 부호화/복호화 장치에서 기-약속된 고정된 값일 수 있다. 또는, 상기 개수는, 블록 T 또는 주변 블록 중 적어도 하나의 속성(e.g., 크기, 형태, 분할 뎁스, 분할 타입, 성분 타입 등)에 기초하여 가변적으로 결정될 수도 있다. 또는, 상기 블록 T의 양자화 파라미터 예측값(QPpred)을 유도하기 위해 이용되는 주변 블록의 최대 개수 정보가, 부호화 장치에서 부호화되어 시그날링될 수도 있다. 즉, 블록 T는 상기 최대 개수 정보에 따른 개수 범위 내의 주변 블록을 이용할 수 있다. 상기 최대 개수 정보는, 비디오 시퀀스, 픽쳐, 기타 조각 영역(e.g., 슬라이스, 타일, Coding Tree Block row, 블록) 중 적어도 하나의 레벨에서 시그날링될 수 있다.The number of the neighboring blocks is n, where n may be 1, 2, 3, 4 or more natural numbers. The number may be a fixed value pre-promised in the encoding/decoding device. Alternatively, the number may be variably determined based on attributes (e.g., size, shape, division depth, division type, component type, etc.) of at least one of the block T or neighboring blocks. Alternatively, information on the maximum number of neighboring blocks used to derive the quantization parameter predicted value (QPpred) of the block T may be encoded and signaled by the encoding apparatus. That is, the block T may use neighboring blocks within the number range according to the maximum number information. The maximum number information may be signaled at at least one level of a video sequence, a picture, and other fragment regions (e.g., slice, tile, Coding Tree Block row, block).

전술한 바와 같이, 블록 T의 양자화 파라미터 예측값(QPpred)은 하나 또는 그 이상의 주변 블록을 이용하여 유도될 수 있다. As described above, the quantization parameter predicted value (QPpred) of the block T may be derived using one or more neighboring blocks.

복수의 주변 블록이 이용되는 경우, 블록 T의 양자화 파라미터 예측값(QPpred)은, 복수의 주변 블록의 양자화 파라미터의 중간값, 평균값, 최소값, 최대값 또는 최빈값 등의 연산 과정을 통해서 유도될 수 있다. When a plurality of neighboring blocks are used, the quantization parameter predicted value (QPpred) of the block T may be derived through an operation process such as the median value, average value, minimum value, maximum value, or mode value of the quantization parameters of the plurality of neighboring blocks.

또는, 블록 T의 양자화 파라미터 예측값(QPpred)은, 상단 블록의 QP와 좌측 블록의 QP의 합에서 좌상단 블록의 QP를 뺌으로써 유도될 수도 있다. 이때, 상단 블록 또는 좌측 블록이 복수개인 경우, 상기 상단 블록 또는 좌측 블록의 QP는 중간값, 평균값, 최소값, 최대값 또는 최빈값 등의 연산 과정을 통해서 결정될 수 있다.Alternatively, the quantization parameter predicted value QPpred of the block T may be derived by subtracting the QP of the upper left block from the sum of the QP of the upper block and the QP of the left block. In this case, when there are a plurality of upper block or left block, the QP of the upper block or left block may be determined through a calculation process such as a median value, an average value, a minimum value, a maximum value, or a mode value.

상기 주변 블록 중 비가용 블록이 존재하는 경우, 상기 블록 T의 양자화 파라미터 예측값은, 가용인 주변 블록만을 이용하여 유도될 수 있다. 또는, 상기 주변 블록이 비가용인 경우, 상기 주변 블록의 양자화 파라미터는 소정의 조각 영역에서 정의된 양자화 파라미터에 기초하여 유도될 수 있다. 상기 조각 영역은, 슬라이스, 타일, Coding Tree Block row, 블록 등을 의미할 수 있다. 상기 조각 영역은, 블록 T 이전에 부호화/복호화된 영역을 의미할 수도 있고, 현재 부호화/복호화 대상인 블록 T가 속한 영역을 의미할 수도 있다. 상기 비가용이라 함은, 상기 주변 블록이 물리적으로 존재하지 않는 경우일 수도 있고, 부호화/복호화 장치의 규칙에 의해 참조가 불가능한 경우를 의미할 수도 있다. 예를 들어, 블록 T와 주변 블록이 서로 다른 병렬 처리 영역(e.g., 슬라이스, 타일 등)에 속하는 경우, 블록 T는 상기 주변 블록을 참조하는 것이 허용되지 않을 수 있다.When an unavailable block exists among the neighboring blocks, the predicted value of the quantization parameter of the block T may be derived using only the available neighboring blocks. Alternatively, when the neighboring block is unavailable, the quantization parameter of the neighboring block may be derived based on a quantization parameter defined in a predetermined fragment region. The fragment area may mean a slice, a tile, a Coding Tree Block row, a block, and the like. The fragment region may mean a region encoded/decoded before the block T, or may mean a region to which a block T, which is a current encoding/decoding target, belongs. The unavailability may mean a case in which the neighboring block does not physically exist, or a case in which reference is impossible according to a rule of an encoding/decoding apparatus. For example, when the block T and the neighboring block belong to different parallel processing regions (e.g., slice, tile, etc.), the block T may not be allowed to refer to the neighboring block.

도 7은 본 발명이 적용되는 일실시예로서, 블록 T의 색차 성분에 관한 양자화 파라미터 예측값을 유도하는 방법을 도시한 것이다.7 is a diagram illustrating a method of deriving a quantization parameter predicted value for a chrominance component of a block T as an embodiment to which the present invention is applied.

이하, 블록 T의 휘도 성분과 색차 성분을 각각 휘도 블록과 색차 블록이라 부르기로 한다.Hereinafter, the luminance component and the chrominance component of the block T will be referred to as a luminance block and a chrominance block, respectively.

4:2:0 칼라 포맷인 경우, 색차 블록(Tc)은 휘도 블록(TY)에 대응될 수 있다. 색차 블록의 양자화 파라미터 예측값은, 대응하는 휘도 블록의 양자화 파라미터를 이용하여 유도될 수 있다. In the 4:2:0 color format, the chrominance block Tc may correspond to the luminance block TY. A quantization parameter predicted value of a chrominance block may be derived using a quantization parameter of a corresponding luminance block.

다만, 도 7에 도시된 바와 같이, 휘도 블록과 색차 블록 간의 분할 구조가 상이할 수 있다. 이 경우, 색차 블록에 대응하는 휘도 블록이 복수개일 수 있다. 색차 블록의 양자화 파라미터 예측값은, 복수의 휘도 블록 중 어느 하나의 양자화 파라미터를 이용하여 유도될 수 있다. 이때, 색차 블록의 중앙 샘플의 위치 또는 좌상단 샘플의 위치에 대응하는 휘도 블록이 이용될 수 있다. 색차 블록과 겹치는 면적이 가장 큰 휘도 블록이 이용될 수도 있다. 또는, 색차 블록의 양자화 파라미터 예측값은, 복수의 휘도 블록의 양자화 파라미터의 평균값, 중간값, 최소값, 최대값, 최빈값 등의 연산을 통해 유도될 수 있다. However, as shown in FIG. 7 , the division structure between the luminance block and the chrominance block may be different. In this case, there may be a plurality of luminance blocks corresponding to the color difference blocks. The quantization parameter predicted value of the chrominance block may be derived using any one quantization parameter among a plurality of luminance blocks. In this case, a luminance block corresponding to the position of the center sample or the upper left sample of the chrominance block may be used. A luminance block having the largest overlapping area with the chrominance block may be used. Alternatively, the predicted value of the quantization parameter of the chrominance block may be derived through calculation of the average value, the median value, the minimum value, the maximum value, the mode value, etc. of the quantization parameters of the plurality of luminance blocks.

색차 블록의 양자화 파라미터 예측값은, 주변 블록의 양자화 파라미터를 이용하여 유도될 수도 있으며, 이는 도 6에서 자세히 살펴 보았는바, 여기서 자세한 설명은 생략하기로 한다.The predicted value of the quantization parameter of the chrominance block may be derived using the quantization parameter of the neighboring block, which has been described in detail with reference to FIG. 6 , so a detailed description thereof will be omitted.

전술한 바와 같이, 색차 블록의 양자화 파라미터 예측값은, 대응하는 휘도 블록의 양자화 파라미터를 이용하는 방법(제1 방법)과 색차 블록의 주변 블록의 양자화 파라미터를 이용하는 방법(제2 방법)을 모두 이용하여 유도될 수 있다. 또는, 색차 블록의 양자화 파라미터 예측값은, 제1 방법 또는 제2 방법 중 어느 하나를 선택하여 유도될 수도 있다. As described above, the predicted value of the quantization parameter of the chrominance block is derived using both the method using the quantization parameter of the corresponding luminance block (the first method) and the method using the quantization parameter of the neighboring block of the chrominance block (the second method) can be Alternatively, the quantization parameter predicted value of the chrominance block may be derived by selecting either the first method or the second method.

상기 선택은, 휘도 블록과 색차 블록의 분할 구조 동일 여부, 블록 T의 예측 모드, 인트라 예측 모드, 칼라 포맷 또는 크기/형태 등을 고려하여 수행될 수 있다. 예를 들어, 블록 T가 인터 모드로 부호화되고, 색차 블록의 분할 구조가 휘도 블록의 분할 구조와 동일한 경우, 상기 색차 블록의 양자화 파라미터는 상기 제1 방법을 이용하여 예측될 수 있다. 또는, 색차 블록의 분할 구조가 휘도 블록의 분할 구조와 동일한 경우에는 상기 제1 방법이 이용되고, 그렇지 않은 경우에는 상기 제2 방법이 이용될 수 있다. 또는, 블록 T의 인트라 예측 모드가 LM 모드인 경우, 색차 블록의 양자화 파라미터는 상기 제1 방법을 이용하여 예측될 수 있다. The selection may be performed in consideration of whether the division structure of the luminance block and the chrominance block is the same, the prediction mode of the block T, the intra prediction mode, the color format, or the size/shape. For example, when the block T is encoded in the inter mode and the partition structure of the chrominance block is the same as that of the luminance block, the quantization parameter of the chrominance block may be predicted using the first method. Alternatively, if the division structure of the chrominance block is the same as that of the luminance block, the first method may be used, otherwise the second method may be used. Alternatively, when the intra prediction mode of the block T is the LM mode, the quantization parameter of the chrominance block may be predicted using the first method.

또는, 상기 선택은, 제1 방법 또는 제2 방법 중 어느 하나를 특정하는 정보에 기초하여 수행될 수도 있다. 상기 정보는, 부호화 장치에서 부호화되어 시그날링될 수 있다. 상기 정보는, 비디오 시퀀스, 픽쳐, 기타 조각 영역(e.g., 슬라이스, 타일, Coding Tree Block row, 블록) 중 적어도 하나의 레벨에서 시그날링될 수 있다.Alternatively, the selection may be performed based on information specifying either the first method or the second method. The information may be encoded and signaled by an encoding apparatus. The information may be signaled at at least one level of a video sequence, a picture, and other fragment regions (e.g., slice, tile, Coding Tree Block row, block).

상기 색차 블록의 양자화 파라미터는, 상기 유도된 색차 블록의 양자화 파라미터 예측값과 동일하게 유도될 수도 있고, 소정의 양자화 파라미터 차분값이 가산되어 유도될 수도 있다. 또한, 상기 유도된 양자화 파라미터는 소정의 양자화 파라미터 오프셋을 이용하여 보정될 수 있으며, 이는 도 5에서 살펴본 바와 같다.The quantization parameter of the chrominance block may be derived to be the same as the derived quantization parameter predicted value of the chrominance block, or may be derived by adding a predetermined quantization parameter difference. In addition, the derived quantization parameter may be corrected using a predetermined quantization parameter offset, as shown in FIG. 5 .

일예로, LM 모드로 부호화된 색차 블록의 경우, 양자화 파라미터 예측값이 양자화 파라미터로 설정될 수 있다. 이 경우, 양자화 파라미터 차분값이 시그날링되지 않거나, 시그날링된 양자화 파라미터 차분값을 가산하는 과정이 생략될 수 있다. 또는, LM 모드로 부호화된 색차 블록의 경우, 양자화 파라미터는 1개, 2개 또는 그 이상의 양자화 파라미터 오프셋을 이용하여 보정될 수 있다.For example, in the case of a color difference block encoded in the LM mode, a quantization parameter predicted value may be set as a quantization parameter. In this case, the quantization parameter difference value is not signaled, or the process of adding the signaled quantization parameter difference value may be omitted. Alternatively, in the case of a color difference block encoded in the LM mode, the quantization parameter may be corrected using one, two or more quantization parameter offsets.

도 8은 본 발명이 적용되는 일실시예로서, 양자화 파라미터 차분값(deltaQP)의 시그날링 단위에 기반한 양자화 파라미터 유도 방법을 도시한 것이다.8 illustrates a quantization parameter derivation method based on a signaling unit of a quantization parameter difference value deltaQP according to an embodiment to which the present invention is applied.

부호화 장치는, deltaQP을 부호화하는 블록의 단위를 결정하고, 상기 블록의 크기를 나타내는 정보를 부호화할 수 있다. 여기서, 크기는, 블록의 너비 또는 높이 중 적어도 하나, 너비와 높이의 곱, 너비와 높이의 합, 너비와 높이 중 최소값/최대값 등으로 표현될 수 있다. 복호화 장치는, 상기 시그날링되는 정보를 복호화하여, deltaQP의 시그날링이 허용되는 블록의 최소 크기를 알 수 있다. 상기 정보는, 비디오 시퀀스, 픽쳐, 슬라이스 또는 타일 중 적어도 하나의 레벨에서 시그날링될 수 있다. 또는, 상기 최소 크기는, 변환 블록의 최소 크기로 유도될 수도 있고, 부호화/복호화 장치에 기-약속된 고정된 크기로 정의될 수도 있다. 예를 들어, 상기 최소 크기는, 4x4, 8x4, 4x8, 8x8 등으로 정의될 수 있다. 상기 블록의 크기를 나타내느 정보는, 휘도 성분과 색차 성분에 대해서 각각 시그날링될 수 있다. 또는, 색차 블록에 대한 최소 크기는, 휘도 블록에 대한 최소 크기에 기초하여 유도될 수도 있다. 예를 들어, 4:2:0 칼라 포맷의 경우, 색차 블록의 최소 크기는, 휘도 블록의 최소 크기의 절반으로 결정될 수 있다. 인터 모드의 경우, 색차 블록의 분할 구조는 휘도 블록의 분할 구조와 상이할 수 있으며, 색차 블록의 최소 크기는 휘도 블록의 절반으로 결정될 수 있다.The encoding apparatus may determine a unit of a block encoding deltaQP and encode information indicating the size of the block. Here, the size may be expressed as at least one of the width and height of the block, the product of the width and the height, the sum of the width and the height, and the minimum/maximum value among the width and the height. The decoding apparatus may know the minimum size of a block in which deltaQP signaling is allowed by decoding the signaled information. The information may be signaled at at least one level of a video sequence, a picture, a slice, or a tile. Alternatively, the minimum size may be derived as the minimum size of the transform block, or may be defined as a fixed size pre-promised to the encoding/decoding apparatus. For example, the minimum size may be defined as 4x4, 8x4, 4x8, 8x8, or the like. Information indicating the size of the block may be signaled with respect to a luminance component and a chrominance component, respectively. Alternatively, the minimum size for the chrominance block may be derived based on the minimum size for the luminance block. For example, in the case of a 4:2:0 color format, the minimum size of the chrominance block may be determined to be half the minimum size of the luminance block. In the inter mode, the division structure of the chrominance block may be different from the division structure of the luminance block, and the minimum size of the chrominance block may be determined to be half that of the luminance block.

도 8을 참조하면, 현재 블록의 양자화 파라미터는, 현재 블록의 크기와 상기 최소 크기 간의 비교 결과에 기초하여 유도될 수 있다. 여기서, 현재 블록은 QT, BT, TT 등의 블록 분할 타입에 의해서 더 이상 분할되지 않는 블록을 의미할 수 있다.Referring to FIG. 8 , the quantization parameter of the current block may be derived based on a comparison result between the size of the current block and the minimum size. Here, the current block may mean a block that is no longer divided by a block division type such as QT, BT, or TT.

도 8(a)는 현재 블록의 크기가 2Mx2N이고, 최소 크기가 MxN인 경우를 도시한 것이다. 도 8(a)와 같이, 상기 현재 블록의 크기가 상기 최소 크기보다 큰 경우, 현재 블록의 양자화 파라미터는, QPpred과 시그날링된 deltaQP을 이용하여 유도될 수 있다. FIG. 8(a) illustrates a case where the size of the current block is 2Mx2N and the minimum size is MxN. As shown in FIG. 8A , when the size of the current block is greater than the minimum size, the quantization parameter of the current block may be derived using QPpred and the signaled deltaQP.

상기 QPpred은 전술한 제1 방법 또는 제2 방법 중 적어도 하나에 기초하여 유도될 수 있다. 상기 deltaQP은, 블록 a에서 시그날링될 수 있고, 나머지 블록 b, c, d는 블록 a에서 시그날링된 deltaQP을 공유할 수 있다. 이 경우, 현재 블록은 하나의 양자화 파라미터를 가진다. 또는, 상기 deltaQP은, 최소 크기인 블록 a-d에 대해서 각각 시그날링될 수 있다. 이 경우, 현재 블록에 속한 블록 a-d에 대해서 각각 양자화 파라미터가 유도될 수 있고, 블록 a-d는 서로 상이한 양자화 파라미터를 가질 수 있다.The QPpred may be derived based on at least one of the first method and the second method described above. The deltaQP may be signaled in block a, and the remaining blocks b, c, and d may share the deltaQP signaled in block a. In this case, the current block has one quantization parameter. Alternatively, the deltaQP may be signaled for each block a-d having a minimum size. In this case, quantization parameters may be derived for blocks a-d belonging to the current block, respectively, and blocks a-d may have different quantization parameters.

한편, 상기 현재 블록의 크기와 상기 최소 크기가 동일한 경우, 상기 QPpred과 시그날링된 deltaQP을 이용하여 유도될 수 있음은 물론이다. On the other hand, when the size of the current block and the minimum size are the same, it goes without saying that it can be derived using deltaQP signaled with the QPpred.

도 8(b)는 최소 크기가 MxN이고, 현재 블록(a-d)이 최소 크기보다 작은 경우를 도시한 것이다. 도 8(b)와 같이, 상기 현재 블록의 크기가 상기 최소 크기보다 작은 경우, 상기 현재 블록의 양자화 파라미터는, QPpred과 시그날링된 deltaQP을 이용하여 유도될 수 있다. FIG. 8(b) illustrates a case where the minimum size is MxN and the current blocks a-d are smaller than the minimum size. As shown in FIG. 8B , when the size of the current block is smaller than the minimum size, the quantization parameter of the current block may be derived using QPpred and the signaled deltaQP.

상기 QPpred은, 현재 블록을 기준으로, 전술한 제1 방법 또는 제2 방법 중 적어도 하나에 기초하여 유도될 수 있다. 예를 들어, 블록 a-d에 대해서 각각 QPpred이 유도될 수 있다. 또는, 블록 a에 대해서 QPpred이 유도되고, 나머지 블록 b-d는 블록 a에서 유도된 QPpred을 공유할 수 있다. 또는, 상기 QPpred은, 상기 현재 블록의 상위 블록을 기준으로, 전술한 제1 방법 또는 제2 방법 중 적어도 하나에 기초하여 유도될 수도 있다. 여기서, 상위 블록은, 현재 블록을 포함하는 블록으로서, 현재 블록보다 작은 분할 뎁스를 가진 블록일 수 있다. 예를 들어, 현재 블록의 분할 뎁스가 k인 경우, 상위 블록의 분할 뎁스는 (k-1), (k-2) 등일 수 있다. 상기 상위 블록은, 상기 QPpred을 공유하는 블록의 단위로 정의될 수도 있다. 상기 상위 블록은, 상기 최소 크기와 동일한 크기(MxN)로 설정될 수 있다. 또는, 부호화 장치는 상기 QPpred을 공유하는 블록의 단위를 결정하고, 상기 블록의 단위를 특정하는 정보를 부호화할 수도 있다. 복호화 장치는, 상기 부호화된 정보를 기반으로, 상기 상위 블록의 위치, 크기, 형태 등을 특정할 수 있다.The QPpred may be derived based on at least one of the first method and the second method described above with respect to the current block. For example, QPpred may be derived for each block a-d. Alternatively, QPpred may be derived for block a, and the remaining blocks b-d may share QPpred derived from block a. Alternatively, the QPpred may be derived based on at least one of the first method or the second method with reference to an upper block of the current block. Here, the upper block is a block including the current block, and may be a block having a division depth smaller than that of the current block. For example, when the division depth of the current block is k, the division depth of the upper block may be (k-1), (k-2), or the like. The upper block may be defined in units of blocks sharing the QPpred. The upper block may be set to the same size (MxN) as the minimum size. Alternatively, the encoding apparatus may determine a unit of a block sharing the QPpred and encode information specifying the unit of the block. The decoding apparatus may specify the position, size, shape, etc. of the upper block based on the encoded information.

상기 deltaQP은, 현재 블록의 상위 블록에서 시그날링된 것일 수 있다. 여기서, 상위 블록은, 현재 블록을 포함하는 블록으로서, 현재 블록보다 작은 분할 뎁스를 가진 블록을 의미할 수 있다. 즉, 현재 블록의 분할 뎁스가 k인 경우, 상위 블록의 분할 뎁스는 (k-1), (k-2) 등일 수 있다. 여기서, 상기 상위 블록은 도 8(b)에 도시된 MxN이라 가정한다. 따라서, 블록 a-d에 대해서 동일한 하나의 양자화 파라미터가 유도될 수도 있고, 블록 a-d 각각에 대해서 서로 상이한 양자화 파라미터가 유도될 수도 있다. 또는, 도 8(b)와 같이, 상기 현재 블록의 크기가 상기 최소 크기보다 작은 경우, 상기 현재 블록의 양자화 파라미터는 QPpred을 이용하여 유도될 수 있다. 이때, deltaQP에 대한 복호화가 생략될 수 있다. 상기 QPpred은, 전술한 바와 같이, 현재 블록 또는 상위 블록을 기준으로, 제1 방법 또는 제2 방법 중 적어도 하나에 기초하여 유도될 수 있으며, 자세한 설명은 생략하기로 한다. 마찬가지로, MxN 블록에 속한 블록 a-d에 대해서 하나의 동일한 양자화 파라미터가 유도될 수도 있고, 블록 a-d 각각에 대해서 서로 상이한 양자화 파라미터가 유도될 수도 있다.The deltaQP may be signaled in an upper block of the current block. Here, the upper block is a block including the current block, and may mean a block having a division depth smaller than that of the current block. That is, when the division depth of the current block is k, the division depth of the upper block may be (k-1), (k-2), or the like. Here, it is assumed that the upper block is MxN shown in FIG. 8(b). Accordingly, one same quantization parameter may be derived for blocks a-d, and different quantization parameters may be derived for each of blocks a-d. Alternatively, as shown in FIG. 8B , when the size of the current block is smaller than the minimum size, the quantization parameter of the current block may be derived using QPpred. In this case, decoding for deltaQP may be omitted. As described above, the QPpred may be derived based on at least one of the first method or the second method based on the current block or the upper block, and a detailed description thereof will be omitted. Similarly, one and the same quantization parameter may be derived for blocks a-d belonging to an MxN block, and different quantization parameters may be derived for each of blocks a-d.

한편, 특정 블록이 픽쳐, 슬라이스 또는 타일의 경계에 인접한 블록의 경우, 해당 블록은 상기 최소 크기를 만족하지 않을 수 있다. 이 경우, 해당 블록의 양자화 파라미터는 Qppred만을 이용하여 유도되며, deltaQP에 대한 복호화가 생략될 수 있다.On the other hand, when a specific block is a block adjacent to a boundary of a picture, a slice, or a tile, the corresponding block may not satisfy the minimum size. In this case, the quantization parameter of the corresponding block is derived using only Qppred, and decoding for deltaQP may be omitted.

도 9는 본 발명이 적용되는 일실시예로서, 잔차 계수의 역변환 과정을 도시한 것이다.9 illustrates an inverse transformation process of residual coefficients as an embodiment to which the present invention is applied.

도 9를 참조하면, 잔차 블록의 잔차 샘플은, 잔차 계수에 제1 역변환 또는 제2 역변환 중 적어도 하나를 수행하여 복원될 수 있다. Referring to FIG. 9 , the residual sample of the residual block may be reconstructed by performing at least one of a first inverse transform or a second inverse transform on the residual coefficients.

상기 제2 역변환은, 잔차 블록의 전체 영역에 적용될 수도 있고, 잔차 블록 내 일부 영역에만 적용될 수도 있다. 상기 일부 영역은, 상기 잔차 블록 내 저주파 영역을 의미할 수 있다. 상기 제2 역변환이 적용되는 영역은, 잔차 블록의 크기/형태 또는 제2 역변환의 변환 행렬의 크기/형태 중 적어도 하나를 고려하여 가변적으로 결정될 수 있다.The second inverse transform may be applied to the entire region of the residual block or may be applied only to a partial region in the residual block. The partial region may mean a low-frequency region in the residual block. A region to which the second inverse transform is applied may be variably determined in consideration of at least one of a size/shape of a residual block and a size/shape of a transform matrix of the second inverse transform.

예를 들어, 잔차 블록의 너비 또는 높이 중 어느 하나가 8과 같거나 큰 경우, 8x8의 변환 행렬을 가진 제2 역변환이 적용될 수 있다. 잔차 블록의 크기가 8x8인 경우, 상기 잔차 블록 전체 영역에 상기 제2 역변환이 적용되며, 잔차 블록의 크기가 16x16인 경우, 상기 잔차 블록의 일부 영역에만 상기 제2 역변환이 적용될 수 있다. 상기 일부 영역은, 잔차 블록의 좌상단에 위치한 8x8 영역, 잔차 블록의 상단에 위치한 16x8 영역, 잔차 블록의 좌측에 위치한 8x16 영역, 또는 잔차 블록의 우하단에 위치한 8x8 영역을 제외한 영역을 의미할 수 있다.For example, when either the width or the height of the residual block is equal to or greater than 8, the second inverse transform having a transform matrix of 8×8 may be applied. When the size of the residual block is 8x8, the second inverse transform is applied to the entire area of the residual block, and when the size of the residual block is 16x16, the second inverse transform can be applied only to a partial area of the residual block. The partial region may mean an area excluding the 8x8 region located at the upper left of the residual block, the 16x8 region located at the upper end of the residual block, the 8x16 region located on the left of the residual block, or the 8x8 region located at the lower right of the residual block. .

또는, 잔차 블록의 너비 또는 높이 중 어느 하나가 4인 경우, 4x4의 변환 행렬을 가진 제2 역변환이 적용될 수 있다. 잔차 블록의 크기가 4x8 또는 8x4인 경우, 상기 잔차 블록의 일부 영역(e.g., 잔차 블록의 좌상단에 위치한 4x4 영역)에만 상기 제2 역변환이 적용될 수도 있고, 상기 잔차 블록에 속한 2개의 4x4 영역에 상기 제2 역변환이 각각 적용될 수도 있다.Alternatively, when either the width or the height of the residual block is 4, the second inverse transform having a 4x4 transform matrix may be applied. When the size of the residual block is 4x8 or 8x4, the second inverse transform may be applied only to a partial region of the residual block (e.g., a 4x4 region located at the upper left of the residual block), and the second inverse transform may be applied to two 4x4 regions belonging to the residual block. A second inverse transform may be applied respectively.

상기 제2 역변환의 변환 행렬의 크기는, 4x4, 8x8, 16x16, 32x32 또는 그 이상일 수 있다. 상기 변환 행렬의 형태는 정방형에 한하지 않으며, 비정방형으로 구현될 수도 있다. 다만, 변환의 복잡도를 줄이기 위해, 제2 역변환에 허용되는 변환 행렬의 크기는 NxM 이하로 제한될 수 있다. 상기 N과 M은 각각 4, 8 또는 16일 수 있으며, N과 M은 서로 동일하거나 상이할 수 있다.The size of the transform matrix of the second inverse transform may be 4x4, 8x8, 16x16, 32x32, or more. The shape of the transformation matrix is not limited to a square, and may be implemented in a non-square shape. However, in order to reduce the complexity of the transformation, the size of the transformation matrix allowed for the second inverse transformation may be limited to NxM or less. Each of N and M may be 4, 8, or 16, and N and M may be the same as or different from each other.

상기 제2 역변환 과정에서, 잔차 블록의 변환 타입은, 도 5에서 설명한 변환 타입 유도 방법을 통해 결정될 수 있다. 또는, 상기 제2 역변환에서의 변환 타입은, 부호화/복호화 장치에 기-약속된 것일 수 있다. 예를 들어, 상기 제2 역변환에서의 변환 타입으로, 전술한 5개의 변환 타입 중 어느 하나가 고정적으로 이용될 수 있다.In the second inverse transform process, the transform type of the residual block may be determined through the transform type derivation method described with reference to FIG. 5 . Alternatively, the transform type in the second inverse transform may be a pre-promised one to the encoding/decoding apparatus. For example, as a transform type in the second inverse transform, any one of the above-described five transform types may be fixedly used.

상기 제2 역변환은, 잔차 블록에 제1 역변환이 스킵되는지 여부를 나타내는 플래그(이하, 제1 플래그라 함)에 기초하여 선택적으로 수행될 수 있다. 즉, 상기 제1 플래그에 따라, 잔차 블록에 제1 역변환이 스킵되는 경우, 상기 제2 역변환의 수행도 스킵될 수 있다. The second inverse transform may be selectively performed based on a flag (hereinafter, referred to as a first flag) indicating whether the first inverse transform is skipped in the residual block. That is, when the first inverse transform is skipped on the residual block according to the first flag, the second inverse transform may also be skipped.

또는, 제2 역변환이 스킵되는지 여부를 나타내는 플래그(이하, 제2 플래그라 함)가 별도로 시그날링될 수도 있다. 상기 제2 플래그가 1인 경우, 제2 역변환이 수행되지 아니하고, 상기 플래그가 0인 경우, 제2 역변환이 수행될 수 있다. 상기 제1 플래그와 제2 플래그는 서로 독립적으로 부호화되어 시그날링될 수 있다. 또는, 상기 제1 플래그와 제2 플래그 중 어느 하나는 다른 하나에 종속적으로 시그날링될 수 있다. 예를 들어, 상기 제1 플래그와 제2 플래그 중 어느 하나가 1인 경우에만, 다른 하나가 시그날링될 수 있다. 반대로, 상기 제1 플래그와 제2 플래그 중 어느 하나가 0인 경우에만, 다른 하나가 시그날링될 수도 있다.Alternatively, a flag indicating whether the second inverse transform is skipped (hereinafter referred to as a second flag) may be signaled separately. When the second flag is 1, a second inverse transform is not performed, and when the flag is 0, a second inverse transform may be performed. The first flag and the second flag may be encoded and signaled independently of each other. Alternatively, any one of the first flag and the second flag may be signaled dependently on the other. For example, only when either one of the first flag and the second flag is 1, the other may be signaled. Conversely, only when either one of the first flag and the second flag is 0, the other may be signaled.

상기 제2 역변환은, 잔차 블록에 속한 넌-제로 잔차 계수의 개수가 n개보다 적은 경우에는 적용되지 않을 수 있다. 여기서, n은 부호화/복호화 장치에 기-약속된 값일 수 있다. 예를 들어, n은 1, 2, 3 또는 8이하의 자연수일 수 있다. 또는, n은 잔차 블록의 크기에 기초하여 가변적으로 결정될 수도 있다. The second inverse transform may not be applied when the number of non-zero residual coefficients included in the residual block is less than n. Here, n may be a value pre-promised to the encoding/decoding apparatus. For example, n may be 1, 2, 3, or a natural number of 8 or less. Alternatively, n may be variably determined based on the size of the residual block.

한편, 도 9는 제1 역변환 이전에 제2 역변환을 수행하는 것을 도시하고 있으나, 이는 역변환의 수행 순서를 한정한 것은 아니다. 즉, 제2 역변환은 제1 역변환 이전에 수행될 수도 있고, 제1 역변환 이후에 수행될 수도 있다. 제2 역변환이 제1 역변환 이전에 수행되는 경우, 도 5에서 살펴본 스케일링은, 역양자화와 제2 역변환 사이에서 수행될 수도 있고, 제1 역변환과 제2 역변환 사이에서 수행될 수도 있다. 반대로, 제2 역변환이 제1 역변환 이후에 수행되는 경우, 도 5에서 살펴본 스케일링은, 역양자화와 제1 역변환 사이에서 수행될 수도 있고, 제1 역변환과 제2 역변환 사이에서 수행될 수도 있다.Meanwhile, although FIG. 9 shows that the second inverse transform is performed before the first inverse transform, the order of performing the inverse transform is not limited. That is, the second inverse transform may be performed before the first inverse transform or may be performed after the first inverse transform. When the second inverse transform is performed before the first inverse transform, the scaling described in FIG. 5 may be performed between inverse quantization and the second inverse transform, or between the first inverse transform and the second inverse transform. Conversely, when the second inverse transform is performed after the first inverse transform, the scaling described in FIG. 5 may be performed between the inverse quantization and the first inverse transform, or between the first inverse transform and the second inverse transform.

본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.Example methods of the present disclosure are expressed as a series of operations for clarity of description, but this is not intended to limit the order in which the steps are performed, and if necessary, each step may be performed simultaneously or in a different order. In order to implement the method according to the present disclosure, other steps may be included in addition to the illustrated steps, steps may be excluded from some steps, and/or other steps may be included except for some steps.

본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.Various embodiments of the present disclosure do not list all possible combinations but are intended to describe representative aspects of the present disclosure, and matters described in various embodiments may be applied independently or in combination of two or more.

또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. For implementation by hardware, one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose It may be implemented by a processor (general processor), a controller, a microcontroller, a microprocessor, and the like.

본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure includes software or machine-executable instructions (eg, operating system, application, firmware, program, etc.) that cause an operation according to the method of various embodiments to be executed on a device or computer, and such software or and non-transitory computer-readable media in which instructions and the like are stored and executable on a device or computer.

Claims (13)

비트스트림으로부터 현재 블록의 잔차 계수를 복호화하는 단계;
양자화 파라미터를 이용하여, 상기 잔차 계수에 대해 역양자화를 수행하는 단계;
상기 역양자화된 잔차 계수에 대해 역변환을 수행하여, 상기 현재 블록의 잔차 샘플을 복원하는 단계를 포함하되,
상기 역변환은, 상기 현재 블록의 변환 후보 세트에 기초하여 수행되고,
상기 현재 블록의 변환 후보 세트는, 제1 변환 후보 세트 및 제2 변환 후보 세트를 포함하는 복수의 변환 후보 세트들 중에서 결정된 하나의 변환 후보 세트이고,
상기 복수의 변환 후보 세트들 각각은, 상기 현재 블록의 역변환에 이용 가능한 적어도 하나의 변환 타입을 포함하는, 비디오 복호화 방법.
decoding the residual coefficients of the current block from the bitstream;
performing inverse quantization on the residual coefficients using a quantization parameter;
performing an inverse transform on the inverse quantized residual coefficient to reconstruct a residual sample of the current block,
The inverse transform is performed based on a transform candidate set of the current block,
The transform candidate set of the current block is one transform candidate set determined from among a plurality of transform candidate sets including a first transform candidate set and a second transform candidate set,
Each of the plurality of transform candidate sets includes at least one transform type usable for inverse transform of the current block.
제1항에 있어서,
상기 현재 블록의 변환 후보 세트는, 상기 현재 블록의 크기에 기초하여 상기 복수의 변환 후보 세트들 중 어느 하나로 결정되는, 비디오 복호화 방법.
According to claim 1,
The transform candidate set of the current block is determined as one of the plurality of transform candidate sets based on the size of the current block.
제2항에 있어서,
상기 현재 블록의 크기가 임계값보다 작거나 같은 경우, 상기 현재 블록의 변환 후보 세트는, 상기 복수의 변환 후보 세트들 중 상기 제1 변환 후보 세트로 결정되고,
상기 현재 블록의 크기가 상기 임계값보다 큰 경우, 상기 현재 블록의 변환 후보 세트는, 상기 복수의 변환 후보 세트들 중 상기 제2 변환 후보 세트로 결정되는, 비디오 복호화 방법.
3. The method of claim 2,
When the size of the current block is less than or equal to a threshold value, the transformation candidate set of the current block is determined as the first transformation candidate set among the plurality of transformation candidate sets,
When the size of the current block is greater than the threshold, the transform candidate set of the current block is determined as the second transform candidate set among the plurality of transform candidate sets.
제3항에 있어서,
상기 임계값은, 32, 64 또는 128 중 어느 하나인, 비디오 복호화 방법.
4. The method of claim 3,
The threshold value is any one of 32, 64 or 128, the video decoding method.
제4항에 있어서,
상기 제1 변환 후보 세트에 포함된 변환 타입의 개수는, 상기 제2 변환 후보 세트에 포함된 변환 타입의 개수와 상이한, 비디오 복호화 방법.
5. The method of claim 4,
The number of transform types included in the first transform candidate set is different from the number of transform types included in the second transform candidate set.
제5항에 있어서,
상기 제1 변환 후보 세트는 DCT-8 및 DST-7를 포함하고,
상기 제2 변환 후보 세트는 DCT-2, DCT-8, 및 DST-7을 포함하는, 비디오 복호화 방법.
6. The method of claim 5,
The first transformation candidate set includes DCT-8 and DST-7,
The second transform candidate set includes DCT-2, DCT-8, and DST-7.
제1항에 있어서,
상기 현재 블록의 변환 후보 세트는, 상기 비트스트림으로부터 시그널링된 제1 정보에 기초하여 상기 복수의 변환 후보 세트들 중 어느 하나로 결정되는, 비디오 복호화 방법.
According to claim 1,
The transform candidate set of the current block is determined as one of the plurality of transform candidate sets based on first information signaled from the bitstream.
제7항에 있어서,
상기 제1 변환 후보 세트에 포함된 변환 타입의 개수는, 상기 제2 변환 후보 세트에 포함된 변환 타입의 개수와 동일한, 비디오 복호화 방법.
8. The method of claim 7,
The number of transform types included in the first transform candidate set is the same as the number of transform types included in the second transform candidate set.
제8항에 있어서,
상기 제1 변환 후보 세트에 포함된 변환 타입들 중 어느 하나는, 상기 제2 변환 후보 세트에 포함된 변환 타입들과 상이하고,
상기 제1 변환 후보 세트에 포함된 변환 타입들 중 다른 하나는, 상기 제2 변환 후보 세트에 포함된 변환 타입들 중 어느 하나와 동일한, 비디오 복호화 방법.
9. The method of claim 8,
any one of transform types included in the first transform candidate set is different from transform types included in the second transform candidate set;
Another one of transform types included in the first transform candidate set is the same as any one of transform types included in the second transform candidate set.
제9항에 있어서,
상기 제1 변환 후보 세트는 DCT-2 및 DST-7를 포함하고,
상기 제2 변환 후보 세트는 DCT-8 및 DST-7을 포함하는, 비디오 복호화 방법.
10. The method of claim 9,
The first transformation candidate set includes DCT-2 and DST-7,
The second transform candidate set includes DCT-8 and DST-7.
제10항에 있어서,
상기 비트스트림으로부터 시그널링된 제2 정보에 기초하여, 상기 현재 블록의 변환 후보 세트의 변환 타입들로부터 상기 현재 블록의 역변환에 대한 변환 타입이 결정되는, 비디오 복호화 방법.
11. The method of claim 10,
A video decoding method, wherein a transform type for the inverse transform of the current block is determined from transform types of a transform candidate set of the current block based on the second information signaled from the bitstream.
현재 블록의 잔차 샘플에 대해 변환을 수행하여, 상기 현재 블록의 잔차 계수를 획득하는 단계;
양자화 파라미터를 이용하여, 상기 잔차 계수에 대해 양자화를 수행하는 단계;
상기 현재 블록의 양자화된 잔차 계수를 부호화하는 단계를 포함하되,
상기 변환은, 상기 현재 블록의 변환 후보 세트에 기초하여 수행되고,
상기 현재 블록의 변환 후보 세트는, 제1 변환 후보 세트 및 제2 변환 후보 세트를 포함하는 복수의 변환 후보 세트들 중에서 결정된 하나의 변환 후보 세트이고,
상기 복수의 변환 후보 세트들 각각은, 상기 현재 블록의 변환에 이용 가능한 적어도 하나의 변환 타입을 포함하는, 비디오 부호화 방법.
performing transformation on the residual samples of the current block to obtain residual coefficients of the current block;
performing quantization on the residual coefficients using a quantization parameter;
encoding the quantized residual coefficients of the current block;
The transform is performed based on a transform candidate set of the current block,
The transform candidate set of the current block is one transform candidate set determined from among a plurality of transform candidate sets including a first transform candidate set and a second transform candidate set,
Each of the plurality of transform candidate sets includes at least one transform type usable for transform of the current block.
비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체에 있어서,
상기 비트스트림은, 현재 블록의 잔차 샘플을 부호화하여 생성된 잔차 계수를 포함하고,
상기 현재 블록의 잔차 샘플은, 상기 잔차 계수에 대해 역양자화 또는 역변환 중 적어도 하나를 수행하여, 상기 비트스트림으로부터 복호화되고,
상기 역양자화는, 양자화 파라미터에 기초하여 수행되고,
상기 역변환은, 상기 현재 블록의 변환 후보 세트에 기초하여 수행되고,
상기 현재 블록의 변환 후보 세트는, 제1 변환 후보 세트 및 제2 변환 후보 세트를 포함하는 복수의 변환 후보 세트들 중에서 결정된 하나의 변환 후보 세트이고,
상기 복수의 변환 후보 세트들 각각은, 상기 현재 블록의 역변환에 이용 가능한 적어도 하나의 변환 타입을 포함하는, 컴퓨터로 판독가능한 기록 매체.
A computer-readable recording medium storing a bitstream, comprising:
The bitstream includes residual coefficients generated by encoding residual samples of the current block,
The residual sample of the current block is decoded from the bitstream by performing at least one of inverse quantization and inverse transform on the residual coefficient,
The inverse quantization is performed based on a quantization parameter,
The inverse transform is performed based on a transform candidate set of the current block,
The transform candidate set of the current block is one transform candidate set determined from among a plurality of transform candidate sets including a first transform candidate set and a second transform candidate set,
Each of the plurality of transform candidate sets includes at least one transform type usable for inverse transform of the current block.
KR1020220049380A 2019-07-02 2022-04-21 A method and an apparatus for encoding/decoding a residual block based on quantization parameter KR102525555B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020220049380A KR102525555B1 (en) 2019-07-02 2022-04-21 A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR1020230052027A KR20230058356A (en) 2019-07-02 2023-04-20 A method and an apparatus for encoding/decoding a residual block based on quantization parameter

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190079267A KR102390733B1 (en) 2018-06-11 2019-07-02 A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR1020220049380A KR102525555B1 (en) 2019-07-02 2022-04-21 A method and an apparatus for encoding/decoding a residual block based on quantization parameter

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020190079267A Division KR102390733B1 (en) 2018-06-11 2019-07-02 A method and an apparatus for encoding/decoding a residual block based on quantization parameter

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020230052027A Division KR20230058356A (en) 2019-07-02 2023-04-20 A method and an apparatus for encoding/decoding a residual block based on quantization parameter

Publications (2)

Publication Number Publication Date
KR20220054771A true KR20220054771A (en) 2022-05-03
KR102525555B1 KR102525555B1 (en) 2023-04-25

Family

ID=81591267

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020220049380A KR102525555B1 (en) 2019-07-02 2022-04-21 A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR1020230052027A KR20230058356A (en) 2019-07-02 2023-04-20 A method and an apparatus for encoding/decoding a residual block based on quantization parameter

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020230052027A KR20230058356A (en) 2019-07-02 2023-04-20 A method and an apparatus for encoding/decoding a residual block based on quantization parameter

Country Status (1)

Country Link
KR (2) KR102525555B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170023893A (en) * 2017-02-07 2017-03-06 인텔렉추얼디스커버리 주식회사 Apparatus and Method of Adaptive Quantization Parameter Encoding and Decoder based on Quad Tree Structure
KR20170106592A (en) * 2016-03-11 2017-09-21 광운대학교 산학협력단 Method and apparatus for video coding using variable size unit of quantized coefficient group
KR20180001485A (en) * 2016-06-24 2018-01-04 한국전자통신연구원 Method and apparatus for encoding and decoding a video image based on transform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170106592A (en) * 2016-03-11 2017-09-21 광운대학교 산학협력단 Method and apparatus for video coding using variable size unit of quantized coefficient group
KR20180001485A (en) * 2016-06-24 2018-01-04 한국전자통신연구원 Method and apparatus for encoding and decoding a video image based on transform
KR20170023893A (en) * 2017-02-07 2017-03-06 인텔렉추얼디스커버리 주식회사 Apparatus and Method of Adaptive Quantization Parameter Encoding and Decoder based on Quad Tree Structure

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
H. 265: High efficiency video coding. Recommendation ITU-T H.265, 2013.04.* *
Tzu-Der Chuang, et al. AhG Quantization: Sub-LCU Delta QP. JCTVC-E051. 2011.03.11. *

Also Published As

Publication number Publication date
KR20230058356A (en) 2023-05-03
KR102525555B1 (en) 2023-04-25

Similar Documents

Publication Publication Date Title
KR102030384B1 (en) A method and an apparatus for encoding/decoding residual coefficient
KR101997681B1 (en) A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR20190140423A (en) A method and an apparatus for encoding/decoding a residual block using scaling
KR20220019731A (en) A video encoding/decoding method and apparatus
KR102390733B1 (en) A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR20180032775A (en) Method and apparatus for processing a video signal based on adaptive block patitioning
KR102389267B1 (en) A method and an apparatus for processing a video signal based on reference between components
US11350093B2 (en) Residual coefficient encoding/decoding method and device
KR102525555B1 (en) A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR102390731B1 (en) A method and an apparatus for encoding/decoding residual coefficient
KR102512179B1 (en) A method and an apparatus for encoding/decoding residual coefficient
KR101997686B1 (en) A method and an apparatus for encoding/decoding a residual block using scaling
KR20200026394A (en) A method and an apparatus for encoding/decoding a intra prediction
KR102660273B1 (en) A method and an apparatus for processing a video signal based on reference between components
KR20220051156A (en) A method and an apparatus for processing a video signal based on reference between components
KR20240054951A (en) A method and an apparatus for processing a video signal based on reference between components
KR20220061085A (en) Method and apparatus for encoding/decoding a video signal
KR20210078773A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210119024A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210120243A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210078768A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20170058854A (en) Method and apparatus for adaptive motion search range control in the parallel processing encoding environment

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant