KR20210091673A - Video Encoding and Decoding Using Adaptive Color Transform - Google Patents

Video Encoding and Decoding Using Adaptive Color Transform Download PDF

Info

Publication number
KR20210091673A
KR20210091673A KR1020210005127A KR20210005127A KR20210091673A KR 20210091673 A KR20210091673 A KR 20210091673A KR 1020210005127 A KR1020210005127 A KR 1020210005127A KR 20210005127 A KR20210005127 A KR 20210005127A KR 20210091673 A KR20210091673 A KR 20210091673A
Authority
KR
South Korea
Prior art keywords
block
current block
color
control flag
level
Prior art date
Application number
KR1020210005127A
Other languages
Korean (ko)
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
Application filed by 현대자동차주식회사, 이화여자대학교 산학협력단, 기아 주식회사 filed Critical 현대자동차주식회사
Priority to US17/792,460 priority Critical patent/US20230130958A1/en
Priority to PCT/KR2021/000527 priority patent/WO2021145691A1/en
Publication of KR20210091673A publication Critical patent/KR20210091673A/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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • 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/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/186Methods 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 colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • H04N19/426Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements using memory downsizing methods
    • 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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

This disclosure relates to video encoding and decoding using adaptive color transform on a residual signal. According to an aspect of the present disclosure, depending on a syntax element indicating a maximum transform size allowed for a sequence of pictures, the allowance of color space transform is controlled at a sequence level, or depending on the size of a coding block the application of color space transform is controlled at the block level. Thereby, the maximum amount of memory required by adaptive color transform is limited. A method for decoding video data includes the steps of: obtaining first residual data; determining whether to apply a color space transform to the first residual data; generating second residual data; generating a prediction block; and generating a restored block.

Description

적응적 색상 변환을 이용하는 비디오 부호화 및 복호화{Video Encoding and Decoding Using Adaptive Color Transform}Video Encoding and Decoding Using Adaptive Color Transform

본 발명은 비디오 부호화 및 복호화에 관한 것이다. 더욱 상세하게는, 잔차 신호에 적응적 색상 변환을 이용하는 비디오 부호화 및 복호화에 대한 것이다.The present invention relates to video encoding and decoding. More specifically, it relates to video encoding and decoding using adaptive color transforms on residual signals.

비디오 데이터는 음성 데이터나 정지 영상 데이터 등에 비하여 많은 데이터량을 가지기 때문에, 압축을 위한 처리 없이 그 자체를 저장하거나 전송하기 위해서는 메모리를 포함하여 많은 하드웨어 자원을 필요로 한다. Since video data has a large amount of data compared to audio data or still image data, it requires a lot of hardware resources including memory to store or transmit itself without compression processing.

따라서, 통상적으로 비디오 데이터를 저장하거나 전송할 때에는 부호화기를 사용하여 비디오 데이터를 압축하여 저장하거나 전송하며, 복호화기에서는 압축된 비디오 데이터를 수신하여 압축을 해제하고 재생한다. 이러한 비디오 압축 기술로는 H.264/AVC를 비롯하여, H.264/AVC에 비해 약 40% 정도의 부호화 효율을 향상시킨 HEVC(High Efficiency Video Coding)가 존재한다. Therefore, in general, when storing or transmitting video data, an encoder is used to compress and store or transmit the video data, and a decoder receives, decompresses, and reproduces the compressed video data. As such a video compression technology, H.264/AVC and High Efficiency Video Coding (HEVC), which improves encoding efficiency by about 40% compared to H.264/AVC, exist.

그러나, 비디오를 구성하는 각 픽처들의 크기 및 해상도, 프레임율이 점차 증가하고 있고, 이에 따라 부호화해야 하는 데이터량도 증가하고 있으므로 기존의 압축 기술보다 더 부호화 효율이 좋고 화질 개선 효과도 높은 새로운 압축 기술이 요구된다.However, as the size, resolution, and frame rate of each picture constituting a video are gradually increasing, and accordingly, the amount of data to be encoded is also increasing. Therefore, a new compression technique with better encoding efficiency and higher picture quality than existing compression techniques. this is required

본 개시는, 적응적 색상 변환에 의해 요구되는 최대 메모리 크기를 줄이는 것을 포함하여, 적응적 색상 변환을 효율적으로 운용하는 몇몇 개선된 방식들이 제시된다.This disclosure presents several improved ways of efficiently operating adaptive color conversion, including reducing the maximum memory size required by adaptive color conversion.

본 개시의 일 측면은, 비디오 데이터를 복호화하는 방법을 제공한다. 상기 복호화 방법은, 비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 획득하는 단계; 상위 레벨의 색상 변환 제어 플래그와 블록 레벨의 색상 변환 제어 플래그에 기초하여 상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용 여부를 결정하는 단계; 상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용된다고 결정하는 것에 응답하여, 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하는 단계; 상기 현재 블록에 대한 예측 블록을 생성하는 단계; 및 상기 예측 블록과 상기 제 2 잔차 데이터에 기초하여 상기 현재 블록에 대한 복원된 블록을 생성하는 단계를 포함한다. One aspect of the present disclosure provides a method of decoding video data. The decoding method may include: obtaining first residual data for a current block from a bitstream; determining whether to apply color space conversion to the first residual data based on a color conversion control flag of a higher level and a color conversion control flag of a block level; in response to determining that a color space transform is applied to the first residual data, performing an inverse color transform on the first residual data to generate second residual data; generating a prediction block for the current block; and generating a reconstructed block for the current block based on the prediction block and the second residual data.

본 개시의 다른 측면은 하나 이상의 프로세서를 포함하는 비디오 데이터를 복호화하기 위한 장치를 제공한다. 하나 이상의 프로세서는, 비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 획득하고; 상위 레벨의 색상 변환 제어 플래그와 블록 레벨의 색상 변환 제어 플래그에 기초하여 상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용 여부를 결정하고; 상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용된다고 결정하는 것에 응답하여, 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하고; 상기 현재 블록에 대한 예측 블록을 생성하고, 상기 예측 블록과 상기 제 2 잔차 데이터에 기초하여 상기 현재 블록에 대한 복원된 블록을 생성하도록 구성된다.Another aspect of the present disclosure provides an apparatus for decoding video data including one or more processors. The one or more processors are configured to: obtain first residual data for a current block from the bitstream; determine whether to apply color space transformation to the first residual data based on a color conversion control flag of a higher level and a color conversion control flag of a block level; in response to determining that a color space transform is applied to the first residual data, perform an inverse color transform on the first residual data to generate second residual data; and generate a prediction block for the current block, and generate a reconstructed block for the current block based on the prediction block and the second residual data.

상기 상위 레벨의 색상 변환 제어 플래그는 상기 현재 블록이 포함된 픽쳐들의 시퀀스에 허용되는 최대 변환 크기에 의존하여 상기 비트스트림에서 시그널링되고, 상기 블록 레벨의 색상 변환 제어 플래그는 상기 상위 레벨의 색상 변환 제어 플래그에 의존하여 상기 비트스트림에서 시그널링되며, 상기 상위 레벨의 색상 변환 제어 플래그와 상기 블록 레벨의 색상 변환 제어 플래그는 상기 비트스트림에서 시그널링되지 않을 때 거짓(false)으로 추론된다.The upper-level color conversion control flag is signaled in the bitstream depending on a maximum conversion size allowed for a sequence of pictures including the current block, and the block-level color conversion control flag is the upper-level color conversion control flag. Signaled in the bitstream depending on a flag, the upper-level color conversion control flag and the block-level color conversion control flag are inferred to be false when not signaled in the bitstream.

본 개시의 다른 측면에 따르면, 비디오 데이터를 복호화하는 방법은, 비트스트림으로부터 비디오 데이터의 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 신택스 엘리먼트를 복호화하는 단계; 상기 최대 변환 크기가 64보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 상기 비트스트림으로부터 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되는지 여부를 지시하는 제 1 제어 플래그를 복호화하는 단계; 및 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상기 제 1 제어 플래그에 의해 지시될 때, 상기 비트스트림으로부터 상기 시퀀스 내의 현재 블록에 상기 색상 공간 변환이 적용되는지 여부를 지시하는 제 2 제어 플래그를 복호화하는 단계를 포함한다. 상기 방법은 상기 현재 블록에 상기 색상 공간 변환이 적용된다고 상기 제 2 제어 플래그에 의해 지시될 때, 상기 비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 복원하고 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하는 단계; 상기 현재 블록에 대한 예측 블록을 생성하는 단계; 및 상기 예측 블록과 상기 제 2 잔차 데이터에 기초하여 상기 현재 블록에 대한 복원된 블록을 생성하는 단계를 더 포함한다.According to another aspect of the present disclosure, a method of decoding video data includes: decoding a syntax element indicating a maximum transform size allowed for a sequence of pictures of video data from a bitstream; decoding a first control flag indicating whether application of a color space transform is permitted to blocks in the sequence from the bitstream when the maximum transform size is smaller than 64 indicated by the syntax element; and a second indicating whether the color space transformation is applied to a current block in the sequence from the bitstream when the first control flag indicates that application of the color space transformation is permitted to the blocks in the sequence. and decoding the control flag. The method reconstructs first residual data for a current block from the bitstream and inverse color transform on the first residual data when the second control flag indicates that the color space transform is applied to the current block. to generate second residual data; generating a prediction block for the current block; and generating a reconstructed block for the current block based on the prediction block and the second residual data.

도 1은 본 개시의 기술들을 구현할 수 있는 비디오 부호화 장치에 대한 예시적인 블록도이다.
도 2는 QTBTTT 구조를 이용하여 블록을 분할하는 방법을 설명하기 위한 도면이다.
도 3은 복수의 인트라 예측 모드들을 나타낸 도면이다.
도 4는 본 개시의 기술들을 구현할 수 있는 비디오 복호화 장치의 예시적인 블록도이다.
도 5는 본 개시의 기술들에 사용될 수 있는 적응적 색상 변환을 채용한 비디오 복호화기의 개략도이다.
도 6은 본 개시의 일 측면에 따른 비디오 데이터를 부호화하는 방법을 도시한 흐름도이다.
도 7은 본 개시의 일 측면에 따른 비디오 데이터를 복호화하는 방법을 도시한 흐름도이다.
도 8은 본 개시의 다른 측면에 따른 비디오 데이터를 복호화하는 방법을 도시한 흐름도이다.
1 is an exemplary block diagram of a video encoding apparatus that may implement the techniques of this disclosure.
2 is a diagram for explaining a method of dividing a block using a QTBTTT structure.
3 is a diagram illustrating a plurality of intra prediction modes.
4 is an exemplary block diagram of a video decoding apparatus capable of implementing the techniques of the present disclosure.
5 is a schematic diagram of a video decoder employing adaptive color conversion that may be used in the techniques of this disclosure.
6 is a flowchart illustrating a method of encoding video data according to an aspect of the present disclosure.
7 is a flowchart illustrating a method of decoding video data according to an aspect of the present disclosure.
8 is a flowchart illustrating a method of decoding video data according to another aspect of the present disclosure.

이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성 요소들에 식별 부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail with reference to exemplary drawings. It should be noted that in adding identification codes to the components of each drawing, the same components are to have the same reference numerals as much as possible even though they are indicated on different drawings. In addition, in describing the present invention, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.

도 1은 본 개시의 기술들을 구현할 수 있는 비디오 부호화 장치에 대한 예시적인 블록도이다. 이하에서는 도 1을 참조하여 비디오 부호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.1 is an exemplary block diagram of a video encoding apparatus that may implement the techniques of this disclosure. Hereinafter, a video encoding apparatus and sub-components of the apparatus will be described with reference to FIG. 1 .

비디오 부호화 장치는 픽처 분할부(110), 예측부(120), 감산기(130), 변환부(140), 양자화부(145), 재정렬부(150), 엔트로피 부호화부(155), 역양자화부(160), 역변환부(165), 가산기(170), 루프 필터부(180) 및 메모리(190)를 포함하여 구성될 수 있다.The video encoding apparatus includes a picture division unit 110 , a prediction unit 120 , a subtractor 130 , a transform unit 140 , a quantization unit 145 , a reordering unit 150 , an entropy encoding unit 155 , and an inverse quantization unit. 160 , an inverse transform unit 165 , an adder 170 , a loop filter unit 180 , and a memory 190 may be included.

비디오 부호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.Each component of the video encoding apparatus may be implemented as hardware or software, or a combination of hardware and software. In addition, the function of each component may be implemented in software and the microprocessor may be implemented to execute the function of the software corresponding to each component.

하나의 비디오(비디오)는 복수의 픽처들로 구성된다. 각 픽처들은 복수의 영역으로 분할되고 각 영역마다 부호화가 수행된다. 예를 들어, 하나의 픽처는 하나 이상의 타일(Tile) 또는/및 슬라이스(Slice)로 분할된다. 여기서, 하나 이상의 타일을 타일 그룹(Tile Group)으로 정의할 수 있다. 각 타일 또는/슬라이스는 하나 이상의 CTU(Coding Tree Unit)로 분할된다. 그리고 각 CTU는 트리 구조에 의해 하나 이상의 CU(Coding Unit)들로 분할된다. 각 CU에 적용되는 정보들은 CU의 신택스로서 부호화되고, 하나의 CTU에 포함된 CU들에 공통적으로 적용되는 정보는 CTU의 신택스로서 부호화된다. 또한, 하나의 슬라이스 내의 모든 블록들에 공통적으로 적용되는 정보는 슬라이스 헤더의 신택스로서 부호화되며, 하나 이상의 픽처들을 구성하는 모든 블록들에 적용되는 정보는 픽처 파라미터 셋(PPS, Picture Parameter Set) 혹은 픽처 헤더에 부호화된다. 나아가, 복수의 픽처로 구성된 시퀀스에 공통으로 참조하는 정보들은 시퀀스 파라미터 셋(SPS, Sequence Parameter Set)에 부호화된다. 또한, 하나의 타일 또는 타일 그룹에 공통으로 적용되는 정보는 타일 또는 타일 그룹 헤더의 신택스로서 부호화될 수도 있다.One video (video) is composed of a plurality of pictures. Each picture is divided into a plurality of regions, and encoding is performed for each region. For example, one picture is divided into one or more tiles and/or slices. Here, one or more tiles may be defined as a tile group. Each tile or/slice is divided into one or more Coding Tree Units (CTUs). And each CTU is divided into one or more CUs (Coding Units) by a tree structure. Information applied to each CU is encoded as a syntax of the CU, and information commonly applied to CUs included in one CTU is encoded as a syntax of the CTU. In addition, information commonly applied to all blocks in one slice is encoded as a syntax of a slice header, and information applied to all blocks constituting one or more pictures is a picture parameter set (PPS) or a picture. encoded in the header. Furthermore, information commonly referred to in a sequence composed of a plurality of pictures is encoded in a sequence parameter set (SPS). Also, information commonly applied to one tile or tile group may be encoded as a syntax of a tile or tile group header.

픽처 분할부(110)는 CTU(Coding Tree Unit)의 크기를 결정한다. CTU의 크기에 대한 정보(CTU size)는 SPS 또는 PPS의 신택스로서 부호화되어 비디오 복호화 장치로 전달된다. The picture divider 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is encoded as a syntax of the SPS or PPS and transmitted to the video decoding apparatus.

픽처 분할부(110)는 비디오를 구성하는 각 픽처(picture)를 미리 결정된 크기를 가지는 복수의 CTU(Coding Tree Unit)들로 분할한 이후에, 트리 구조(tree structure)를 이용하여 CTU를 반복적으로(recursively) 분할한다. 트리 구조에서의 리프 노드(leaf node)가 부호화의 기본 단위인 CU(coding unit)가 된다. The picture divider 110 divides each picture constituting a video into a plurality of coding tree units (CTUs) having a predetermined size, and then repeatedly divides the CTUs using a tree structure. (recursively) divide. A leaf node in the tree structure becomes a coding unit (CU), which is a basic unit of encoding.

