KR20220016938A - Method and apparatus for encoding/decoding an image - Google Patents

Method and apparatus for encoding/decoding an image Download PDF

Info

Publication number
KR20220016938A
KR20220016938A KR1020220010851A KR20220010851A KR20220016938A KR 20220016938 A KR20220016938 A KR 20220016938A KR 1020220010851 A KR1020220010851 A KR 1020220010851A KR 20220010851 A KR20220010851 A KR 20220010851A KR 20220016938 A KR20220016938 A KR 20220016938A
Authority
KR
South Korea
Prior art keywords
intra prediction
prediction mode
block
mode
reference pixel
Prior art date
Application number
KR1020220010851A
Other languages
Korean (ko)
Other versions
KR102502216B1 (en
Inventor
문주희
임성원
원동재
Original Assignee
세종대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Publication of KR20220016938A publication Critical patent/KR20220016938A/en
Priority to KR1020230020808A priority Critical patent/KR20230025851A/en
Application granted granted Critical
Publication of KR102502216B1 publication Critical patent/KR102502216B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Abstract

A main object of the present invention is to improve efficiency of intra prediction by inducing an intra prediction mode of an image to be encoded or decoded using a previously reconstructed pixel region. According to the present invention, a method and device for encoding/decoding image obtain reference pixel line index information from bit-stream, select a reference pixel line for a current block from a plurality of reference pixel lines based on the reference pixel line index information, induce an intra prediction mode of the current block, and reset the derived intra prediction mode. The prediction block of the current block may be generated by performing intra prediction based on the selected reference pixel line and the reset intra prediction mode.

Description

영상의 부호화/복호화 방법 및 장치{METHOD AND APPARATUS FOR ENCODING/DECODING AN IMAGE}Image encoding/decoding method and apparatus

본 발명은 영상 신호 부호화/복호화 방법 및 장치에 관한 것으로서, 보다 구체적으로는 개선된 화면 내 예측을 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for encoding/decoding a video signal, and more particularly, to a method and apparatus for encoding/decoding an image using improved intra prediction.

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이러한 문제를 해결하기 위하여 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)에서는 꾸준히 공동 연구를 통하여 보다 향상된 동영상 압축 표준을 연구하는 중이다.Recently, the demand for multimedia data such as moving pictures is rapidly increasing 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. In order to solve this problem, VCEG (Video Coding Expert Group) of ITU-T, an international standardization organization, and MPEG (Moving Picture Expert Group) of ISO/IEC are continuously researching improved video compression standards through joint research.

동영상 압축은 크게 화면 내 예측, 화면 간 예측, 변환, 양자화, 엔트로피(Entropy coding)부호화, 인루프 필터(In-loop filter)로 구성된다. 이 중, 화면 내 예측은 현재 블록주변에 존재하는 복원된 화소들을 이용하여 현재 블록을 위한 예측 블록을 생성하는 기술을 말한다. Video compression is largely composed of intra prediction, inter prediction, transformation, quantization, entropy coding, and in-loop filter. Among them, intra prediction refers to a technology of generating a prediction block for the current block using reconstructed pixels existing around the current block.

종래의 화면 내 예측은, 정수 위치의 참조 화소들을 이용한 보간 과정을 통해 분수 위치의 화소들을 생성하고, 이렇게 생성된 분수 위치의 화소들을 이용하여 예측 블록을 생성한다. 이 때 어떤 정수 위치의 참조 화소들을 이용하느냐 여부와 어떤 보간 방식을 적용하였는지 여부에 따라 원래 화소값과 그 예측값 간의 오차에 영향을 주게된다.In the conventional intra prediction, fractional-position pixels are generated through an interpolation process using integer-positioned reference pixels, and a prediction block is generated using the generated fractional-position pixels. In this case, the error between the original pixel value and the predicted value is affected depending on whether reference pixels at an integer position are used and whether an interpolation method is applied.

또한, 종래의 화면 내 예측 기술은, 다수의 화면 내 예측 모드들 중 어떠한 화면 내 예측 모드가 입력 영상의 화면 내 예측에 사용되었는지를 영상 복호화 장치에 알리기 위해 예측 모드에 관한 상당한 정보를 부호화해야 한다.In addition, in the conventional intra prediction technique, significant information about the prediction mode must be encoded in order to inform the video decoding apparatus which intra prediction mode among a plurality of intra prediction modes is used for intra prediction of the input image. .

본 발명은 영상을 부호화/복호화함에 있어서, 이미 복원된 화소 영역을 이용하여 부호화 또는 복호화할 영상의 화면 내 예측 모드를 유도함으로써, 화면 내 예측의 효율을 향상시키는 것에 주된 목적이 있다.A main object of the present invention is to improve the efficiency of intra prediction by inducing an intra prediction mode of an image to be encoded or decoded using an already reconstructed pixel region when encoding/decoding an image.

전술한 목적을 달성하기 위한 본 발명의 실시예에 따른 영상 부호화/복호화 방법 및 장치는, 이미 복원된, 적어도 하나의 화소 영역의 참조 화소 영역에 기초하여 상기 복원된 화소 영역의 인트라 예측 모드를 유도하고, 상기 유도된 상기 복원된 화소 영역의 인트라 예측 모드에 기초하여, 상기 현재 블록의 인트라 예측 모드를 유도하고, 상기 유도된 인트라 예측 모드를 이용하여 상기 현재 블록의 인트라 예측 블록을 얻고, 상기 얻은 인트라 예측 블록과 상기 현재 블록의 잔차 블록을 가산하여 상기 현재 블록을 복원할 수 있다.An image encoding/decoding method and apparatus according to an embodiment of the present invention for achieving the above object induces an intra prediction mode of the reconstructed pixel region based on the already reconstructed reference pixel region of at least one pixel region and, based on the derived intra prediction mode of the reconstructed pixel region, derive an intra prediction mode of the current block, obtain an intra prediction block of the current block using the derived intra prediction mode, and The current block may be reconstructed by adding the intra prediction block and the residual block of the current block.

전술한 목적을 달성하기 위한 본 발명의 실시예에 따른 영상 복호화 방법 및 장치는, 입력 비트스트림으로부터 인트라 예측 모드의 유도 방법을 지시하는 정보를 얻고, 상기 인트라 예측 모드의 유도 방법을 지시하는 정보에 따라, 복원된 화소 영역의 인트라 예측 모드의 유도의 수행 여부가 선택될 수 있다.An image decoding method and apparatus according to an embodiment of the present invention for achieving the above object obtains information indicating a method of inducing an intra prediction mode from an input bitstream, and adds information indicating a method of inducing an intra prediction mode. Accordingly, whether to induce the intra prediction mode of the reconstructed pixel region may be selected.

전술한 목적을 달성하기 위한 본 발명의 실시예에 따른 영상 복호화 방법 및 장치는, 입력 비트스트림에서 상기 가용한 복수의 인트라 예측 모드들의 개수 또는 상기 가용한 복수의 인트라 예측 모드들의 리스트를 특정하는 가용한 인트라 예측 모드 정보를 얻고, 상기 가용한 인트라 예측 모드 정보에 기초하여 상기 현재 블록의 인트라 예측 모드를 유도할 수 있다.An image decoding method and apparatus according to an embodiment of the present invention for achieving the above object are available for specifying the number of the plurality of available intra prediction modes or a list of the plurality of available intra prediction modes in an input bitstream. One intra prediction mode information may be obtained, and the intra prediction mode of the current block may be derived based on the available intra prediction mode information.

전술한 목적을 달성하기 위한 본 발명의 실시예에 따른 영상 부호화 방법 및 장치는, 현재 블록의 인트라 예측 모드의 유도 방법을 지시하는 정보를 부호화한 후 비트스트림에 포함시키고, 상기 비트스트림을 입력받은 영상 복호화 장치는, 상기 현재 블록의 인트라 예측 모드의 유도 방법을 지시하는 정보에 따라 상기 복원된 화소 영역의 인트라 예측 모드를 유도하는 단계를 선택적으로 수행할 수 있다.In an image encoding method and apparatus according to an embodiment of the present invention for achieving the above object, information indicating a method of inducing an intra prediction mode of a current block is encoded and included in a bitstream, and the bitstream is received The image decoding apparatus may selectively perform the step of inducing the intra prediction mode of the reconstructed pixel region according to information indicating a method of inducing the intra prediction mode of the current block.

