KR20210003005A - Video encoding and decoding method and apparatus using signal change correlation between cross components - Google Patents

Video encoding and decoding method and apparatus using signal change correlation between cross components Download PDF

Info

Publication number
KR20210003005A
KR20210003005A KR1020190079008A KR20190079008A KR20210003005A KR 20210003005 A KR20210003005 A KR 20210003005A KR 1020190079008 A KR1020190079008 A KR 1020190079008A KR 20190079008 A KR20190079008 A KR 20190079008A KR 20210003005 A KR20210003005 A KR 20210003005A
Authority
KR
South Korea
Prior art keywords
block
prediction
component
unit
information
Prior art date
Application number
KR1020190079008A
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 KR1020190079008A priority Critical patent/KR20210003005A/en
Publication of KR20210003005A publication Critical patent/KR20210003005A/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties

Landscapes

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

Abstract

The present invention provides a method and device for encoding and decoding a video using a signal change correlation between cross-components to improve a coding efficiency of a video signal. The present invention suggests a motion information derivation method used for generating a MERGE/AMVP candidate list.

Description

교차 성분간 신호변화 상관도를 이용한 동영상 부호화 및 복호화 방법과 장치{.}A video encoding and decoding method and apparatus using the correlation of signal change between cross components{.}

본 발명은 영상 부호화/복호화 방법 및 장치에 관한 것이다.The present invention relates to a video encoding/decoding method and apparatus.

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이에 따라, 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)은 2014년 2월, 동영상 압축 표준인 HEVC(High Efficiency Video Coding) 버전1을 제정하였다.Recently, the demand for multimedia data such as video is increasing rapidly on the Internet. However, it is difficult to keep up with the rapidly increasing amount of multimedia data at the rate of development of the bandwidth of the channel. Accordingly, ITU-T's VCEG (Video Coding Expert Group) and ISO/IEC's Moving Picture Expert Group (MPEG), an international standardization organization, revised version 1 of HEVC (High Efficiency Video Coding), a video compression standard, in February 2014. Established.

HEVC에서는 화면 내 예측(또는 인트라 예측), 화면 간 예측(또는 인터 예측), 변환, 양자화, 엔트로피 부호화 및 인-루프 필터 등의 기술을 정의하고 있다.In HEVC, technologies such as intra prediction (or intra prediction), inter prediction (or inter prediction), transformation, quantization, entropy coding, and in-loop filter are defined.

본 발명은 비디오 신호의 코딩 효율을 향상시키고자 함에 있다.The present invention is to improve the coding efficiency of a video signal.

본 발명은 MERGE/AMVP 후보 리스트를 생성할 때 이용되는 움직임 정보 유도 방법을 제안하고 있다.The present invention proposes a motion information derivation method used when generating a MERGE/AMVP candidate list.

본 발명에 따른 비디오 신호 처리 방법 및 장치는 비디오 신호 코딩 효율을 향상시킬 수 있다.The video signal processing method and apparatus according to the present invention can improve video signal coding efficiency.

도 1은 영상 부호화 장치를 나타낸 블록도이다.
도 2는 영상 부호화 장치의 화면 내 예측부를 나타낸 블록도이다.
도 3은 영상 부호화 장치의 화면 간 예측부를 나타낸 블록도이다.
도 4는 화면 내 예측 설명을 위해 현재 블록과 주변 이용 가능한 참조 화소 라인 예시이다.
도 5는 휘도 성분의 화면 내 예측에서 ISP 모드 설명을 위한 예시이다.
도 6은 동일 위치에서 휘도 성분과 색차 성분의 블록 분할이 서로 다르게 된 예시이다.
도 7은 LM 모드 설명을 위한 예시이다.
도 8은 예측 모드 정보를 부호화 하는 방법이다.
도 9는 본 발명의 영상 복호화 장치(900)를 나타낸 블록도이다.
도 10은 영상 복호화 장치의 화면 내 예측부를 도시한다.
도 11은 영상 복호화 장치의 화면 간 예측부를 도시한다.
도 12는 예측 모드 정보를 복호화 하는 방법이다.
도 13은 본 발명의 일 실시예에 따라 영상 부호화 장치를 나타낸 블록도이다.
도 14는 본 발명의 일 실시예에 따라 영상 부호화 장치의 1번 성분 예측부와 2번 성분 예측부의 화면 내 예측 과정을 나타내는 흐름도이다.
도 15는 본 발명의 일 실시예에 따라 1번 성분과 2번 성분 블록을 나타낸 예시이다.
도 16은 본 발명의 일 실시예에 따라 영상 복호화 장치를 나타낸 블록도이다.
도 17은 본 발명의 일 실시예에 따라 영상 복호화 장치의 1번 성분 예측부와 2번 성분 예측부의 화면 내 예측 과정을 나타내는 흐름도이다.
도 18은 본 실시예에 따라 예측 모드 정보를 부호화 하는 방법이다.
도 19은 본 실시예에 따라 예측 모드 정보를 복호화 하는 방법이다.
1 is a block diagram showing an image encoding apparatus.
2 is a block diagram illustrating an intra prediction unit of an image encoding apparatus.
3 is a block diagram illustrating an inter prediction unit of an image encoding apparatus.
4 is an example of a reference pixel line that can be used around a current block to describe intra prediction.
5 is an example for explaining an ISP mode in intra-screen prediction of a luminance component.
6 is an example in which block divisions of a luminance component and a color difference component are different from each other at the same position.
7 is an example for explaining an LM mode.
8 is a method of encoding prediction mode information.
9 is a block diagram showing an image decoding apparatus 900 according to the present invention.
10 illustrates an intra-screen prediction unit of an image decoding apparatus.
11 shows an inter prediction unit of an image decoding apparatus.
12 is a method of decoding prediction mode information.
13 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
14 is a flowchart illustrating an intra prediction process of a component 1 predictor and a component 2 predictor of an image encoding apparatus according to an embodiment of the present invention.
15 is an illustration showing component 1 and component 2 blocks according to an embodiment of the present invention.
16 is a block diagram showing an image decoding apparatus according to an embodiment of the present invention.
17 is a flowchart illustrating an intra prediction process of a component 1 predictor and a component 2 predictor of an image decoding apparatus according to an embodiment of the present invention.
18 is a method of encoding prediction mode information according to the present embodiment.
19 is a method of decoding prediction mode information according to the present embodiment.

도 1은 영상 부호화 장치를 나타낸 블록도이다. 도 1을 참조하면, 영상 부호화 장치(100)는 블록 분할부(S101), 화면 내 예측부(S102), 화면 간 예측부(S103), 감산부(S104), 변환부(S105), 양자화부(S106), 엔트로피 부호화부(S107), 역양자화부(S108), 역변환부(S109), 증산부(S110), 필터부(S111) 및 메모리(S112)를 포함할 수 있다. 1 is a block diagram showing an image encoding apparatus. Referring to FIG. 1, the image encoding apparatus 100 includes a block division unit S101, an intra prediction unit S102, an inter prediction unit S103, a subtraction unit S104, a transform unit S105, and a quantization unit. (S106), an entropy encoding unit (S107), an inverse quantization unit (S108), an inverse transform unit (S109), a multiplication unit (S110), a filter unit (S111), and a memory (S112).

각 장치에서 최적의 정보를 선택하기 위해 RD-Cost(RateDistortion-Cost)를 비교한다. RD-Cost란 원본 블록과 복원된 블록간의 왜곡 정보와 예측 모드 전송시에 발생하는 비트량을 이용하여 계산된 비용값을 의미한다. 이때 비용값을 계산하기 위해 SAD(Sum of Absolute Difference), SATD(Sum of Absolute Transformed Difference), SSE(Sum of Square for Error) 등을 이용할 수도 있다.RD-Cost (RateDistortion-Cost) is compared to select the optimal information in each device. RD-Cost refers to a cost value calculated using distortion information between the original block and the reconstructed block and the amount of bits generated during transmission of the prediction mode. In this case, sum of absolute difference (SAD), sum of absolute transformed difference (SATD), sum of square for error (SSE), and the like may be used to calculate the cost value.

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

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

블록 분할부(100)는 입력된 영상을 적어도 하나의 블록으로 분할할 수 있다. 이 때, 입력된 영상은 픽처, 슬라이스, 타일, 세그먼트, CTU 등 다양한 형태와 크기를 가질 수 있다. 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree) 또는 바이너리 트리(Biniary tree), 터너리 트리(Ternary tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할 하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할 하는 방식이다. 터너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록을 하위 블록으로 삼분할 하는 방식이다. 전술한 바이너리 트리, 터너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태를 가질 수 있다.The block dividing unit 100 may divide the input image into at least one block. In this case, the input image may have various shapes and sizes, such as a picture, a slice, a tile, a segment, and a CTU. A block may mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU). The division may be performed based on at least one of a quad tree, a binary tree, and a ternary tree. Quad tree is a method of dividing the upper block into lower blocks whose width and height are half of the upper block. The binary tree is a method of dividing the upper block into lower blocks whose width or height is half of the upper block. The ternary tree is a method in which an upper block is divided into three parts with either the width or the height of the upper block. Through the aforementioned division based on the binary tree and the ternary tree, the block may have a shape of not only a square but also an irregular shape.

예측부(102, 103)는 화면 간 예측을 수행하는 화면 간 예측부(103)와 화면 내 예측을 수행하는 화면 내 예측부(102)를 포함할 수 있다. 예측 단위에 대해 화면 간 예측을 사용할 것인지 또는 화면 내 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 화면 내 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다.The prediction units 102 and 103 may include an inter prediction unit 103 that performs inter prediction and an intra prediction unit 102 that performs intra prediction. It is possible to determine whether to use inter prediction or to perform intra prediction for the prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. In this case, a processing unit in which prediction is performed may be different from a processing unit in which a prediction method and specific content are determined. For example, a prediction method and a prediction mode are determined in a prediction unit, and prediction may be performed in a transformation unit.