트리 구조로는 상위 노드(혹은 부모 노드)가 동일한 크기의 네 개의 하위 노드(혹은 자식 노드)로 분할되는 쿼드트리(QuadTree, QT), 또는 상위 노드가 두 개의 하위 노드로 분할되는 바이너리트리(BinaryTree, BT), 또는 상위 노드가 1:2:1 비율로 세 개의 하위 노드로 분할되는 터너리트리(TernaryTree, TT), 또는 이러한 QT 구조, BT 구조 및 TT 구조 중 둘 이상을 혼용한 구조일 수 있다. 예컨대, QTBT(QuadTree plus BinaryTree) 구조가 사용될 수 있고, 또는 QTBTTT(QuadTree plus BinaryTree TernaryTree) 구조가 사용될 수 있다. 여기서, BTTT를 합쳐서 MTT(Multiple-Type Tree)라 지칭될 수 있다. As a tree structure, a quadtree (QT) in which a parent node (or parent node) is divided into four child nodes (or child nodes) of the same size, or a binary tree (BinaryTree) in which a parent node is divided into two child nodes , BT), or a ternary tree (TT) in which a parent node is divided into three child nodes in a 1:2:1 ratio, or a structure in which two or more of these QT structures, BT structures, and TT structures are mixed there is. For example, a QuadTree plus BinaryTree (QTBT) structure may be used, or a QuadTree plus BinaryTree TernaryTree (QTBTTT) structure may be used. Here, BTTT may be collectively referred to as a Multiple-Type Tree (MTT).

도 2는 QTBTTT 분할 트리 구조를 보인다. 도 2에서 보는 바와 같이, CTU는 먼저 QT 구조로 분할될 수 있다. 쿼드트리 분할은 분할 블록(splitting block)의 크기가 QT에서 허용되는 리프 노드의 최소 블록 크기(MinQTSize)에 도달할 때까지 반복될 수 있다. QT 구조의 각 노드가 하위 레이어의 4개의 노드들로 분할되는지 여부를 지시하는 제1 플래그(QT_split_flag)는 엔트로피 부호화부(155)에 의해 부호화되어 비디오 복호화 장치로 시그널링된다. QT의 리프 노드가 BT에서 허용되는 루트 노드의 최대 블록 크기(MaxBTSize)보다 크지 않은 경우, BT 구조 또는 TT 구조 중 어느 하나 이상으로 더 분할될 수 있다. BT 구조 및/또는 TT 구조에서는 복수의 분할 방향이 존재할 수 있다. 예컨대, 해당 노드의 블록이 가로로 분할되는 방향과 세로로 분할되는 방향 두 가지가 존재할 수 있다. 도 2와 같이, MTT 분할이 시작되면, 노드들이 분할되었는지 여부를 지시하는 제2 플래그(mtt_split_flag)와, 분할이 되었다면 추가적으로 분할 방향(vertical 혹은 horizontal)을 나타내는 플래그 및/또는 분할 타입(Binary 혹은 Ternary)을 나타내는 플래그가 엔트로피 부호화부(155)에 의해 부호화되어 비디오 복호화 장치로 시그널링된다. 대안적으로, 각 노드가 하위 레이어의 4개의 노드들로 분할되는지 여부를 지시하는 제1 플래그(QT_split_flag)를 부호화하기에 앞서, 그 노드가 분할되는지 여부를 지시하는 CU 분할 플래그(split_cu_flag)가 부호화될 수도 있다. CU 분할 플래그(split_cu_flag) 값이 분할되지 않았음을 지시하는 경우, 해당 노드의 블록이 분할 트리 구조에서의 리프 노드(leaf node)가 되어 부호화의 기본 단위인 CU(coding unit)가 된다. CU 분할 플래그(split_cu_flag) 값이 분할됨을 지시하는 경우, 비디오 부호화 장치는 전술한 방식으로 제1 플래그부터 부호화를 시작한다.2 shows the QTBTTT split tree structure. As shown in FIG. 2 , the CTU may be first divided into a QT structure. The quadtree splitting may be repeated until the size of a splitting block reaches the minimum block size (MinQTSize) of a leaf node allowed in QT. A first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of a lower layer is encoded by the entropy encoder 155 and signaled to the video decoding apparatus. If the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in the BT, it may be further divided into any one or more of the BT structure or the TT structure. A plurality of division directions may exist in the BT structure and/or the TT structure. For example, there may be two directions in which the block of the corresponding node is divided horizontally and vertically. As shown in FIG. 2 , when MTT splitting starts, a second flag (mtt_split_flag) indicating whether or not nodes are split, and a flag indicating additionally split directions (vertical or horizontal) and/or split type (Binary or Ternary) ) is encoded by the entropy encoder 155 and signaled to the video decoding apparatus. Alternatively, before encoding the first flag (QT_split_flag) indicating whether each node is split into four nodes of a lower layer, a CU split flag (split_cu_flag) indicating whether the node is split is encoded could be When the CU split flag (split_cu_flag) value indicates that it is not split, the block of the corresponding node becomes a leaf node in the split tree structure and becomes a coding unit (CU), which is a basic unit of coding. When the CU split flag (split_cu_flag) value indicates to be split, the video encoding apparatus starts encoding from the first flag in the above-described manner.

트리 구조의 다른 예시로서 QTBT가 사용되는 경우, 해당 노드의 블록을 동일 크기의 두 개 블록으로 가로로 분할하는 타입(즉, symmetric horizontal splitting)과 세로로 분할하는 타입(즉, symmetric vertical splitting) 두 가지가 존재할 수 있다. BT 구조의 각 노드가 하위 레이어의 블록으로 분할되는지 여부를 지시하는 분할 플래그(split_flag) 및 분할되는 타입을 지시하는 분할 타입 정보가 엔트로피 부호화부(155)에 의해 부호화되어 비디오 복호화 장치로 전달된다. 한편, 해당 노드의 블록을 서로 비대칭 형태의 두 개의 블록으로 분할하는 타입이 추가로 더 존재할 수도 있다. 비대칭 형태에는 해당 노드의 블록을 1:3의 크기 비율을 가지는 두 개의 직사각형 블록으로 분할하는 형태가 포함될 수 있고, 혹은 해당 노드의 블록을 대각선 방향으로 분할하는 형태가 포함될 수도 있다.When QTBT is used as another example of the tree structure, there are two types of splitting the block of the corresponding node into two blocks of the same size horizontally (ie, symmetric horizontal splitting) and vertically (ie, symmetric vertical splitting). branches may exist. A split flag (split_flag) indicating whether each node of the BT structure is split into blocks of a lower layer and split type information indicating a split type are encoded by the entropy encoder 155 and transmitted to the video decoding apparatus. On the other hand, there may be additionally a type in which the block of the corresponding node is divided into two blocks having an asymmetric shape. The asymmetric form may include a form in which the block of the corresponding node is divided into two rectangular blocks having a size ratio of 1:3, or a form in which the block of the corresponding node is divided in a diagonal direction.

CU는 CTU로부터의 QTBT 또는 QTBTTT 분할에 따라 다양한 크기를 가질 수 있다. 이하에서는, 부호화 또는 복호화하고자 하는 CU(즉, QTBTTT의 리프 노드)에 해당하는 블록을 '현재 블록'이라 칭한다. QTBT 또는 QTBTTT 분할의 채용에 따라, 현재 블록의 모양은 정사각형뿐만 아니라 직사각형일 수도 있다.A CU may have various sizes depending on the QTBT or QTBTTT split from the CTU. Hereinafter, a block corresponding to a CU to be encoded or decoded (ie, a leaf node of QTBTTT) is referred to as a 'current block'. Depending on the adoption of QTBT or QTBTTT partitioning, the shape of the current block may be rectangular as well as square.

예측부(120)는 현재 블록을 예측하여 예측 블록을 생성한다. 예측부(120)는 인트라 예측부(122)와 인터 예측부(124)를 포함한다. The prediction unit 120 generates a prediction block by predicting the current block. The prediction unit 120 includes an intra prediction unit 122 and an inter prediction unit 124 .

인트라 예측부(122)는 현재 블록이 포함된 현재 픽처 내에서 현재 블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재 블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재한다. 예컨대, 도 3a에서 보는 바와 같이, 복수의 인트라 예측모드는 planar 모드와 DC 모드를 포함하는 2개의 비방향성 모드와 65개의 방향성 모드를 포함할 수 있다. 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다.The intra prediction unit 122 predicts pixels in the current block by using pixels (reference pixels) located around the current block in the current picture including the current block. A plurality of intra prediction modes exist according to a prediction direction. For example, as shown in FIG. 3A , the plurality of intra prediction modes may include two non-directional modes including a planar mode and a DC mode and 65 directional modes. According to each prediction mode, the neighboring pixels to be used and the formula are defined differently.

인트라 예측부(122)는 현재 블록을 부호화하는데 사용할 인트라 예측모드를 결정할 수 있다. 일부 예들에서, 인트라 예측부(122)는 여러 인트라 예측모드들을 사용하여 현재 블록을 인코딩하고, 테스트된 모드들로부터 사용할 적절한 인트라 예측모드를 선택할 수도 있다. 예를 들어, 인트라 예측부(122)는 여러 테스트된 인트라 예측모드들에 대한 레이트 왜곡(rate-distortion) 분석을 사용하여 레이트 왜곡 값들을 계산하고, 테스트된 모드들 중 최선의 레이트 왜곡 특징들을 갖는 인트라 예측모드를 선택할 수도 있다.The intra prediction unit 122 may determine an intra prediction mode to be used for encoding the current block. In some examples, the intra prediction unit 122 may encode the current block using several intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, the intra prediction unit 122 calculates rate-distortion values using rate-distortion analysis for several tested intra prediction modes, and has the best rate-distortion characteristics among the tested modes. An intra prediction mode may be selected.

인트라 예측부(122)는 복수의 인트라 예측모드 중에서 하나의 인트라 예측모드를 선택하고, 선택된 인트라 예측모드에 따라 결정되는 주변 픽셀(참조 픽셀)과 연산식을 사용하여 현재 블록을 예측한다. 선택된 인트라 예측모드에 대한 정보는 엔트로피 부호화부(155)에 의해 부호화되어 비디오 복호화 장치로 전달된다.The intra prediction unit 122 selects one intra prediction mode from among a plurality of intra prediction modes, and predicts the current block by using a neighboring pixel (reference pixel) determined according to the selected intra prediction mode and an equation. Information on the selected intra prediction mode is encoded by the entropy encoder 155 and transmitted to the video decoding apparatus.

인터 예측부(124)는 움직임 보상 과정을 통해 현재 블록에 대한 예측 블록을 생성한다. 인터 예측부(124)는 현재 픽처보다 먼저 부호화 및 복호화된 참조픽처 내에서 현재 블록과 가장 유사한 블록을 탐색하고, 그 탐색된 블록을 이용하여 현재 블록에 대한 예측 블록을 생성한다. 그리고, 현재 픽처 내의 현재 블록과 참조픽처 내의 예측 블록 간의 변위(displacement)에 해당하는 움직임벡터(motion vector)를 생성한다. 일반적으로, 움직임 추정은 루마(luma) 컴포넌트에 대해 수행되고, 루마 컴포넌트에 기초하여 계산된 모션 벡터는 루마 컴포넌트 및 크로마 컴포넌트 모두에 대해 사용된다. 현재 블록을 예측하기 위해 사용된 참조픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함하는 움직임 정보는 엔트로피 부호화부(155)에 의해 부호화되어 비디오 복호화 장치로 전달된다. 인터 예측부(124)는, 예측의 정확성을 높이기 위해, 참조 픽처 또는 참조 블록에 대한 보간을 수행할 수도 있다. 즉, 연속한 두 정수 픽셀 사이의 서브 픽셀들은 그 두 정수 픽셀을 포함한 연속된 복수의 정수 픽셀들에 필터 계수들을 적용하여 보간된다. 보간된 참조 픽처에 대해서 현재 블록과 가장 유사한 블록을 탐색하는 과정을 수행하면, 움직임 벡터는 정수 픽셀 단위의 정밀도(precision)가 아닌 소수 단위의 정밀도까지 표현될 수 있다. 움직임벡터의 정밀도 또는 해상도(resolution)은 부호화하고자 하는 대상 영역, 예컨대, 슬라이스, 타일, CTU, CU 등의 단위마다 다르게 설정될 수 있다. The inter prediction unit 124 generates a prediction block for the current block through a motion compensation process. The inter prediction unit 124 searches for a block most similar to the current block in the coded and decoded reference picture before the current picture, and generates a prediction block for the current block by using the found block. Then, a motion vector corresponding to the displacement between the current block in the current picture and the prediction block in the reference picture is generated. In general, motion estimation is performed for a luma component, and a motion vector calculated based on the luma component is used for both the luma component and the chroma component. Motion information including information on a reference picture and information on a motion vector used to predict the current block is encoded by the entropy encoder 155 and transmitted to the video decoding apparatus. The inter prediction unit 124 may perform interpolation on a reference picture or reference block in order to increase prediction accuracy. That is, sub-pixels between two consecutive integer pixels are interpolated by applying filter coefficients to a plurality of consecutive integer pixels including the two integer pixels. When the process of searching for a block most similar to the current block is performed with respect to the interpolated reference picture, the motion vector may be expressed up to the precision of the decimal unit rather than the precision of the integer pixel unit. The precision or resolution of the motion vector may be set differently for each unit of a target region to be encoded, for example, a slice, a tile, a CTU, or a CU.

감산기(130)는 현재 블록으로부터 인트라 예측부(122) 또는 인터 예측부(124)에 의해 생성된 예측 블록을 감산하여 잔차 블록을 생성한다.The subtractor 130 generates a residual block by subtracting the prediction block generated by the intra prediction unit 122 or the inter prediction unit 124 from the current block.

변환부(140)는 잔차 블록 내의 잔차 신호들을 변환할 수 있다. 잔차 블록의 2차원 크기를 변환을 수행하기 위한 블록 크기인 변환 단위(Transform Unit, 이하 'TU')로 사용할 수 있다. 또는, 잔차 블록을 복수 개의 서브블록으로 분할하고 각 서브블록을 TU로 사용하여 해당 서브블록 내의 잔차 신호들을 변환할 수도 있다.The transform unit 140 may transform the residual signals in the residual block. The two-dimensional size of the residual block may be used as a transform unit (hereinafter, 'TU'), which is a block size for performing transformation. Alternatively, a residual block may be divided into a plurality of subblocks and residual signals in the corresponding subblock may be transformed by using each subblock as a TU.

변환부(140)는 잔차 블록을 하나 이상의 서브블록들로 나누고, 변환을 하나 이상의 서브블록들에 적용하여, 변환 블록들의 잔차 값들을 픽셀 도메인에서 주파수 도메인으로 변환한다. 주파수 도메인에서, 변환된 블록들은 하나 이상의 변환 계수 값들을 포함하는 계수블록(coefficient block)들 또는 변환 블록(transform block)이라고 지칭된다. 변환에는 2차원 변환 커널(kernel)이 사용될 수 있으며, 수평 방향 변환과 수직 방향 방향에 각각 1차원 변환 커널이 사용될 수도 있다. 변환 커널은 이산 코사인 변환(DCT), 이산 사인 변환(DST) 등에 기반할 수 있다.The transform unit 140 divides the residual block into one or more subblocks and applies a transform to the one or more subblocks to transform the residual values of the transform blocks from the pixel domain to the frequency domain. In the frequency domain, transformed blocks are referred to as coefficient blocks or transform blocks including one or more transform coefficient values. A two-dimensional transform kernel may be used for the transform, and a one-dimensional transform kernel may be used for each of the horizontal transform and the vertical direction. The transform kernel may be based on a discrete cosine transform (DCT), a discrete sine transform (DST), or the like.

변환부(140)는 잔차 블록 또는 변환 단위에 대해 가로 방향과 세로 방향으로 개별적으로 변환을 수행할 수 있다. 변환을 위해, 다양한 타입의 변환 커널 또는 변환 매트릭스가 사용될 수 있다. 예컨대, 가로 방향 변환과 세로 방향 변환을 위한 변환 커널의 쌍을 MTS(Multiple Transform Set)로 정의할 수 있다. 변환부(140)는 MTS 중 변환 효율이 가장 좋은 하나의 변환 커널 쌍을 선택하고 가로 및 세로 방향으로 각각 잔차 블록을 변환할 수 있다. MTS 중에서 선택된 변환 커널 쌍에 대한 정보(mts_idx)는 엔트로피 부호화부(155)에 의해 부호화되어 비디오 복호화 장치로 시그널링된다.The transform unit 140 may separately transform the residual block or transform unit in a horizontal direction and a vertical direction. For transformation, various types of transformation kernels or transformation matrices may be used. For example, a pair of transform kernels for horizontal transformation and vertical transformation may be defined as a multiple transform set (MTS). The transform unit 140 may select one transform kernel pair having the best transform efficiency among MTSs and transform the residual blocks in horizontal and vertical directions, respectively. The information (mts_idx) on the transform kernel pair selected from the MTS is encoded by the entropy encoder 155 and signaled to the video decoding apparatus.