이러한 본 발명에 따르면, 영상을 부호화 및 복호화하는 데 이용되는 화면 내 예측 기술을 효율적으로 적용함으로서 영상의 압축 효율을 향상시킬 수 있다.According to the present invention, the compression efficiency of an image can be improved by efficiently applying an intra prediction technique used for encoding and decoding an image.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다.
도 3은 평면 모드를 설명하기 위한 도면이다.
도 4는 DC 모드를 설명하기 위한 도면이다.
도 5는 예측 블록을 생성하는 일 예를 설명하기 위한 도면이다.
도 6은 본 발명의 일 실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 7은 본 발명의 제1 실시예에 따른 DIMD를 설명하기 위한 도면이다.
도 8은 본 발명의 제3 실시예에 따른 DIMD를 설명하기 위한 도면이다.
도 9는 본 발명에 따른 DIMD를 설명하기 위한 순서도이다.
도 10은 본 발명에 따른 DIMD를 이용하여 영상을 부호화하는 경우, 화면 내 예측 모드를 부호화하는 방법을 설명하기 위한 순서도이다.
도 11은 본 발명에 따른 DIMD를 이용하여 영상을 복호화하는 경우, 화면 내 예측 모드를 복호화하는 방법을 설명하기 위한 순서도이다.
도 12는 본 발명에 따른 제7 실시예를 설명하기 위한 도면이다.
도 13은 본 발명의 제7 실시예를 적용한 경우, 인트라 예측 모드를 부호화 하는 과정을 나타낸 순서도이다.
도 14는 본 발명의 제7 실시예를 적용한 경우, 인트라 예측 모드를 복호화 하는 과정을 나타낸 순서도이다.
도 15a 및 도 15b는 템플릿 인덱스를 전송하는 DIMD의 변형예를 설명하기 위한 도면이다.
도 16은 템플릿 인덱스가 사용되는 DIMD에 따른 화면 내 예측 모드의 부호화 방법을 설명하는 순서도이다.
도 17은 템플릿 인덱스가 사용되는 DIMD에 따른 화면 내 예측 모드의 부호화 방법을 설명하는 순서도이다.
도 18은 템플릿을 이용하여 유도된 화면 내 예측 모드를 MPM 후보로 설정하는 일 예를 설명하기 위한 도면이다.
도 19는 본 발명의 일 실시예에 따른 MPM 후보 설정을 설명하기 위한 도면이다.
1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
2 is a diagram for explaining an example of an intra prediction mode.
3 is a diagram for explaining a planar mode.
4 is a diagram for explaining a DC mode.
5 is a diagram for explaining an example of generating a prediction block.
6 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
7 is a view for explaining a DIMD according to the first embodiment of the present invention.
8 is a diagram for explaining a DIMD according to a third embodiment of the present invention.
9 is a flowchart for explaining a DIMD according to the present invention.
10 is a flowchart illustrating a method of encoding an intra prediction mode when an image is encoded using DIMD according to the present invention.
11 is a flowchart illustrating a method of decoding an intra prediction mode when decoding an image using DIMD according to the present invention.
12 is a view for explaining a seventh embodiment according to the present invention.
13 is a flowchart illustrating a process of encoding an intra prediction mode when the seventh embodiment of the present invention is applied.
14 is a flowchart illustrating a process of decoding an intra prediction mode when the seventh embodiment of the present invention is applied.
15A and 15B are diagrams for explaining a modified example of DIMD for transmitting a template index.
16 is a flowchart illustrating a method of encoding an intra prediction mode according to DIMD using a template index.
17 is a flowchart illustrating a method of encoding an intra prediction mode according to DIMD using a template index.
18 is a diagram for explaining an example of setting an intra prediction mode derived using a template as an MPM candidate.
19 is a diagram for explaining MPM candidate setting according to an embodiment of the present invention.

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

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

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

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

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

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 영상 부호화 장치(100)는 영상 분할부(101),화면 내 예측부(102), 화면 간 예측부(103), 감산부(104), 변환부(105), 양자화부(106), 엔트로피 부호화부(107), 역양자화부(108), 역변환부(109), 증산부(110), 필터부(111) 및 메모리(112)를 포함할 수 있다.Referring to FIG. 1 , the image encoding apparatus 100 includes an image division unit 101 , an intra prediction unit 102 , an inter prediction unit 103 , a subtraction unit 104 , a transform unit 105 , and a quantization unit. 106 , an entropy encoding unit 107 , an inverse quantization unit 108 , an inverse transform unit 109 , a multiplication unit 110 , a filter unit 111 , and a memory 112 .

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

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

영상 분할부(100)는 입력된 영상을 적어도 하나의 블록으로 분할할 수 있다. 이 때, 입력된 영상은 픽처, 슬라이스, 타일, 세그먼트 등 다양한 형태와 크기를 가질 수 있다. 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree) 또는 바이너리 트리(Biniary tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할하는 방식이다. 전술한 바이너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태를 가질 수 있다.The image 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, and a segment. A block may mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU). The division may be performed based on at least one of a quadtree and a binary tree. The quad tree divides the upper block into lower blocks whose width and height are half that of the upper block. Binary tree is a method of dividing the upper block into lower blocks whose either width or height is half that of the upper block. Through the binary tree-based partitioning described above, a block may have a non-square shape as well as a square shape.

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

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

생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(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 . In addition, prediction mode information, motion vector information, etc. used for prediction may be encoded in the entropy encoder 107 together with a residual value and transmitted to a decoder. When a specific encoding mode is used, it is also possible to encode the original block as it is without generating the prediction block through the predictors 102 and 103 and transmit it to the decoder.

화면 내 예측부(102)는 현재 블록의 화면 내 예측 모드를 결정하고, 상기 결정된 인트라 예측 모드에 따라, 참조 화소들을 이용하여 하나 또는 복수개의 예측 블록을 생성할 수 있다. 인트라 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 인터 예측인 경우, 인터 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 인트라 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 102 may determine an intra prediction mode of the current block, and generate one or a plurality of prediction blocks using reference pixels according to the determined intra prediction mode. When the prediction mode of the neighboring block of the current block to which intra prediction is to be performed is inter prediction, a reference pixel included in the neighboring block to which the inter prediction is applied may be replaced with a reference pixel in another neighboring block to which the intra prediction is applied. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels to be used.

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

화면 내 예측부(102)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 102 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a filter that performs filtering on reference pixels 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 intra prediction unit 102 is a prediction unit that performs intra prediction based on a pixel value obtained by interpolating the reference pixel, the reference pixel interpolation unit of the intra prediction unit 102 interpolates the reference pixel to the reference pixel at the fractional unit position. can create When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

예측부(102, 103)에서 생성된 예측 블록과 예측 블록의 원본 블록 간의 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력되어 변환될 수 있다. A residual block including residual information that is a difference value between the prediction block generated by the prediction units 102 and 103 and the original block of the prediction block may be generated. The generated residual block may be input to the transform unit 130 and transformed.

도 2는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다. 도 2에 도시된 인트라 예측 모드는 총 35가지의 모드를 가지고 있다. 0번 모드는 평면 모드(Planar mode), 1번 모드는 DC 모드, 2 내지 34번 모드는 각도 모드(Angular mode)를 나타낸다. 2 is a diagram for explaining an example of an intra prediction mode. The intra prediction mode shown in FIG. 2 has a total of 35 modes. Mode 0 indicates a planar mode, mode 1 indicates a DC mode, and modes 2 to 34 indicate an angular mode.

도 3은 평면 모드를 설명하기 위한 도면이다. 현재 블록 내의 첫 번째 화소 P1의 예측값을 생성하기 위해 Y축으로 같은 위치에 있는 복원된 화소와 현재 블록의 우측 상단에 존재하는 복원된 화소 T를 도시된 바와 같이 선형 보간 하여 생성한다. 마찬가지로 두 번째 화소 P2의 예측값을 생성하기 위해 X축으로 같은 위치에 있는 복원된 화소와 현재 블록의 좌측 하단에 존재하는 복원된 화소 L을 도시된 바와 같이 선형 보간 하여 생성한다. 두 개의 예측 화소 P1과 P2를 평균한 값이 최종적인 예측 화소가 된다. 평면 모드에서는 위와 같은 방식으로 예측 화소들을 유도하여 현재 블록의 예측 블록을 생성한다. 3 is a diagram for explaining a planar mode. In order to generate the predicted value of the first pixel P1 in the current block, the reconstructed pixel located at the same position along the Y axis and the reconstructed pixel T present at the upper right of the current block are linearly interpolated as shown. Similarly, in order to generate the predicted value of the second pixel P2, the reconstructed pixel located at the same position along the X-axis and the reconstructed pixel L existing at the lower left of the current block are linearly interpolated and generated as shown. A value obtained by averaging the two prediction pixels P1 and P2 becomes the final prediction pixel. In the planar mode, a prediction block of the current block is generated by inducing prediction pixels in the same manner as above.

도 4는 DC 모드를 설명하기 위한 도면이다. 현재 블록 주변의 복원된 화소들의 평균을 계산한 다음, 그 평균 값을 현재 블록 내의 모든 화소들의 예측값으로 이용한다. 4 is a diagram for explaining a DC mode. After calculating the average of the reconstructed pixels around the current block, the average value is used as a predicted value of all pixels in the current block.

도 5는 도 2의 10번 모드(수평 모드)와 26번 모드(수직 모드)를 이용하여 예측 블록을 생성하는 일 예를 설명하기 위한 도면이다. 10번 모드를 이용하는 경우, 현재 블록의 좌측에 접하는 각 참조화소를 오른쪽 방향으로 복사하여 현재 블록의 예측 블록을 생성한다. 마찬가지로 26번 모드는, 현재 블록의 상측에 접하는 각 참조 화소를 아래쪽 방향으로 복사하여 현재 블록의 예측 블록을 생성한다.FIG. 5 is a diagram for explaining an example of generating a prediction block using mode 10 (horizontal mode) and mode 26 (vertical mode) of FIG. 2 . When mode 10 is used, a prediction block of the current block is generated by copying each reference pixel adjacent to the left side of the current block in the right direction. Similarly, in mode 26, a prediction block of the current block is generated by copying each reference pixel adjacent to the upper side of the current block in a downward direction.

다시 도 1을 참조하면, 화면 간 예측부(103)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 화면 간 예측부(103)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. Referring back to FIG. 1 , the inter prediction unit 103 may predict a prediction unit based on information on at least one of a picture before or after the current picture, and in some cases, encoding in the current picture is completed. A prediction unit may be predicted based on information on a partial area. The inter prediction unit 103 may include a reference picture interpolator, a motion prediction unit, and a motion compensator.

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

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

감산부(104)는, 현재 부호화하려는 블록과 화면 내 예측부(102) 혹은 화면 간 예측부(103)에서 생성된 예측 블록을 감산하여 현재 블록의 잔차 블록을 생성한다.The subtraction unit 104 generates a residual block of the current block by subtracting the block to be currently encoded and the prediction block generated by the intra prediction unit 102 or the inter prediction unit 103 .

변환부(105)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST, KLT(Karhunen Loeve Transform) 등과 같은 변환 방법을 사용하여 변환시킬 수 있다. 이때 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 인트라 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.The transform unit 105 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 transform method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, according to the intra prediction mode, DCT may be used in a horizontal direction and DST may be used in a vertical direction.

양자화부(106)는 변환부(105)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(106)에서 산출된 값은 역양자화부(108)와 엔트로피 부호화부(107)에 제공될 수 있다.The quantization unit 106 may quantize the values transformed in the frequency domain by the transform unit 105 . The quantization coefficient may vary according to blocks or the importance of an image. The value calculated by the quantizer 106 may be provided to the inverse quantizer 108 and the entropy encoder 107 .

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

엔트로피 부호화부(107)는 예측부(102, 103)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. 엔트로피 부호화부(107)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 부호화될 수 있다. 상기 플래그만으로 부호화되지 않는 계수는, 플래그를 통해 부호화된 계수와 실제 변환 블록의 계수 간의 차이의 절대값을 통해 부호화될 수 있다. 역양자화부(108) 및 역변환부(109)에서는 양자화부(106)에서 양자화된 값들을 역양자화하고 변환부(105)에서 변환된 값들을 역변환한다. 역양자화부(108) 및 역변환부(109)에서 생성된 잔차값(Residual)은 예측부(102, 103)에 포함된 움직임 추정부, 움직임 보상부 및 화면 내 예측부(102)를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. 증산기(110)는, 예측부(102, 103)에서 생성된 예측 블록과, 역 변환부(109)를 통해 생성된 잔차 블록을 증산하여 복원 블록을 생성한다.The entropy encoder 107 receives the residual value coefficient information and block type information of the coding unit, prediction mode information, partition unit information, prediction unit information and transmission unit information, motion vector information, and reference frame information from the prediction units 102 and 103 . , block interpolation information, filtering information, etc. can be encoded. In the entropy encoding unit 107, the coefficients of the transform block are encoded in units of sub-blocks within the transform block, and various kinds of flags indicating non-zero coefficients, coefficients having absolute values greater than 1 or 2, and signs of coefficients are encoded. can be Coefficients that are not encoded using only the flag may be encoded using an absolute value of a difference between a coefficient encoded through the flag and a coefficient of an actual transform block. The inverse quantizer 108 and the inverse transform unit 109 inversely quantize the values quantized by the quantizer 106 and inversely transform the values transformed by the transform unit 105 . The residual values generated by the inverse quantization unit 108 and the inverse transform unit 109 are predicted through the motion estimation unit, the motion compensator, and the intra prediction unit 102 included in the prediction units 102 and 103 . It may be combined with a prediction unit to generate a reconstructed block. The multiplier 110 multiplies the prediction block generated by the prediction units 102 and 103 and the residual block generated through the inverse transform unit 109 to generate a reconstructed block.

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

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

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

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

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

도 6은 본 발명의 일 실시예에 따른 영상 복호화 장치(600)를 나타낸 블록도이다. 6 is a block diagram illustrating an image decoding apparatus 600 according to an embodiment of the present invention.

도 6을 참조하면, 영상 복호화 장치(600)는 엔트로피 복호화부(601), 역양자화부(602), 역변환부(603), 증산부(604), 필터부(605), 메모리(606) 및 예측부(607, 608)를 포함할 수 있다.Referring to FIG. 6 , the image decoding apparatus 600 includes an entropy decoding unit 601 , an inverse quantization unit 602 , an inverse transform unit 603 , an increment unit 604 , a filter unit 605 , a memory 606 and Predictors 607 and 608 may be included.

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

엔트로피 복호화부(601)는 영상 부호화 장치(100)의 엔트로피 부호화부(107)에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(601)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 기반으로 복호화될 수 있다. 상기 플래그만으로 표현되지 않는 계수는, 플래그를 통해 표현되는 계수와 시그날링된 계수의 합을 통해 복호화될 수 있다.The entropy decoding unit 601 may perform entropy decoding in a procedure opposite to that performed by the entropy encoding unit 107 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 corresponding to the method performed by the image encoder. In the entropy decoding unit 601, the coefficients of the transform block are based on various kinds of flags indicating non-zero coefficients, coefficients with absolute values greater than 1 or 2, and signs of coefficients in units of partial blocks within the transform block. can be decrypted as Coefficients that are not expressed only by the flag may be decoded through the sum of the coefficients expressed through the flags and the signaled coefficients.

엔트로피 복호화부(601)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.역 양자화부(602)는 양자화된 변환 블록에 역 양자화를 수행하여 변환 블록을 생성한다. 도 1의 역 양자화부(108)와 실질적으로 동일하게 동작한다.The entropy decoding unit 601 may decode information related to intra prediction and inter prediction performed by the encoder. The inverse quantization unit 602 performs inverse quantization on a quantized transform block to generate a transform block. It operates substantially the same as the inverse quantization unit 108 of FIG. 1 .

역 변환부(603)은 변환 블록에 역 변환을 수행하여 잔차 블록을 생성한다. 이때, 변환 방법은 예측 방법(인터 또는 인트라 예측), 블록의 크기 및/또는 형태, 인트라 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다. 도 1의 역 변환부(109)와 실질적으로 동일하게 동작한다. The inverse transform unit 603 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 or intra prediction), a size and/or a shape of a block, an intra prediction mode, and the like. It operates substantially the same as the inverse transform unit 109 of FIG. 1 .

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