생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(105)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(107)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(102, 103)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.A residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 105. Further, prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoder 107 together with a residual value and transmitted to a decoder. In the case of using a specific encoding mode, it is possible to encode an original block as it is and transmit it to a decoder without generating a prediction block through the prediction units 102 and 103.

화면 내 예측부(102)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 화면 내 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 화면 간 예측인 경우, 화면 간 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 화면 내 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 102 may generate a prediction block based on reference pixel information around the current block, which is pixel information in the current picture. When the prediction mode of the neighboring block of the current block on which intra prediction is to be performed is inter prediction, the reference pixel included in the adjacent block to which the inter prediction is applied will be replaced with a reference pixel in another block surrounding the intra prediction. I can. That is, when the reference pixel is not available, information on the reference pixel that is not available can be replaced with at least one reference pixel among the available reference pixels.

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

화면 내 예측부(102)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 102 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a filter that performs filtering on a reference pixel of the current block, and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.

화면 내 예측부(102)의 참조 화소 보간부는 예측 단위의 화면 내 예측 모드가 참조 화소를 보간한 화소값을 기초로 화면 내 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.When the intra prediction mode of the prediction unit is a prediction unit that performs intra prediction based on a pixel value interpolated by a reference pixel, the reference pixel interpolation unit of the intra prediction unit 102 interpolates the reference pixel Reference pixels can be created. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating a reference pixel, the reference pixel may not be interpolated. The DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

화면 간 예측부(103)은, 메모리(112)에 저장된 기 복원된 참조영상과 움직임 정보를 이용하여 예측 블록을 생성한다. 움직임 정보는 예컨대 움직임 벡터, 참조픽처 인덱스, 리스트 1 예측 플래그, 리스트 0 예측 플래그 등을 포함할 수 있다. The inter prediction unit 103 generates a prediction block by using the reconstructed reference image and motion information stored in the memory 112. The motion information may include, for example, a motion vector, a reference picture index, a list 1 prediction flag, and a list 0 prediction flag.

화면 간 예측부(103)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 블록을 유도할 수 있다. 또한, 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로, 현재 블록의 예측 블록을 유도할 수도 있다. 본 발명의 일 실시예에 따른 화면 간 예측부(103)는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부를 포함할 수 있다. The inter prediction unit 103 may derive the prediction block based on information on at least one picture of a picture before or after a current picture. In addition, a prediction block of the current block may be derived based on information on a partial region of the current picture in which encoding is completed. The inter prediction unit 103 according to an embodiment of the present invention may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

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

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

감산부(S104)는, 현재 부호화하려는 블록과 화면 내 예측부(S102) 혹은 화면 간 예측부(S103)에서 생성된 예측 블록을 감산하여 현재 블록의 잔차 블록을 생성한다. 생성된 잔차 블록은 변환부(S103)로 입력되어 변환될 수 있다. The subtraction unit S104 generates a residual block of the current block by subtracting the block to be currently encoded from the prediction block generated by the intra prediction unit S102 or the inter prediction unit S103. The generated residual block may be input to the transform unit S103 to be transformed.

변환부(S105)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST, KLT(Karhunen Loeve Transform) 등과 같은 변환 방법을 사용하여 변환시킬 수 있다. 이때 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 화면 내 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 화면 내 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.The transform unit S105 may transform the residual block including the residual data using a transform method such as DCT, DST, or Karhunen Loeve Transform (KLT). In this case, the transformation method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, depending on the intra prediction mode, DCT may be used in the horizontal direction and DST may be used in the vertical direction.

양자화부(S106)는 변환부(S105)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(S106)에서 산출된 값은 역양자화부(S108)와 엔트로피 부호화부(S107)에 제공될 수 있다.The quantization unit S106 may quantize values converted into the frequency domain by the transform unit S105. Quantization coefficients may vary depending on the block or the importance of the image. The value calculated by the quantization unit S106 may be provided to the inverse quantization unit S108 and the entropy encoding unit S107.

상기 변환부(S105) 및/또는 양자화부(S106)는, 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치(100)는, 잔차 블록의 잔차 데이터에 대해 변환 또는 양자화 중 적어도 하나를 수행하거나, 변환 및 양자화를 모두 스킵하여 잔차 블록을 부호화할 수 있다. 영상 부호화 장치(S100)에서 변환 또는 양자화 중 어느 하나가 수행되지 않거나, 변환 및 양자화 모두 수행되지 않더라도, 엔트로피 부호화부(S107)의 입력으로 들어가는 블록을 통상적으로 변환 블록이라 일컫는다. 엔트로피 부호화부(S107)는 입력 데이터를 엔트로피 부호화한다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The transform unit S105 and/or the quantization unit S106 may be selectively included in the image encoding apparatus 100. That is, the image encoding apparatus 100 may encode the residual block by performing at least one of transformation or quantization on the residual data of the residual block, or skipping both transformation and quantization. Even if neither transformation nor quantization is performed in the image encoding apparatus S100, or both transformation and quantization are not performed, a block entering the input of the entropy encoder S107 is generally referred to as a transform block. The entropy encoding unit S107 entropy encodes the input data. Entropy coding may use various coding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).

엔트로피 부호화부(S107)는 변환 블록의 계수 정보, 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보, 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. 변환 블록의 계수들은, 변환 블록 내 서브 블록 단위로, 부호화될 수 있다. The entropy encoder S107 includes various types of coefficient information, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc. Information can be encoded. The coefficients of the transform block may be encoded in units of sub-blocks within the transform block.

변환 블록의 계수의 부호화를 위하여, 역스캔 순서로 최초의 0이 아닌 계수의 위치를 알리는 신택스 요소(syntax element)인 Last_sig, 서브블록 내에 0이 아닌 계수가 적어도 하나 이상 있는지를 알리는 플래그인 Coded_sub_blk_flag, 0이 아닌 계수인지를 알리는 플래그인 Sig_coeff_flag, 계수의 절대값이 1 보다 큰지를 알리는 플래그인 Abs_greater1_flag, 계수의 절대값이 2 보다 큰지를 알리는 플래그인 Abs_greater2_flag, 계수의 부호를 나타내는 플래그인 Sign_flag 등의 다양한 신택스 요소들이 부호화될 수 있다. 상기 신택스 요소들만으로 부호화되지 않는 계수의 잔여값은 신택스 요소 remaining_coeff를 통해 부호화될 수 있다. For encoding the coefficients of the transform block, Last_sig, a syntax element indicating the position of the first non-zero coefficient in the inverse scan order, Coded_sub_blk_flag, a flag indicating whether there is at least one non-zero coefficient in the subblock, Sig_coeff_flag, a flag indicating whether the coefficient is a non-zero coefficient, Abs_greater1_flag, a flag indicating whether the absolute value of the coefficient is greater than 1, Abs_greater2_flag, a flag indicating whether the absolute value of the coefficient is greater than 2, and Sign_flag, a flag indicating the sign of the coefficient. Syntax elements can be encoded. A residual value of a coefficient that is not coded with only the syntax elements may be coded through the syntax element remaining_coeff.

역양자화부(S108) 및 역변환부(S109)에서는 양자화부(S106)에서 양자화된 값들을 역양자화하고 변환부(S105)에서 변환된 값들을 역변환한다. 역양자화부(S108) 및 역변환부(S109)에서 생성된 잔차값(Residual)은 예측부(S102, 103)에 포함된 움직임 추정부, 움직임 보상부 및 화면 내 예측부(S102)를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. 증산기(S110)는, 예측부(S102, S103)에서 생성된 예측 블록과, 역 변환부(S109)를 통해 생성된 잔차 블록을 증산하여 복원 블록을 생성한다.The inverse quantization unit S108 and the inverse transform unit S109 inverse quantize values quantized in the quantization unit S106 and inverse transform the values transformed in the transform unit S105. The residual values generated by the inverse quantization unit S108 and the inverse transform unit S109 are predicted through the motion estimation unit, the motion compensation unit, and the in-screen prediction unit S102 included in the prediction units S102 and 103. It can be combined with the prediction unit to generate a reconstructed block. The multiplier S110 generates a reconstructed block by multiplying the prediction block generated by the prediction units S102 and S103 and the residual block generated through the inverse transform unit S109.

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

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

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct an offset from the original image for the deblocking image in pixel units. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a certain number of areas, and then the area to be offset is determined and the offset is applied to the area, or offset by considering the edge information of each pixel. You can use the method of applying.

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

메모리(S112)는 필터부(S111)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 화면 간 예측을 수행할 때 예측부(S102, S103)에 제공될 수 있다.The memory S112 may store the reconstructed block or picture calculated through the filter unit S111, and the stored reconstructed block or picture may be provided to the prediction units S102 and S103 when inter prediction is performed.

도 2는 영상 부호화 장치의 화면 내 예측부를 나타낸 블록도이고, 도 4는 화면 내 예측 설명을 위해 현재 블록과 주변 이용 가능한 참조 화소 라인 예시이다.FIG. 2 is a block diagram illustrating an intra prediction unit of an image encoding apparatus, and FIG. 4 is an example of a current block and a reference pixel line that can be used around the screen to describe intra prediction.