양자화부(145)는 변환부(140)로부터 출력되는 변환 계수들을 양자화 파라미터를 이용하여 양자화하고, 양자화된 변환 계수들을 엔트로피 부호화부(155)로 출력한다. 양자화부(145)는, 어떤 블록 혹은 프레임에 대해, 변환 없이, 관련된 잔차 블록을 곧바로 양자화할 수도 있다. 양자화부(145)는 변환 블록 내의 변환 계수들의 위치에 따라 서로 다른 양자화 계수(스케일링 값)을 적용할 수도 있다. 2차원으로 배열된 양자화된 변환 계수들에 적용되는 양자화 계수들의 행렬은 부호화되어 비디오 복호화 장치로 시그널링될 수 있다.The quantization unit 145 quantizes the transform coefficients output from the transform unit 140 using a quantization parameter, and outputs the quantized transform coefficients to the entropy encoding unit 155 . The quantization unit 145 may directly quantize a related residual block for a certain block or frame without transformation. The quantization unit 145 may apply different quantization coefficients (scaling values) according to positions of the transform coefficients in the transform block. A matrix of quantization coefficients applied to two-dimensionally arranged quantized transform coefficients may be encoded and signaled to a video decoding apparatus.

재정렬부(150)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다. 재정렬부(150)는 계수 스캐닝(coefficient scanning)을 통해 2차원의 계수 어레이를 1차원의 계수 시퀀스로 변경할 수 있다. 예를 들어, 재정렬부(150)에서는 지그-재그 스캔(zig-zag scan) 또는 대각선 스캔(diagonal scan)을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원의 계수 시퀀스를 출력할 수 있다. 변환 단위의 크기 및 인트라 예측모드에 따라 지그-재그 스캔 대신 2차원의 계수 어레이를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측모드에 따라 지그-재그 스캔, 대각선 스캔, 수직 방향 스캔 및 수평 방향 스캔 중에서 사용될 스캔 방법이 결정될 수도 있다.The reordering unit 150 may rearrange the coefficient values on the quantized residual values. The reordering unit 150 may change a two-dimensional coefficient array into a one-dimensional coefficient sequence through coefficient scanning. For example, the reordering unit 150 may output a one-dimensional coefficient sequence by scanning from DC coefficients to coefficients in a high frequency region using a zig-zag scan or a diagonal scan. . A vertical scan for scanning a two-dimensional coefficient array in a column direction and a horizontal scan for scanning a two-dimensional block shape coefficient in a row direction may be used instead of the zig-zag scan according to the size of the transform unit and the intra prediction mode. That is, a scanning method to be used among zig-zag scan, diagonal scan, vertical scan, and horizontal scan may be determined according to the size of the transform unit and the intra prediction mode.

엔트로피 부호화부(155)는, CABAC(Context-based Adaptive Binary Arithmetic Code), 지수 골롬(Exponential Golomb) 등의 다양한 부호화 방식을 사용하여, 재정렬부(150)로부터 출력된 1차원의 양자화된 변환 계수들의 시퀀스를 부호화함으로써 비트스트림을 생성한다. The entropy encoding unit 155 uses various encoding methods such as Context-based Adaptive Binary Arithmetic Code (CABAC) and Exponential Golomb to convert the one-dimensional quantized transform coefficients output from the reordering unit 150 . A bitstream is created by encoding the sequence.

또한, 엔트로피 부호화부(155)는 블록 분할과 관련된 CTU size, CU 분할 플래그, QT 분할 플래그, MTT 분할 타입, MTT 분할 방향 등의 정보를 부호화하여, 비디오 복호화 장치가 비디오 부호화 장치와 동일하게 블록을 분할할 수 있도록 한다. 또한, 엔트로피 부호화부(155)는 현재 블록이 인트라 예측에 의해 부호화되었는지 아니면 인터 예측에 의해 부호화되었는지 여부를 지시하는 예측 타입에 대한 정보를 부호화하고, 예측 타입에 따라 인트라 예측정보(즉, 인트라 예측모드에 대한 정보) 또는 인터 예측정보(참조픽처 및 움직임벡터에 대한 정보)를 부호화한다. 또한, 엔트로피 부호화부(155)는 양자화와 관련된 정보, 즉, 양자화 파라미터에 대한 정보 및 양자화 행렬에 대한 정보를 부호화한다.In addition, the entropy encoder 155 encodes information such as CTU size, CU split flag, QT split flag, MTT split type, and MTT split direction related to block splitting, so that the video decoding apparatus divides the block in the same way as the video encoding apparatus. to be able to divide. Also, the entropy encoder 155 encodes information on a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and intra prediction information (ie, intra prediction) according to the prediction type. Mode information) or inter prediction information (information about reference pictures and motion vectors) is encoded. Also, the entropy encoder 155 encodes information related to quantization, that is, information about a quantization parameter and information about a quantization matrix.

역양자화부(160)는 양자화부(145)로부터 출력되는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 생성한다. 역변환부(165)는 역양자화부(160)로부터 출력되는 변환 계수들을 주파수 도메인으로부터 공간 도메인으로 변환하여 잔차 블록을 복원한다.The inverse quantization unit 160 inverse quantizes the quantized transform coefficients output from the quantization unit 145 to generate transform coefficients. The inverse transform unit 165 reconstructs a residual block by transforming the transform coefficients output from the inverse quantization unit 160 from the frequency domain to the spatial domain.

가산부(170)는 복원된 잔차 블록과 예측부(120)에 의해 생성된 예측 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록 내의 픽셀들은 다음 순서의 블록을 인트라 예측할 때 참조 픽셀로서 사용된다.The addition unit 170 reconstructs the current block by adding the reconstructed residual block to the prediction block generated by the prediction unit 120 . Pixels in the reconstructed current block are used as reference pixels when intra-predicting the next block.

루프(loop) 필터부(180)는 블록 기반의 예측 및 변환/양자화로 인해 발생하는 블록킹 아티팩트(blocking artifacts), 링잉 아티팩트(ringing artifacts), 블러링 아티팩트(blurring artifacts) 등을 줄이기 위해 복원된 픽셀들에 대한 필터링을 수행한다. 루프 필터부(180)는 디블록킹 필터(182), SAO(Sample Adaptive Offset) 필터(184) 및 ALF(Adaptive Loop Filter, 186) 중 하나 이상을 포함할 수 있다.The loop filter unit 180 reconstructs pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. generated due to block-based prediction and transformation/quantization. filter on them. The loop filter unit 180 may include at least one of a deblocking filter 182 , a sample adaptive offset (SAO) filter 184 , and an adaptive loop filter (ALF) 186 .

디블록킹 필터(182)는 블록 단위의 부호화/복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하기 위해 복원된 블록 간의 경계를 필터링하고, SAO 필터(184)는 디블록킹 필터링된 이미지에 대해 추가적인 필터링을 수행한다. SAO 필터(184)는 손실 부호화(lossy coding)로 인해 발생하는 복원된 픽셀과 원본 픽셀 간의 차이를 보상하기 위해 사용되는 필터로서, 각 복원된 픽셀들에 그에 대응하는 오프셋에 가산되는 방식으로 수행된다. ALF(186)는 필터링을 수행할 대상 픽셀 및 그 대상 픽셀의 주변픽셀들에 필터 계수들을 적용하여 대상 픽셀에 대한 필터링을 수행한다. ALF(186)는 이미지에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF에 사용될 필터 계수들에 대한 정보는 부호화되어 비디오 복호화 장치로 시그널링될 수 있다.The deblocking filter 182 filters the boundary between the reconstructed blocks in order to remove blocking artifacts caused by block-by-block encoding/decoding, and the SAO filter 184 adds additional information to the deblocking-filtered image. perform filtering. The SAO filter 184 is a filter used to compensate for a difference between a reconstructed pixel and an original pixel caused by lossy coding, and is performed in such a way that an offset corresponding to each reconstructed pixel is added. . The ALF 186 performs filtering on the target pixel by applying filter coefficients to the target pixel to be filtered and neighboring pixels of the target pixel. The ALF 186 divides the pixels included in the image into a predetermined group and then determines one filter to be applied to the corresponding group, thereby differentially filtering each group. Information on filter coefficients to be used for ALF may be encoded and signaled to a video decoding apparatus.

루프 필터부(180)를 통해 필터링된 복원블록은 메모리(190)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용될 수 있다.The restored block filtered through the loop filter unit 180 is stored in the memory 190 . When all blocks in one picture are reconstructed, the reconstructed picture may be used as a reference picture for inter prediction of blocks in a picture to be encoded later.

도 4는 본 개시의 기술들을 구현할 수 있는 비디오 복호화 장치의 예시적인 기능 블록도이다. 이하에서는 도 4를 참조하여 비디오 복호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.4 is an exemplary functional block diagram of a video decoding apparatus capable of implementing the techniques of the present disclosure. Hereinafter, a video decoding apparatus and sub-components of the apparatus will be described with reference to FIG. 4 .

비디오 복호화 장치는 엔트로피 복호화부(410), 재정렬부(415), 역양자화부(420), 역변환부(430), 예측부(440), 가산기(450), 루프 필터부(460) 및 메모리(470)를 포함하여 구성될 수 있다. The video decoding apparatus includes an entropy decoding unit 410, a reordering unit 415, an inverse quantization unit 420, an inverse transform unit 430, a prediction unit 440, an adder 450, a loop filter unit 460, and a memory ( 470) may be included.

도 1의 비디오 부호화 장치와 마찬가지로, 비디오 복호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.Like the video encoding apparatus of FIG. 1 , each component of the video decoding apparatus may be implemented as hardware or software, or a combination of hardware and software. In addition, the function of each component may be implemented in software and the microprocessor may be implemented to execute the function of the software corresponding to each component.

엔트로피 복호화부(410)는 비디오 부호화 장치에 의해 생성된 비트스트림을 복호화하여 블록 분할과 관련된 정보를 추출함으로써 복호화하고자 하는 현재 블록을 결정하고, 현재 블록을 복원하기 위해 필요한 예측정보와 잔차 신호에 대한 정보 등을 추출한다.The entropy decoding unit 410 decodes the bitstream generated by the video encoding apparatus and extracts information related to block division to determine a current block to be decoded, and prediction information and residual signal required to reconstruct the current block. extract information, etc.

엔트로피 복호화부(410)는 SPS(Sequence Parameter Set) 또는 PPS(Picture Parameter Set)로부터 CTU size에 대한 정보를 추출하여 CTU의 크기를 결정하고, 픽처를 결정된 크기의 CTU로 분할한다. 그리고, CTU를 트리 구조의 최상위 레이어, 즉, 루트 노드로 결정하고, CTU에 대한 분할정보를 추출함으로써 트리 구조를 이용하여 CTU를 분할한다. The entropy decoder 410 determines the size of the CTU by extracting information on the CTU size from a sequence parameter set (SPS) or a picture parameter set (PPS), and divides the picture into CTUs of the determined size. Then, the CTU is determined as the uppermost layer of the tree structure, that is, the root node, and the CTU is divided using the tree structure by extracting division information on the CTU.

예컨대, QTBTTT 구조를 사용하여 CTU를 분할하는 경우, 먼저 QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 MTT의 분할과 관련된 제2 플래그(MTT_split_flag) 및 분할 방향(vertical / horizontal) 및/또는 분할 타입(binary / ternary) 정보를 추출하여 해당 리프 노드를 MTT 구조로 분할한다. 이를 통해 QT의 리프 노드 이하의 각 노드들을 BT 또는 TT 구조로 반복적으로(recursively) 분할한다.For example, when a CTU is split using the QTBTTT structure, a first flag (QT_split_flag) related to QT splitting is first extracted and each node is split into four nodes of a lower layer. And, for the node corresponding to the leaf node of QT, the second flag (MTT_split_flag) related to the split of MTT and the split direction (vertical / horizontal) and / or split type (binary / ternary) information are extracted and the corresponding leaf node is set to MTT split into structures. Through this, each node below the leaf node of QT is recursively divided into a BT or TT structure.

또 다른 예로서, QTBTTT 구조를 사용하여 CTU를 분할하는 경우, 먼저 CU의 분할 여부를 지시하는 CU 분할 플래그(split_cu_flag)를 추출하고, 해당 블록이 분할된 경우, 제1 플래그(QT_split_flag)를 추출할 수도 있다. 분할 과정에서 각 노드는 0번 이상의 반복적인 QT 분할 후에 0번 이상의 반복적인 MTT 분할이 발생할 수 있다. 예컨대, CTU는 바로 MTT 분할이 발생하거나, 반대로 다수 번의 QT 분할만 발생할 수도 있다. As another example, when a CTU is split using the QTBTTT structure, a CU split flag (split_cu_flag) indicating whether a CU is split is first extracted, and when the block is split, a first flag (QT_split_flag) is extracted. may be In the partitioning process, each node may have zero or more repeated MTT splits after zero or more repeated QT splits. For example, in the CTU, MTT division may occur immediately, or conversely, only multiple QT divisions may occur.

다른 예로서, QTBT 구조를 사용하여 CTU를 분할하는 경우, QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 BT로 더 분할되는지 여부를 지시하는 분할 플래그(split_flag) 및 분할 방향 정보를 추출한다.As another example, when a CTU is split using the QTBT structure, a first flag (QT_split_flag) related to QT splitting is extracted and each node is split into four nodes of a lower layer. And, for a node corresponding to a leaf node of QT, a split flag (split_flag) indicating whether or not to be further split into BT and split direction information are extracted.

한편, 엔트로피 복호화부(410)는 트리 구조의 분할을 통해 복호화하고자 하는 현재 블록을 결정하게 되면, 현재 블록이 인트라 예측되었는지 아니면 인터 예측되었는지를 지시하는 예측 타입에 대한 정보를 추출한다. 예측 타입 정보가 인트라 예측을 지시하는 경우, 엔트로피 복호화부(410)는 현재 블록의 인트라 예측정보(인트라 예측모드)에 대한 신택스 요소(syntax element)를 추출한다. 예측 타입 정보가 인터 예측을 지시하는 경우, 엔트로피 복호화부(410)는 인터 예측정보에 대한 신택스 요소, 즉, 움직임벡터 및 그 움직임벡터가 참조하는 참조픽처를 나타내는 정보를 추출한다.On the other hand, when the entropy decoding unit 410 determines a current block to be decoded through division of the tree structure, information on a prediction type indicating whether the current block is intra-predicted or inter-predicted is extracted. When the prediction type information indicates intra prediction, the entropy decoder 410 extracts a syntax element for intra prediction information (intra prediction mode) of the current block. When the prediction type information indicates inter prediction, the entropy decoding unit 410 extracts a syntax element for the inter prediction information, that is, a motion vector and information indicating a reference picture referenced by the motion vector.

또한, 엔트로피 복호화부(410)는 양자화와 관련된 정보, 및 잔차 신호에 대한 정보로서 현재 블록의 양자화된 변환계수들에 대한 정보를 추출한다.Also, the entropy decoding unit 410 extracts quantization-related information and information on quantized transform coefficients of the current block as information on the residual signal.

재정렬부(415)는, 비디오 부호화 장치에 의해 수행된 계수 스캐닝 순서의 역순으로, 엔트로피 복호화부(410)에서 엔트로피 복호화된 1차원의 양자화된 변환계수들의 시퀀스를 다시 2차원의 계수 어레이(즉, 블록)로 변경할 수 있다.The reordering unit 415 re-orders the sequence of one-dimensional quantized transform coefficients entropy-decoded by the entropy decoder 410 in the reverse order of the coefficient scanning order performed by the video encoding apparatus into a two-dimensional coefficient array (that is, block) can be changed.