필터부(605)는, 복원된 블록들에 발생하는 여러 종류의 노이즈를 감소시킨다.The filter unit 605 reduces various types of noise generated in the reconstructed blocks.

필터부(605)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The filter unit 605 may include a deblocking filter, an offset correction unit, and an ALF.

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

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

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

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

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

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

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

화면 내 예측부(607)는, 현재 부호화하려는 블록 주변에 위치한, 그리고 기 복원된 화소들을 이용하여 예측 블록을 생성한다. The intra prediction unit 607 generates a prediction block using previously reconstructed pixels located around the block to be currently encoded.

화면 내 예측부(607)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 영상 부호화 장치(100)에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 607 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a filter that performs filtering on reference pixels of the current block, and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the image encoding apparatus 100 . 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.

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

화면 내 예측부(607)는 도 1의 화면 내 예측부(102)와 실질적으로 동일하게 동작한다.The intra prediction unit 607 operates substantially the same as the intra prediction unit 102 of FIG. 1 .

화면 간 예측부(608)는, 메모리(606)에 저장된 참조 픽처, , 움직임 정보를 이용하여 인터 예측 블록을 생성한다. 화면 간 예측부(608)는 도 1의 화면 간 예측부(103)와 실질적으로 동일하게 동작한다.The inter prediction unit 608 generates an inter prediction block by using reference pictures stored in the memory 606 , and motion information. The inter prediction unit 608 operates substantially the same as the inter prediction unit 103 of FIG. 1 .

본 발명은, 특히 인트라 예측 모드의 유도에 관한 것으로서, 이하, 본 발명에 따른 화면 내 예측 모드의 유도, 부호화 및 복호화와 관련된 다양한 실시예들과 응용예들을 도면들을 참조하면서 설명한다. 본 발명에 따른 화면 내 예측 모드 유도를 적용하면, 동일한 방법 및/또는 동일한 기준으로 영상 부호화 장치와 영상 복호화 장치가, 화면 내 예측 모드를 유도할 수 있으므로 화면 내 예측 모드 자체를 알리기 위한 정보를 영상 복호화 장치로 전달할 필요가 없다.The present invention particularly relates to derivation of an intra prediction mode. Hereinafter, various embodiments and applications related to derivation, encoding, and decoding of an intra prediction mode according to the present invention will be described with reference to the drawings. When the intra prediction mode derivation according to the present invention is applied, the image encoding apparatus and the image decoding apparatus can induce the intra prediction mode by the same method and/or the same standard, so information for notifying the intra prediction mode itself is provided to the image. There is no need to pass it to the decryption device.

<영상 복호화 장치에 의한 화면 내 예측 모드의 유도><Induction of intra prediction mode by video decoding device>

본 실시예에서는, 영상 복호화 장치에 의한 화면 내 예측 모드의 유도가 설명된다. 본 발명에 따른 영상 복호화 장치에 의한 화면 내 예측 모드의 유도는 이 후 줄여서 DIMD (Decoder-side Intra Mode Derivation)라 부른다. 그러나 DIMD는 영상 부호화 장치에 의해서도 동일하게 수행될 수 있다. 따라서 DIMD 라는 명칭에도 불구하고, DIMD는 영상 부호화 장치 (100) 및 영상 복호화 장치 (600) 각각에 의해 수행될 수 있다. 특히, DIMD는, 영상 부호화 장치(100)의 화면 내 예측부(102) 및 영상 복호화 장치(600)의 화면 내 예측부(607)에 의해 각각 동일하게 수행될 수 있다.In this embodiment, induction of the intra prediction mode by the video decoding apparatus is described. The derivation of the intra prediction mode by the image decoding apparatus according to the present invention is hereinafter referred to as DIMD (Decoder-side Intra Mode Derivation) for short. However, DIMD may be equally performed by an image encoding apparatus. Therefore, despite the name DIMD, DIMD may be performed by each of the image encoding apparatus 100 and the image decoding apparatus 600 . In particular, DIMD may be equally performed by the intra prediction unit 102 of the image encoding apparatus 100 and the intra prediction unit 607 of the image decoding apparatus 600 , respectively.

이하, 도면들을 참조하면서 본 발명에 따른 DIMD에 관한 다양한 실시예들을 설명한다.Hereinafter, various embodiments of the DIMD according to the present invention will be described with reference to the drawings.

(제1 실시예)(Example 1)

도 7은 본 발명의 제1 실시예에 따른 DIMD를 설명하기 위한 도면이다. 본 발명의 일 실시예에 따르면, 현재 블록 주변에 위치하는, 이미 복원된 화소들을 이용하여 현재 블록의 화면 내 예측 모드를 유도할 수 있다. 7 is a view for explaining a DIMD according to the first embodiment of the present invention. According to an embodiment of the present invention, an intra prediction mode of the current block may be induced by using already reconstructed pixels located around the current block.

도 7을 참조하면, 부호화 또는 복호화될 현재 블록(2001)의 크기는 M x N이고, 템플릿 A(2004)의 크기는 P x N, 템플릿 B(2003)의 크기는 M x Q 이라 가정한다. 도 7에 도시된 바와 같이, 참조 화소 영역(2002)는 템플릿 A (2004)의 왼쪽에 위치한 영역과 템플릿 B(2003)의 위쪽에 위치한 영역으로 구성된다.Referring to FIG. 7 , it is assumed that the size of the current block 2001 to be encoded or decoded is M x N, the size of the template A 2004 is P x N, and the size of the template B 2003 is M x Q. As shown in FIG. 7 , the reference pixel region 2002 is composed of a region located to the left of the template A 2004 and an region located above the template B 2003 .

참조 화소 영역(2002)의 크기를 나타내는 값들 중 R과 S의 값이 각각 1이라 가정하면, 참조 화소 영역(2002)은 2(Q+N) + 2(P+M) + 1 개의 참조 화소들을 포함한다.Assuming that the values of R and S among the values indicating the size of the reference pixel region 2002 are each 1, the reference pixel region 2002 includes 2(Q+N) + 2(P+M) + 1 reference pixels. include