현재 블록의 예측 모드가 화면 내 예측(S201)이 선택된 후, 현재 블록이 휘도 성분 블록이면 휘도 성분 참조 화소 유도 및 필터링(S202) 과정을 수행하고, 색차 성분 블록이면 색차 성분 참조 화소 유도 및 필터링(S207) 과정을 수행한다. 참조 화소는 현재 블록 주변에 복원 화소를 이용하여 결정한다. 현재 블록 주변에 일부 복원된 화소를 이용할 수 없거나 복원된 화소가 없는 경우, 이용 가능한 참조 화소를 이용할 수 없는 영역에 패딩하거나 화소가 가질 수 있는 값의 범위 중 중간 값을 가지고 패딩을 할 수 있다. 참조 화소를 모두 유도한 후, AIS(Adaptive Intra Smoothing) 필터를 이용하여 필터링을 한다.After intra prediction (S201) is selected as the prediction mode of the current block, if the current block is a luminance component block, a luminance component reference pixel derivation and filtering process (S202) is performed, and if a color difference component block, a chrominance component reference pixel derivation and filtering ( S207) process is performed. The reference pixel is determined using reconstructed pixels around the current block. When some reconstructed pixels are not available or there are no reconstructed pixels around the current block, the available reference pixels may be padded in an unusable area, or padding may be performed with an intermediate value among a range of possible values of the pixels. After deriving all the reference pixels, filtering is performed using an AIS (Adaptive Intra Smoothing) filter.

휘도 성분의 화면 내 예측은 필터링 된 참조 화소를 이용하여 방향성 예측 모드(S205, S206)와 비방향성 예측모드(S203, S204)에 따라 생성된 예측 블록들을 비교한 후, 원본 블록과 가장 유사한 예측 블록을 생성한 최적의 화면 내 예측 모드를 찾는다. S206에서 M은 화면 내 예측 모드 총 개수를 나타낸다.Intra prediction of the luminance component is performed by comparing the prediction blocks generated according to the directional prediction modes (S205, S206) and the non-directional prediction modes (S203, S204) using the filtered reference pixels, and then the prediction block most similar to the original block. Find the optimal intra prediction mode that generated In S206, M represents the total number of prediction modes in the screen.

도 4에서 1st 라인은 현재 블록과 인접한 참조 화소 라인이고, 2nd 라인, 3rd 라인, 4th 라인은 각각 현재 블록과 2 화소, 3화소, 4화소 떨어져 있는 참조 화소 라인을 의미한다. 참조 화소 라인 결정부(S208)에서는 현재 블록과 인접하지 않은 참조 화소 라인(2nd 라인, 3rd 라인, 4th 라인)들을 이용하여 최적의 화면 내 예측 모드에 대한 예측 블록들을 생성한 후, 원본 블록과 가장 유사한 예측 블록을 생성하는 최적의 참조 화소 라인을 찾는다. In FIG. 4, a 1st line is a reference pixel line adjacent to a current block, and a 2nd line, a 3rd line, and a 4th line are reference pixel lines separated by 2, 3, and 4 pixels from the current block, respectively. The reference pixel line determiner S208 generates prediction blocks for the optimal intra prediction mode by using reference pixel lines (2nd line, 3rd line, 4th line) that are not adjacent to the current block, and Find an optimal reference pixel line that produces a similar prediction block.

도 5는 휘도 성분의 화면 내 예측에서 ISP 모드 설명을 위한 예시이다.5 is an example for explaining an ISP mode in intra-screen prediction of a luminance component.

ISP 모드는 현재 블록을 N 개의 서브 블록으로 나누고, 서브 블록 별로 코딩을 수행한다. 이때, 각각의 서브 블록은 동일한 화면 내 예측 모드를 이용한다. a번 서브 블록은 최적의 화면 내 예측 모드와 도 4의 1st 참조 화소 라인을 이용하여 예측 블록을 생성한 후 복원 과정을 통해 해당 영역을 복원한다. 이후, b번 변환 블록은 휘도 성분 참조 화소 유도 및 필터링(S202) 과정을 통해 a번 서브 블록의 복원 화소를 참조 화소로 이용한다. 생성된 참조 화소 라인에 a번 서브 블록과 동일한 예측 모드를 적용하여 예측 블록을 생성한다. In the ISP mode, the current block is divided into N sub-blocks, and coding is performed for each sub-block. In this case, each sub-block uses the same intra prediction mode. The sub-block a generates a prediction block using the optimal intra prediction mode and the 1st reference pixel line of FIG. 4 and reconstructs the corresponding region through a reconstruction process. Thereafter, the transform block b uses the reconstructed pixel of the sub-block a as a reference pixel through a process of deriving and filtering a luminance component reference pixel (S202). A prediction block is generated by applying the same prediction mode as the subblock a to the generated reference pixel line.

색차 성분의 화면 내 예측 모드는 방향성 예측모드(S209, S210), 비방향성 예측 모드(S203, S204) 뿐만 아니라 DM(S214), LM(S211), LM-A(S212), LM-L 모드(S213)가 존재한다.In-screen prediction modes of the color difference components include DM(S214), LM(S211), LM-A(S212), and LM-L modes as well as directional prediction modes (S209 and S210) and non-directional prediction modes (S203 and S204). S213) exists.

도 6은 동일 위치에서 휘도 성분과 색차 성분의 블록 분할이 서로 다르게 된 예시이다.6 is an example in which block divisions of a luminance component and a color difference component are different from each other at the same location.

DM 모드(S214)는 현재 색차 블록과 동일 위치에 존재하는 휘도 블록의 화면 내 예측 모드를 현재 DM 모드의 화면 내 예측 모드로 사용한다. 이때, 색차 성분과 휘도 성분의 블록 분할이 다른 경우, 현재 색차 블록의 가운데 화소와 동일한 위치를 가지는 휘도 블록의 화면 내 예측 모드를 이용한다. 예를 들어, 도6의 색차 성분 블록과 동일한 위치의 휘도 성분 블록이 Blk1, Blk2, Blk3로 분할되어 있는 경우, 색차 성분 블록의 가운데 화소와 동일한 위치를 가지는 Blk3 블록의 화면 내 예측 모드를 색차 성분 블록의 화면 내 예측 모드로 이용한다.In the DM mode (S214), the intra prediction mode of the luminance block existing at the same position as the current color difference block is used as the intra prediction mode of the current DM mode. In this case, when the block division of the chrominance component and the luminance component are different, the intra prediction mode of the luminance block having the same position as the center pixel of the current color difference block is used. For example, if the luminance component block at the same position as the color difference component block in Fig. 6 is divided into Blk1, Blk2, and Blk3, the intra prediction mode of the Blk3 block having the same position as the center pixel of the color difference component block is set to the color difference component. It is used as an intra prediction mode of a block.

또한, DM 모드(S214)가 DC(S203), Planar(S204), Angular#50(S209), Angular#18 모드(S210) 중 1개의 모드와 겹치는 경우, 겹치는 모드는 Angular#66번 모드로 대체된다.In addition, if the DM mode (S214) overlaps with one of DC (S203), Planar (S204), Angular#50 (S209), and Angular#18 mode (S210), the overlapping mode is replaced with Angular#66 mode. do.

도 7은 LM 모드 설명을 위한 예시이다. 7 is an example for explaining an LM mode.

LM, LM-A, LM-L 모드는 복원된 휘도 성분을 이용하여 색차 성분의 예측 블록을 생성하는 모드이다. 현재 색차 성분 블록과 동일한 위치를 가지는 휘도 성분 복원 블록을 찾은 후, 수학식 1을 이용하여 예측 블록을 생성한다.The LM, LM-A, and LM-L modes are modes for generating predictive blocks of chrominance components using the restored luminance component. After finding the luminance component restoration block having the same position as the current color difference component block, a prediction block is generated using Equation 1.

Figure pat00001
Figure pat00001

복원블록(x,y)는 색차 성분 블록 크기에 맞게 다운 샘플링한 복원된 휘도 성분 블록을 의미하며,

Figure pat00002
는 색차 성분 블록 주변 화소와 휘도 성분 블록 주변 화소를 이용하여 구한 파라미터이다. 파라미터를 유도하기 위해 LM 모드에서는 도 7의 그림과 같이 휘도 성분과 색차 성분에서 각각 현재 블록 상단에 가로 길이의 4분의 1, 4분의 3 위치에 존재하는 화소와 현재 블록 좌측에 세로 길이의 4분의 1, 4분의 3 위치에 존재하는 화소를 이용한다. 휘도 성분 화소 4개를 화소값의 크기에 따라 2개의 그룹으로 나누어 각각 평균을 내고, 색차 성분 화소 4개는 동일 위치의 휘도 성분 화소가 속한 그룹으로 나누어 평균을 낸 후, 수학식2, 수학식3을 이용하여 파라미터를 유도한다.The reconstructed block (x,y) refers to a reconstructed luminance component block down-sampled to fit the color difference component block size,
Figure pat00002
Is a parameter obtained using pixels around the color difference component block and pixels around the luminance component block. To derive the parameters, in the LM mode, as shown in Fig. 7, in the luminance component and the chrominance component, pixels existing at positions of 1/4 and 3/4 of the horizontal length at the top of the current block and the vertical length at the left of the current block, respectively. Pixels present in the quarter and three quarters are used. The four luminance component pixels are divided into two groups according to the size of the pixel value and averaged, and the four chrominance component pixels are divided into groups to which the luminance component pixels at the same location belong to the average, and then, Equation 2, Equation 2 Use 3 to derive the parameter.

Figure pat00003
Figure pat00003

Figure pat00004
Figure pat00004

수학식2, 3에서 Xa는 크기가 작은 휘도 성분 화소 2개의 평균값, Xb는 크기가 큰 휘도 성분 화소 2개의 평균값을 의미하고, Ya, Yb는 각각 휘도 성분과 매핑되는 위치의 색차 성분의 평균값을 의미한다.In Equations 2 and 3, Xa denotes the average value of two small luminance component pixels, Xb denotes the average value of two large luminance component pixels, and Ya and Yb denote the average values of the luminance component and the chrominance component at the mapped position, respectively. it means.