역양자화부(420)는 양자화 파라미터를 이용하여 양자화된 변환계수들을 역양자화한다. 역양자화부(420)는 2차원으로 배열된 양자화된 변환계수들에 대해 서로 다른 양자화 계수(스케일링 값)을 적용할 수도 있다. 역양자화부(420)는 비디오 부호화 장치로부터 양자화 계수(스케일링 값)들의 행렬을 양자화된 변환계수들의 2차원 어레이에 적용하여 역양자화를 수행할 수 있다. The inverse quantization unit 420 inverse quantizes the quantized transform coefficients by using the quantization parameter. The inverse quantizer 420 may apply different quantization coefficients (scaling values) to the two-dimensionally arranged quantized transform coefficients. The inverse quantizer 420 may perform inverse quantization by applying a matrix of quantization coefficients (scaling values) from the video encoding apparatus to a two-dimensional array of quantized transform coefficients.

역변환부(430)는 역양자화된 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환하여 잔차 신호들을 복원함으로써 현재 블록에 대한 복원된 잔차 블록을 생성한다. 또한, MTS가 적용된 경우, 역변환부(430)는 비디오 부호화 장치로부터 시그널링된 MTS 정보(mts_idx)를 이용하여 가로 및 세로 방향으로 각각 적용할 변환 커널 또는 변환 매트릭스를 결정하고, 결정된 변환 커널을 이용하여 가로 및 세로 방향으로 변환 블록 내의 변환계수들에 대해 역변환을 수행한다.The inverse transform unit 430 inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to reconstruct residual signals to generate a reconstructed residual block for the current block. In addition, when MTS is applied, the inverse transform unit 430 determines a transform kernel or transform matrix to be applied in the horizontal and vertical directions, respectively, using the MTS information (mts_idx) signaled from the video encoding apparatus, and uses the determined transform kernel. Inverse transform is performed on transform coefficients in the transform block in the horizontal and vertical directions.

예측부(440)는 인트라 예측부(442) 및 인터 예측부(444)를 포함할 수 있다. 인트라 예측부(442)는 현재 블록의 예측 타입이 인트라 예측일 때 활성화되고, 인터 예측부(444)는 현재 블록의 예측 타입이 인터 예측일 때 활성화된다.The prediction unit 440 may include an intra prediction unit 442 and an inter prediction unit 444 . The intra prediction unit 442 is activated when the prediction type of the current block is intra prediction, and the inter prediction unit 444 is activated when the prediction type of the current block is inter prediction.

인트라 예측부(442)는 엔트로피 복호화부(410)로부터 추출된 인트라 예측모드에 대한 신택스 요소로부터 복수의 인트라 예측모드 중 현재 블록의 인트라 예측모드를 결정하고, 인트라 예측모드에 따라 현재 블록 주변의 참조 픽셀들을 이용하여 현재 블록을 예측한다.The intra prediction unit 442 determines the intra prediction mode of the current block from among the plurality of intra prediction modes from the syntax element for the intra prediction mode extracted from the entropy decoding unit 410, and references the vicinity of the current block according to the intra prediction mode. Predict the current block using pixels.

인터 예측부(444)는 엔트로피 복호화부(410)로부터 추출된 인터 예측정보에 대한 신택스 요소를 이용하여 현재 블록의 움직임벡터와 그 움직임벡터가 참조하는 참조픽처를 결정하고, 움직임벡터와 참조픽처를 이용하여 현재 블록을 예측한다.The inter prediction unit 444 determines a motion vector of the current block and a reference picture referenced by the motion vector by using the syntax element for inter prediction information extracted from the entropy decoding unit 410, and divides the motion vector and the reference picture. to predict the current block.

가산기(450)는 역변환부로부터 출력되는 잔차 블록과 인터 예측부 또는 인트라 예측부로부터 출력되는 예측 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록 내의 픽셀들은 이후에 복호화할 블록을 인트라 예측할 때의 참조픽셀로서 활용된다.The adder 450 reconstructs the current block by adding the residual block output from the inverse transform unit and the prediction block output from the inter predictor or intra predictor. Pixels in the reconstructed current block are used as reference pixels when intra-predicting a block to be decoded later.

루프 필터부(460)는 디블록킹 필터(462), SAO 필터(464) 및 ALF(466) 중 적어도 하나를 포함할 수 있다. 디블록킹 필터(462)는 블록 단위의 복호화로 인해 발생하는 블록킹 현상(blocking artifact)를 제거하기 위해, 복원된 블록 간의 경계를 디블록킹 필터링한다. SAO 필터(464)는 손실 부호화(lossy coding)으로 인해 발생하는 복원된 픽셀과 원본 픽셀 간의 차이를 보상하기 위해, 디블록킹 필터링 이후의 복원된 블록에 그에 대응하는 오프셋에 가산되는 방식으로 필터링을 수행한다. ALF(466)는 필터링을 수행할 대상 픽셀 및 그 대상 픽셀의 주변픽셀들에 필터 계수들을 적용하여 대상 픽셀에 대한 필터링을 수행한다. ALF(466)는 이미지에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF의 필터 계수는 비트스트림으로부터 복호화한 필터 계수에 대한 정보를 이용하여 결정된다.The loop filter unit 460 may include at least one of a deblocking filter 462 , an SAO filter 464 , and an ALF 466 . The deblocking filter 462 deblocks and filters the boundary between reconstructed blocks in order to remove a blocking artifact caused by block-by-block decoding. The SAO filter 464 performs filtering in such a way that an offset corresponding to the reconstructed block after deblocking filtering is added to compensate for the difference between the reconstructed pixel and the original pixel caused by lossy coding. do. The ALF 466 performs filtering on the target pixel by applying filter coefficients to the target pixel to be filtered and neighboring pixels of the target pixel. The ALF 466 divides the pixels included in the image into a predetermined group and determines one filter to be applied to the corresponding group, thereby differentially filtering each group. ALF filter coefficients are determined using information on filter coefficients decoded from a bitstream.

루프 필터부(460)를 통해 필터링된 복원블록은 메모리(470)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The restored block filtered through the loop filter unit 460 is stored in the memory 470 . When all blocks in one picture are reconstructed, the reconstructed picture is used as a reference picture for inter prediction of blocks in a picture to be encoded later.

본 개시의 기술들은 일반적으로 비디오 데이터의 코딩에 색상 공간 변환을 적용하는 것과 관련되어 있다. 이하의 설명은 주로 복호화 기술, 즉 비디오 복호화기의 동작에 초점이 맞춰져 있으며, 부호화 기술들에 대한 설명은, 포괄적으로 설명된 복호화 기술과 반대이므로, 간략화된다.The techniques of this disclosure generally relate to applying a color space transform to the coding of video data. The following description is mainly focused on a decoding technique, that is, an operation of a video decoder, and a description of the coding techniques is simplified as it is opposite to the comprehensively described decoding technique.

대부분의 스크린 컨텐츠는 YCbCr 색상 공간 대신 RGB 색상 공간에서 캡처된다. RGB 색상 공간의 각 이미지 블록에 대해 일반적으로 서로 다른 색상 컴포넌트들 사이에 강한 상관이 있다. RGB 데이터가 색상 공간 변환 없이 직접 압축되면, 컬러 채널들 사이의 리던던시들이 감소되지 않기 때문에 코딩 효율이 감소될 수도 있다. 색상 컴포넌트들 간의 중복성을 제거하기 위해 다른 색상 공간으로 변환될 수 있다. 색상 공간 변환 및 색상 변환이라는 용어는 동일하며 본 명세서에서 상호 호환적으로 사용될 수 있다. Most screen content is captured in RGB color space instead of YCbCr color space. For each image block in the RGB color space, there is usually a strong correlation between the different color components. If RGB data is directly compressed without color space conversion, coding efficiency may be reduced because redundancies between color channels are not reduced. It can be converted to a different color space to remove redundancy between color components. The terms color space conversion and color conversion are the same and may be used interchangeably herein.

YCbCr은 Y, Cb, 및 Cr 컴포넌트들 사이에 중복되는 데이터가 거의 없다는 점에서 압축된 비디오 데이터의 컬러를 표현하는데 종종 이용된다. 따라서 YCbCr 컬러 표현(컬러 포맷으로도 지칭됨)을 이용하여 비디오 데이터를 코딩하는 것은 많은 경우들에서 양호한 압축 성능을 제공한다. YCoCg 색상 공간은 YCbCr 색상 공간에 비해 계산이 더 간단하고 빠른 장점이 있으며 색상 컴포넌트들 사이의 상관성도 더욱 낮다. 그러나, 색상 변환은 주관적인 품질 열화로 이어지는 컬러 왜곡을 야기할 수도 있다.YCbCr is often used to represent the color of compressed video data in that there is little data overlapping between Y, Cb, and Cr components. Therefore, coding video data using the YCbCr color representation (also referred to as color format) provides good compression performance in many cases. Compared to the YCbCr color space, the YCoCg color space is simpler and faster to calculate, and the correlation between color components is lower. However, color conversion may cause color distortion leading to subjective quality degradation.

HEVC Screen Content Coding (SCC)에서는 예측 후 잔차 신호를 RGB 또는 YUV 색상 공간에서 YCgCo 공간으로 적응적으로 변환하는 기술로 적응적 색상 변환(Adaptive Color Transform: ACT)을 이용한다. 각 변환 유닛 (TU)에 대해 하나의 ACT 플래그를 표시하여 두 가지 색상 공간 중 하나를 적응적으로 선택한다. ACT 플래그가 1인 경우, TU의 잔차가 YCgCo 공간에서 부호화되며 그렇지 않으면 TU 잔차가 원래 색상 공간에서 부호화가 된다. 색상 포맷의 샘플링 비율이 4:4:4 인 비디오 데이터의 경우에, ACT 부호화 기술이 VVC 프레임워크에 사용이 가능하다.In HEVC Screen Content Coding (SCC), adaptive color transform (ACT) is used to adaptively transform the residual signal after prediction from the RGB or YUV color space to the YCgCo space. One ACT flag is marked for each transform unit (TU) to adaptively select one of the two color spaces. If the ACT flag is 1, the TU residual is coded in the YCgCo space, otherwise the TU residual is coded in the original color space. In the case of video data in which the sampling ratio of the color format is 4:4:4, the ACT encoding technique can be used in the VVC framework.

도 5는 본 개시의 기술들에 사용될 수 있는 적응적 색상 변환을 채용한 비디오 복호화기의 개략도이다.5 is a schematic diagram of a video decoder employing adaptive color conversion that may be used in the techniques of this disclosure.

도 5에서 보인 바와 같이, 역 변환 후 YCgCo 도메인의 잔차를 원래 도메인으로 다시 변환하기 위해 하나의 추가 디코딩 모듈인 역 ACT부(510)가 사용된다. 즉, 색상 공간 변환은 잔차 신호 영역에서 수행된다.As shown in FIG. 5 , one additional decoding module, the inverse ACT unit 510 , is used to transform the residual of the YCgCo domain back to the original domain after the inverse transformation. That is, color space transformation is performed in the residual signal domain.

엔트로피 복호화부(502)는 현재 블록의 계수 레벨을 디코딩하고, 역양자화부(504) 및 역변환부(506)는 계수 레벨을 역 양자화한 다음 역변환하여 현재 블록의 잔차를 복원한다. 엔트로피 복호화부(502)는 트리 유형이 단일 트리 파티셔닝이고 대응하는 상위 레벨 ACT 플래그가 참이면 현재 블록에 대한 블록 레벨 ACT 플래그를 파싱한다. 현재 블록에 대한 블록 레벨 ACT 플래그가 참이면 현재 블록의 잔차는 역 ACT부(510)에 의해 처리되고, 그렇지 않으면 현재 블록의 잔차가 가산기(512)로 곧바로 전달된다. 잔차의 색상 공간은 비디오 부호화기에서 YCbCr(혹은 RGB)로부터 YCoCg로 변환되었으므로 역 ACT부(510)는 재구성을 위해 다시 YCbCr(혹은 RGB)로 변환한다. 현재 블록에 대한 예측 블록이 인터 예측부(514) 또는 인트라 예측부(516)에 의해 생성되고, 현재 블록을 재구성하기 위해 가산기(512)에서 현재 블록의 잔차에 가산된다. 재구성된 현재 블록은 이미지 품질을 향상시키기 위해 인-루프 필터들(518)에 의해 처리된다. 필터링된 픽쳐는 인터 예측 모듈에 의해 참조될 DPB(Decoded Picture Block; 520)에 저장된다.The entropy decoding unit 502 decodes the coefficient level of the current block, and the inverse quantization unit 504 and the inverse transform unit 506 inversely quantizes the coefficient level and then inversely transforms it to restore the residual of the current block. The entropy decoding unit 502 parses the block-level ACT flag for the current block when the tree type is single-tree partitioning and the corresponding higher-level ACT flag is true. If the block level ACT flag for the current block is true, the residual of the current block is processed by the inverse ACT unit 510 , otherwise the residual of the current block is passed directly to the adder 512 . Since the color space of the residual is converted from YCbCr (or RGB) to YCoCg in the video encoder, the inverse ACT unit 510 converts it back to YCbCr (or RGB) for reconstruction. A prediction block for the current block is generated by the inter prediction unit 514 or the intra prediction unit 516, and is added to the residual of the current block in the adder 512 to reconstruct the current block. The reconstructed current block is processed by in-loop filters 518 to improve image quality. The filtered picture is stored in a decoded picture block (DPB) 520 to be referenced by the inter prediction module.

VVC 프레임워크에서는 최대 변환 크기가 하나의 CU 의 폭이나 높이보다 작지 않는 한, 하나의 CU는 변환 처리 단위로도 사용된다. 따라서 블록 레벨 ACT 플래그가 CU 신택스로서 시그널링될 수 있다. 또한, 잔차 신호를 추가적으로 (역)변환하는 것이므로 화면 간 예측과 IBC(Intra Block Copy)로 부호화를 수행하는 CU의 경우 ACT는 최소 1개의 0이 아닌 변환 계수가 있을 때만 사용이 된다. CU 내에서는 크로마 컴포넌트들이 루마 컴포넌트와 동일한 예측 모드, 즉 DM 모드를 선택할 때만 ACT가 활성화된다. 또한, 색상 변환 전후의 잔차 신호의 동적 범위 변경을 보상하기 위해 QP 오프셋 세트(-5, -5, -3)가 변환 잔차에 적용된다. In the VVC framework, one CU is also used as a transform processing unit, unless the maximum transform size is less than the width or height of one CU. Accordingly, the block level ACT flag may be signaled as a CU syntax. In addition, since the residual signal is additionally (inverse) transformed, ACT is used only when there is at least one non-zero transform coefficient in the case of a CU that performs inter prediction and IBC (Intra Block Copy) encoding. In the CU, the ACT is activated only when the chroma components select the same prediction mode as the luma component, that is, the DM mode. In addition, a set of QP offsets (-5, -5, -3) is applied to the transform residual to compensate for the change in the dynamic range of the residual signal before and after color conversion.

적응적 색상 변환(ACT)은, YCbCr 색상 공간으로부터 YCoCg 색상 공간으로 그리고 본래 색상 공간으로 샘플 값들을 변환하기 위해, 한 쌍의 YCoCg 변환 행렬들을 이용하는 [수학식 1]과 같은 순방향 및 역방향 색상 변환이 사용될 수도 있다. YCoCg 색상 공간은 YCbCr 색상 공간에 비해 계산이 더 간단하고 빠른 장점이 있으며 색상 컴포넌트들 사이의 상관성도 더욱 낮다.Adaptive color transformation (ACT) is a forward and backward color transformation such as [Equation 1] using a pair of YCoCg transformation matrices to convert sample values from the YCbCr color space to the YCoCg color space and to the original color space. may be used. Compared to the YCbCr color space, the YCoCg color space is simpler and faster to calculate, and the correlation between color components is lower.

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

여기서, [C0, C1, C2]는 [Cb, Cr, Y]이다.Here, [C0, C1, C2] is [Cb, Cr, Y].

적응적 색상 변환(ACT)은, RGB 색상 공간으로부터 YCoCg 색상 공간으로 그리고 본래 색상 공간으로 샘플 값들을 변환하기 위해, 한 쌍의 YCoCg 변환 행렬들을 이용하는 [수학식 2]와 같은 순방향 및 역방향 색상 변환이 사용될 수도 있다. Adaptive color transformation (ACT) is a forward and backward color transformation as in [Equation 2] using a pair of YCoCg transformation matrices to convert sample values from the RGB color space to the YCoCg color space and to the native color space. may be used.

Figure pat00003
Figure pat00003

Figure pat00004
Figure pat00004

여기서, [C0, C1, C2]는 [R, G, B]이다.Here, [C0, C1, C2] is [R, G, B].