본 발명의 일 실시예에 따르면, 가용한 화면 내 예측모드들 각각에 따라, 참조 화소 영역(2002) 내의 참조 화소들을 이용하여 템플릿 A (2004)와 템플릿 B(2003)의 예측값들을 산출한다. 이 때 템플릿 A (2004)와 템플릿 B(2003)는 하나의 영역으로 취급된다. 예를 들면, 도 2에 도시된 바와 같은 35가지의 화면 내 예측 모드 각각에 따라, 참조 화소 영역(2002) 내의 참조 화소들을 이용하여 템플릿 A (2004)와 템플릿 B(2003)의 예측값들을 산출한다. 각 화면 내 예측 모드에 따라 예측된 템플릿 A (2004) 및 템플릿 B(2003)와 템플릿 A (2004) 및 템플릿 B(2003)의 복원값들 간의 차이의 합에 해당하는 SAD(Sum of Absolute Difference)를 구한다. 그 후, 가장 적은 SAD(Sum of Absolute Difference)를 가지는 화면 내 예측 모드를 현재 블록(2001)의 화면 내 예측 모드로 선택할 수 있다. According to an embodiment of the present invention, prediction values of the template A 2004 and the template B 2003 are calculated using reference pixels in the reference pixel region 2002 according to each of the available intra prediction modes. At this time, template A (2004) and template B (2003) are treated as one area. For example, according to each of the 35 intra prediction modes as shown in FIG. 2 , the prediction values of the template A ( 2004 ) and the template B ( 2003 ) are calculated using reference pixels in the reference pixel region 2002 . . SAD (Sum of Absolute Difference) corresponding to the sum of the differences between the restored values of template A (2004) and template B (2003) and template A (2004) and template B (2003) predicted according to the prediction mode within each screen save Thereafter, an intra prediction mode having the smallest sum of absolute difference (SAD) may be selected as the intra prediction mode of the current block 2001 .

영상 부호화 장치 (100) 또는 복호화 장치 (600)에 의해 이미 복원된 화소들을 이용하여 현재 블록(2001)의 화면 내 예측 모드를 유도하기 때문에 영상 부호화 장치 (100) 및 영상 복호화 장치 (600) 양자 모두 동일한 화면 내 예측모드를 유도할 수 있다. Since the intra prediction mode of the current block 2001 is induced using pixels already reconstructed by the image encoding apparatus 100 or the decoding apparatus 600, both the image encoding apparatus 100 and the image decoding apparatus 600 A prediction mode within the same screen can be induced.

한편, 휘도 화소들에게 적용되었던된 화면 내 예측 모드가 색차 화소들에서도 동일하게 적용될 수 있다. 화면 내 예측 모드를 부호화 장치 (100)가 복호화 장치 (600)로 전송하지 않기 때문에 오버헤드의 부담이 없다. 따라서 각도 모드들(angular modes) 사이의 1/2위치, 1/3위치, 혹은 1/4위치에 화면 내 예측 모드를 추가하는 것 또한 가능하다. 이때 사용된 화면 내 예측 모드의 개수에 관한 정보가 다양한 방법을 이용하여 복호화 장치(600)로 전송될 수 있다. 일 예로서, 2의 지수승을 이용하여 블록 헤더 또는 블록의 상위 헤더, 예컨대 슬라이스 헤더, 픽처 헤더, 시퀀스 헤더 등을 통해 부호화되어 복호화 장치(600)로 전송될 수 있다. 또는 서로 다른 개수의 인트라 예측 모드들로 구성된 복수의 인트라 예측 모드 리스트들 중 하나를 지시하는 인덱스를 전송하는 방법을 이용하여, 가용한 화면 내 예측 모드의 개수에 관한 정보가 복호화 장치(600)로 전달될 수도 있다.Meanwhile, the intra prediction mode applied to the luminance pixels may be equally applied to the chrominance pixels. Since the encoding apparatus 100 does not transmit the intra prediction mode to the decoding apparatus 600, there is no overhead burden. Therefore, it is also possible to add an in-screen prediction mode at 1/2 position, 1/3 position, or 1/4 position between angular modes. In this case, information on the number of used intra prediction modes may be transmitted to the decoding apparatus 600 using various methods. As an example, it may be encoded through a block header or an upper header of the block, for example, a slice header, a picture header, a sequence header, etc. using an exponential power of 2 and transmitted to the decoding apparatus 600 . Alternatively, information on the number of available intra prediction modes is transmitted to the decoding apparatus 600 using a method of transmitting an index indicating one of a plurality of intra prediction mode lists composed of different numbers of intra prediction modes. may be transmitted.

또한, 전술한 실시예에서는, 현재 블록(2001)의 인트라 예측 모드를 유도하기 위해 템플릿 A (2004)와 템플릿 B(2003)의 두 개의 템플릿이 이용되었으나 세 개 이상의 템플릿들이 이용될 수도 있다. In addition, in the above-described embodiment, two templates, template A 2004 and template B 2003, are used to derive the intra prediction mode of the current block 2001, but three or more templates may be used.

또한, 전술한 실시예에서는, 화면 내 예측 모드 전부를 템플릿 A (2004) 및/또는 템플릿 B(2003)에 적용하여 최종적인 화면 내 예측 모드를 유도하였으나, 전체 모드가 아닌 기 설정된 일부 화면 내 예측 모드 중에서 현재 블록(2001)의 최종적인 화면 내 예측 모드를 유도할 수도 있다.Also, in the above-described embodiment, the final intra prediction mode was derived by applying all of the intra prediction modes to the template A (2004) and/or the template B (2003). Among the modes, the final intra prediction mode of the current block 2001 may be derived.

(제2 실시예)(Second embodiment)

전술한 제1 실시예에서는, 두 개의 템플릿 A (2004) 및 템플릿 B(2003)를 하나의 영역으로 간주하여 설명하였다. 그러나, 본 실시예에서는, 두 개의 템플릿 A (2004) 및 템플릿 B(2003)이 별개의 영역으로 취급된다. 구체적으로, 각 템플릿을 이용하여 현재 블록의 예측 모드를 각각 유도한 후 유도된 두 개의 예측 모드들 중에서 하나의 모드를 최종적으로 선택할 수도 있다. In the above-described first embodiment, two templates A (2004) and template B (2003) have been described as one area. However, in this embodiment, the two templates A (2004) and B (2003) are treated as separate areas. Specifically, after each of the prediction modes of the current block is derived using each template, one mode may be finally selected from among the two derived prediction modes.

예를 들면, 도 2에 도시된 18번 각도 모드(왼쪽 위 45도 방향 화면 내 예측모드)를 기준으로, 18번 각도 모드의 왼쪽에 존재하는 각도 모드들은 템플릿 A (2004)에만 적용한 후 각각 SAD를 구한다. 모드 별로 산출된 SAD 값들 중 최소 값을 가지는 모드를 템플릿 A (2004)의 화면 내 예측모드로 결정한다. For example, based on the 18th angle mode shown in FIG. 2 (prediction mode in the upper left 45 degree screen), the angular modes existing on the left of the 18th angle mode are applied only to template A (2004) and then SAD save A mode having a minimum value among the SAD values calculated for each mode is determined as an intra prediction mode of the template A (2004).

다음으로, 18번 각도 모드의 오른쪽에 존재하는 각도 모드들은 템플릿 B(2003)에만 적용 한 후 각각 SAD를 구한다. 모드 별로 산출된 SAD 값들 중 최소 값을 가지는 모드를 템플릿 B(2003)의 화면 내 예측모드로 결정한다. 그 후 결정된 템플릿 A(2004)의 화면 내 예측모드와 템플릿 B(2003)의 화면 내 예측모드 중 하나를 최종적으로 현재 블록(2001)의 예측 모드로 선택한다.Next, each of the angular modes on the right of the 18th angular mode is applied only to template B (2003), and then the SAD is obtained. The mode having the minimum value among the SAD values calculated for each mode is determined as the intra prediction mode of the template B (2003). Thereafter, one of the determined intra prediction mode of the template A 2004 and the intra prediction mode of the template B 2003 is finally selected as the prediction mode of the current block 2001 .

각 템플릿에 DC 모드와 플래너 모드를 각각 적용하여 DC 모드에 대응하는 SAD값과 플래너 모드에 대응하는 SAD 값을 구할 수 있다. 그 후, 전술한 각도 모드들 중 해당 템플릿의 화면 내 예측모드로 선택된 모드에 대응하는 SAD 값, DC 모드에 대응하는 SAD값과 플래너 모드에 대응하는 SAD 값을 상호 비교하여 각 템플릿의 최종적인 화면 내 예측모드를 선택할 수 있다.By applying the DC mode and the planar mode to each template, respectively, the SAD value corresponding to the DC mode and the SAD value corresponding to the planar mode can be obtained. Thereafter, the SAD value corresponding to the mode selected as the prediction mode in the screen of the corresponding template among the above-described angle modes, the SAD value corresponding to the DC mode, and the SAD value corresponding to the planar mode are compared with each other to obtain a final screen of each template. You can choose my prediction mode.

(제3 실시예)(Example 3)

이하, 본 발명에 따른 DIMD의 제3 실시예를 설명한다. Hereinafter, a third embodiment of the DIMD according to the present invention will be described.

본 발명에 따른 제2 실시예는, 현재 블록의 템플릿들 중 일부가 가용하지 않은 경우, 가용한 나머지 템플릿을 이용하여 DIMD를 실행하는 방법에 관한 것이다. A second embodiment according to the present invention relates to a method of executing DIMD using the remaining available templates when some of the templates of the current block are not available.

도 8은 본 발명의 제3 실시예에 따른 DIMD를 설명하기 위한 도면이다. 8 is a diagram for explaining a DIMD according to a third embodiment of the present invention.

도 8에서는, 현재 블록(2101)의 상측의 템플릿은 가용하지 않고 좌측의 템플릿 A(2104)만 가용하다. In FIG. 8 , the template above the current block 2101 is not available, but only the template A 2104 on the left is available.