LM-A모드와 LM-L 모드는 α, β 파라미터를 찾는 화소 위치만 다를 뿐 예측 블록 생성하는 방법은 LM모드와 동일하다. LM-A 모드는 현재 블록 상단에 존재하는 화소만을 이용하여 α, β 파라미터를 유도하고, LM-L 모드는 현재 블록 좌측에 존재하는 화소만을 이용하여 α, β 파라미터를 유도한다.The LM-A mode and the LM-L mode differ only in the pixel positions for finding α and β parameters, but the method of generating a prediction block is the same as in the LM mode. In the LM-A mode, α and β parameters are derived using only the pixels present at the top of the current block, and the LM-L mode derives the α and β parameters using only the pixels present at the left of the current block.

색차 성분의 화면 내 예측 모드 별로 RD-Cost를 비교하여 비용값이 가장 낮은 하나의 화면 내 예측 모드를 선택한다.RD-Cost is compared for each intra prediction mode of the color difference component, and one intra prediction mode with the lowest cost value is selected.

도 3는 영상 부호화 장치의 화면 간 예측부를 자세하게 나타낸 블록도이다.3 is a block diagram showing in detail an inter prediction unit of an image encoding apparatus.

화면 간 예측부는 움직임 정보를 유도하는 방법에 따라 Merge 후보 탐색부(S302)와 AMVP 후보 탐색부(S304)로 나눌 수 있다. Merge 후보 탐색부(S302)는 현재 블록 주변에 복원된 블록 중 화면 간 예측이 사용된 참조 블록을 Merge 후보로 설정한다. Merge 후보는 부호화/복호화 장치에서 동일한 방법으로 유도하고, 동일한 개수를 사용하며 Merge 후보 개수는 부호화 장치에서 복호화 장치로 전송을 한다. 이때, 현재 블록 주변에 복원된 참조 블록으로 Megre 후보를 약속된 개수만큼 설정하지 못한 경우, 현재 픽쳐가 아닌 다른 픽쳐에서 현재 블록과 동일한 위치에 존재하는 블록의 움직임 정보를 가져온다. 혹은 현재 픽쳐를 기준으로 과거 방향, 미래방향 움직임 정보들을 조합해서 후보로 채우거나 다른 참조 픽쳐의 동일한 위치의 블록을 움직임 정보라고 설정하여 Merge 후보를 설정한다. The inter prediction unit may be divided into a merge candidate search unit S302 and an AMVP candidate search unit S304 according to a method of inducing motion information. The merge candidate search unit S302 sets a reference block using inter prediction among blocks reconstructed around the current block as a merge candidate. Merge candidates are derived by the same method in the encoding/decoding apparatus, and the same number is used, and the number of merge candidates is transmitted from the encoding apparatus to the decoding apparatus. In this case, when it is not possible to set as many Megre candidates as the predetermined number of reference blocks restored around the current block, motion information of a block existing at the same position as the current block in a picture other than the current picture is obtained. Alternatively, a merge candidate is set by combining motion information in the past and future directions based on the current picture and filling them with candidates, or by setting a block at the same position of another reference picture as motion information.

AMVP 후보 탐색부(S304)는 현재 블록의 움직임 정보를 움직임 추정부(S305)에서 결정한다. 움직임 추정부(S305)는 복원된 픽쳐들 중 현재 블록과 가장 유사한 예측 블록을 찾는다. The AMVP candidate search unit S304 determines motion information of the current block in the motion estimation unit S305. The motion estimation unit S305 finds a prediction block that is most similar to the current block among reconstructed pictures.

화면 간 예측부에서는 Merge 후보 탐색부와 AMVP 후보 탐색부 중 하나를 이용하여 현재 블록의 움직임 정보를 결정한 후, 움직임 보상(S306)을 통해 예측 블록이 생성된다.The inter prediction unit determines motion information of the current block using one of the merge candidate search unit and the AMVP candidate search unit, and then generates a prediction block through motion compensation (S306).

도 8은 예측 모드 정보를 부호화 하는 방법이다. 8 is a method of encoding prediction mode information.

Skip 모드 동작 정보 부호화(S801)는 현재 블록의 예측 모드 정보를 화면 간 예측의 Merge 정보를 이용하고, 복호화 장치에서 예측 블록을 복원 블록으로 사용하는 여부를 알려주는 정보이다.The skip mode operation information encoding (S801) is information indicating whether the prediction mode information of the current block is used for inter prediction merge information, and whether the decoding apparatus uses the prediction block as a reconstructed block.

Skip 모드가 동작을 한다면 결정된 Merge 후보 색인 부호화(S803)를 하고, 동작을 안한다면 예측 모드 부호화(S804)를 한다.If the skip mode operates, the determined merge candidate index coding (S803) is performed, and if not, the prediction mode coding (S804) is performed.

예측 모드 부호화(S804)는 현재 블록의 예측 모드가 화면 간 예측과 화면 내 예측인지를 부호화 한다. 화면 간 예측 모드가 선택된 경우, Merge모드 동작 정보를 부호화 한다(S806). Merge 모드가 동작을 한다면(S807) Merge 후보 색인 부호화(S803)를 한다. Merge 모드가 동작을 안한다면 예측 방향 부호화를 한다(S808). 예측 방향 부호화(S808)는 이용하는 참조 픽쳐의 방향이 현재 픽쳐를 기준으로 과거 방향에 있는지, 미래 방향에 있는지 혹은 양방향 둘다 이용하는지 여부를 알려준다. 예측 방향이 과거 혹은 양방향인 경우(S809), 과거방향 참조 픽쳐 색인 정보 부호화(S810), 과거 방향 MVD정보 부호화(S811), 과거 방향 MVP 정보를 부호화(S812)하고, 예측 방향이 미래 혹은 양방향인 경우(S813), 미래 방향 참조 픽쳐 색인 정보 부호화(S814), 미래 방향 MVD정보 부호화(S815), 미래 방향 MVP 정보를 부호화(S816) 하여 현재 블록의 화면 간 예측 움직임 정보를 알려줄 수 있다. 화면 간 예측 과정에서 부호화 되는 정보들은 화면 간 예측부 모드 정보 부호화로 지칭한다(80).Prediction mode encoding (S804) encodes whether the prediction mode of the current block is inter prediction and intra prediction. When the inter prediction mode is selected, the merge mode operation information is encoded (S806). If the merge mode operates (S807), merge candidate index encoding (S803) is performed. If the merge mode does not operate, prediction direction encoding is performed (S808). The prediction direction encoding (S808) indicates whether the direction of the reference picture to be used is in the past direction, the future direction, or both directions with respect to the current picture. When the prediction direction is past or bidirectional (S809), past direction reference picture index information is encoded (S810), past direction MVD information is encoded (S811), past direction MVP information is encoded (S812), and the prediction direction is future or bidirectional. In the case (S813), future direction reference picture index information encoding (S814), future direction MVD information encoding (S815), and future direction MVP information may be encoded (S816) to inform the inter prediction motion information of the current block. Information encoded in the inter prediction process is referred to as inter prediction unit mode information encoding (80).

예측 모드가 화면 내 예측 모드인 경우, 휘도, 색차 성분의 예측 정보를 각각 부호화한다. 휘도 성분의 예측 정보는 Ref_idx 부호화(S817)한다. Ref_idx는 현재 블록의 참조 화소 라인을 알려주는 정보이다. Ref_idx가 0보다 큰 경우(S818), MPM 색인 부호화(S819)를 하고, 0인 경우(S818), ISP모드 부호화(S820)를 한다. ISP 모드가 참인 경우(S821), ISP 분할 정보를 부호화하여 현재 블록의 분할 방향을 알려준 뒤에 MPM 색인 부호화(S819)를 하고, ISP 모드가 거짓인 경우, MPM 동작 정보를 부호화(S823)한다. MPM 동작 정보 부호화는 현재 블록 주변에 복원된 블록 중 현재 블록과 동일한 예측 모드 정보를 가지고 있는 경우 현재 블록의 예측 모드 정보를 부호화 하지 않고, 복원된 블록과 동일한 예측 모드 정보를 사용하라고 알려주는 정보이다. MPM 동작을 하는 경우(S824), MPM 색인 부호화(S819)를 하여 어느 복원된 블록의 예측 모드를 현재 블록의 예측 모드로 사용하는지 알려주고, MPM 동작을 하지 않는 경우(S824), 잔여 예측 모드 부호화를 한다(S825). 잔여 예측 모드 부호화는 MPM후보로 선택된 예측 모드를 뺀 나머지 예측 모드들 중 현재 블록의 예측 모드로 사용되는 예측 모드 색인을 부호화 한다. 그 후, 색차 성분의 예측 정보를 부호화 하기 위해 색치 예측 모드 부호화한다(S826). 화면 내 예측 과정에서 부호화 되는 정보들은 화면 내 예측부 모드 정보 부호화로 지칭한다(81).When the prediction mode is an intra prediction mode, prediction information of luminance and color difference components is respectively encoded. The prediction information of the luminance component is subjected to Ref_idx encoding (S817). Ref_idx is information indicating the reference pixel line of the current block. When Ref_idx is greater than 0 (S818), MPM index encoding (S819) is performed, and when 0 (S818), ISP mode encoding (S820) is performed. When the ISP mode is true (S821), the ISP segmentation information is encoded to inform the direction of the current block, and then MPM index encoding (S819) is performed. If the ISP mode is false, the MPM operation information is encoded (S823). MPM motion information encoding is information indicating that the prediction mode information of the current block is not encoded and the same prediction mode information as the reconstructed block is used when the reconstructed blocks around the current block have the same prediction mode information as the current block. . When the MPM operation is performed (S824), the prediction mode of which reconstructed block is used as the prediction mode of the current block by performing MPM index encoding (S819), and when the MPM operation is not performed (S824), the residual prediction mode encoding is performed. Do (S825). In the residual prediction mode encoding, a prediction mode index used as a prediction mode of a current block is encoded among the remaining prediction modes by subtracting a prediction mode selected as an MPM candidate. Thereafter, color value prediction mode encoding is performed in order to encode the prediction information of the color difference component (S826). Information encoded in the intra prediction process is referred to as intra prediction mode information encoding (81).