상위 레벨 ACT 플래그는 SPS(Sequence Parameter Set)와 같은 시퀀스 레벨 또는 PPS(Picture Parameter Set)와 같은 픽처 레벨에서 전송되어 ACT가 시퀀스 또는 픽처에 대해 활성화 또는 비활성화되었는지 여부를 지시할 수 있다. 예를 들어, 상위 레벨 ACT 플래그가 거짓("0")인 경우 시퀀스 또는 픽처 전체에서 ACT가 비활성화되는 반면, 상위 레벨 ACT 플래그가 참("1")인 경우 시퀀스 또는 픽처 내 하나 이상의 블록들에 대해 ACT가 활성화되었는지 또는 비활성화되었는지를 지시하는 하나 이상의 블록 레벨 ACT 플래그가 전송된다.The high-level ACT flag may be transmitted at a sequence level such as a sequence parameter set (SPS) or a picture level such as a picture parameter set (PPS) to indicate whether the ACT is activated or deactivated for a sequence or picture. For example, if the high-level ACT flag is false (“0”), the ACT is disabled for the entire sequence or picture, whereas if the high-level ACT flag is true (“1”), it is applied to one or more blocks in the sequence or picture. One or more block-level ACT flags are sent to indicate whether the ACT is enabled or disabled for the ACT.

1. ACT 메모리 대역폭 제한1. ACT memory bandwidth limit

적응적 색상 변환(ACT)은 순방향 및 역방향 색상 변환 과정에서 잔차 신호의 세 가지 컴포넌트들을 모두 이용하는 바, 세 가지 컴포넌트들을 이용할 수 없는 경우에는 ACT의 사용이 허용되지 않는다. 예를 들어, 루마 및 크로마 컴포넌트들이 별개의 트리 구조로 분할되어 부호화되는 경우에는 ACT의 사용이 허용되지 않는다. 즉, ACT는 단일 트리 파티셔닝으로 분할된 블록에 대해서만 사용이 허용될 수 있다.The adaptive color conversion (ACT) uses all three components of the residual signal in the forward and backward color conversion processes. When the three components are unavailable, the use of the ACT is not allowed. For example, when luma and chroma components are divided into separate tree structures and encoded, use of ACT is not allowed. That is, ACT may be allowed to be used only for blocks divided by single tree partitioning.

따라서, 상위 레벨 ACT 플래그가 참("1")이고 단일 트리 블록 파티셔닝이 현재 CU를 분할하는 데 사용되는 경우, 현재 CU에 대해 블록 레벨 ACT 플래그가 시그널링된다. 현재 CU에 대한 블록 레벨 ACT 플래그가 참("1")일 때 현재 CU의 잔차들의 색상 공간은 색상 변환에 의해 변환된다. 현재 CU에 대한 블록 레벨 ACT 플래그가 거짓("0")이거나 현재 CU에 대해 블록 레벨 ACT 플래그가 시그널링되지 않으면, 현재 CU에 대해 ACT가 비활성화된다. 유사하게, ISP(Intra sub-partition prediction)가 루마 컴포넌트에만 적용되고 크로마 컴포넌트들에는 적용되지 않은 경우, 현재 CU에 대해 블록 레벨 ACT 플래그가 시그널링되지 않으며 ACT는 비활성화된다.Thus, if the upper level ACT flag is true (“1”) and single tree block partitioning is used to partition the current CU, the block level ACT flag is signaled for the current CU. When the block level ACT flag for the current CU is true (“1”), the color space of the residuals of the current CU is transformed by color transform. If the block level ACT flag for the current CU is false (“0”) or the block level ACT flag is not signaled for the current CU, the ACT is deactivated for the current CU. Similarly, when Intra sub-partition prediction (ISP) is applied only to the luma component and not to the chroma components, the block level ACT flag is not signaled for the current CU and the ACT is deactivated.

적응적 색상 변환(ACT)은 3가지 색상 컴포넌트를 모두 필요로 하기 때문에, 역변환(inverse tranform)과 역-ACT(inverse ACT) 사이에 각 컴포넌트의 샘플값들을 일시적으로 저장하기 위한 메모리가 필요하다. 따라서, 비디오 코덱에서 허용되는 최대 변환 크기가 증가함에 따라, 비디오 부/복호화기들의 하드웨어 구현에 있어서, 변환된 잔차 데이터의 샘플들을 전달 및 저장하기 위해 더 많은 메모리 대역폭이 요구될 수 있다. 예를 들어, VVC 표준 초안은 64 포인트 변환까지 허용되며, 그에 따라 최대 64Х64Х3개의 색상 컴포넌트들의 값이 역-ACT를 위해 저장될 필요가 있다.Since the adaptive color transformation (ACT) requires all three color components, a memory for temporarily storing the sample values of each component is required between the inverse transform and the inverse ACT. Therefore, as the maximum transform size allowed in a video codec increases, in a hardware implementation of video encoders/decoders, more memory bandwidth may be required to deliver and store samples of the transformed residual data. For example, the draft VVC standard allows up to 64 point conversion, so that the values of up to 64Х64Х3 color components need to be stored for inverse-ACT.

본 개시의 일 측면에 따르면, 적응적 색상 변환(ACT)에 의해 요구되는 최대 메모리 크기를 줄이기 위한 몇몇 방식들이 도입된다.According to one aspect of the present disclosure, several schemes are introduced to reduce the maximum memory size required by adaptive color conversion (ACT).

첫 번째 방식은 최대 변환 크기를 지시하는 상위 레벨 신택스에 의존하여 ACT의 허용 여부를 제어함으로써 ACT가 사용되는 변환 유닛의 크기를 제한하는 것이다. 일 예로, SPS(Sequence parameter set)에서 픽쳐들의 시퀀스에 포함된 루마 블록들에 대해 허용되는 최대 변환 크기를 지시하는 신택스 엘리먼트(예컨대, 1비트 플래그)가 시그널링될 수 있다. 상기 신택스 엘리먼트가 "1" 이면 루마 샘플의 최대 변환 크기는 64이며, 상기 신택스 엘리먼트 가 "0" 이면 최대 변환 크기는 32일 수 있다. 따라서 최대 변환 크기는 32인 경우에만 ACT의 활성화가 허용되도록, 비디오 부호화기는 상기 신택스 엘리먼트가 "0" 인 경우에만 상위 레벨 ACT 플래그를 시그널링할 수 있다. 따라서, ACT는 최대 32Х32Х3개의 색상 컴포넌트들의 값에 상응하는 메모리 대역폭이 필요하게 된다. The first method is to limit the size of the transform unit in which the ACT is used by controlling whether or not the ACT is allowed or not depending on a higher-level syntax indicating the maximum transform size. As an example, a syntax element (eg, a 1-bit flag) indicating a maximum transform size allowed for luma blocks included in a sequence of pictures in a sequence parameter set (SPS) may be signaled. If the syntax element is “1”, the maximum transform size of the luma sample may be 64, and if the syntax element is “0”, the maximum transform size may be 32. Therefore, the video encoder may signal the high-level ACT flag only when the syntax element is “0” so that activation of the ACT is allowed only when the maximum transform size is 32. Accordingly, ACT requires a memory bandwidth corresponding to the value of a maximum of 32Х32Х3 color components.

두 번째 방식은 CU 또는 TU의 크기에 의존하여 블록 레벨에서 ACT의 활성화를 제어함으로써, 큰 블록에 대해 ACT의 적용을 제한하는 것이다. 즉, 본 방식은, 최대 변환 크기에 의존하여 상위 레벨 ACT 플래그의 시그널링을 제어하는 대신에, CU의 크기에 따라 블록 레벨에서 ACT 플래그의 시그널링을 제어한다. 아래 표는 이러한 방식에 따른 예시적인 Coding unit syntax를 보인다. 예시된 신택스에서, 엘리먼트들의 회색화는 신택스에서의 잠재적 변화들을 표시하기 위해 또는 이해를 돕기 위해 사용된다.The second method is to restrict the application of the ACT to a large block by controlling the activation of the ACT at the block level depending on the size of the CU or TU. That is, the present method controls the signaling of the ACT flag at the block level according to the size of the CU, instead of controlling the signaling of the higher-level ACT flag depending on the maximum transform size. The table below shows example coding unit syntax according to this method. In the illustrated syntax, graying of elements is used to indicate or aid understanding of potential changes in the syntax.

Figure pat00005
Figure pat00005

첫 번째 방식에 따르면, SPS 레벨에서 지시되는 최대 변환 크기가 64인 경우에는, (32Х32의 블록들을 포함한) 시퀀스 내 모든 블록들에 대해 ACT가 비활성화된다. 반면, 두 번째 방식에서는 32Х32 이하의 블록들에 대해 ACT가 선택적으로 활성화될 수 있다.According to the first scheme, when the maximum transform size indicated in the SPS level is 64, ACT is deactivated for all blocks in the sequence (including blocks of 32Х32). On the other hand, in the second method, ACT may be selectively activated for blocks of 32Х32 or less.

세 번째 방식은 64Х64 CU에 대해 ACT가 활성화된 경우에, 64Х64 CU를 예컨대 4개의 32Х32 서브블록으로 나누어 서브블록 별로 (역)변환, (역)양자화 및 (역)ACT를 적용하는 것이다. 이 방식에 따르면, 64Х64 CU에 대해서도 ACT의 사용이 허용되지만 ACT는 여전히 최대 32Х32Х3개의 색상 컴포넌트들의 값에 상응하는 메모리 대역폭이 필요하게 된다.The third method is to apply (inverse) transform, (inverse) quantization, and (inverse) ACT for each subblock by dividing the 64Х64 CU into, for example, four 32Х32 subblocks when ACT is activated for a 64Х64 CU. According to this method, the use of ACT is allowed even for a 64Х64 CU, but the ACT still requires a memory bandwidth corresponding to the value of a maximum of 32Х32Х3 color components.

2. 컬러 컴포넌트 간 예측과 ACT의 결합2. Combination of prediction and ACT between color components

본 개시의 다른 측면은 컬러 컴포넌트 간 예측을 통해 컴포넌트들 간의 중복성을 제거한 후, 컬러 컴포넌트들의 잔차 신호에 대해 색상 공간 변환이 수행된다.In another aspect of the present disclosure, after removing redundancy between components through inter-color component prediction, color space conversion is performed on the residual signal of the color components.

비디오 부호화기는 순방향 색상 변환에 사용되는 색상 컴포넌트들의 잔차 블록들을 생성하기 위해 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트(들)로부터 예측할 수 있다. 비디오 복호화기는 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트(들)로부터 예측하여 예측 블록을 생성하고, 역방향 색상 변환을 통해 얻은 색상 컴포넌트들의 잔차 블록들 중에서 관련된 잔차 블록에 가산할 수 있다. 일 예로, 비디오 부호화기와 비디오 복호화기는 제 1 크로마 컴포넌트로부터 제 2 크로마 컴포넌트를 예측하고, 원래의 샘플 값과 예측 값을 차분하여 제 2 크로마 컴포넌트의 잔차 값을 생성할 수 있다. 다른 일 예로, 비디오 부호화기와 비디오 복호화기는 루마 컴포넌트로부터 제 1 및 제 2 크로마 컴포넌트들을 각각 예측하여, 제 1 및 제2 크로마 컴포넌트의 잔차 값을 생성할 수 있다.The video encoder may predict at least one of the color components of the current block from the other color component(s) to generate residual blocks of the color components used for the forward color transformation. The video decoder may generate a prediction block by predicting at least one of the color components of the current block from other color component(s), and may add it to a related residual block among the residual blocks of the color components obtained through inverse color transformation. As an example, the video encoder and the video decoder may predict the second chroma component from the first chroma component, and generate a residual value of the second chroma component by differentiating the original sample value and the predicted value. As another example, the video encoder and the video decoder may predict the first and second chroma components from the luma component, respectively, and generate residual values of the first and second chroma components.

구체적으로, Cr는 Cb로부터 선형적으로 예측될 수 있으며, Cr의 예측 값을 "k * Cb"라고 할 때, [수학식 1]의 순방향 색상 변환에 입력되는 Cr의 잔차는 "Cr - k * Cb"일 수 있다. k는 "1"로 미리 정의될 수도 있으며, 서로 다른 k를 사용하는 모드들이 도입될 수도 있다. 예를 들어, k 는 "+1" 또는 "-1"로 설정 가능하고, k는 블록 레벨이나 슬라이스 레벨 등에서 시그널링될 수도 있다. 여기서, Cb 컴포넌트로부터 Cr 컴포넌트를 예측하고 Cr의 잔차를 생성하는 연산은 [수학식 1]의 "C1"을 " Cr - k * Cb"로 대체함으로써, 순방향 색상 변환 연산에 은닉될 수 있다. 즉, 순방향 색상 변환과 컬러 컴포넌트 간 예측은 하나의 프로세스로 통합될 수 있다.Specifically, Cr can be predicted linearly from Cb, and when the predicted value of Cr is "k * Cb", the residual of Cr input to the forward color conversion of [Equation 1] is "Cr - k * Cb". k may be predefined as “1”, and modes using different k may be introduced. For example, k may be set to "+1" or "-1", and k may be signaled at a block level or a slice level. Here, the operation of predicting the Cr component from the Cb component and generating the residual of Cr may be hidden in the forward color conversion operation by replacing “C1” in [Equation 1] with “Cr - k * Cb”. That is, forward color conversion and prediction between color components can be integrated into one process.

Cb와 Cr 사이에 선형 관계를 더 일반화하여, Cr 컴포넌트의 예측 값을 "k1 * Cb + k2"라고 할 때, [수학식 1]의 순방향 색상 변환에 입력되는 Cr 컴포넌트의 잔차는 "Cr - k1 * Cb - k2"일 수 있다. Cb 컴포넌트로부터 Cr 컴포넌트를 예측하고 Cr의 잔차를 생성하는 연산은 [수학식 1]의 "C1"을 "Cr - k1 * Cb - k2"으로 대체함으로써, 순방향 색상 변환 연산에 은닉될 수 있다.By further generalizing the linear relationship between Cb and Cr, when the predicted value of the Cr component is "k1 * Cb + k2", the residual of the Cr component input to the forward color conversion of [Equation 1] is "Cr - k1" * Cb - k2". The operation of predicting the Cr component from the Cb component and generating the residual of Cr can be hidden in the forward color conversion operation by replacing “C1” in [Equation 1] with “Cr - k1 * Cb - k2”.

일부 실시예에서, 크로마 컴포넌트들의 예측은 그들 간의 선형 합에 의해 예측될 수 있다. 일 예로, Cb 컴포넌트의 예측 값은 "(Cb + Cr)/2"로 결정되고, Cr의 예측 값은 "(Cb - Cr)/2"로 결정될 수 있다. 다른 일 예로, Cb와 Cr 컴포넌트들의 예측 값은 Cb와 Cr 간의 선형 합의 일반화된 표현인 " (1 + k)Cb + (1-k)Cr" 과 "(1 + k)Cb - (1 - k )Cr"로 결정될 수도 있다. 여기서, 서로 다른 k를 사용하는 모드들이 도입될 수도 있으며, 해당 픽셀이 속한 블록의 tu_cbf_cb 및 tu_cbf_cr을 이용하여 그 모드가 결정될 수도 있다. tu_cbf_cb 및 tu_cbf_cr는 Cb 컴포넌트 및 Cr 컴포넌트에 대한 변환블록 내 0이 아닌 변환 계수의 존재를 표현하는 플래그들이다.In some embodiments, the prediction of the chroma components may be predicted by a linear sum between them. As an example, the predicted value of the Cb component may be determined as “(Cb + Cr)/2”, and the predicted value of Cr may be determined as “(Cb - Cr)/2”. As another example, the predicted values of the Cb and Cr components are "(1 + k)Cb + (1-k)Cr" and "(1 + k)Cb - (1 - k) which are generalized expressions of the linear sum between Cb and Cr. )Cr". Here, modes using different k may be introduced, and the mode may be determined using tu_cbf_cb and tu_cbf_cr of a block to which a corresponding pixel belongs. tu_cbf_cb and tu_cbf_cr are flags representing the presence of a non-zero transform coefficient in a transform block for a Cb component and a Cr component.