만약 부호화 장치(100)와 복호화 장치(600)가 도 2에 예시된 바와 같이 35개의 화면 내 예측 모드를 사용하기로 하였는데, 2개의 템플릿들 중 어느 하나가 이용 불가능 하다면, 도 8에 도시된 바와 같이 범위를 정하여 하나의 템플릿(2104)에만 35개의 화면 내 예측 모드를 적용할 수 있다. 도 8에서는, 왼쪽 아래 45도 방향을 화면 내 예측 모드 2번으로 설정하고, 수평한 방향을 화면 내 예측 모드 34번으로 설정하고, 예측 모드 2번과 예측 모드 34번 사이에 각도 모드 33개가 존재하도록 설정하였다. If the encoding apparatus 100 and the decoding apparatus 600 decide to use 35 intra prediction modes as illustrated in FIG. 2 , but any one of the two templates is unavailable, as shown in FIG. It is possible to apply 35 intra prediction modes to only one template 2104 by defining a range. In FIG. 8 , the lower left 45 degree direction is set as intra-screen prediction mode No. 2, the horizontal direction is set as intra-screen prediction mode No. 34, and 33 angular modes exist between prediction mode No. 2 and prediction mode No. 34 set to do so.

전술한 바와 같이 설정된 33개의 각도 모드들, DC 모드 및 플래너 모드를 가용한 템플릿 A(2104)에 적용하여 DIMD를 수행한 후 현재 블록(2101)의 인트라 예측 모드를 유도할 수 있다. After performing DIMD by applying the 33 angular modes, DC mode, and planar mode set as described above to the available template A 2104 , the intra prediction mode of the current block 2101 may be derived.

현재 블록(2101)이 입력 영상의 상측 경계에 해당하여, 템플릿 A(2104)의 좌측의 참조 화소들(2105)들은 가용하지만 템플릿 A(2104)의 상측의 참조 화소들이 존재하지 않는 경우, 적절한 주변 화소들을 이용한 패딩을 통해 상측의 참조 화소들(2102)을 생성할 수 있다. 패딩에 이용되는 주변 화소들은 현재 블록(2101) 및/또는 템플릿 A(2104)의 상측 화소들, 또는 템플릿 A(2104)의 좌측의 참조 화소들(2105)들이 될 수 있다.If the current block 2101 corresponds to the upper boundary of the input image, so that the reference pixels 2105 on the left of the template A 2104 are available but the reference pixels on the upper side of the template A 2104 do not exist, the appropriate surrounding The upper reference pixels 2102 may be generated through padding using the pixels. The surrounding pixels used for padding may be pixels above the current block 2101 and/or template A 2104 , or reference pixels 2105 to the left of template A 2104 .

(제4 실시예)(Example 4)

도 9는 본 발명에 따른 DIMD를 설명하기 위한 순서도이다. 전술한 제1 실시예 내지 제3 실시예와 관련된다. 도 9에 도시된 방법은, 영상 부호화 장치(100)의 화면 내 예측부(102) 및 영상 복호화 장치(600)의 화면 내 예측부(607)에 의해 각각 동일하게 수행될 수 있다.9 is a flowchart for explaining a DIMD according to the present invention. It relates to the first to third embodiments described above. The method shown in FIG. 9 may be equally performed by the intra prediction unit 102 of the image encoding apparatus 100 and the intra prediction unit 607 of the image decoding apparatus 600 , respectively.

도 9를 참조하면, 먼저, 이미 복원된, 적어도 하나의 화소 영역의 참조 화소 영역에 기초하여 상기 복원된 화소 영역의 인트라 예측 모드가 유도된다 (S2201). 여기서, 적어도 하나의 화소 영역은 전술한 실시예들에서 템플릿 A (2004, 2104) 및/또는 템플릿 B(2003)이 될 수 있다. 그러나 이들 템플릿에 한정되지 않음은 물론이다. 참조 화소 영역은 전술한 실시예들에서 설명된 참조 화소 영역(2002, 2102, 2105)에 해당될 수 있다. 그러나 이들 참조 화소 영역에 한정되지 않음은 물론이다.Referring to FIG. 9 , first, an intra prediction mode of the reconstructed pixel area is induced based on the already reconstructed reference pixel area of at least one pixel area ( S2201 ). Here, at least one pixel area may be template A (2004, 2104) and/or template B (2003) in the above-described embodiments. However, of course, it is not limited to these templates. The reference pixel region may correspond to the reference pixel regions 2002, 2102, and 2105 described in the above-described embodiments. However, it goes without saying that it is not limited to these reference pixel regions.

다음으로, S2201단계에서 유도된 상기 복원된 화소 영역의 인트라 예측 모드에 기초하여, 상기 현재 블록의 인트라 예측 모드가 유도된다 (S2203). 상기 유도된 인트라 예측 모드를 이용하여 현재 블록의 인트라 예측 블록을 얻은 후 (S2205), 상기 얻은 인트라 예측 블록과 현재 블록의 잔차 블록을 가산함으로써 현재 블록이 복원된다 (S2207).Next, an intra prediction mode of the current block is derived based on the intra prediction mode of the reconstructed pixel region derived in step S2201 ( S2203 ). After obtaining the intra prediction block of the current block using the derived intra prediction mode (S2205), the current block is reconstructed by adding the obtained intra prediction block and the residual block of the current block (S2207).

(제5 실시예)(Example 5)

도 10은 본 발명에 따른 DIMD를 이용하여 영상을 부호화하는 경우, 화면 내 예측 모드를 부호화하는 방법을 설명하기 위한 순서도이다. 10 is a flowchart illustrating a method of encoding an intra prediction mode when an image is encoded using DIMD according to the present invention.

먼저, 본 발명에 따른 DIMD의 수행 여부를 알려주는 정보를 부호화 한다(S2501). 이 정보는 화면 내 예측 모드의 유도 방법을 영상 복호화 장치(600)에 알리는 정보이다. 즉, 본 발명에 따른 DIMD를 이용하여 화면 내 예측 모드가 유도되는지 아니면 다른 방법을 이용하여 화면 내 예측 모드가 유도되는지 여부를 시그널링한다. First, information indicating whether DIMD is performed according to the present invention is encoded (S2501). This information is information informing the video decoding apparatus 600 of a method of inducing an intra prediction mode. That is, it signals whether the intra prediction mode is derived using the DIMD according to the present invention or whether the intra prediction mode is derived using another method.

본 발명에 따른 DIMD가 사용 되었는지 여부를 판단한 후(S2502), 만약 사용 되었다면 본 프로세스는 종료되고, 현재 블록의 인트라 예측 모드는 DIMD에 의해 유도된다.After determining whether or not the DIMD according to the present invention is used (S2502), if used, the process is terminated, and the intra prediction mode of the current block is induced by the DIMD.

그러나, 본 발명에 따른 DIMD가 사용되지 않았다면 MPM(Most Probable Mode) 적용 여부가 부호화된다(S2503). 본 발명에 따른 DIMD를 이용한 화면 내 예측 모드 유도 외의 다른 방법으로서 MPM이 사용될 수 있다. However, if the DIMD according to the present invention is not used, whether or not MPM (Most Probable Mode) is applied is encoded (S2503). MPM may be used as a method other than inducing an intra prediction mode using DIMD according to the present invention.

현재 블록의 인트라 예측 모드가 MPM 리스트(most probable mode list)에 속하는지 여부를 나타내는 MPM 플래그 및 MPM 인덱스 정보가 추가로 복호화 장치(600)로 전달된다. 상기 MPM 리스트 내에 포함되는 인트라 예측 모드의 개수는 전체 인트라 예측 모드의 개수에 비해 매우 적다. 따라서, 현재 블록의 인트라 예측 모드가 MPM 리스트(most probable mode list)에 속한다면 매우 적은 비트를 이용하여 복호화 장치(600)로 시그널링하는 것이 가능하다. MPM 인덱스 정보는 현재 블록의 인트라 예측 모드가 MPM 리스트(most probable mode list)에 속하는 모드들 중 어떤 모드에 해당하는지 여부를 나타낸다.An MPM flag indicating whether the intra prediction mode of the current block belongs to a most probable mode list and MPM index information are additionally transmitted to the decoding apparatus 600 . The number of intra prediction modes included in the MPM list is very small compared to the total number of intra prediction modes. Accordingly, if the intra prediction mode of the current block belongs to an MPM list (most probable mode list), it is possible to signal to the decoding apparatus 600 using very few bits. The MPM index information indicates whether the intra prediction mode of the current block corresponds to which mode among modes belonging to the MPM list (most probable mode list).

상기 MPM 플래그가 1이면, 현재 블록의 인트라 예측 모드가 MPM 리스트에 속하고, 상기 플래그가 0이면, 현재 블록의 인트라 예측 모드가 잔여 모드 그룹(residual mode group)에 속한다. 상기 잔여 모드 그룹은 상기 MPM 리스트에 속하는 인트라 예측 모드들 이외의 모든 인트라 예측 모드들을 포함할 수 있다. S2503 단계에서, MPM(Most Probable Mode) 적용 여부의 부호화는 상기 MPM 플래그를 부호화함으로써 수행된다.If the MPM flag is 1, the intra prediction mode of the current block belongs to the MPM list, and if the flag is 0, the intra prediction mode of the current block belongs to a residual mode group. The residual mode group may include all intra prediction modes other than intra prediction modes belonging to the MPM list. In step S2503, the encoding of whether MPM (Most Probable Mode) is applied is performed by encoding the MPM flag.

다시 도 10을 참조하면, MPM이 사용되었는지 여부를 확인한 후(S2504), 사용되지 않았다면 MPM 후보를 제외한 나머지 모드를 재 정렬한 후 현재 블록의 인트라 예측 모드를 부호화(S2505)한다. 만약, MPM이 사용되었다면 어떤 인트라 예측 모드 후보가 적용되었는지를 알려주는 MPM 인덱스를 부호화 (S2506)한 후 종료한다.Referring back to FIG. 10, after checking whether the MPM is used (S2504), if not used, the remaining modes except for the MPM candidates are rearranged and the intra prediction mode of the current block is encoded (S2505). If the MPM is used, the MPM index indicating which intra prediction mode candidate is applied (S2506) is encoded and then ended.

(제6 실시예)(Example 6)

도 11은 본 발명에 따른 DIMD를 이용하여 영상을 복호화하는 경우, 화면 내 예측 모드를 복호화하는 방법을 설명하기 위한 순서도이다. 11 is a flowchart illustrating a method of decoding an intra prediction mode when an image is decoded using a DIMD according to the present invention.