다음으로, 본 발명의 영상 복호화 장치를 도면을 참조하여 설명한다. 도 9는 본 발명의 영상 복호화 장치(900)를 나타낸 블록도이다. Next, a video decoding apparatus according to the present invention will be described with reference to the drawings. 9 is a block diagram showing an image decoding apparatus 900 according to the present invention.

도 9를 참조하면, 영상 복호화 장치(900)는 엔트로피 복호화부(901), 역양자화부(902), 역변환부(903), 증산부(904), 필터부(905), 메모리(906) 및 예측부(907, 908)를 포함할 수 있다.Referring to FIG. 9, the image decoding apparatus 900 includes an entropy decoding unit 901, an inverse quantization unit 902, an inverse transform unit 903, a multiplication unit 904, a filter unit 905, a memory 906, and It may include prediction units 907 and 908.

영상 부호화 장치(100)에 의해 생성된 영상 비트스트림이 영상 복호화 장치(500)로 입력되는 경우, 입력된 비트스트림은 영상 부호화 장치(100)에서 수행된 과정과 반대의 과정에 따라 복호될 수 있다.When the image bitstream generated by the image encoding apparatus 100 is input to the image decoding apparatus 500, the input bitstream may be decoded according to a process opposite to that performed by the image encoding apparatus 100. .

엔트로피 복호화부(901)는 영상 부호화 장치(100)의 엔트로피 부호화부(907)에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(201)는, 전술한 바와 같은 신택스 요소들, 즉 Last_sig, Coded_sub_blk_flag, Sig_coeff_flag, Abs_greater1_flag, Abs_greater2_flag, Sign_flag 및 remaining_coeff를 복호화할 수 있다. 또한, 엔트로피 복호화부(901)는 영상 부호화 장치(100)에서 수행된 화면 내 예측 및 화면 간 예측에 관련된 정보를 복호화 할 수 있다.The entropy decoding unit 901 may perform entropy decoding in a procedure opposite to that performed by the entropy encoding unit 907 of the image encoding apparatus 100. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied in response to the method performed by the image encoder. The entropy decoding unit 201 may decode the syntax elements as described above, that is, Last_sig, Coded_sub_blk_flag, Sig_coeff_flag, Abs_greater1_flag, Abs_greater2_flag, Sign_flag and remaining_coeff. In addition, the entropy decoder 901 may decode information related to intra prediction and inter prediction performed by the image encoding apparatus 100.

역 양자화부(902)는 양자화된 변환 블록에 역 양자화를 수행하여 변환 블록을 생성한다. 도 1의 역 양자화부(108)와 실질적으로 동일하게 동작한다.The inverse quantization unit 902 generates a transform block by performing inverse quantization on the quantized transform block. It operates substantially the same as the inverse quantization unit 108 of FIG. 1.

역 변환부(903)은 변환 블록에 역 변환을 수행하여 잔차 블록을 생성한다. 이때, 변환 방법은 예측 방법(화면 간 예측 또는 화면 내 예측), 블록의 크기 및/또는 형태, 화면 내 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다. 도 1의 역 변환부(909)와 실질적으로 동일하게 동작한다. The inverse transform unit 903 generates a residual block by performing inverse transform on the transform block. In this case, the transformation method may be determined based on information about a prediction method (inter prediction or intra prediction), a size and/or shape of a block, and an intra prediction mode. It operates substantially the same as the inverse transform unit 909 of FIG. 1.

증산부(904)는, 화면 내 예측부(907) 혹은 화면 간 예측부(908)에서 생성된 예측 블록과 역 변환부(903)를 통해 생성된 잔차 블록를 증산하여 복원 블록을 생성한다. 도 1의 증산부(110)과 실질적으로 동일하게 동작한다.The multiplication unit 904 generates a reconstructed block by multiplying the prediction block generated by the intra prediction unit 907 or the inter prediction unit 908 and the residual block generated through the inverse transform unit 903. It operates substantially the same as the multiplication unit 110 of FIG. 1.

필터부(905)는, 복원된 블록들에 발생하는 여러 종류의 노이즈를 감소시킨다. 또한, 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The filter unit 905 reduces various types of noise generated in reconstructed blocks. In addition, it may include a deblocking filter, an offset correction unit, and an ALF.

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

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

ALF는 영상 부호화 장치(100)로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라미터 셋에 포함되어 제공될 수 있다. 필터부(505)는 도 1의 필터부(111)와 실질적으로 동일하게 동작한다.The ALF may be applied to a coding unit based on information on whether to apply ALF and information on ALF coefficients provided from the image encoding apparatus 100. Such ALF information may be provided by being included in a specific parameter set. The filter unit 505 operates substantially the same as the filter unit 111 of FIG. 1.

메모리(906)는 증산부(904)에 의해 생성된 복원 블록을 저장한다. 도 1의 메모리(112)와 실질적으로 동일하게 동작한다.The memory 906 stores the reconstructed block generated by the multiplication unit 904. It operates substantially the same as the memory 112 of FIG. 1.

도 10과 도11은 영상 복호화 장치의 화면 내 예측부, 화면 간 예측부를 도시한다.10 and 11 illustrate an intra prediction unit and an inter prediction unit of an image decoding apparatus.

화면 내 예측부(1000)는 도 2의 최적의 예측 모드를 결정하는 과정만 빠져 있고, 최적이라고 판단된 예측 모드를 받아서 예측 블록을 생성하는 과정은 영상 부호화 장치의 화면 내 예측부와 실질적으로 동일하게 동작한다.In the intra prediction unit 1000, only the process of determining the optimal prediction mode of FIG. 2 is omitted, and the process of generating the prediction block by receiving the prediction mode determined to be optimal is substantially the same as that of the intra prediction unit of the video encoding apparatus. Works well.

화면 간 예측부(1100)는 도 3의 최적의 예측 모드를 결정하는 과정만 빠져 있고, 최적이라고 판단된 예측 모드를 받아서 예측 블록을 생성하는 과정은 영상 부호화 장치의 화면 간 예측부와 실질적으로 동일하게 동작한다.The inter prediction unit 1100 only skips the process of determining the optimal prediction mode in FIG. 3, and the process of generating a prediction block by receiving the prediction mode determined to be optimal is substantially the same as that of the inter prediction unit of the video encoding apparatus. Works well.

도 12는 예측 모드 정보를 복호화 하는 방법이다. 도 8의 예측 모드 정보를 부호화 하는 방법과 실질적으로 동일하게 동작한다.12 is a method of decoding prediction mode information. It operates substantially the same as the method of encoding prediction mode information of FIG. 8.

(실시예 1)(Example 1)

본 실시예에서는 1번 성분 복원 정보와 1번 성분 예측 정보을 이용하여 2번 성분 예측 블록 생성 방법을 서술한다. 여기서 1번 성분은 휘도 성분, 2번 성분은 색차 성분이 될 수 있다. 혹은, 1번 성분은 색차 성분, 2번 성분은 휘도 성분이 될 수 있다. 혹은, 영상의 다른 성분이 1번과 2번 성분으로 들어갈 수도 있다. 이때, 1번과 2번 서로 다른 성분일 수도 있고, 같은 성분 일 수도 있다.In the present embodiment, a method of generating a second component prediction block using component 1 reconstruction information and component 1 prediction information will be described. Here, component 1 may be a luminance component and component 2 may be a color difference component. Alternatively, component 1 may be a color difference component and component 2 may be a luminance component. Alternatively, other components of the image may be included as components 1 and 2. In this case, the components 1 and 2 may be different or the same component.

도 13은 본 발명의 일 실시예에 따라 영상 부호화 장치를 나타낸 블록도이다. 도 13을 참조하면, 영상 부호화 장치(1300)는 블록 분할부(S301), 감산부(S1304), 변환부(S1305), 양자화부(S1306), 엔트로피 부호화부(S1307), 역양자화부(S1308), 역변환부(S1309), 증산부(S1310), 필터부(S1311) 및 메모리(S1312)를 포함할 수 있다. 각 구성부는 도 1의 구성부와 동일한 역할을 수행한다. 1번 성분 메모리와 2번 성분 메모리에는 각각 1번 성분 복원 픽쳐와 2번 성분 복원 픽쳐를 저장하고, 1번 성분 예측부와 2번 성분 예측부에서 각각 1번 성분 화면 내 예측, 2번 성분 화면 내 예측을 수행한다.13 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention. Referring to FIG. 13, an image encoding apparatus 1300 includes a block division unit S301, a subtraction unit S1304, a transform unit S1305, a quantization unit S1306, an entropy encoding unit S1307, and an inverse quantization unit S1308. ), an inverse transform unit S1309, a multiplication unit S1310, a filter unit S1311, and a memory S1312. Each component performs the same role as the component of FIG. 1. The component 1 and component 2 are stored in the component 1 memory and component 2 memory, respectively, and the component 1 and component 2 predictors each store the 1st component prediction and 2nd component screen. Do my predictions

도 14는 본 발명의 일 실시예에 따라 영상 부호화 장치의 1번 성분 예측부와 2번 성분 예측부의 화면 내 예측 과정을 나타내는 흐름도이다.14 is a flowchart illustrating an intra prediction process of a component 1 predictor and a component 2 predictor of an image encoding apparatus according to an embodiment of the present invention.