한편, Cb 컴포넌트와 Cr 컴포넌트 간에 선형적인 상관관계(예를 들어, Cb = k * Cr)가 존재한다면, ACT 변환은 3Х3의 색상 변환 행렬을 사용하는 [수학식 1] 대신에, 축소된 색상 변환 행렬을 사용할 수도 있다. 일 예로, 하나의 크로마 컴포넌트(예컨대, Cr)에 대한 원소들이 제거되어, 3Х2의 색상 변환 행렬이 사용될 수 있다. 다른 일 예로, [수학식 1]의 3Х3의 색상 변환 행렬에서 좌상단의 4개 행렬 계수만으로 구성된 2×2의 색상 변환 행렬이 사용될 수 있다. 혹은, [수학식 1]의 3Х3의 색상 변환 행렬에서 두 번째 행과 두 번째 열의 행렬 계수들을 모두 0으로 대체하여, [수학식 3]과 같은 형태의 순방향 색상 변환이 수행될 수도 있다. 비디오 복호화기는 [수학식 3]과 같은 형태의 역방향 색상 변환을 통해 Y 및 Cr 잔차신호를 얻은 뒤에, Cb 컴포넌트와 Cr 컴포넌트 간에 선형적인 상관관계에 따라 Cr 잔차신호를 복원할 수 있다. 이로써, 색상 변환에 필요한 연산 및 지연을 줄일 수 있다.On the other hand, if there is a linear correlation between the Cb component and the Cr component (eg, Cb = k * Cr), the ACT transformation is a reduced color transformation instead of [Equation 1] using a color transformation matrix of 3Х3. You can also use matrices. As an example, elements for one chroma component (eg, Cr) are removed, so that a color conversion matrix of 3Х2 may be used. As another example, in the color conversion matrix of 3Х3 of [Equation 1], a 2×2 color conversion matrix composed of only the upper left four matrix coefficients may be used. Alternatively, in the color transformation matrix of 3Х3 of [Equation 1], all matrix coefficients of the second row and the second column are replaced with 0, and the forward color transformation of the form [Equation 3] may be performed. After obtaining the Y and Cr residual signals through the inverse color transformation of the form [Equation 3], the video decoder may restore the Cr residual signal according to a linear correlation between the Cb component and the Cr component. Accordingly, it is possible to reduce the calculation and delay required for color conversion.

Figure pat00006
Figure pat00006

Figure pat00007
Figure pat00007

위 예시들에서는 YCbCr 색상 포맷에 대해 예시하였지만, (R, G, B)와 같은 다른 색상 포맷에 대해서도 유사한 방식이 적용될 수 있음은 통상의 기술자에게 자명하다.Although the above examples illustrate the YCbCr color format, it is apparent to those skilled in the art that a similar method may be applied to other color formats such as (R, G, B).

3. ACT와 크로스 컴포넌트 예측 간의 제약3. Constraints between ACT and cross-component prediction

CCLM(Cross-Component Linear Model)은 루마 신호와 크로마 신호 간에 존재하는 중복성을 제거하여 부호화 예측 성능을 향상하기 위한 기술이다. CCLM은 크로마 샘플과 동일한 위치의 재구성된 루마 샘플 사이의 연관성을 계산한 다음과 같은 예시적인 선형 모델을 사용하여, 동일한 CU의 재구성된 루마 샘플을 기초로 크로마 샘플을 예측한다.CCLM (Cross-Component Linear Model) is a technology for improving encoding prediction performance by removing redundancy existing between a luma signal and a chroma signal. CCLM predicts a chroma sample based on the reconstructed luma sample of the same CU, using the following exemplary linear model that calculates the association between the chroma sample and the co-located reconstructed luma sample.

Figure pat00008
Figure pat00008

여기서, predc(i, j)는 CU에서 예측된 크로마 샘플을 나타내고 rec'L(i, j)는 동일한 CU의 재구성된 루마 컴포넌트의 다운 샘플링된 샘플이다. 선형 모델 계수 α 및 β는 별도로 시그널링되지 않고 주변 샘플로부터 유도된다.Here, pred c (i, j) represents a chroma sample predicted in the CU and rec' L (i, j) is a down-sampled sample of the reconstructed luma component of the same CU. The linear model coefficients α and β are not signaled separately and are derived from the surrounding samples.

ACT 기술이 컬러 컴포넌트들 간의 중복성을 제거한다는 점에서 유사한 특성을 가지는 ACT 기술과 CCLM 기술 사이의 간섭을 방지하기 위하여, 어느 하나의 기술이 적용되는 경우에는 다른 하나의 기술은 사용하지 않을 수도 있다. 일 실시예에서, 비디오 부/복호화기는 현재 CU에서 ACT가 적용이 되는 경우에는 CCLM을 사용하지 않는다. 즉, 현재 CU에서 ACT가 적용이 되지 않는 경우에만 CCLM이 사용 가능하다. 다른 실시예에서, 현재 CU가 CCLM을 사용하는 경우에는 현재 CU에서 ACT를 적용하지 않는다. 즉, 현재 CU 레벨에서 CCLM을 사용하지 않는 경우에만 현재 CU에서 ACT이 사용 가능하다. 또 다른 실시예에서, 둘 중의 하나만 사용되도록 CCLM과 ACT이 CU 레벨 혹은 TU 레벨에서 제어된다. 대안적으로, 단일 트리 파티셔닝으로 얻어진 블록에 대해서만 CCLM과 ACT가 함께 사용될 수도 있다. In order to prevent interference between the ACT technique and the CCLM technique, which have similar characteristics in that the ACT technique removes redundancy between color components, when one technique is applied, the other technique may not be used. In an embodiment, the video encoder/decoder does not use CCLM when ACT is applied in the current CU. That is, CCLM can be used only when ACT is not applied in the current CU. In another embodiment, when the current CU uses CCLM, the ACT is not applied in the current CU. That is, ACT is available in the current CU only when CCLM is not used in the current CU level. In another embodiment, CCLM and ACT are controlled at the CU level or the TU level so that only one of the two is used. Alternatively, CCLM and ACT may be used together only for blocks obtained by single-tree partitioning.

Joint coding of chroma residuals (JCCR)은 Cb과 Cr 컴포넌트들의 잔차 신호를 합동으로 부호화하는 기술이다. 보다 구체적으로, 비디오 부호화기는 resJointC[x][y] 라는 하나의 신호를 전송하고, 비디오 복호화기는 Cb 와 Cr 컴포넌트의 잔차 신호인 resCb와 resCr을 모드에 따라 사전에 약속한 방식으로 복원한다. 비디오 부/복호화기는 TU 레벨 플래그인 tu_joint_cbcr_residual_flag가 1인 경우 Cb/Cr 신호의 coded block pattern (CBF), 그리고 슬라이스 레벨에서 전송되는 CSign을 이용하여 아래 표와 같이 JCCR 모드를 선택할 수 있다. JCCR 적용 여부는 TU 레벨 플래그인 tu_joint_cbcr_residual_flag에 의해 시그널링된다.Joint coding of chroma residuals (JCCR) is a technique for jointly coding the residual signal of Cb and Cr components. More specifically, the video encoder transmits one signal called resJointC[x][y], and the video decoder restores resCb and resCr, which are residual signals of Cb and Cr components, in a previously agreed manner according to the mode. When the TU level flag tu_joint_cbcr_residual_flag is 1, the video encoder/decoder can select the JCCR mode as shown in the table below by using the coded block pattern (CBF) of the Cb/Cr signal and the CSign transmitted at the slice level. Whether or not JCCR is applied is signaled by tu_joint_cbcr_residual_flag, which is a TU level flag.

Figure pat00009
Figure pat00009

비디오 부호화기 측에서 JCCR 기술은 다음과 같이 적용된다. JCCR 기술에 사용되는 모드 1, 2, 3은 I 슬라이스에서만 적용하고, P와 B 슬라이스에 대해서는 모드 2만 적용된다.On the video encoder side, JCCR technology is applied as follows. Modes 1, 2, and 3 used in JCCR technology are applied only to I slices, and only mode 2 is applied to P and B slices.

모드가 2이면, 비디오 부호화기는 다음과 같이 resJointC을 생성한다. If the mode is 2, the video encoder generates resJointC as follows.

resJointC[ x ][ y ] = ( resCb[ x ][ y ] + CSign * resCr[ x ][ y ] ) / 2resJointC[ x ][ y ] = ( resCb[ x ][ y ] + CSign * resCr[ x ][ y ] ) / 2

모드가 1이면, 비디오 부호화기는 다음과 같이 resJointC이 생성된다. If the mode is 1, the video encoder generates resJointC as follows.

resJointC[ x ][ y ] = ( 4 * resCb[ x ][ y ] + 2 * CSign * resCr[ x ][ y ] ) / 5resJointC[ x ][ y ] = ( 4 * resCb[ x ][ y ] + 2 * CSign * resCr[ x ][ y ] ) / 5

모드가 3이면, 비디오 부호화기는 다음과 같이 resJointC를 구성한다.If the mode is 3, the video encoder constructs resJointC as follows.

resJointC[ x ][ y ] = ( 4 * resCr[ x ][ y ] + 2 * CSign * resCb[ x ][ y ] ) / 5resJointC[ x ][ y ] = ( 4 * resCr[ x ][ y ] + 2 * CSign * resCb[ x ][ y ] ) / 5

ACT 및 JCCR 양자 모두 잔차 기반 코딩 툴들이며, 단일 트리 파티셔닝으로 얻어진 블록에 대해서 ACT 과 JCCR이 함께 사용될 수도 있다. 따라서, 비디오 복화화기는 비트스트림으로부터 루마 컴포넌트의 잔차 신호와 resJointC[x][y]를 복호화하고, resJointC[x][y]로부터 Cb 컴포넌트의 잔차 신호와 Cr 컴포넌트의 잔차 신호를 복원하고, 이들 잔차 신호들에 대해 역방향 색상 변환을 수행할 수 있다.Both ACT and JCCR are residual-based coding tools, and ACT and JCCR may be used together for a block obtained by single tree partitioning. Accordingly, the video decoder decodes the residual signal of the luma component and resJointC[x][y] from the bitstream, and restores the residual signal of the Cb component and the residual signal of the Cr component from resJointC[x][y], and these Inverse color conversion may be performed on the residual signals.

대안적으로 어느 하나의 기술이 적용되는 경우에는 다른 하나의 기술은 사용하지 않을 수 있다. 예를 들어, 둘 중의 하나만 사용되도록 ACT와 JCCR이 CU 레벨 혹은 TU 레벨에서 제어될 수 있다.Alternatively, when one technique is applied, the other technique may not be used. For example, ACT and JCCR may be controlled at a CU level or a TU level so that only one of them is used.

도 6은 본 개시의 일 측면에 따른, 전술한 하나 이상의 기법을 이용한 비디오 데이터를 부호화하는 방법을 도시한 흐름도이다.6 is a flowchart illustrating a method of encoding video data using one or more techniques described above, according to an aspect of the present disclosure.

비디오 부호화기는 비디오 데이터의 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 상위 레벨의 신택스 엘리먼트를 비트스트림에 부호화할 수 있다(S610). 상기 신택스 엘리먼트는 SPS 신택스에서 시그널링되는 1비트 플래그일 수 있다. 신택스 엘리먼트가 "1" 이면 최대 변환 크기는 64이며, "0" 이면 최대 변환 크기는 32이다.The video encoder may encode a higher-level syntax element indicating a maximum transform size allowed for a sequence of pictures of video data into a bitstream (S610). The syntax element may be a 1-bit flag signaled in the SPS syntax. If the syntax element is "1", the maximum transform size is 64, and if "0", the maximum transform size is 32.

최대 변환 크기가 64보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 비디오 부호화기는 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되는지 여부를 지시하는 제 1 제어 플래그를 비트스트림에 부호화할 수 있다(S620). 제 1 제어 플래그는 SPS 신택스에서 시그널링될 수 있다. 제 1 제어 플래그가 "1" 이면 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용됨을 나타내고, 제 1 제어 플래그가 "0" 이면 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되지 않음을 나타낸다.When it is indicated by the syntax element that the maximum transform size is less than 64, the video encoder may encode in the bitstream a first control flag indicating whether application of a color space transform is allowed for blocks in the sequence. (S620). The first control flag may be signaled in the SPS syntax. If the first control flag is “1”, it indicates that color space transform is allowed to be applied to blocks in the sequence, and if the first control flag is “0”, color space transform is not allowed to be applied to blocks in the sequence. indicates not.

상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상기 제 1 제어 플래그에 의해 지시될 때, 비디오 부호화기는 상기 시퀀스 내의 현재 블록에 색상 공간 변환이 적용되는지 여부를 지시하는 제 2 제어 플래그를 비트스트림에 부호화할 수 있다(S630). 제 2 제어 플래그는 CU 신택스 혹은 TU 신택스에 포함되는 1비트 플래그일 수 있다.When the first control flag indicates that application of color space transformation is permitted for blocks in the sequence, the video encoder generates a second control flag indicating whether color space transformation is applied to the current block in the sequence. It can be encoded in the bitstream (S630). The second control flag may be a 1-bit flag included in the CU syntax or the TU syntax.

비디오 부호화기는 현재 블록에 대한 제 1 잔차 데이터를 생성하기 위해, 현재 블록에 대한 예측 값들을 생성하고, 현재 블록의 본래 샘플들과 예측 값들을 차분하여 제 1 잔차 데이터를 생성할 수 있다(S640). 제 1 잔차 데이터는 현재 블록의 색상 컴포넌트들에 대한 잔차 블록들을 포함할 수 있다. 비디오 부호화기는 순방향 색상 변환에 사용되는 색상 컴포넌트들의 잔차 블록들을 생성하기 위해 현재 블록의 색상 컴포넌트들 중 적어도 하나를 현재 블록의 다른 색상 컴포넌트(들)로부터 예측할 수 있다. 컬러 컴포넌트 간 예측은 제 1 크로마 컴포넌트로부터 제 2 크로마 컴포넌트를 선형적으로 예측하는 것일 수 있다.In order to generate the first residual data for the current block, the video encoder may generate prediction values for the current block, and may generate first residual data by differentiating the prediction values from original samples of the current block ( S640 ). . The first residual data may include residual blocks for color components of the current block. The video encoder may predict at least one of the color components of the current block from other color component(s) of the current block to generate residual blocks of color components used for forward color transformation. The inter-color component prediction may be to linearly predict the second chroma component from the first chroma component.

현재 블록에 색상 공간 변환이 적용된다고 제 2 제어 플래그에 의해 지시될 때, 비디오 부호화기는 현재 블록에 대한 제 1 잔차 데이터에 대해 순방향 색상 변환을 수행하여 제 2 잔차 데이터(순방향 색상 변환된 잔차 데이터)를 생성하고, 제 2 잔차 데이터를 비트스트림에 부호화할 수 있다(S650). 반면, 현재 블록에 색상 공간 변환이 적용되지 않는다고 제 2 제어 플래그에 의해 지시될 때, 비디오 부호화기는 현재 블록에 대한 제 1 잔차 데이터에 대해 순방향 색상 변환의 수행 없이, 제 1 잔차 데이터를 비트스트림에 부호화할 수 있다.When the second control flag indicates that color space transformation is applied to the current block, the video encoder performs forward color transformation on the first residual data for the current block to perform a forward color transformation to the second residual data (forward color transformed residual data) may be generated, and the second residual data may be encoded in the bitstream (S650). On the other hand, when the second control flag indicates that color space transformation is not applied to the current block, the video encoder transfers the first residual data to the bitstream without performing forward color transformation on the first residual data for the current block. can be encoded.

도 7은 본 개시의 일 측면에 따른, 전술한 하나 이상의 기법을 이용한 비디오 데이터를 복호화하는 방법을 도시한 흐름도이다.7 is a flowchart illustrating a method of decoding video data using one or more techniques described above, according to an aspect of the present disclosure.

비디오 복호화기는 비트스트림으로부터 비디오 데이터의 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 상위 레벨의 신택스 엘리먼트를 복호화할 수 있다(S710). 상기 신택스 엘리먼트는 SPS 신택스에서 시그널링되는 1비트 플래그일 수 있다. 상기 신택스 엘리먼트가 "1" 이면 최대 변환 크기는 64이며, "0" 이면 최대 변환 크기는 32 일 수 있다.The video decoder may decode a syntax element of a higher level indicating a maximum transform size allowed for a sequence of pictures of video data from the bitstream ( S710 ). The syntax element may be a 1-bit flag signaled in the SPS syntax. If the syntax element is “1”, the maximum transform size may be 64, and if “0”, the maximum transform size may be 32.