먼저, 본 발명에 따른 DIMD의 수행 여부를 알려주는 정보를 복호화 한다(S2601). 이 정보는, 본 발명에 따른 DIMD를 이용하여 화면 내 예측 모드가 유도되는지 아니면 다른 방법을 이용하여 화면 내 예측 모드가 유도되는지 여부를 지시한다. First, information indicating whether DIMD is performed according to the present invention is decoded (S2601). This information indicates whether the intra prediction mode is derived using the DIMD according to the present invention or the intra prediction mode is derived using another method.

본 발명에 따른 DIMD가 사용 되었는지 여부를 판단한 후(S2602), 만약 DIMD가 사용되었다면 본 프로세스는 종료되고, 현재 블록의 인트라 예측 모드는 DIMD에 의해 유도된다.After determining whether the DIMD according to the present invention is used (S2602), if the DIMD is used, the process ends, and the intra prediction mode of the current block is induced by the DIMD.

그러나, 본 발명에 따른 DIMD가 사용되지 않았다면 MPM(Most Probable Mode) 적용 여부가 복호화된다(S2603). S2603 단계에서는, MPM 플래그가 복호될 수 있다.However, if the DIMD according to the present invention is not used, whether or not MPM (Most Probable Mode) is applied is decoded (S2603). In step S2603, the MPM flag may be decoded.

상기 MPM 플래그가 1이면, 현재 블록의 인트라 예측 모드가 MPM 리스트에 속하고, 상기 플래그가 0이면, 현재 블록의 인트라 예측 모드가 잔여 모드 그룹(residual mode group)에 속한다. 상기 잔여 모드 그룹은 상기 MPM 리스트에 속하는 인트라 예측 모드들 이외의 모든 인트라 예측 모드들을 포함할 수 있다. If the MPM flag is 1, the intra prediction mode of the current block belongs to the MPM list, and if the flag is 0, the intra prediction mode of the current block belongs to a residual mode group. The residual mode group may include all intra prediction modes other than intra prediction modes belonging to the MPM list.

다음으로, MPM이 사용되었는지 여부를 확인한 후(S2604), 사용되지 않았다면 MPM 후보를 제외한 나머지 모드를 재 정렬한 후 현재 블록의 인트라 예측 모드를 복호화(S2505)한다. 만약, MPM이 사용되었다면, 어떤 인트라 예측 모드 후보가 적용되었는지를 알려주는 MPM 인덱스를 복호화 (S2506)한 후 종료한다.Next, after checking whether the MPM is used (S2604), if not used, the remaining modes except for the MPM candidates are rearranged and then the intra prediction mode of the current block is decoded (S2505). If the MPM is used, the MPM index indicating which intra prediction mode candidate is applied is decoded (S2506) and then the process is finished.

(제7 실시예)(Seventh embodiment)

도 12는 본 발명에 따른 제7 실시예를 설명하기 위한 도면이다. 본 발명의 제7 실시예는, 템플릿에 다수의 참조 화소 라인들을 이용하여 인트라 예측 모드를 유도하는 방법에 관한 것이다.12 is a view for explaining a seventh embodiment according to the present invention. A seventh embodiment of the present invention relates to a method of deriving an intra prediction mode by using a plurality of reference pixel lines in a template.

도 12에 도시한 바와 같이, 템플릿의 참조 화소 라인으로서 참조 화소 라인 1과 참조 화소 라인 2의 2개 라인이 이용된다고 가정한다. 템플릿의 길이인 P와 Q는 각각 1이라고 가정하고 설명한다. As shown in Fig. 12, it is assumed that two lines, a reference pixel line 1 and a reference pixel line 2, are used as reference pixel lines of the template. The length of the template, P and Q, is assumed to be 1, respectively.

왼쪽 위 45도 방향 모드의 오른쪽에 존재하는 각도 모드들을 위측 각도 모드라 정의하고 템플릿 B와 그 위쪽의 참조 화소 라인들을 사용한다. 또한 왼쪽 위 45도 방향 모드를 기준으로 왼쪽에 존재하는 각도 모드들을 좌측 각도 모드라 정의하고 템플릿 A와 그 왼쪽의 참조 화소 라인들을 사용한다. 그 후 화면 내 예측 모드에 따라 도 12에 도시한 바와 같이 참조 화소 라인별로 예측을 수행해본다. 예를 들어 템플릿의 참조 화소라인 2를 이용하여 템플릿의 참조 화소라인 1를 예측하고, 최적의 화면 내 예측 모드 후보 1을 생성한다. 그 후, 템플릿의 참조 화소라인 1를 이용하여 템플릿을 예측하고 최적의 화면 내 예측 모드 후보 2를 생성한다. 만약 화면 내 예측 모드 후보 1과 2가 동일하다면 그 예측 모드를 현재 블록의 화면 내 예측 모드로 선택한다. 만약 다르다면, 전술한, 본 발명의 다양한 실시예들에 따른 DIMD 방법 중 하나를 수행할지 여부를 결정한다. Angle modes existing on the right side of the upper left 45 degree direction mode are defined as upper angle modes, and template B and reference pixel lines above it are used. Also, angle modes existing on the left side of the upper left 45 degree direction mode are defined as left angle modes, and template A and reference pixel lines on the left are used. Thereafter, prediction is performed for each reference pixel line as shown in FIG. 12 according to the intra prediction mode. For example, the reference pixel line 1 of the template is predicted using the reference pixel line 2 of the template, and an optimal intra prediction mode candidate 1 is generated. Then, the template is predicted by using the reference pixel line 1 of the template, and an optimal intra prediction mode candidate 2 is generated. If the intra prediction mode candidates 1 and 2 are identical, the prediction mode is selected as the intra prediction mode of the current block. If different, it is determined whether to perform one of the above-described DIMD methods according to various embodiments of the present invention.

도 13은 본 발명의 제7 실시예를 적용한 경우, 인트라 예측 모드를 부호화 하는 과정을 나타낸 순서도이다. 13 is a flowchart illustrating an intra prediction mode encoding process when the seventh embodiment of the present invention is applied.

먼저, 템플릿의 참조 화소 라인을 이용하여 화면 내 예측 모드 후보들을 유도한다(S2801). 그 후, 화면 내 예측 모드 후보들이 동일한지 여부를 판단한 후(S2802), 동일 하다면 그 동일한 모드가 현재 블록의 화면 내 예측 모드로 선택되기 때문에 순서도가 종료된다. 만약, 화면 내 예측 모드 후보들이 동일하지 않다면 본 발명에 따른 DIMD를 수행할지 여부가 부호화된다(S2803). First, intra prediction mode candidates are derived using the reference pixel line of the template (S2801). Thereafter, after determining whether the intra prediction mode candidates are the same (S2802), if they are the same, the same mode is selected as the intra prediction mode of the current block, so the flowchart ends. If the prediction mode candidates in the picture are not the same, whether or not to perform DIMD according to the present invention is encoded (S2803).

이 후 단계들인 S2804 S2808은 도 10에 도시된 S2502 내지 S2506과 실질적으로 동일하므로 상세한 설명은 생략한다. Subsequent steps S2804 and S2808 are substantially the same as S2502 to S2506 illustrated in FIG. 10 , and thus detailed description thereof will be omitted.

도 14는 본 발명의 제7 실시예를 적용한 경우, 인트라 예측 모드를 복호화 하는 과정을 나타낸 순서도이다. 도 14에 도시된 각 과정은 영상 복호화 장치(600)에 의해 수행된다는 점 외에는 도 13에 도시된 각 단계들과 실질적으로 동일하므로 상세한 설명은 생략한다.14 is a flowchart illustrating a process of decoding an intra prediction mode when the seventh embodiment of the present invention is applied. Each process shown in FIG. 14 is substantially the same as each process shown in FIG. 13 except that it is performed by the image decoding apparatus 600 , and thus a detailed description thereof will be omitted.

<DIMD의 변형예: 템플릿 인덱스의 전송><DIMD variant: transfer of template index>

전술한 다양한 실시예들에 따른 DIMD를 사용할 경우, 인트라 예측 모드 자체를 시그널링하지는 않는다. 그러나, 본 실시예에서는 복수의 템플릿을 이용하여 각각 후보 인트라 예측 모드를 유도한 후 이 중 어느 모드가 사용되는지를 나타내는 인덱스 정보가 부호화 장치(100)에 의해 복호화 장치(600)로 전송된다. 도 15a 및 도 15b는 템플릿 인덱스를 전송하는 DIMD의 변형예를 설명하기 위한 도면으로서, 본 발명의 DIMD를 이용하여 두 개의 템플릿을 이용하여 각각 인트라 예측 모드 후보를 생성한 후 인덱스를 이용하여 지정하는 방식에 대한 예시이다. 도 15a 또는 도 15b에 도시된 템플릿의 참조 화소 영역의 크기를 나타내는 R과 S는 설명의 편의성을 위해 1이라고 가정하고 설명한다. When DIMD according to the above-described various embodiments is used, the intra prediction mode itself is not signaled. However, in the present embodiment, after each candidate intra prediction mode is derived using a plurality of templates, index information indicating which mode is used is transmitted by the encoding apparatus 100 to the decoding apparatus 600 . 15A and 15B are diagrams for explaining a modified example of DIMD for transmitting a template index. Using the DIMD of the present invention, each intra prediction mode candidate is generated using two templates and then designated using the index. This is an example of the method. For convenience of explanation, it is assumed that R and S indicating the size of the reference pixel region of the template shown in FIG. 15A or 15B are 1 for convenience of description.

도 15a에서는, 템플릿 A(3102)에 템플릿의 참조 화소 영역(3103)내의 화소들을 이용하여 화면 내 예측 모드 후보 1을 유도한다. 도 15b에서는, 템플릿 B(3104)에 템플릿의 참조 화소 영역(3105)내의 화소들을 이용하여 화면 내 예측 모드 후보 2을 유도한다. 다음으로, 어떤 템플릿에서 유도한 화면 내 예측 모드 후보가 현재 블록(3101)의 화면 내 예측 모드인지를 나타내는 인덱스를 부호화 하여 복호화 장치(600)로 전송된다. In FIG. 15A , the intra prediction mode candidate 1 is derived by using the pixels in the reference pixel region 3103 of the template in the template A 3102 . In FIG. 15B , the intra prediction mode candidate 2 is derived by using the pixels in the reference pixel region 3105 of the template for the template B 3104 . Next, an index indicating whether an intra prediction mode candidate derived from a certain template is an intra prediction mode of the current block 3101 is encoded and transmitted to the decoding apparatus 600 .