현재 블록의 예측 모드가 화면 내 예측(S1401)이 선택된 후, 현재 블록이 1번 성분 블록이면 1번 성분 참조 화소 유도 및 필터링(S1402) 과정을 수행하고, 2번 성분 블록이면 2번 성분 참조 화소 유도 및 필터링(S1407) 과정을 수행한다. 참조 화소는 현재 블록 주변에 복원 화소를 이용하여 결정한다. 현재 블록 주변에 일부 복원된 화소를 이용할 수 없거나 복원된 화소가 없는 경우, 이용 가능한 참조 화소를 이용할 수 없는 영역에 패딩하거나 화소가 가질 수 있는 값의 범위 중 중간 값을 가지고 패딩을 할 수 있다. 참조 화소를 모두 유도한 후, AIS(Adaptive Intra Smoothing) 필터를 이용하여 필터링을 한다.After intra prediction (S1401) is selected as the prediction mode of the current block, if the current block is a component block 1, the process of deriving and filtering component 1 reference pixels (S1402) is performed, and if the current block is component 2, the component reference pixel 2 Derivation and filtering (S1407) is performed. The reference pixel is determined using reconstructed pixels around the current block. When some reconstructed pixels are not available or there are no reconstructed pixels around the current block, the available reference pixels may be padded in an unusable area, or padding may be performed with an intermediate value among a range of possible values of the pixels. After deriving all the reference pixels, filtering is performed using an AIS (Adaptive Intra Smoothing) filter.

1번 성분의 화면 내 예측은 필터링 된 참조 화소를 이용하여 방향성 예측 모드(S1405, S1406)와 비방향성 예측모드(S1403, S1404)에 따라 생성된 예측 블록들을 비교한 후, 원본 블록과 가장 유사한 예측 블록을 생성한 최적의 화면 내 예측 모드를 찾는다.Intra prediction of component 1 is performed by comparing prediction blocks generated according to directional prediction modes (S1405, S1406) and non-directional prediction modes (S1403, S1404) using filtered reference pixels, and then predicts the most similar to the original block. The optimal intra prediction mode that generated the block is found.

참조 화소 라인 결정부(S1408)에서는 현재 블록과 인접하지 않은 참조 화소 라인(도 4의 2nd 라인, 3rd 라인, 4th 라인)들을 이용하여 예측 모드에 대한 예측 블록들을 생성한 후, 원본 블록과 가장 유사한 예측 블록을 생성하는 최적의 참조 화소 라인을 찾는다. The reference pixel line determiner S1408 generates prediction blocks for the prediction mode using reference pixel lines that are not adjacent to the current block (2nd line, 3rd line, and 4th line in FIG. 4), and then generates the prediction blocks that are most similar to the original block. An optimal reference pixel line that generates a prediction block is found.

ISP 모드는 현재 블록을 N 개의 서브 블록으로 나누고, 서브 블록 별로 코딩을 수행한다. 이때, 각각의 서브 블록은 동일한 화면 내 예측 모드를 이용한다. a번 서브 블록은 최적의 화면 내 예측 모드와 도 4의 1st 참조 화소 라인을 이용하여 예측 블록을 생성한 후 복원 과정을 통해 해당 영역을 복원한다. 이후, b번 변환 블록은 색차 성분 참조 화소 유도 및 필터링(S1402) 과정을 통해 a번 서브 블록의 복원 화소를 참조 화소로 이용한다. 생성된 참조 화소 라인에 a번 서브 블록과 동일한 예측 모드를 적용하여 예측 블록을 생성한다. In the ISP mode, the current block is divided into N sub-blocks, and coding is performed for each sub-block. In this case, each sub-block uses the same intra prediction mode. The sub-block a generates a prediction block using the optimal intra prediction mode and the 1st reference pixel line of FIG. 4 and reconstructs the corresponding region through a reconstruction process. Thereafter, the transform block b uses the reconstructed pixel of the sub-block a as a reference pixel through a process of deriving and filtering a color difference component reference pixel (S1402). A prediction block is generated by applying the same prediction mode as the subblock a to the generated reference pixel line.

2번 성분의 화면 내 예측 모드는 방향성 예측모드(S1409, S1410), 비방향성 예측 모드(S1403, S1404) 뿐만 아니라 DM(S1414), LM(S1411), LM-A(S1412), LM-L 모드(S1413)가 존재한다.In-screen prediction modes of component 2 are directional prediction modes (S1409, S1410), non-directional prediction modes (S1403, S1404), as well as DM (S1414), LM (S1411), LM-A (S1412), and LM-L modes. (S1413) exists.

DM 모드(S1414)는 현재 2차 블록과 동일 위치에 존재하는 1번 블록의 화면 내 예측 모드를 현재 DM 모드의 화면 내 예측 모드로 사용한다. 이때, 1번 성분과 2번 성분의 블록 분할이 다른 경우, 현재 2번 블록의 가운데 화소와 동일한 위치를 가지는 1번 블록의 화면 내 예측 모드를 이용한다. 예를 들어, 도6의 색차(2번) 성분 블록과 동일한 위치의 휘도(1번) 성분 블록이 Blk1, Blk2, Blk3로 분할되어 있는 경우, 색차(2번) 성분 블록의 가운데 화소와 동일한 위치를 가지는 휘도(1번) 성분의 Blk3 블록의 화면 내 예측 모드를 색차(2번) 성분 블록의 화면 내 예측 모드로 이용한다.In the DM mode (S1414), the intra prediction mode of block 1 existing at the same position as the current secondary block is used as the intra prediction mode of the current DM mode. In this case, if the block divisions of the first component and the second component are different, the intra prediction mode of the first block having the same position as the center pixel of the current block 2 is used. For example, if the luminance (No. 1) component block at the same position as the color difference (No. 2) component block in Fig. 6 is divided into Blk1, Blk2, and Blk3, the same position as the center pixel of the color difference (No. 2) component block The intra prediction mode of the Blk3 block having the luminance (No. 1) component is used as the intra prediction mode of the color difference (No. 2) component block.

또한, DM 모드(S1414)가 DC(S1403), Planar(S1404), Angular#50(S1409), Angular#18 모드(S1410) 중 1개의 모드와 겹치는 경우, 겹치는 모드는 Angular#66번 모드로 대체된다.In addition, if the DM mode (S1414) overlaps with one of DC (S1403), Planar (S1404), Angular#50 (S1409), and Angular#18 mode (S1410), the overlapping mode is replaced with Angular#66 mode. do.

LM, LM-A, LM-L 모드는 복원된 1번 성분을 이용하여 2번 성분의 예측 블록을 생성하는 모드이다. 현재 휘도 성분 블록과 동일한 위치를 가지는 1번 성분 복원 블록을 찾은 후, 수학식 1을 이용하여 예측 블록을 생성한다.The LM, LM-A, and LM-L modes are modes for generating a prediction block of component 2 by using the reconstructed component 1. After finding the first component reconstructed block having the same position as the current luminance component block, a prediction block is generated using Equation 1.

복원블록(x,y)는 2번 성분 블록 크기에 맞게 업/다운 샘플링한 복원된 2번 성분 블록을 의미하며, α, β 는 1번 성분 블록 주변 화소와 2번 성분 블록 주변 화소를 이용하여 구한 파라미터이다. 파라미터를 유도하기 위해 LM 모드에서는 도 7의 그림과 같이 1번 성분과 2번 성분에서 각각 현재 블록 상단에 가로 길이의 4분의 1, 4분의 3 위치에 존재하는 화소와 현재 블록 좌측에 세로 길이의 4분의 1, 4분의 3 위치에 존재하는 화소를 이용한다. 1번 성분 화소 4개를 화소값의 크기에 따라 2개의 그룹으로 나누어 각각 평균을 내고, 2번 성분 화소 4개는 동일 위치의 1번 성분 화소가 속한 그룹으로 나누어 평균을 낸 후, 수학식2, 수학식3을 이용하여 파라미터를 유도한다.The reconstructed block (x,y) refers to the reconstructed component block 2 obtained by up/down sampling according to the size of the component block 2, and α and β are the pixels around the component block 1 and the pixels around the component block 2. This is the calculated parameter. To derive the parameters, in the LM mode, as shown in the figure of Fig. 7, in the 1st and 2nd components, the pixels existing at the top of the current block and at the positions of 1/4 and 3/4 of the horizontal length and the vertical on the left of the current block, respectively. Use pixels that exist at positions 1/4 and 3/4 of the length. Divide the 4 pixels of the 1st component into 2 groups according to the size of the pixel value, and average them, and the 4 of the 2nd component pixels are divided by the group to which the 1st component pixel belongs to the same location and average them, and then Equation 2 , The parameter is derived using Equation 3.

수학식2, 3에서 Xa는 크기가 작은 1번 성분 화소 2개의 평균값, Xb는 크기가 큰 1번 성분 화소 2개의 평균값을 의미하고, Ya, Yb는 각각 1번 성분과 매핑되는 위치의 2번 성분의 평균값을 의미한다.In Equations 2 and 3, Xa denotes the average value of two pixels of the first component having a small size, Xb denotes the average value of two pixels of the first component having a large size, and Ya and Yb denotes the second component of the mapped position with the first component. Means the average value of the components.

LM-A모드와 LM-L 모드는 α, β 파라미터를 찾는 화소 위치만 다를 뿐 예측 블록 생성하는 방법은 LM모드와 동일하다. LM-A 모드는 현재 블록 상단에 존재하는 화소만을 이용하여 α, β 파라미터를 유도하고, LM-L 모드는 현재 블록 좌측에 존재하는 화소만을 이용하여 α, β 파라미터를 유도한다.The LM-A mode and the LM-L mode differ only in the pixel positions for finding α and β parameters, but the method of generating a prediction block is the same as in the LM mode. In the LM-A mode, α and β parameters are derived using only the pixels present at the top of the current block, and the LM-L mode derives the α and β parameters using only the pixels present at the left of the current block.

도 15는 본 발명의 일 실시예에 따라 1번 성분과 2번 성분 블록을 나타낸 예시이다.15 is an illustration showing component 1 and component 2 blocks according to an embodiment of the present invention.