최대 변환 크기가 64보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 비디오 복호화기는 비트스트림으로부터 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되는지 여부를 지시하는 제 1 제어 플래그를 복호화할 수 있다(S720). 제 1 제어 플래그는 SPS 신택스에서 시그널링되는 1비트 플래그일 수 있다. 제 1 제어 플래그가 참("1")이면 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용됨을 나타내고, 제 1 제어 플래그가 거짓("0")이면 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되지 않음을 나타낸다.When it is indicated by the syntax element that the maximum transform size is less than 64, the video decoder may decode a first control flag indicating whether application of the color space transform is allowed to blocks in the sequence from the bitstream. (S720). The first control flag may be a 1-bit flag signaled in the SPS syntax. If the first control flag is true (“1”), it indicates that the application of color space transform is allowed for blocks in the sequence, and if the first control flag is false (“0”), the color space for blocks in the sequence is allowed. Indicates that the application of the transform is not allowed.

상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상기 제 1 제어 플래그에 의해 지시될 때, 비디오 복호화기는 비트스트림으로부터 상기 시퀀스 내의 현재 블록에 색상 공간 변환이 적용되는지 여부를 지시하는 제 2 제어 플래그를 복호화할 수 있다(S730). 제 2 제어 플래그는 CU 신택스 혹은 TU 신택스에 포함되는 1비트 플래그일 수 있다. 제 2 제어 플래그가 참("1")이면 현재 블록에 대해 색상 공간 변환의 적용됨을 나타내고, 제 2 제어 플래그가 거짓("0")이면 현재 블록에 대해 색상 공간 변환의 적용되지 않음을 나타낸다.When the first control flag indicates that application of color space transform is permitted to blocks in the sequence, the video decoder is configured to use a second control flag indicating whether color space transform is applied to a current block in the sequence from a bitstream. The control flag may be decoded (S730). The second control flag may be a 1-bit flag included in the CU syntax or the TU syntax. If the second control flag is true (“1”), it indicates that color space transformation is applied for the current block, and if the second control flag is false (“0”), it indicates that color space transformation is not applied for the current block.

비디오 복호화기는 인터 예측 혹은 인트라 예측을 수행하여 현재 블록에 대한 예측 블록을 생성하고, 비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터(즉, 순방향 색상 변환된 잔차 블록들)을 복원할 수 있다(S740). 제 1 잔차 데이터는 현재 블록의 색상 컴포넌트들에 대한 잔차 블록들을 포함할 수 있다. 비디오 복호화기는 색상 컴포넌트들의 잔차 블록들을 복원하기 위해 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트(들)로부터 예측할 수 있다.The video decoder may generate a prediction block for the current block by performing inter prediction or intra prediction, and may reconstruct first residual data (ie, forward color-transformed residual blocks) of the current block from the bitstream (S740). ). The first residual data may include residual blocks for color components of the current block. The video decoder may predict at least one of the color components of the current block from the other color component(s) to reconstruct the residual blocks of the color components.

현재 블록에 색상 공간 변환이 적용된다고 제 2 제어 플래그에 의해 지시될 때, 비디오 복호화기는 제 1 잔차 데이터에 대해 역방향 색상 변환을 수행하여 제 2 잔차 데이터(즉, 역방향 색상 변환된 잔차 블록들)을 생성하고(S750), 현재 블록에 대한 복원된 블록을 생성하기 위해 예측 블록에 제 2 잔차 데이터를 가산할 수 있다(S760). 반면, 현재 블록에 색상 공간 변환이 적용되지 않는다고 제 2 제어 플래그에 의해 지시될 때, 비디오 복호화기는 현재 블록에 대한 복원된 블록을 생성하기 위해 예측 블록에 제 1 잔차 데이터를 가산할 수 있다.When the second control flag indicates that color space transformation is applied to the current block, the video decoder performs reverse color transformation on the first residual data to generate second residual data (ie, backward color transformed residual blocks). generated ( S750 ), and second residual data may be added to the prediction block to generate a reconstructed block with respect to the current block ( S760 ). On the other hand, when the second control flag indicates that the color space transform is not applied to the current block, the video decoder may add the first residual data to the prediction block to generate a reconstructed block for the current block.

도 8은 본 개시의 다른 측면에 따른, 전술한 하나 이상의 기법을 이용한 비디오 데이터를 복호화하는 방법을 도시한 흐름도이다.8 is a flowchart illustrating a method of decoding video data using one or more techniques described above, according to another aspect of the present disclosure.

비디오 복호화기는 비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 획득한다(S810). 제 1 잔차 데이터는 현재 블록의 색상 컴포넌트들 각각에 대한 잔차 데이터(잔차 블록)를 포함한다. 비디오 복호화기는, 상위 레벨의 색상 변환 제어 플래그와 블록 레벨의 색상 변환 제어 플래그에 기초하여, 제 1 잔차 데이터에 대해 색상 공간 변환의 적용 여부를 결정한다(S820). 상위 레벨의 색상 변환 제어 플래그는 현재 블록이 포함된 픽쳐들의 시퀀스에 허용되는 최대 변환 크기에 의존하여 비트스트림에서 시그널링된다. The video decoder obtains first residual data for the current block from the bitstream (S810). The first residual data includes residual data (residual block) for each of the color components of the current block. The video decoder determines whether to apply the color space transformation to the first residual data based on the upper-level color transformation control flag and the block-level color transformation control flag ( S820 ). The higher-level color conversion control flag is signaled in the bitstream depending on the maximum conversion size allowed for the sequence of pictures including the current block.

예를 들어, 비디오 복호화기는 비트스트림으로부터 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 신택스 엘리먼트를 복호화하고, 최대 변환 크기가 기설정된 값보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 비트스트림으로부터 상위 레벨의 색상 변환 제어 플래그를 복호화한다. 상위 레벨의 색상 변환 제어 플래그는 SPS 신택스에서 시그널링되는 1비트 플래그일 수 있다. 상위 레벨의 색상 변환 제어 플래그가 참("1")이면 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용됨을 나타내고, 상위 레벨의 색상 변환 제어 플래그가 거짓("0")이면 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되지 않음을 나타낸다.For example, the video decoder decodes a syntax element indicating a maximum transform size allowed for a sequence of pictures from the bitstream, and when the syntax element indicates that the maximum transform size is smaller than a preset value, from the bitstream Decodes high-level color conversion control flags. The upper-level color conversion control flag may be a 1-bit flag signaled in the SPS syntax. If the upper-level color conversion control flag is true ("1"), it indicates that color space conversion is allowed for blocks in the sequence, and if the upper-level color conversion control flag is false ("0"), the Indicates that application of color space transform is not allowed for blocks.

블록 레벨의 색상 변환 제어 플래그는 상위 레벨의 색상 변환 제어 플래그에 의존하여 비트스트림에서 시그널링된다. 즉, 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상위 레벨의 색상 변환 제어 플래그에 의해 지시될 때, 비디오 복호화기는 비트스트림으로부터 현재 블록에 대한 블록 레벨의 색상 변환 제어 플래그를 복호화한다. 블록 레벨의 색상 변환 제어 플래그는 CU 신택스 혹은 TU 신택스에 포함되는 1비트 플래그일 수 있다. 블록 레벨의 색상 변환 제어 플래그가 참("1")이면 현재 블록에 대해 색상 공간 변환의 적용이 허용됨을 나타내고, 블록 레벨의 색상 변환 제어 플래그가 거짓("0")이면 현재 블록에 대해 색상 공간 변환의 적용이 허용되지 않음을 나타낸다.The block-level color conversion control flag is signaled in the bitstream depending on the upper-level color conversion control flag. That is, when the upper-level color conversion control flag indicates that the application of color space conversion is permitted to blocks in the sequence, the video decoder decodes the block-level color conversion control flag for the current block from the bitstream. The block-level color conversion control flag may be a 1-bit flag included in the CU syntax or the TU syntax. If the block-level color conversion control flag is true ("1"), it indicates that color space conversion is allowed for the current block; if the block-level color conversion control flag is false ("0"), the color space for the current block is allowed. Indicates that the application of the transform is not allowed.

상위 레벨의 색상 변환 제어 플래그와 블록 레벨의 색상 변환 제어 플래그는 비트스트림에서 시그널링되지 않을 때, 비디오 복호화기에 의해 거짓('0')으로 추론된다.When the upper-level color conversion control flag and the block-level color conversion control flag are not signaled in the bitstream, it is inferred as false ('0') by the video decoder.

비디오 복호화기는 인터 예측 혹은 인트라 예측을 수행하여 현재 블록에 대한 예측 블록을 생성한다(S830).The video decoder generates a prediction block for the current block by performing inter prediction or intra prediction (S830).

제 1 잔차 데이터에 대해 색상 공간 변환의 적용된다는 결정에 응답하여, 비디오 복호화기는, 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하고, 예측 블록과 제 2 잔차 데이터에 기초하여 현재 블록에 대한 복원된 블록을 생성한다(S840). 반면, 제 1 잔차 데이터에 대해 색상 공간 변환의 적용되지 않는다는 결정에 응답하여, 비디오 복호화기는, 예측 블록과 제 1 잔차 데이터에 기초하여 현재 블록에 대한 복원된 블록을 생성한다.In response to determining that a color space transform is to be applied on the first residual data, the video decoder performs an inverse color transform on the first residual data to generate second residual data, and to the prediction block and the second residual data. A reconstructed block for the current block is generated based on the block (S840). On the other hand, in response to determining that the color space transform is not applied to the first residual data, the video decoder generates a reconstructed block for the current block based on the prediction block and the first residual data.

색상 공간 변환은 싱글 트리로 분할되는 경우에 한해 허용될 수 있다. 따라서 비디오 복호화기는 현재 블록의 루마 컴포넌트와 크로마 컴포넌트들이 듀얼 분할 트리를 사용하여 부호화된 때, 블록 레벨의 색상 변환 제어 플래그가 거짓("0")이라고 추론한다(즉, 현재 블록에 대해 색상 공간 변환의 적용되지 않았다고 결정한다).Color space conversion is allowed only if it is partitioned into a single tree. Accordingly, the video decoder infers that the block-level color conversion control flag is false (“0”) when the luma and chroma components of the current block are encoded using the dual split tree (that is, the color space conversion for the current block). determines that it does not apply).

색상 공간 변환은 크로마 샘플링 포맷이 4:4:4인 경우에 한해 허용될 수 있다. 따라서 비디오 복호화기는 비디오 데이터에 대한 크로마 샘플링 포맷이 4:4:4 이외의 크로마 샘플링 포맷인 경우에, 상위 레벨의 색상 변환 제어 플래그가 거짓("0")이라고 추론한다(즉, 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되지 않는다고 결정한다).Color space conversion may be allowed only when the chroma sampling format is 4:4:4. Therefore, when the chroma sampling format for video data is a chroma sampling format other than 4:4:4, the video decoder infers that the high-level color conversion control flag is false (“0”) (ie, blocks in the sequence). determines that the application of color space transformations is not allowed for ).

색상 공간 변환은 CCLM(cross-component linear mode)과 함께 코딩 블록에 적용되는 것이 허용되지 않을 수 있다. 따라서, 비디오 복호화기는 현재 블록에 색상 공간 변환이 적용된다고 블록 레벨의 색상 변환 제어 플래그에 의해 지시될 때, 현재 블록의 크로마 컴포넌트들에는 CCLM(cross-component linear mode)이 적용되지 않는다고 결정한다.Color space transform may not be allowed to be applied to the coding block together with the cross-component linear mode (CCLM). Accordingly, the video decoder determines that CCLM (cross-component linear mode) is not applied to chroma components of the current block when it is indicated by the block-level color transformation control flag that color space transformation is to be applied to the current block.

일부의 경우에, 색상 공간 변환은 크로마 컴포넌트들 간 예측과 함께 사용될 수도 있다. 따라서, 현재 블록에 대한 색상 컴포넌트들의 예측 블록들을 생성하기 위해, 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트로부터 예측할 수도 있다.In some cases, color space transformation may be used in conjunction with prediction between chroma components. Accordingly, in order to generate prediction blocks of color components for the current block, at least one of the color components of the current block may be predicted from another color component.

이상의 설명에서 예시적인 실시예들은 많은 다른 방식으로 구현될 수 있다는 것을 이해해야 한다. 하나 이상의 예시들에서 설명된 기능들은 하드웨어, 소프트웨어, 펌웨어 또는 이들의 임의의 조합으로 구현될 수 있다. 본 명세서에서 설명된 기능적 컴포넌트들은 그들의 구현 독립성을 특히 더 강조하기 위해 "...부(unit)" 로 라벨링되었음을 이해해야 한다. It should be understood that the exemplary embodiments in the above description may be implemented in many different ways. The functions described in one or more examples may be implemented in hardware, software, firmware, or any combination thereof. It should be understood that the functional components described herein have been labeled "...unit" to particularly further emphasize their implementation independence.

한편, 본 개시에서 설명된 다양한 기능들 혹은 방법들은 하나 이상의 프로세서에 의해 판독되고 실행될 수 있는 비일시적 기록매체에 저장된 명령어들로 구현될 수도 있다. 비일시적 기록매체는, 예를 들어, 컴퓨터 시스템에 의하여 판독가능한 형태로 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 예를 들어, 비일시적 기록매체는 EPROM(erasable programmable read only memory), 플래시 드라이브, 광학 드라이브, 자기 하드 드라이브, 솔리드 스테이트 드라이브(SSD)와 같은 저장매체를 포함한다.Meanwhile, various functions or methods described in the present disclosure may be implemented as instructions stored in a non-transitory recording medium that can be read and executed by one or more processors. The non-transitory recording medium includes, for example, any type of recording device in which data is stored in a form readable by a computer system. For example, the non-transitory recording medium includes a storage medium such as an erasable programmable read only memory (EPROM), a flash drive, an optical drive, a magnetic hard drive, and a solid state drive (SSD).

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of this embodiment, and various modifications and variations will be possible by those skilled in the art to which this embodiment belongs without departing from the essential characteristics of the present embodiment. Accordingly, the present embodiments are for explanation rather than limiting the technical spirit of the present embodiment, and the scope of the technical spirit of the present embodiment is not limited by these embodiments. The protection scope of the present embodiment should be interpreted by the following claims, and all technical ideas within the equivalent range should be construed as being included in the scope of the present embodiment.

Claims (20)