한편, 템플릿을 포함하고 있는 블록이 어떤 화면 내 예측 모드로 부호화 되었는지 여부가 본 실시예에 이용될 수 있다. 예를 들면, 도 15a 및 도 15b에서, 템플릿 A(3102)를 포함하고 있는 블록의 화면 내 예측 모드를 화면 내 예측모드 A라 할 때, 화면 내 예측모드 A와 템플릿의 참조 화소들을 이용하여 템플릿 A(3102)에 적용하여 결정된 화면 내 예측 모드가 동일하면 높거나 낮은 우선순위를 부여할 수 있다. 그 우선순위에 따라 인덱스 설정을 위한 후보들 배치시에 비트를 할당 하는 것 또한 가능하다. 마찬가지로, 템플릿 A (3102)외에 다수의 템플릿이 존재하는 경우 위 조건을 이용하여 비트 할당 시, 우선순위를 설정하는 것 또한 가능하다.Meanwhile, whether a block including a template is coded in which intra prediction mode may be used in this embodiment. For example, in FIGS. 15A and 15B , when the intra prediction mode of the block including the template A 3102 is referred to as the intra prediction mode A, a template using the intra prediction mode A and reference pixels of the template If the intra prediction mode determined by applying to A 3102 is the same, a higher or lower priority may be given. It is also possible to allocate bits when arranging candidates for index setting according to the priority. Similarly, when a plurality of templates exist in addition to the template A 3102, it is also possible to set the priority when allocating bits using the above condition.

도 16은 템플릿 인덱스가 사용되는 DIMD에 따른 화면 내 예측 모드의 부호화 방법을 설명하는 순서도이다. 16 is a flowchart illustrating a method of encoding an intra prediction mode according to DIMD using a template index.

먼저, 템플릿 인덱스가 사용되는 DIMD의 수행여부를 알려주는 정보가 부호된다(S3301). 템플릿 인덱스가 사용되는 DIMD가 수행 되었는지 여부를 판단한 후(S3302), 만약 수행되었다면 템플릿 인덱스를 부호화 하고 종료한다(S3307). 만약 템플릿 인덱스가 사용되는 DIMD가 수행되지 않았다면 MPM(Most Probable Mode) 적용 여부를 부호화한다(S3303). MPM이 적용되었는지 여부를 확인한 후(S3304), 적용되지 않았다면 MPM 후보를 제외한 나머지 모드를 재 정렬 후 부호화를 수행하고(S3305) MPM이 적용되었다면 어떤 후보가 적용되었는지를 알려주는 MPM 인덱스를 부호화하고(S3306) 종료한다.First, information indicating whether DIMD using a template index is performed is encoded (S3301). After determining whether DIMD using the template index has been performed (S3302), if it has been performed, the template index is encoded and terminated (S3307). If DIMD using the template index is not performed, whether or not MPM (Most Probable Mode) is applied is encoded (S3303). After checking whether or not MPM is applied (S3304), if not applied, the mode except for the MPM candidate is rearranged and then encoding is performed (S3305). If the MPM is applied, the MPM index indicating which candidate is applied is encoded ( S3306) ends.

도 17은 템플릿 인덱스가 사용되는 DIMD에 따른 화면 내 예측 모드의 부호화 방법을 설명하는 순서도이다. 도 17에 도시된 각 과정은 영상 복호화 장치(600)에 의해 수행된다는 점 외에는 도 16에 도시된 각 단계들과 실질적으로 동일하므로 상세한 설명은 생략한다.17 is a flowchart illustrating a method of encoding an intra prediction mode according to DIMD using a template index. Each process shown in FIG. 17 is substantially the same as each process shown in FIG. 16 except that it is performed by the image decoding apparatus 600 , and thus a detailed description thereof will be omitted.

한편, 도 15a 및 도 15b는 주변 2개의 템플릿들을 예시로 들었지만 3개 이상의 템플릿들을 이용하는 것 또한 가능하다.Meanwhile, although FIGS. 15A and 15B exemplify the surrounding two templates, it is also possible to use three or more templates.

<DIMD의 응용예: MPM 리스트 생성><Application example of DIMD: MPM list creation>

앞에서는, 본 발명에 따른 DIMD를 사용할 경우, 인트라 예측 모드 자체를 복호화 장치(600)로 시그널링하지 않거나 또는 복수의 템플릿들 중 어떤 템플릿을 이용하여 유도된 인트라 예측 모드 후보가 현재 블록의 인트라 예측 모드로 선택되었는지를 나타내는 템플릿 인덱스 정보가 부호화 장치(100)에 의해 복호화 장치(600)로 전송되었다. Previously, when DIMD according to the present invention is used, the intra prediction mode itself is not signaled to the decoding apparatus 600 or an intra prediction mode candidate derived using a template among a plurality of templates is the intra prediction mode of the current block. Template index information indicating whether or not is selected is transmitted by the encoding apparatus 100 to the decoding apparatus 600 .

이하에서는, DIMD에 따라 유도된 화면 내 예측모드를 사용하여 MPM(Most Probable Mode) 후보를 재정렬하거나 MPM 리스트를 생성하는 실시예를 설명한다. Hereinafter, an embodiment in which MPM (Most Probable Mode) candidates are rearranged or an MPM list is generated using the intra prediction mode derived according to DIMD will be described.

화면 내 예측 모드의 예측을 위해 MPM 후보를 생성한 후, 템플릿을 이용하여 유도한 화면 내 예측 모드와 유사한 순으로 MPM 후보를 상위에 배치하는 것 또한 가능하다.After generating the MPM candidates for prediction of the intra prediction mode, it is also possible to arrange the MPM candidates on the top in an order similar to the intra prediction mode derived using the template.

(제1 실시예)(Example 1)

도 18은 템플릿을 이용하여 유도된 화면 내 예측 모드를 MPM 후보로 설정하는 일 예를 설명하기 위한 도면이다. 18 is a diagram for explaining an example of setting an intra prediction mode derived using a template as an MPM candidate.

현재 블록(3501) 주변에 복원된 블록 A(3503)와 블록 B(3505)가 존재한다고 가정하고, 블록 A(3503)는 화면 내 예측, 블록 B(3505)는 화면 간 예측이 사용 되었다고 가정한다. 블록 B(3505)는 화면 간 예측이 사용되어 화면 내 예측 모드가 존재하지 않기 때문에, 본 실시예에서는 템플릿을 이용하여 블록 B(3505)의 화면 내 예측 모드를 생성한다. 템플릿을 이용하여 블록 B(3505)의 화면 내 예측 모드를 유도하는 것은 도 15b 및 도 15b와 관련된 앞선 설명들을 참고한다. 한편, 도 15b의 템플릿 B(3104)를 이용하여 템플릿 B(3104)의 화면 내 예측 모드를 유도할 때, 화면 내 예측 모드를 부호화하는 방식, 인트라 예측 모드의 개수와 예측 각도들은 영상 부호화 장치 (100) 또는 영상 복호화 장치(600)에 의해 기 설정된 것들과 동일해야 한다. It is assumed that reconstructed blocks A 3503 and B 3505 exist around the current block 3501 , it is assumed that block A 3503 uses intra prediction and block B 3505 uses inter prediction. . In the block B 3505 , inter prediction is used and there is no intra prediction mode, so in the present embodiment, the intra prediction mode of the block B 3505 is generated using a template. For deriving the intra prediction mode of block B 3505 using the template, refer to the preceding descriptions related to FIGS. 15B and 15B . Meanwhile, when the intra prediction mode of the template B 3104 is derived using the template B 3104 of FIG. 15B , the method of encoding the intra prediction mode, the number of intra prediction modes and the prediction angles are determined by the video encoding apparatus ( 100) or the ones preset by the image decoding apparatus 600 should be the same.

(제2 실시예)(Second embodiment)

본 실시예에서는 템플릿을 포함하고 있는 블록이 어떤 화면 내 예측 모드로 부호화 되었는지를 이용하여 MPM의 후보를 설정한다. In this embodiment, the MPM candidate is set using which intra prediction mode the block including the template is encoded.

도 19는 본 발명의 일 실시예에 따른 MPM 후보 설정을 설명하기 위한 도면이다. 도 19를 참조하면, 현재 블록(3701)의 왼쪽 블록(3703)의 화면 내 예측 모드를 10번 모드라 가정하고, 왼쪽 블록(3703)의 일부분에 해당하는 템플릿 A(3705)에 템플릿의 참조 화소들(도시되지 않음)을 이용하여 유도한 화면 내 예측 모드가 12번 모드라 가정한다. 마찬가지로 현재 블록(3701)의 위쪽 블록(3707)의 화면 내 예측 모드는 28번이라 가정하고, 위쪽 블록(3707)의 일부분인 템플릿 B(3709)에 템플릿의 참조 화소들(도시되지 않음)을 이용하여 유도한 화면 내 예측 모드가 28번이라 가정한다. 왼쪽 블록(3703)의 경우, 왼쪽 블록(3703) 전체를 고려하면 10번 모드가 부호화에 유리하지만 현재 블록(3701)과 인접한 템플릿 A(3705)에서는 12번 모드가 설정 되었으므로 현재 블록의 예측 모드는 10번 모드보다는 12번 모드가 더 적절하다고 가정할 수 있다. 이러한 경우, MPM의 후보 설정시에 왼쪽 블록(3703)의 화면 내 예측모드보다는 템플릿 A(3705)에서 유도된 화면 내 예측모드를 이용하여 MPM 후보를 생성할 수 있다. 19 is a diagram for explaining MPM candidate setting according to an embodiment of the present invention. Referring to FIG. 19 , it is assumed that the intra prediction mode of the left block 3703 of the current block 3701 is the 10th mode, and the template reference pixel is located in the template A 3705 corresponding to a part of the left block 3703 . It is assumed that the intra prediction mode induced using the ? (not shown) is mode 12. Similarly, it is assumed that the intra prediction mode of the upper block 3707 of the current block 3701 is No. 28, and reference pixels (not shown) of the template are used for the template B 3709 which is a part of the upper block 3707 . It is assumed that the in-screen prediction mode induced by this is number 28. In the case of the left block 3703, considering the entire left block 3703, mode 10 is advantageous for encoding, but since mode 12 is set in template A 3705 adjacent to the current block 3701, the prediction mode of the current block is It can be assumed that mode 12 is more appropriate than mode 10. In this case, when setting the MPM candidate, the MPM candidate may be generated using the intra prediction mode derived from the template A 3705 rather than the intra prediction mode of the left block 3703 .