2번 성분의 화면 내 예측 수행 과정은 2번 성분의 화면 내 예측 모드를 이용하여 2번 성분 예측 블록을 생성한 후, 예측 블록 수정부(S1415)에서 예측 블록을 수정할 수 있다. 도 15의 A 영역은 2번 성분 예측 블록에서 일부 예측 화소 값이 수정되는 영역 및 수정을 위해 이용되는 1번 성분 영역을 의미한다. 이를 수정 영역이라고 지징한다. 부호화 하는 현재 2번 성분 블록과 동일한 위치의 1번 성분 복원 블록을 가져오고, 최적의 1번 성분 화면 내 예측 모드를 이용한 예측 블록을 생성한다. 그 후, 예측 블록의 수정 영역에 대해서만 M개의 예측 모드들을 이용한 M개의 예측 블록을 생성하고, 휘도 성분의 복원 블록과 M개의 예측 블록 간의 RD - Cost를 비교하여 최적이라고 판단된 휘도 성분 수정 영역의 화면 내 예측 모드를 색차 성분 수정 영역의 화면내 예측 모드로 사용한다. 이때, RD - Cost 비교를 1번 성분의 복원 블록과 수정된 1번 성분의 예측 블록을 비교할 수도 있고, 복원 블록의 수정 영역과, 예측 블록의 수정 영역을 비교할 수도 있다. 또한, 복원 블록의 수정 영역과, 예측 블록의 수정 영역을 비교한 뒤, 복원 블록과 수정된 예측 블록을 비교할 수도 있다. 예를 들어, 복원 블록의 수정 영역과, 예측 블록의 수정 영역은 SSE로 비교하고, 복원 블록과 수정된 예측 블록은 SATD로 비교할 수도 있다. 복원 블록과 예측 블록의 RD-cost 비교 방법은 부호화/복호화 장치에서 기 설정된 방법으로 동일하게 수행하거나 상위 헤더에서 전송할 수도 있다. In the process of performing the intra prediction of the second component, after generating the second component prediction block using the intra prediction mode of the second component, the prediction block modifying unit S1415 may correct the prediction block. A region of FIG. 15 denotes a region in which some predicted pixel values are corrected in the second component prediction block and a first component region used for correction. This is called a correction area. The component 1 reconstructed block at the same position as the current component block 2 to be encoded is obtained, and a prediction block using an optimal component 1 prediction mode is generated. Thereafter, M prediction blocks using M prediction modes are generated for only the modified area of the prediction block, and the RD-Cost between the reconstructed block of the luminance component and the M prediction blocks is compared to determine the optimal luminance component modified area. The intra prediction mode is used as the intra prediction mode of the color difference component correction area. In this case, the RD-Cost comparison may be performed by comparing the reconstructed block of the first component and the corrected prediction block of the first component, or the correction region of the reconstructed block and the correction region of the prediction block may be compared. In addition, after comparing the correction region of the reconstructed block with the correction region of the prediction block, the reconstructed block and the modified prediction block may be compared. For example, the correction region of the reconstructed block and the correction region of the prediction block may be compared by SSE, and the reconstructed block and the modified prediction block may be compared by SATD. The RD-cost comparison method between the reconstructed block and the prediction block may be performed in the same manner as a preset method in the encoding/decoding apparatus or may be transmitted in an upper header.

이때, 수정 영역의 크기와 모양은 도 15의 A영역 예시와 같이 우하단 영역, 하단 영역, 우측 영역만으로 설정할 수도 있고, 블록 전체 영역으로 설정할 수도 있다. 또한 우하단 4분의 1영역, 4분의 3영역 등 다양하게 설정할 수 있다. 혹은 화면 내 예측 모드에 따라 수정 영역을 다르게 설정할 수도 있다. 예를 들어, 현재의 화면 내 예측 모드가 수직 방향인 경우, 수정 영역은 하단 영역으로 설정하고, 현재의 화면 내 예측 모드가 수평 방향인 경우, 수정 영역은 우측 영역으로 설정하고, 나머지 예측 모드인 경우, 수정 영역은 우하단 영역으로 설정할 수도 있다. 혹은 수정 영역을 따로 설정하지 않고 ISP 모드에 따라 영역을 나눌 수도 있다. 부호화/복호화 장치에서 수정 영역의 크기와 모양은 기 설정된 방법으로 동일하게 사용하거나 상위 헤더에서 전송할 수도 있다.In this case, the size and shape of the correction area may be set to only the lower right area, the lower area, and the right area, as in the example of area A of FIG. 15, or may be set to the entire block area. In addition, it can be set in various ways, such as a quarter area at the bottom right and a 3/4 area. Alternatively, the correction area may be set differently according to the prediction mode in the screen. For example, when the current intra prediction mode is in the vertical direction, the corrected area is set to the lower area, and when the current intra prediction mode is in the horizontal direction, the corrected area is set to the right area, and In this case, the correction area may be set as the lower right area. Alternatively, you can divide the area according to the ISP mode without separately setting the modified area. In the encoding/decoding apparatus, the size and shape of the correction region may be used in the same manner by a preset method or may be transmitted from an upper header.

또한, 수정 영역을 서브 블록 단위로 나눌 수도 있다. 각 서브 블록마다 1번 성분의 M개의 예측 블록과 복원 블록을 비교하고, 선택된 최적의 예측 모드를 2번 성분의 예측 모드로 사용할 수 있다. 또한, 도 4의 예시처럼 각 서브 블록마다 다른 참조 화소 라인을 사용하여 최적의 수정된 예측 블록을 찾을 수도 있다. 예를 들어, 현재 색차 성분의 화면 내 예측 모드가 0번이 선택되고, 도 15의 A-1 서브 블록은 2번, A-2 서브 블록은 4번, A-3 서브 블록은 6번, A-4 서브 블록은 3번 예측 모드를 사용할 수 있다. 또한, 서브 블록의 모양과 크기는 수정 영역의 모양에 따라 다르게 설정할 수 있다. 예를 들어, 도 15의 우하단 A 영역은 쿼드 트리 형태로 서브 블록을 가질 수 있고, 하단 A영역, 우측 A영역인 경우, 바이너리 트리 형태로 서브 블록을 가질 수 있다. 혹은 수정 영역의 모양과 크기에 상관없이 동일한 형태의 서브 블록을 가질 수도 있으며 부호화/복호화 장치에서 기 설정된 방법으로 동일하게 사용하거나 상위 헤더에서 전송할 수 있다. Also, the modified region may be divided into sub-block units. For each sub-block, M prediction blocks of component 1 and reconstructed blocks may be compared, and the selected optimal prediction mode may be used as a prediction mode of component 2. Also, as in the example of FIG. 4, an optimal modified prediction block may be found using a different reference pixel line for each sub-block. For example, 0 is selected as the intra prediction mode of the current color difference component, and in FIG. 15, sub-block A-1 is 2, sub-block A-2 is 4, sub-block A-3 is 6, and A The -4 subblock can use the 3rd prediction mode. Also, the shape and size of the sub-block can be set differently according to the shape of the correction area. For example, the lower right A region of FIG. 15 may have a sub-block in the form of a quad tree, and in the case of the lower A region and the right A region, the sub-block may have a binary tree form. Alternatively, they may have sub-blocks of the same shape regardless of the shape and size of the correction region, and may be used in the same manner by a preset method in the encoding/decoding apparatus or transmitted from an upper header.

본 실시예에서는 설명의 편의성을 위해 모든 2번 성분 화면 내 예측 모드에 대하여 수정 영역의 최적 예측 모드를 찾는 과정을 수행하였으나 특정 화면 내 예측 모드에서만 수행하는 것도 가능하다. 예를 들어, 현재 2번 성분의 화면 내 예측 모드가 DM 모드인 경우에 대해서만 수정 영역의 예측 모드 찾는 과정을 수행할 수도 있다.In the present embodiment, for convenience of explanation, the process of finding the optimal prediction mode of the correction region is performed for all the prediction modes in the component 2 screen, but it is also possible to perform the process only in a specific intra prediction mode. For example, only when the intra prediction mode of the current component 2 is the DM mode, the process of finding the prediction mode of the correction region may be performed.

또한, 수정 영역의 최적 예측 모드를 M개의 모드가 아닌 일부 모드에 대해서만 최적의 예측 모드 찾는 과정을 수행할 수 있다. 예를 들어, 현재 화면 내 예측 모드가 PLANAR 모드인 경우, 수정 영역의 예측 모드는 DC 모드에 대해서만 수행해 볼 수도 있다. 또한 현재 화면 내 예측 모드가 방향성 예측 모드인 경우, 현재 예측 모드 색인 +,-2한 예측 모드에 대해서만 수행해 볼 수도 있다. 또한, LM 관련 모드에서도 수정 영역을 이용하여 수정된 예측 블록을 찾을 수 있다. 수정 영역에 적용할 화면 내 예측 모드의 개수와 종류는 부호화/복호화 장치에서 기 설정된 방법을 이용하여 동일하게 적용하거나 상위 헤더 혹은 블록 단위로 전송할 수도 있다.In addition, it is possible to perform a process of finding the optimal prediction mode only for some modes, not M modes, of the optimal prediction mode of the correction region. For example, when the prediction mode in the current screen is the PLANAR mode, the prediction mode of the correction region may be performed only for the DC mode. In addition, when the prediction mode in the current screen is the directional prediction mode, only prediction modes with a current prediction mode index of +, -2 may be performed. In addition, in the LM-related mode, a modified prediction block can be found using the modified region. The number and type of intra prediction modes to be applied to the correction region may be equally applied by using a preset method in the encoding/decoding apparatus or may be transmitted in units of higher headers or blocks.