비디오 데이터를 복호화하는 방법으로서,
비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 획득하는 단계;
상위 레벨의 색상 변환 제어 플래그와 블록 레벨의 색상 변환 제어 플래그에 기초하여 상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용 여부를 결정하는 단계;
상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용된다고 결정하는 것에 응답하여, 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하는 단계;
상기 현재 블록에 대한 예측 블록을 생성하는 단계; 및
상기 예측 블록과 상기 제 2 잔차 데이터에 기초하여 상기 현재 블록에 대한 복원된 블록을 생성하는 단계
를 포함하고,
상기 상위 레벨의 색상 변환 제어 플래그는 상기 현재 블록이 포함된 픽쳐들의 시퀀스에 허용되는 최대 변환 크기에 의존하여 상기 비트스트림에서 시그널링되고, 상기 블록 레벨의 색상 변환 제어 플래그는 상기 상위 레벨의 색상 변환 제어 플래그에 의존하여 상기 비트스트림에서 시그널링되며, 상기 상위 레벨의 색상 변환 제어 플래그와 상기 블록 레벨의 색상 변환 제어 플래그는 상기 비트스트림에서 시그널링되지 않을 때 거짓(false)으로 추론되는, 복호화 방법.
A method of decoding video data, comprising:
obtaining first residual data for a current block from the bitstream;
determining whether to apply color space conversion to the first residual data based on a color conversion control flag of a higher level and a color conversion control flag of a block level;
in response to determining that a color space transform is applied to the first residual data, performing an inverse color transform on the first residual data to generate second residual data;
generating a prediction block for the current block; and
generating a reconstructed block for the current block based on the prediction block and the second residual data;
including,
The upper-level color conversion control flag is signaled in the bitstream depending on a maximum conversion size allowed for a sequence of pictures including the current block, and the block-level color conversion control flag is the upper-level color conversion control flag. Signaled in the bitstream depending on a flag, the upper-level color conversion control flag and the block-level color conversion control flag are inferred to be false when not signaled in the bitstream.
제 1 항에 있어서,
상기 비트스트림으로부터 상기 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 신택스 엘리먼트를 복호화하는 단계; 및
상기 최대 변환 크기가 상기 기설정된 값보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 상기 비트스트림으로부터 상기 상위 레벨의 색상 변환 제어 플래그를 복호화하는 단계
를 더 포함하는, 복호화 방법.
The method of claim 1,
decoding a syntax element indicating a maximum transform size allowed for the sequence of pictures from the bitstream; and
decoding the upper-level color conversion control flag from the bitstream when it is indicated by the syntax element that the maximum conversion size is smaller than the preset value;
Further comprising, a decryption method.
제 2 항에 있어서,
상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상기 상위 레벨의 색상 변환 제어 플래그에 의해 지시될 때, 상기 비트스트림으로부터 상기 현재 블록에 대한 상기 블록 레벨의 색상 변환 제어 플래그를 복호화하는 단계
를 더 포함하는, 복호화 방법.
3. The method of claim 2,
decoding the block-level color conversion control flag for the current block from the bitstream when the higher-level color conversion control flag indicates that application of color space conversion is permitted to the blocks in the sequence;
Further comprising, a decryption method.
제 1 항에 있어서,
상기 현재 블록의 루마 컴포넌트와 크로마 컴포넌트들이 듀얼 분할 트리를 사용하여 부호화된 때, 상기 블록 레벨의 색상 변환 제어 플래그의 복호화 없이, 상기 현재 블록에 대해 색상 공간 변환의 적용되지 않았다고 결정하는 단계
를 더 포함하는, 복호화 방법.
The method of claim 1,
When the luma component and the chroma component of the current block are encoded using a dual split tree, determining that color space conversion is not applied to the current block without decoding the block-level color conversion control flag;
Further comprising, a decryption method.
제 1 항에 있어서,
상기 비디오 데이터에 대한 크로마 샘플링 포맷이 4:4:4 이외의 크로마 샘플링 포맷인 경우에, 상기 상위 레벨의 색상 변환 제어 플래그의 복호화 없이, 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되지 않는다고 결정하는 단계
를 더 포함하는, 복호화 방법.
The method of claim 1,
When the chroma sampling format for the video data is a chroma sampling format other than 4:4:4, application of color space transformation to blocks in the sequence is not allowed without decoding of the upper-level color transformation control flag. Deciding not to
Further comprising, a decryption method.
제 1 항에 있어서,
상기 현재 블록에 대한 예측 블록을 생성하는 단계는,
상기 현재 블록에 상기 색상 공간 변환이 적용된다고 상기 블록 레벨의 색상 변환 제어 플래그에 의해 지시될 때, 상기 현재 블록의 크로마 컴포넌트들에는 CCLM(cross-component linear mode)이 적용되지 않는다고 결정하는 단계
를 더 포함하는, 복호화 방법.
The method of claim 1,
The step of generating a prediction block for the current block includes:
determining that cross-component linear mode (CCLM) is not applied to chroma components of the current block when the block-level color conversion control flag indicates that the color space conversion is applied to the current block;
Further comprising, a decryption method.
제 1 항에 있어서,
상기 현재 블록에 대한 예측 블록을 생성하는 단계는,
상기 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트로부터 예측하는 단계
를 포함하는, 복호화 방법.
The method of claim 1,
The step of generating a prediction block for the current block includes:
predicting at least one of the color components of the current block from another color component;
Including, a decryption method.
제 1 항에 있어서,
상기 제 1 잔차 데이터는,
상기 현재 블록의 색상 컴포넌트들 각각에 대한 잔차 데이터를 포함하는, 복호화 방법.
The method of claim 1,
The first residual data is
and residual data for each of the color components of the current block.
비디오 데이터를 복호화하기 위한 장치로서,
하나 이상의 프로세서를 포함하고,
상기 하나 이상의 프로세서는,
비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 획득하고,
상위 레벨의 색상 변환 제어 플래그와 블록 레벨의 색상 변환 제어 플래그에 기초하여 상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용 여부를 결정하고,
상기 제 1 잔차 데이터에 대해 색상 공간 변환의 적용된다고 결정하는 것에 응답하여, 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하고,
상기 현재 블록에 대한 예측 블록을 생성하고,
상기 예측 블록과 상기 제 2 잔차 데이터에 기초하여 상기 현재 블록에 대한 복원된 블록을 생성하도록 구성되고,
상기 상위 레벨의 색상 변환 제어 플래그는 상기 현재 블록이 포함된 픽쳐들의 시퀀스에 허용되는 최대 변환 크기에 의존하여 상기 비트스트림에서 시그널링되고, 상기 블록 레벨의 색상 변환 제어 플래그는 상기 상위 레벨의 색상 변환 제어 플래그에 의존하여 상기 비트스트림에서 시그널링되며, 상기 상위 레벨의 색상 변환 제어 플래그와 상기 블록 레벨의 색상 변환 제어 플래그는 상기 비트스트림에서 시그널링되지 않을 때 거짓(false)으로 추론되는, 복호화 장치.
An apparatus for decoding video data, comprising:
one or more processors;
The one or more processors,
obtain first residual data for the current block from the bitstream,
determining whether to apply color space transformation to the first residual data based on a color conversion control flag of a higher level and a color conversion control flag of a block level;
in response to determining that a color space transform is applied to the first residual data, performing an inverse color transform on the first residual data to generate second residual data;
generating a prediction block for the current block;
and generate a reconstructed block for the current block based on the prediction block and the second residual data,
The upper-level color conversion control flag is signaled in the bitstream depending on a maximum conversion size allowed for a sequence of pictures including the current block, and the block-level color conversion control flag is the upper-level color conversion control flag. Signaled in the bitstream depending on a flag, the upper-level color conversion control flag and the block-level color conversion control flag are inferred to be false when not signaled in the bitstream.
제 9 항에 있어서,
상기 하나 이상의 프로세서는, 또한
상기 비트스트림으로부터 상기 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 신택스 엘리먼트를 복호화하고,
상기 최대 변환 크기가 상기 기설정된 값보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 상기 비트스트림으로부터 상기 상위 레벨의 색상 변환 제어 플래그를 복호화하도록 구성된, 복호화 장치.
10. The method of claim 9,
the one or more processors,
Decodes a syntax element indicating a maximum transform size allowed for the sequence of pictures from the bitstream,
and decode the upper-level color conversion control flag from the bitstream when it is indicated by the syntax element that the maximum transform size is smaller than the preset value.
제 10 항에 있어서,
상기 하나 이상의 프로세서는, 또한
상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상기 상위 레벨의 색상 변환 제어 플래그에 의해 지시될 때, 상기 비트스트림으로부터 상기 현재 블록에 대한 상기 블록 레벨의 색상 변환 제어 플래그를 복호화하도록 구성된, 복호화 장치.
11. The method of claim 10,
the one or more processors,
and decode the block-level color conversion control flag for the current block from the bitstream when it is indicated by the higher-level color conversion control flag that application of color space conversion to blocks in the sequence is permitted. , decryption device.
제 9 항에 있어서,
상기 하나 이상의 프로세서는, 또한
상기 현재 블록의 루마 컴포넌트와 크로마 컴포넌트들이 듀얼 분할 트리를 사용하여 부호화된 때, 상기 블록 레벨의 색상 변환 제어 플래그의 복호화 없이, 상기 현재 블록에 대해 색상 공간 변환의 적용되지 않았다고 결정하도록 구성된, 복호화 장치.
10. The method of claim 9,
the one or more processors,
and determine that color space transformation is not applied to the current block without decoding the block-level color transformation control flag when the luma component and the chroma component of the current block are encoded using a dual split tree. .
제 9 항에 있어서,
상기 하나 이상의 프로세서는, 또한
상기 비디오 데이터에 대한 크로마 샘플링 포맷이 4:4:4 이외의 크로마 샘플링 포맷인 경우에, 상기 상위 레벨의 색상 변환 제어 플래그의 복호화 없이, 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되지 않는다고 결정하도록 구성된, 복호화 장치.
10. The method of claim 9,
the one or more processors,
When the chroma sampling format for the video data is a chroma sampling format other than 4:4:4, application of color space transformation to blocks in the sequence is not allowed without decoding of the upper-level color transformation control flag. A decryption device, configured to determine that no.
제 9 항에 있어서,
상기 하나 이상의 프로세서는, 또한
상기 현재 블록에 상기 색상 공간 변환이 적용된다고 상기 블록 레벨의 색상 변환 제어 플래그에 의해 지시될 때, 상기 현재 블록의 크로마 컴포넌트들에는 CCLM(cross-component linear mode)이 적용되지 않는다고 결정하도록 구성된, 복호화 장치.
10. The method of claim 9,
the one or more processors,
and determine that cross-component linear mode (CCLM) is not applied to chroma components of the current block when it is indicated by the block-level color conversion control flag that the color space transformation is applied to the current block. Device.
제 9 항에 있어서,
상기 하나 이상의 프로세서는, 또한
상기 현재 블록에 대한 예측 블록을 생성하는 것의 일부로서, 상기 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트로부터 예측하도록 구성된, 복호화 장치.
10. The method of claim 9,
the one or more processors,
The decoding apparatus, configured to predict at least one of color components of the current block from another color component as part of generating the prediction block for the current block.
제 9 항에 있어서,
상기 제 1 잔차 데이터는,
상기 현재 블록의 색상 컴포넌트들 각각에 대한 잔차 데이터를 포함하는, 복호화 장치.
10. The method of claim 9,
The first residual data is
and residual data for each of the color components of the current block.
비디오 데이터를 복호화하는 방법으로서,
비트스트림으로부터 비디오 데이터의 픽처들의 시퀀스에 대해 허용되는 최대 변환 크기를 지시하는 신택스 엘리먼트를 복호화하는 단계;
상기 최대 변환 크기가 64보다 작다고 상기 신택스 엘리먼트에 의해 지시될 때, 상기 비트스트림으로부터 상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용되는지 여부를 지시하는 제 1 제어 플래그를 복호화하는 단계;
상기 시퀀스 내의 블록들에 대해 색상 공간 변환의 적용이 허용된다고 상기 제 1 제어 플래그에 의해 지시될 때, 상기 비트스트림으로부터 상기 시퀀스 내의 현재 블록에 상기 색상 공간 변환이 적용되는지 여부를 지시하는 제 2 제어 플래그를 복호화하는 단계;
상기 현재 블록에 상기 색상 공간 변환이 적용된다고 상기 제 2 제어 플래그에 의해 지시될 때, 상기 비트스트림으로부터 현재 블록에 대한 제 1 잔차 데이터를 복원하고 상기 제 1 잔차 데이터에 대해 역 색상 변환을 수행하여 제 2 잔차 데이터를 생성하는 단계;
상기 현재 블록에 대한 예측 블록을 생성하는 단계; 및
상기 예측 블록과 상기 제 2 잔차 데이터에 기초하여 상기 현재 블록에 대한 복원된 블록을 생성하는 단계
를 포함하는, 복호화 방법.
A method of decoding video data, comprising:
decoding a syntax element indicating a maximum transform size allowed for a sequence of pictures of video data from a bitstream;
decoding a first control flag indicating whether application of a color space transform is permitted to blocks in the sequence from the bitstream when the maximum transform size is smaller than 64 indicated by the syntax element;
A second control indicating whether the color space transform is applied to the current block in the sequence from the bitstream when the first control flag indicates that application of the color space transform is permitted to the blocks in the sequence decoding the flag;
When it is indicated by the second control flag that the color space transformation is applied to the current block, the first residual data for the current block is restored from the bitstream, and the inverse color transformation is performed on the first residual data. generating second residual data;
generating a prediction block for the current block; and
generating a reconstructed block for the current block based on the prediction block and the second residual data;
Including, a decryption method.
제 17 항에 있어서,
상기 현재 블록에 상기 색상 공간 변환이 적용된다고 상기 제 2 제어 플래그에 의해 지시될 때, 상기 현재 블록의 크로마 컴포넌트들에는 CCLM(cross-component linear mode)이 적용되지 않는다고 결정하는 단계를 더 포함하는, 복호화 방법.
18. The method of claim 17,
When the second control flag indicates that the color space transformation is applied to the current block, determining that cross-component linear mode (CCLM) is not applied to the chroma components of the current block. Decryption method.
제 17 항에 있어서,
상기 현재 블록의 루마 컴포넌트와 크로마 컴포넌트들이 듀얼 분할 트리를 사용하여 부호화된 때, 상기 제 2 제어 플래그의 복호화 없이, 상기 현재 블록에 대해 색상 공간 변환의 적용이 허용되지 않는다고 결정하는 단계를 더 포함하는, 복호화 방법.
18. The method of claim 17,
When the luma component and the chroma component of the current block are encoded using a dual split tree, determining that application of a color space transform is not allowed to the current block without decoding the second control flag , the decryption method.
제 17 항에 있어서,
상기 현재 블록에 대한 예측 블록을 생성하는 단계는,
상기 현재 블록의 색상 컴포넌트들 중 적어도 하나를 다른 색상 컴포넌트로부터 예측하는 단계를 포함하는, 복호화 방법.
18. The method of claim 17,
The step of generating a prediction block for the current block includes:
and predicting at least one of the color components of the current block from another color component.
KR1020210005127A 2020-01-14 2021-01-14 Video Encoding and Decoding Using Adaptive Color Transform KR20210091673A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/792,460 US20230130958A1 (en) 2020-01-14 2021-01-14 Video encoding and decoding using adaptive color transform
PCT/KR2021/000527 WO2021145691A1 (en) 2020-01-14 2021-01-14 Video encoding and decoding using adaptive color transform

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR1020200004645 2020-01-14
KR20200004645 2020-01-14
KR20200022425 2020-02-24
KR1020200022425 2020-02-24

Publications (1)

Publication Number Publication Date
KR20210091673A true KR20210091673A (en) 2021-07-22

Family

ID=77158167

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210005127A KR20210091673A (en) 2020-01-14 2021-01-14 Video Encoding and Decoding Using Adaptive Color Transform

Country Status (1)

Country Link
KR (1) KR20210091673A (en)

Similar Documents

Publication Publication Date Title
KR20210018137A (en) Method and apparatus for intra prediction coding of video data
KR20210006305A (en) Method and apparatus for intra prediction coding of video data
CN114270826A (en) Method and apparatus for intra prediction encoding of video data
EP4109901A1 (en) Image encoding and decoding based on resampling of chroma signal
CN113892268A (en) Intra-frame prediction device and method based on prediction mode estimation
KR20230105646A (en) Method for Template-based Intra Mode Derivation for Chroma Component
KR20220071131A (en) Video Encoding and Decoding Method and Apparatus Using Subblock Based Intra Prediction
KR20200110236A (en) Method and apparatus for efficiently applying transform skip mode to video data block
CN113841403A (en) Inverse quantization apparatus and method used in image decoding apparatus
KR20210091673A (en) Video Encoding and Decoding Using Adaptive Color Transform
US20230130958A1 (en) Video encoding and decoding using adaptive color transform
US20240007620A1 (en) Image encoding and decoding method using adaptive alternative mode
US20240007656A1 (en) Method and apparatus for video coding using segmentation
US11973966B2 (en) Method and apparatus for efficiently coding residual blocks
US20240007623A1 (en) Block splitting structure for efficient prediction and transform, and method and appartus for video encoding and decoding using the same
US20240007649A1 (en) Method and apparatus for video coding using motion vector with component-wise adaptive spatial resolution
US20220191531A1 (en) Method and apparatus for efficiently coding residual blocks
US20240031564A1 (en) Method and apparatus for video coding using adaptive intra prediction precision
US20230412811A1 (en) Method and apparatus for video coding using spiral scan order
EP4068777A1 (en) Video encoding and decoding using differential modulation
US20220150470A1 (en) Method and apparatus for intra predictionbased on deriving prediction mode
KR20230083247A (en) Method and apparatus for vedeo decoding and encoding by adjusting the number of multiple transformation selection candidates in multiple transform selection
KR20230059135A (en) Video Coding Method And Apparatus Using Various Block Partitioning Structure
KR20220071128A (en) Method for Encoding and Decoding Video Using Adaptive Replacement Mode
KR20220118334A (en) Video Coding Method and Apparatus Using Intra Prediction Based on Subblock Partitioning

Legal Events

Date Code Title Description
A201 Request for examination