위쪽 블록(3707)의 경우 위쪽 블록(3707)의 화면 내 예측모드와 템플릿 B(3709)를 통해 유도된 화면 내 예측모드가 동일하므로 그 동일한 모드가 MPM 후보로 사용된다. In the case of the upper block 3707 , since the intra prediction mode of the upper block 3707 and the intra prediction mode derived through the template B 3709 are the same, the same mode is used as an MPM candidate.

다른 대안으로서, 왼쪽 블록(3703)의 화면 내 예측모드, 템플릿A(3705)에서 유도된 화면 내 예측모드, 위쪽 블록(3707)의 화면 내 예측모드, 템플릿B(3709)에서 유도된 화면 내 예측모드의 4가지 모드를 이용하여 MPM의 후보 설정을 하는 것 또한 가능하다. 이때, 템플릿을 이용하여 유도한 화면 내 예측 모드가 현재 블록에 더욱 가깝기 때문에, 템플릿을 이용하여 유도한 화면 내 예측 모드를 MPM 후보 설정시에 높은 우선순위를 부과하여 비트를 적게 할당하는 것 또한 가능하다. As another alternative, the intra prediction mode of the left block 3703, the intra prediction mode derived from the template A 3705, the intra prediction mode of the upper block 3707, and the intra prediction induced from the template B 3709 It is also possible to set a candidate for the MPM by using the four modes. In this case, since the intra prediction mode induced using the template is closer to the current block, it is also possible to assign a small number of bits by assigning a high priority to the intra prediction mode induced using the template when setting the MPM candidate. do.

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

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

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

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

Claims (3)

영상 복호화 방법에 있어서,
비트스트림으로부터 참조 화소 라인 인덱스 정보를 획득하는 단계;
상기 참조 화소 라인 인덱스 정보에 기반하여, 복수의 참조 화소 라인들로부터 현재 블록에 대한 참조 화소 라인을 선택하는 단계;
상기 현재 블록의 인트라 예측 모드를 유도하는 단계;
상기 유도된 인트라 예측 모드를 재설정하는 단계; 및
상기 선택된 참조 화소 라인 및 상기 재설정된 인트라 예측 모드에 기반하여 인트라 예측을 수행함으로써, 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하는
영상 복호화 방법.
In the video decoding method,
obtaining reference pixel line index information from the bitstream;
selecting a reference pixel line for a current block from a plurality of reference pixel lines based on the reference pixel line index information;
deriving an intra prediction mode of the current block;
resetting the derived intra prediction mode; and
generating a prediction block of the current block by performing intra prediction based on the selected reference pixel line and the reset intra prediction mode
video decoding method.
영상 부호화 방법에 있어서,
복수의 참조 화소 라인들로부터 현재 블록에 대한 참조 화소 라인을 선택하는 단계;
상기 현재 블록의 인트라 예측 모드를 유도하는 단계;
상기 유도된 인트라 예측 모드를 재설정하는 단계; 및
상기 선택된 참조 화소 라인 및 상기 재설정된 인트라 예측 모드에 기반하여 인트라 예측을 수행함으로써, 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하고,
상기 선택된 참조 화소 라인을 나타내는 참조 화소 라인 인덱스 정보가 비트스트림 내에 부호화되는
영상 부호화 방법.
In the video encoding method,
selecting a reference pixel line for a current block from a plurality of reference pixel lines;
deriving an intra prediction mode of the current block;
resetting the derived intra prediction mode; and
generating a prediction block of the current block by performing intra prediction based on the selected reference pixel line and the reset intra prediction mode;
Reference pixel line index information indicating the selected reference pixel line is encoded in the bitstream.
video encoding method.
영상 부호화 방법에 의해 생성된 비트스트림을 저장한 컴퓨터 판독가능한 기록 매체에 있어서, 상기 영상 부호화 방법은,
복수의 참조 화소 라인들로부터 현재 블록에 대한 참조 화소 라인을 선택하는 단계;
상기 현재 블록의 인트라 예측 모드를 유도하는 단계;
상기 유도된 인트라 예측 모드를 재설정하는 단계; 및
상기 선택된 참조 화소 라인 및 상기 재설정된 인트라 예측 모드에 기반하여 인트라 예측을 수행함으로써, 상기 현재 블록의 예측 블록을 생성하는 단계; 및
상기 예측 블록을 기반으로 상기 현재 블록을 부호화하여 비트스트림을 생성하는 단계를 포함하고,
상기 선택된 참조 화소 라인을 나타내는 참조 화소 라인 인덱스 정보가 상기 비트스트림 내에 부호화되는
컴퓨터 판독가능한 기록 매체.
A computer-readable recording medium storing a bitstream generated by an image encoding method, the image encoding method comprising:
selecting a reference pixel line for a current block from a plurality of reference pixel lines;
deriving an intra prediction mode of the current block;
resetting the derived intra prediction mode; and
generating a prediction block of the current block by performing intra prediction based on the selected reference pixel line and the reset intra prediction mode; and
generating a bitstream by encoding the current block based on the prediction block;
Reference pixel line index information indicating the selected reference pixel line is encoded in the bitstream.
A computer-readable recording medium.
KR1020220010851A 2016-10-14 2022-01-25 Method and apparatus for encoding/decoding an image KR102502216B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020230020808A KR20230025851A (en) 2016-10-14 2023-02-16 Method and apparatus for encoding/decoding an image

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20160133755 2016-10-14
KR1020160133755 2016-10-14
KR1020170127940A KR102357283B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020170127940A Division KR102357283B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020230020808A Division KR20230025851A (en) 2016-10-14 2023-02-16 Method and apparatus for encoding/decoding an image

Publications (2)

Publication Number Publication Date
KR20220016938A true KR20220016938A (en) 2022-02-10
KR102502216B1 KR102502216B1 (en) 2023-02-21

Family

ID=62084995

Family Applications (3)

Application Number Title Priority Date Filing Date
KR1020170127940A KR102357283B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image
KR1020220010851A KR102502216B1 (en) 2016-10-14 2022-01-25 Method and apparatus for encoding/decoding an image
KR1020230020808A KR20230025851A (en) 2016-10-14 2023-02-16 Method and apparatus for encoding/decoding an image

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020170127940A KR102357283B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020230020808A KR20230025851A (en) 2016-10-14 2023-02-16 Method and apparatus for encoding/decoding an image

Country Status (1)

Country Link
KR (3) KR102357283B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4266686A1 (en) * 2022-04-18 2023-10-25 Comcast Cable Communications, LLC Video compression using template-based determination of intra prediction mode
WO2024039155A1 (en) * 2022-08-16 2024-02-22 현대자동차주식회사 Image encoding/decoding method, device, and recording medium for storing bitstream

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112106360A (en) * 2018-05-10 2020-12-18 三星电子株式会社 Video encoding method and apparatus, and video decoding method and apparatus
WO2019245261A1 (en) * 2018-06-18 2019-12-26 세종대학교 산학협력단 Method and apparatus for encoding/decoding image
US20220150470A1 (en) * 2019-03-20 2022-05-12 Hyundai Motor Company Method and apparatus for intra predictionbased on deriving prediction mode
WO2023068870A1 (en) * 2021-10-21 2023-04-27 엘지전자 주식회사 Method and apparatus for coding intra prediction mode

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090097688A (en) * 2008-03-12 2009-09-16 삼성전자주식회사 Method and apparatus of encoding/decoding image based on intra prediction

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090097688A (en) * 2008-03-12 2009-09-16 삼성전자주식회사 Method and apparatus of encoding/decoding image based on intra prediction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Y-J Chang et al: "Arbitrary reference tier for intra directional modes", JVET-C0043, 17 May 2016. *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4266686A1 (en) * 2022-04-18 2023-10-25 Comcast Cable Communications, LLC Video compression using template-based determination of intra prediction mode
WO2024039155A1 (en) * 2022-08-16 2024-02-22 현대자동차주식회사 Image encoding/decoding method, device, and recording medium for storing bitstream

Also Published As

Publication number Publication date
KR20230025851A (en) 2023-02-23
KR102357283B1 (en) 2022-01-28
KR102502216B1 (en) 2023-02-21
KR20180041577A (en) 2018-04-24

Similar Documents

Publication Publication Date Title
JP7442200B2 (en) Image encoding/decoding method and device
US20240107029A1 (en) Image encoding/decoding method and apparatus using intra-screen prediction
KR102357283B1 (en) Method and apparatus for encoding/decoding an image
KR102357282B1 (en) Method and apparatus for encoding/decoding an image
US20200359020A1 (en) Method, Device, and Recording Medium Storing Bit Stream, for Encoding/Decoding Image
US20240015286A1 (en) Image encoding method/device, image decoding method/device and recording medium having bitstream stored thereon
US20200404278A1 (en) Method and system for processing luma and chroma signals
US11792426B2 (en) Method and apparatus for encoding/decoding image using a prediction value based on reference pixels
US20210297666A1 (en) Image encoding method/device, image decoding method/device, and recording medium in which bitstream is stored
US11363280B2 (en) Method and apparatus for encoding/decoding image signal
US11909990B2 (en) Method and apparatus for encoding/decoding image signals using weight prediction parameter sets based on neighboring regions
US11909970B2 (en) Image encoding method/device, image decoding method/device, and recording medium in which bitstream is stored
KR20170124077A (en) Method and apparatus for encoding/decoding a video signal
KR102511611B1 (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20200026394A (en) A method and an apparatus for encoding/decoding a intra prediction
KR20230042236A (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20220061085A (en) Method and apparatus for encoding/decoding a video signal
KR20170124076A (en) Method and apparatus for encoding and decoding a video signal group
KR20170124078A (en) Method and apparatus for encoding/decoding a video signal
KR20200076807A (en) A method and an apparatus for processing a block divided into sub-block units

Legal Events

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