도 16은 본 발명의 일 실시예에 따라 영상 복호화 장치를 나타낸 블록도이다. 도 16을 참조하면, 영상 복호화 장치(1600)의. 각 구성부는 도 9의 구성부와 동일한 역할을 수행한다. 1번 성분 메모리와 2번 성분 메모리에는 각각 1번 성분 복원 픽쳐와 2번 성분 복원 픽쳐를 저장하고, 1번 성분 예측부와 2번 성분 예측부에서 각각 1번 성분 화면 내 예측, 2번 성분 화면 내 예측을 수행한다. 16 is a block diagram illustrating a video decoding apparatus according to an embodiment of the present invention. Referring to FIG. 16, the image decoding apparatus 1600 is shown. Each component performs the same role as the component of FIG. 9. The component 1 and component 2 are stored in the component 1 memory and component 2 memory, respectively, and the component 1 and component 2 predictors each store the 1st component prediction and 2nd component screen. Do my predictions

도 17은 본 발명의 일 실시예에 따라 영상 복호화 장치의 1번 성분 예측부와 2번 성분 예측부의 화면 내 예측 과정을 나타내는 흐름도이다.17 is a flowchart illustrating an intra prediction process of a component 1 predictor and a component 2 predictor of an image decoding apparatus according to an embodiment of the present invention.

복호화 장치의 화면 내 예측에서는 도 10의 화면 내 예측부와 동일한 방법으로 최적의 1번 성분 예측 모드를 찾은 후, 부호화 장치에서 전송된 최적의 2번 성분 예측 모드에 대해서만 부호화 장치와 동일하게 수정 영역의 최적의 예측 모드를 1번 성분의 복원 정보와 M개의 예측 정보를 이용해서 찾는 과정을 수행한다.In the intra prediction of the decoding device, after finding the optimal component 1 prediction mode in the same manner as the intra prediction of FIG. 10, the corrected region is the same as the encoding device only for the optimal component 2 prediction mode transmitted from the encoding device. A process of finding the optimal prediction mode of is performed using the reconstruction information of component 1 and M pieces of prediction information.

도 8과와 도12를 이용하여 예측 모드 정보를 부호화, 복호화 한다.Using FIGS. 8 and 12, prediction mode information is encoded and decoded.

예측 모드가 화면 내 예측 모드인 경우, 1번, 2번 성분의 예측 정보를 각각 부호화/복호화 한다. 2번 성분의 예측 정보는 Ref_idx 부호화/복호화(S817/S1217)한다. Ref_idx는 현재 블록의 참조 화소 라인을 알려주는 정보이다. Ref_idx가 0보다 큰 경우, MPM 색인 부호화/복호화를 하고(S819/S1219), 0인 경우, ISP모드 부호화/복호화를 한다(S820/S1220). ISP 모드가 참인 경우(S821/S1221), ISP 분할 정보를 부호화/복호화(S822/S1222)하여 현재 블록의 분할 방향을 알려준 뒤에 MPM 색인 부호화/복호화를 하고(S819/S1219), ISP 모드가 거짓인 경우(S821/S1221), MPM 동작 정보를 부호화/복호화(S823/S1223)한다. MPM 동작 정보 부호화/복호화는 현재 블록 주변에 복원된 블록 중 현재 블록과 동일한 예측 모드 정보를 가지고 있는 경우 현재 블록의 예측 모드 정보를 부호화 하지 않고, 복원된 블록과 동일한 예측 모드 정보를 사용하라고 알려주는 정보이다. MPM 동작을 하는 경우(S824/S1224), MPM 색인 부호화/복호화(S819/S1219)를 하여 어느 복원된 블록의 예측 모드를 현재 블록의 예측 모드로 사용하는지 알려주고, MPM 동작을 하지 않는 경우(S824/S1224), 잔여 예측 모드 부호화/복호화를 한다(S825/S1225). 잔여 예측 모드 부호화는 MPM후보로 선택된 예측 모드를 뺀 나머지 예측 모드들 중 현재 블록의 예측 모드로 사용되는 예측 모드 색인을 부호화/복호화 한다. 그 후, 2번 성분의 예측 정보를 부호화 하기 위해 2번 성분 예측 모드 부호화/복호화 한다(S826/S1226). When the prediction mode is an intra prediction mode, prediction information of components 1 and 2 is encoded/decoded, respectively. The prediction information of the second component is Ref_idx encoded/decoded (S817/S1217). Ref_idx is information indicating the reference pixel line of the current block. When Ref_idx is greater than 0, MPM index encoding/decoding is performed (S819/S1219), and when it is 0, ISP mode encoding/decoding is performed (S820/S1220). If the ISP mode is true (S821/S1221), the ISP segmentation information is encoded/decoded (S822/S1222) to indicate the direction of the current block and then MPM index encoding/decoding is performed (S819/S1219), and the ISP mode is false. In case (S821/S1221), MPM motion information is encoded/decoded (S823/S1223). MPM motion information encoding/decoding is a reminder to use the same prediction mode information as the reconstructed block without encoding the prediction mode information of the current block when the reconstructed blocks around the current block have the same prediction mode information as the current block. Information. When the MPM operation is performed (S824/S1224), the MPM index encoding/decoding (S819/S1219) is performed to inform which prediction mode of the reconstructed block is used as the prediction mode of the current block, and when the MPM operation is not performed (S824/ S1224), encoding/decoding of the residual prediction mode is performed (S825/S1225). The residual prediction mode encoding encodes/decodes a prediction mode index used as a prediction mode of the current block among the remaining prediction modes by subtracting the prediction mode selected as an MPM candidate. After that, in order to encode the prediction information of the second component, the second component prediction mode is encoded/decoded (S826/S1226).

혹은, 본 실시예에서 1번 성분과 2번 성분 중 먼저 코딩할 순서를 선택할 수도 있다. Alternatively, in the present embodiment, the first coding order may be selected from the first component and the second component.

도 18와 도19은 본 실시예에 따라 예측 모드 정보를 부호화, 복호화 하는 방법이다. 먼저 부호화/복호화할 성분 선택 및 부호화/복호화 과정에서 1번 성분과 2번 성분 중 먼저 부호화/복호화할 성분을 알려주는 정보를 전송하고(S1827/S1927), 나머지 과정은 도8, 도12의 과정과 동일한 과정을 수행한다.18 and 19 are methods of encoding and decoding prediction mode information according to the present embodiment. First, information indicating a component to be encoded/decoded first among components 1 and 2 is transmitted in the process of selecting a component to be encoded/decoded and the encoding/decoding process (S1827/S1927), and the remaining processes are the processes of FIGS. Perform the same process as

혹은, 본 실시예에서 1번 성분과 2번 성분의 화면 내 예측 모드를 동시에 수행할 수도 있다. 최적의 화면 내 예측 모드를 탐색하는 과정에서 1번 성분 예측 블록과 2번 성분 예측 블록을 동시에 고려하여 화면 내 예측을 수행할 수 있다.Alternatively, in the present embodiment, the intra prediction mode of the first component and the second component may be simultaneously performed. In the process of searching for an optimal intra prediction mode, intra prediction may be performed by simultaneously considering the component prediction block 1 and the component prediction block 2.

Claims (1)

교차 성분간 신호변화 상관도를 이용한 동영상 부호화 방법.A video encoding method using signal change correlation between cross components.
KR1020190079008A 2019-07-01 2019-07-01 Video encoding and decoding method and apparatus using signal change correlation between cross components KR20210003005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190079008A KR20210003005A (en) 2019-07-01 2019-07-01 Video encoding and decoding method and apparatus using signal change correlation between cross components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190079008A KR20210003005A (en) 2019-07-01 2019-07-01 Video encoding and decoding method and apparatus using signal change correlation between cross components

Publications (1)

Publication Number Publication Date
KR20210003005A true KR20210003005A (en) 2021-01-11

Family

ID=74128931

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190079008A KR20210003005A (en) 2019-07-01 2019-07-01 Video encoding and decoding method and apparatus using signal change correlation between cross components

Country Status (1)

Country Link
KR (1) KR20210003005A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102497181B1 (en) 2022-01-10 2023-02-06 김주필 Generator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102497181B1 (en) 2022-01-10 2023-02-06 김주필 Generator

Similar Documents

Publication Publication Date Title
US10917661B2 (en) Method and apparatus for intra prediction
KR102070319B1 (en) Method of coefficient scan based on partition mode of prediction unit and apparatus using the same
CN109952762B (en) Video encoding/decoding method and apparatus, and recording medium storing bit stream
US11533470B2 (en) Method and apparatus for encoding/decoding an image signal
KR20180018388A (en) Method for encoding/decoding video and apparatus thereof
KR101981905B1 (en) Encoding method and device, decoding method and device, and computer-readable storage medium
US20220030249A1 (en) Image encoding/decoding method and device
KR20150099486A (en) Method and apparratus of video decoding
US11792426B2 (en) Method and apparatus for encoding/decoding image using a prediction value based on reference pixels
KR20230110701A (en) Method and apparatus for encoding/decoding a video signal
US11671584B2 (en) Inter-prediction method and video decoding apparatus using the same
KR20180041578A (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20210035036A (en) Method and apparatus for deriving temporal motion vector predictor
KR20210000635A (en) Method and apparatus for deriving a block vector of chroma block
US11962764B2 (en) Inter-prediction method and video decoding apparatus using the same
KR20190142750A (en) Image encoding/decoding method and apparatus
KR20210003005A (en) Video encoding and decoding method and apparatus using signal change correlation between cross components
EP3780609A1 (en) Image coding method based on motion vector and apparatus therefor
KR102557740B1 (en) Method and apparatus for encoding/decoding a video signal
KR20210037205A (en) Image encoding and decoding method and apparatus through efficient generation of prediction pixels in the screen
KR20180086135A (en) Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream
KR20200087086A (en) Method and apparatus for encoding/decoding an image
KR20210033834A (en) Transform Coefficient Coding and Decoding Method and Device according to Block Division Tree Structure
KR20200110138A (en) Method and apparatus for deriving motion information using shared candidate list
KR20190142751A (en) Image encoding/decoding method and apparatus