KR20180086135A - Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream - Google Patents

Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream Download PDF

Info

Publication number
KR20180086135A
KR20180086135A KR1020180005467A KR20180005467A KR20180086135A KR 20180086135 A KR20180086135 A KR 20180086135A KR 1020180005467 A KR1020180005467 A KR 1020180005467A KR 20180005467 A KR20180005467 A KR 20180005467A KR 20180086135 A KR20180086135 A KR 20180086135A
Authority
KR
South Korea
Prior art keywords
information
unit
current block
clipping range
block
Prior art date
Application number
KR1020180005467A
Other languages
Korean (ko)
Inventor
문주희
원동재
임성원
Original Assignee
세종대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Publication of KR20180086135A publication Critical patent/KR20180086135A/en
Priority to KR1020230194064A priority Critical patent/KR20240005658A/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/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Abstract

The present invention provides an image encoding method and an image decoding method. The image decoding method according to the present invention includes the steps of decoding information about a clipping range for a current block and performing sample adaptive offset (SAO) filtering based on the information about the clipping range. The information about the clipping range includes information about the maximum value and the minimum value of pixel values included in the current block. Accordingly, the present invention can improve compression efficiency.

Description

영상 부호화 방법/장치, 영상 복호화 방법/장치 및 비트스트림을 저장한 기록 매체{IMAGE ENCODING METHOD/APPARATUS, IMAGE DECODING METHOD/APPARATUS AND RECORDING MEDIUM FOR STORING BITSTREAM}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding method and apparatus, an image decoding method and apparatus, and a recording medium storing a bitstream.

본 발명은 영상 부호화/복호화 방법 및 장치에 관한 것이다. 상세하게는, 임의의 영상 영역에 대한 화소 범위를 이용하여 압축 효율을 향상시킬 수 있는 영상 부호화/복호화 방법 및 장치에 관한 것이다.The present invention relates to an image encoding / decoding method and apparatus. To an image encoding / decoding method and apparatus capable of improving compression efficiency by using a pixel range for an arbitrary image area.

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이러한 추세의 일환으로 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)에서는 꾸준한 공동 연구를 통하여 동영상 압축 표준을 연구하는 중이다.In recent years, demand for multimedia data such as video has been rapidly increasing on the Internet. However, the rate at which the bandwidth of a channel develops is hard to follow the amount of multimedia data that is rapidly increasing. As part of this trend, Video Coding Expert Group (VCEG) of the International Organization for Standardization (ITU-T) and MPEG (Moving Picture Expert Group) of ISO / IEC are studying video compression standards through cooperative research.

본 발명은 영상의 부호화/복호화에 있어서, 압축 효율을 향상시킬 수 있는 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide an image encoding / decoding method and apparatus capable of improving compression efficiency in image encoding / decoding.

또한, 본 발명은 영상의 부호화/복호화에 있어서, 임의의 영상 영역에 대한 화소 범위를 이용하여 압축 효율을 향상시킬 수 있는 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.It is another object of the present invention to provide an image encoding / decoding method and apparatus capable of improving compression efficiency by using a pixel range for an arbitrary image area in image encoding / decoding.

또한, 본 발명은 본 발명에 따른 영상 부호화 방법/장치에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체를 제공하는 것을 목적으로 한다.It is another object of the present invention to provide a computer-readable recording medium storing a bitstream generated by a video encoding method / apparatus according to the present invention.

본 발명에 따른 영상 복호화 방법은, 현재 블록에 대한 클리핑 범위에 관한 정보를 복호화하는 단계, 및 상기 클리핑 범위에 관한 정보에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 단계를 포함하고, 상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함할 수 있다.The method of decoding an image according to the present invention includes the steps of decoding information on a clipping range for a current block and performing sample adaptive offset (SAO) filtering based on information on the clipping range And information on the clipping range may include information on a maximum value and a minimum value of pixel values included in the current block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 현재 블록에 대한 클리핑 범위에 관한 정보는, 상기 현재 블록 또는 상기 현재 블록을 포함하는 임의의 영역 단위로 전송될 수 있다.In the video decoding method according to the present invention, the information on the clipping range for the current block may be transmitted in units of the current block or an arbitrary region including the current block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 임의의 영역 단위는, 픽쳐 단위, 타일 단위 및 슬라이스 단위 중 적어도 하나를 포함할 수 있다.In the image decoding method according to the present invention, the arbitrary area unit may include at least one of a picture unit, a tile unit, and a slice unit.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 최대값 및 최소값에 대한 정보는, 상기 최대값 및 최소값 중 하나에 대한 정보와 상기 최대값과 최소값의 차이에 대한 정보를 포함할 수 있다.In the image decoding method according to the present invention, the information on the maximum value and the minimum value may include information on one of the maximum value and the minimum value, and information on a difference between the maximum value and the minimum value.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 현재 블록에 대한 SAO 모드가 밴드 오프셋(Band Offset, BO) 모드일 때, 상기 밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점을 복호화하는 단계, 및 상기 밴드 오프셋이 적용되는 밴드 구간에 대한 M개의 오프셋 정보를 복호화하는 단계를 더 포함하고, 상기 M은 상기 복호화된 초기 밴드 지점과 상기 최소값 및 상기 최대값 중 적어도 하나에 기초하여 결정될 수 있다.In the image decoding method according to the present invention, when the SAO mode for the current block is a band offset (BO) mode, decoding an initial band point related to a start position of a band section to which the band offset is applied And decoding M offset information for a band interval to which the band offset is applied, wherein M may be determined based on the decoded initial band point and at least one of the minimum value and the maximum value .

본 발명에 따른 영상 복호화 방법에 있어서, 상기 현재 블록에 대한 SAO 모드가 밴드 오프셋 모드일 때, 상기 최대값과 상기 최소값 사이의 구간을 32개의 밴드로 재구분하는 단계를 더 포함하고, 밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점은 상기 재구분된 32개의 밴드에 대한 지점일 수 있다.The image decoding method according to the present invention may further comprise the step of classifying the interval between the maximum value and the minimum value into 32 bands when the SAO mode for the current block is a band offset mode, The initial band point for the starting position of the applicable band interval may be a point for the 32 reassociated bands.

본 발명에 따른 영상 부호화 방법은, 현재 블록에 대한 클리핑 범위를 결정하는 단계, 상기 클리핑 범위에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 단계, 및 상기 클리핑 범위에 관한 정보를 부호화하는 단계를 포함하고, 상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함할 수 있다.A method of encoding an image according to the present invention includes the steps of: determining a clipping range for a current block; performing sample adaptive offset (SAO) filtering based on the clipping range; And the information on the clipping range may include information on a maximum value and a minimum value of pixel values included in the current block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 현재 블록에 대한 클리핑 범위에 관한 정보는, 상기 현재 블록 또는 상기 현재 블록을 포함하는 임의의 영역 단위로 부호화될 수 있다.In the image encoding method according to the present invention, the information on the clipping range for the current block may be encoded in units of the current block or an arbitrary region including the current block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 임의의 영역 단위는, 픽쳐 단위, 타일 단위 및 슬라이스 단위 중 적어도 하나를 포함할 수 있다.In the image encoding method according to the present invention, the arbitrary area unit may include at least one of a picture unit, a tile unit, and a slice unit.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 최대값 및 최소값에 대한 정보는, 상기 최대값 및 최소값 중 하나에 대한 정보와 상기 최대값과 최소값의 차이에 대한 정보를 포함할 수 있다.In the image encoding method according to the present invention, the information on the maximum value and the minimum value may include information on one of the maximum value and the minimum value, and information on the difference between the maximum value and the minimum value.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 현재 블록에 대한 SAO 모드가 밴드 오프셋(Band Offset, BO) 모드일 때, 상기 밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점을 결정하는 단계, 상기 밴드 오프셋이 적용되는 밴드 구간에 대한 M개의 오프셋 정보를 결정하는 단계, 및 상기 초기 밴드 지점과 상기 M개의 오프셋 정보를 부호화하는 단계를 더 포함하고, 상기 M은 상기 초기 밴드 지점과 상기 최소값 및 상기 최대값 중 적어도 하나에 기초하여 결정될 수 있다.In the image coding method according to the present invention, when the SAO mode for the current block is a band offset (BO) mode, a step of determining an initial band point with respect to a start position of a band section to which the band offset is applied , Determining M offset information for a band interval to which the band offset is applied, and encoding the initial band point and M offset information, wherein M is a value obtained by multiplying the initial band point and the minimum value And the maximum value.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 현재 블록에 대한 SAO 모드가 밴드 오프셋 모드일 때, 상기 최대값과 상기 최소값 사이의 구간을 32개의 밴드로 재구분하는 단계를 더 포함하고, 밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점은 상기 재구분된 32개의 밴드에 대한 지점일 수 있다.In the image encoding method according to the present invention, when the SAO mode for the current block is a band offset mode, the method further comprises re-segmenting the interval between the maximum value and the minimum value into 32 bands, The initial band point for the starting position of the applicable band interval may be a point for the 32 reassociated bands.

본 발명에 따른 영상 복호화 장치는, 현재 블록에 대한 클리핑 범위에 관한 정보를 복호화하는 복호화부, 및 상기 클리핑 범위에 관한 정보에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 필터링부를 포함하고, 상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함할 수 있다.A video decoding apparatus according to the present invention includes: a decoding unit that decodes information on a clipping range of a current block; and a filtering unit that performs sample adaptive offset (SAO) filtering based on the information on the clipping range And the information on the clipping range may include information on the maximum value and the minimum value of the pixel values included in the current block.

본 발명에 따른 영상 부호화 장치는, 현재 블록에 대한 클리핑 범위를 결정하고, 상기 클리핑 범위에 대한 정보를 부호화하는 부호화부, 및 상기 클리핑 범위에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 필터링부를 포함하고, 상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함할 수 있다.An image encoding apparatus according to the present invention includes: an encoding unit that determines a clipping range for a current block and encodes information about the clipping range; and a sample adaptive offset (SAO) filtering And the information on the clipping range may include information on the maximum value and the minimum value of the pixel values included in the current block.

본 발명에 따른 컴퓨터 판독 가능한 기록 매체는, 본 발명에 따른 영상 부호화 방법 또는 영상 부호화 장치에 의해 생성된 비트스트림을 저장할 수 있다.The computer-readable recording medium according to the present invention can store a bitstream generated by the image encoding method or the image encoding apparatus according to the present invention.

본 발명에 따르면, 압축 효율을 향상시킬 수 있는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다. According to the present invention, an image encoding / decoding method and apparatus capable of improving compression efficiency can be provided.

또한, 본 발명에 따르면, 임의의 영상 영역에 대한 화소 범위를 이용하여 압축 효율을 향상시킬 수 있는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.Also, according to the present invention, an image encoding / decoding method and apparatus capable of improving compression efficiency by using a pixel range for an arbitrary image region can be provided.

또한, 본 발명에 따르면, 본 발명에 따른 영상 부호화 방법 또는 영상 부호화 장치에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체를 제공될 수 있다.Also, according to the present invention, there can be provided a video encoding method according to the present invention or a computer readable recording medium storing a bit stream generated by the video encoding apparatus.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한 도면이다.
도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한 도면이다.
도 3은 EO(Edge Offset) 모드를 설명하기 위한 도면이다.
도 4는 BO(Band Offset) 모드를 설명하기 위한 도면이다.
도 5는 영상 부호화 장치(100)에서 SAO 정보를 부호화하는 방법을 설명하기 위한 도면이다.
도 6은 영상 복호화 장치(200)에서 SAO 정보를 복호화하는 방법을 설명하기 위한 도면이다.
도 7은 임의의 영역 내 클리핑 범위와 BO 모드의 이용 가능한 밴드를 설명하기 위한 도면이다.
도 8은 BO 모드의 이용 가능한 밴드 구간을 다시 32개의 밴드 구간으로 세분화한 것을 나타낸 도면이다.
도 9는 임의의 영역 단위의 클리핑 범위를 이용하여 잔차 블록의 계수를 보정하는 방법을 설명하기 위한 도면이다.
도 10은 픽쳐 단위로 클리핑 정보를 부호화하는 방법을 설명하기 위한 도면이다.
도 11은 픽쳐 단위로 클리핑 정보를 복호화하는 방법을 설명하기 위한 도면이다.
도 12는 임의의 블록 단위로 클리핑 정보를 부호화하는 방법을 설명하기 위한 도면이다.
도 13은 임의의 블록 단위로 클리핑 정보를 복호화하는 방법을 설명하기 위한 도면이다.
도 14는 본 발명의 일 실시예에 따라, 클리핑 범위에 기초하여 SAO 정보를 부호화하는 방법을 설명하기 위한 도면이다.
도 15는 본 발명의 실시예에 따라, 클리핑 범위에 기초하여 SAO 정보를 복호화하는 방법을 설명하기 위한 도면이다.
도 16은 본 발명의 또 다른 실시예에 따라, 클리핑 범위에 기초하여 DMVD(Decoder-side Motion Vector Derivation)을 수행하는 과정을 설명하기 위한 도면이다.
도 17은 본 발명의 또 다른 실시예에 따라, 클리핑 범위에 기초하여 디블록킹 필터링을 수행하는 과정을 설명하기 위한 도면이다.
1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
3 is a diagram for explaining the EO (Edge Offset) mode.
4 is a diagram for explaining a BO (Band Offset) mode.
FIG. 5 is a diagram for explaining a method of encoding SAO information in the image encoding apparatus 100. FIG.
FIG. 6 is a diagram for explaining a method of decoding SAO information in the video decoding apparatus 200. FIG.
FIG. 7 is a diagram for explaining an available region clipping range and an available band of the BO mode.
FIG. 8 is a diagram showing the usable band sections of the BO mode subdivided into 32 band sections again.
FIG. 9 is a diagram for explaining a method of correcting coefficients of residual blocks using a clipping range in an arbitrary area unit. FIG.
10 is a diagram for explaining a method of coding clipping information in units of pictures.
11 is a diagram for explaining a method of decoding clipping information on a picture-by-picture basis.
12 is a diagram for explaining a method of encoding clipping information in units of blocks.
13 is a diagram for explaining a method of decoding clipping information in units of blocks.
14 is a diagram for explaining a method of encoding SAO information based on a clipping range according to an embodiment of the present invention.
15 is a diagram for explaining a method of decoding SAO information based on a clipping range according to an embodiment of the present invention.
16 is a diagram for explaining a process of performing DMVD (Decoder-Side Motion Vector Derivation) based on a clipping range according to another embodiment of the present invention.
17 is a diagram for explaining a process of performing deblocking filtering based on a clipping range according to another embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

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

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

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, 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 will be used for the same constituent elements in the drawings, and redundant explanations for the same constituent elements will be 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)를 포함할 수 있다.1, an image encoding apparatus 100 includes an image division unit 101, an intra-frame prediction unit 102, an inter-frame prediction unit 103, a subtraction unit 104, a conversion unit 105, An entropy encoding unit 107, an inverse quantization unit 108, an inverse transformation unit 109, an addition unit 110, a filter unit 111, and a memory 112. [

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

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

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

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

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

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

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

인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction, and a non-directional mode in which direction information is not used in prediction. The mode for predicting the luminance information may be different from the mode for predicting the chrominance information and the intra prediction mode information or predicted luminance signal information used for predicting the luminance information may be utilized to predict the 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 the reference pixels of the current block and can 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 on the basis of the pixel value obtained by interpolating the reference pixel, the reference pixel interpolator 102 interpolates the reference pixel, Lt; / RTI > The reference pixel may not be interpolated in the prediction mode in which the prediction mode of the current prediction unit generates the prediction block without interpolating the reference pixel. The DC filter can 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 residue information that is a difference value between the prediction unit generated by the prediction units 102 and 103 and the original block of the prediction unit can be generated. The generated residual block may be input to the conversion unit 130 and converted.

화면 간 예측부(103)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 화면 간 예측부(103)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter-picture predicting unit 103 may predict a prediction unit based on information of at least one picture of a previous picture or a following picture of the current picture, and may predict a prediction unit based on information of a partially coded area in the current picture The prediction unit may also be predicted. The inter-picture predicting unit 103 may include a reference picture interpolating unit, a motion predicting unit, and a motion compensating unit.

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

모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 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) 방법 등 다양한 방법이 사용될 수 있다. 감산부(104)는, 현재 부호화하려는 블록과 화면 내 예측부(102) 혹은 화면 간 예측부(103)에서 생성된 예측 블록을 감산하여 현재 블록의 잔차 블록을 생성한다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolating unit. Various methods such as Full Search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) can be used as methods for calculating motion vectors. 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 can predict the current prediction unit by making the motion prediction method different. Various methods such as a skip method, a merge method, and an AMVP (Advanced Motion Vector Prediction) method can be used as the motion prediction method. The subtracting unit 104 subtracts the current block to be encoded from the intra prediction unit 102 or the inter prediction unit 103 to generate a residual block of the current block.

변환부(105)에서는 원본 블록과 예측 블록의 차이인 잔차 블록을 변환하여 변환 블록을 생성할 수 있다. 변환 블록은 변환 및 양자화 과정이 수행되는 가장 작은 단위일 수 있다. 변환부(105)는 잔차 신호를 주파수 영역으로 변환하여 변환 계수를 포함하는 변환 블록을 생성할 수 있다. 잔차 데이터를 포함한 잔차 블록을 주파수 영역으로 변환하기 위해 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen Loeve Transform) 등과 같은 변환 방법이 이용될 수 있다. 상기 변환 방법을 이용하여 잔차 신호를 주파수 영역으로 변환함으로써 변환 계수가 생성될 수 있다. 변환을 용이하게 수행하기 위해 기저 벡터(basis vector)를 이용한 행렬 연산이 수행될 수 있다. 예측 블록이 어떤 예측 모드로 부호화되었는지에 따라 행렬 연산 시 변환 방법들을 다양하게 섞어 사용할 수 있다. 예를 들어, 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 인트라 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.The transforming unit 105 can transform the residual block, which is a difference between the original block and the prediction block, to generate a transform block. The transform block may be the smallest unit in which the transform and quantization process is performed. The conversion unit 105 may convert the residual signal into the frequency domain and generate a transform block including the transform coefficient. A transform method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen Loeve Transform) and the like can be used to transform the residual block including the residual data into the frequency domain. The transform coefficients can be generated by transforming the residual signal into the frequency domain using the transform method. Matrix operations using a basis vector may be performed to facilitate the transformation. It is possible to use a variety of conversion methods in a matrix operation depending on which prediction mode the prediction block is encoded. For example, the transform method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, depending on the intra prediction mode, DCT may be used in the horizontal direction, and DST may be used in the vertical direction.

양자화부(106)는 변환부(105)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 즉, 양자화부(106)는 변환부(105)로부터 생성되는 변환 블록의 변환 계수들을 양자화하여 양자화된 변환 계수를 가지는 양자화된 변환 블록(Quantized Transform Coefficient)을 생성할 수 있다. 양자화 방법으로는 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization) 또는 양자화 가중치 행렬 (Quantization Weighted Matrix) 등이 이용될 수 있다. 또는 이를 개량한 양자화 등의 다양한 양자화 방법이 이용될 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(106)에서 산출된 값은 역양자화부(108)와 엔트로피 부호화부(107)에 제공될 수 있다.The quantization unit 106 may quantize the values converted into the frequency domain by the conversion unit 105. That is, the quantization unit 106 may quantize the transform coefficients of the transform block generated from the transform unit 105 to generate a quantized transform coefficient having a quantized transform coefficient. As the quantization method, Dead Zone Uniform Threshold Quantization (DZUTQ) or a Quantization Weighted Matrix may be used. Or various quantization methods such as an improved quantization method can be used. The quantization factor may vary depending on the block or the importance of the image. The values calculated by the quantization unit 106 may be provided to the inverse quantization unit 108 and the entropy coding unit 107. [

상기 변환부(105) 및/또는 양자화부(106)는, 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치(100)는, 잔차 블록의 잔차 데이터에 대해 변환 또는 양자화 중 적어도 하나를 수행하거나, 변환 및 양자화를 모두 스킵하여 잔차 블록을 부호화할 수 있다. 영상 부호화 장치(100)에서 변환 또는 양자화 중 어느 하나가 수행되지 않거나, 변환 및 양자화 모두 수행되지 않더라도, 엔트로피 부호화부(107)의 입력으로 들어가는 블록을 통상적으로 변환 블록이라 일컫는다. The transforming unit 105 and / or the quantizing unit 106 may be selectively included in the image encoding apparatus 100. That is, the image encoding apparatus 100 can perform at least one of conversion or quantization on the residual data of the residual block, or may skip both the conversion and the quantization, thereby encoding the residual block. A block entering the input of the entropy encoding unit 107 is generally referred to as a transform block even though either the transform or the quantization is not performed in the image coding apparatus 100 or both the transform and the quantization are not performed.

엔트로피 부호화부(107)는 입력 데이터를 엔트로피 부호화한다. 엔트로피 부호화부(107)는 양자화된 변환 블록을 부호화하여 비트스트림을 출력할 수 있다. 즉, 엔트로피 부호화부(107)는 양자화부(106)로부터 출력되는 양자화된 변환 블록의 양자화된 변환 계수를 엔트로피 부호화(Entropy Encoding) 등의 다양한 부호화 기법을 이용하여 부호화할 수 있다. 또한 엔트로피 부호화부(107)는 후술하는 영상 복호화 장치에서 해당 블록을 복호화하는데 필요한 부가적인 정보들(예를 들면, 예측 모드에 대한 정보, 양자화 계수 등)을 부호화할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The entropy coding unit 107 entropy-codes the input data. The entropy encoding unit 107 may encode the quantized transform block and output a bit stream. That is, the entropy encoding unit 107 may encode the quantized transform coefficients of the quantized transform block output from the quantization unit 106 using various encoding techniques such as entropy encoding. Further, the entropy encoding unit 107 can encode additional information (e.g., information on a prediction mode, a quantization coefficient, and the like) necessary for decoding the corresponding block in a video decoding apparatus described later. 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 encoding unit 107 receives the residual value coefficient information of the encoding unit and the block type information, the prediction mode information, the division unit information, the prediction unit information, the transmission unit information, the motion vector information, the reference frame information , Block interpolation information, filtering information, and the like. In the entropy encoding unit 107, the coefficient of the transform block is encoded in units of partial blocks in the transform block by encoding a non-zero coefficient, a coefficient having an absolute value of 1 or larger than 2, . The coefficient that is not encoded with only the flag can be encoded through the absolute value of the difference between the coefficient encoded through the flag and the coefficient of the actual conversion block. The inverse quantization unit 108 and the inverse transformation unit 109 dequantize the quantized values in the quantization unit 106 and inversely transform the values converted in the conversion unit 105. The residual value generated in the inverse quantization unit 108 and the inverse transformation unit 109 is predicted through the motion estimation unit, the motion compensation unit and the intra prediction unit 102 included in the prediction units 102 and 103 A reconstructed block can be created by combining with prediction units. The addition unit 110 adds the residual blocks generated through the inverse transform unit 109 to the prediction blocks generated by the prediction units 102 and 103 to generate reconstruction blocks.

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

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

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법(밴드 오프셋 모드, BO 모드) 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법(에지 오프셋 모드, EO 모드)을 사용할 수 있다.The offset correction unit may correct the offset of the deblocked image with respect to the original image in units of pixels. In order to perform offset correction for a specific picture, a method of dividing a pixel included in an image into a predetermined number of regions and determining an area to be offset and applying an offset to the corresponding area (band offset mode, BO mode) A method of applying an offset in consideration of edge information of a pixel (edge offset mode, EO mode) can be used.

ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) can be performed based on a comparison between 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 group may be determined and different filtering may be performed for each group. The information related to whether to apply the ALF may be transmitted for each coding unit (CU), and the shape and the filter coefficient of the ALF filter to be applied may be changed according to each block. Also, an ALF filter of the same type (fixed form) may be applied irrespective of the characteristics of the application target block.

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

상기 화면 내 예측부(102)와 화면 간 예측부(103)는 통칭하여 예측부로 명명될 수 있다. 예측부는 현재 블록의 주변 화소나 이전에 이미 복호화가 완료된 참조 픽쳐를 이용하여 예측 블록을 생성할 수 있다. 예측 블록은 현재 블록 내에서 1개 혹은 그 이상의 예측 블록들이 생성될 수 있다. 현재 블록 내 예측 블록이 1개일 경우, 예측 블록은 현재 블록과 동일한 형태를 가질 수 있다. 예측 블록이 생성되면, 현재 블록과 예측 블록의 차분에 해당하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록에 대해 율-왜곡 최적화(RDO: Rate-Distortion Optimization) 등의 다양한 기법을 적용함으로써, 최적의 예측 모드를 결정할 수 있다. 예를 들어, RDO의 계산을 위해 아래의 수학식 1이 이용될 수 있다.The intra-picture prediction unit 102 and the inter-picture prediction unit 103 may collectively be referred to as a prediction unit. The prediction unit can generate a prediction block using the neighboring pixels of the current block or a reference picture that has been already decoded. The prediction block may generate one or more prediction blocks in the current block. If there is only one intra-block prediction block, the prediction block may have the same shape as the current block. When the prediction block is generated, a residual block corresponding to the difference between the current block and the prediction block can be generated. By applying various techniques such as Rate-Distortion Optimization (RDO) to the generated residual block, the optimal prediction mode can be determined. For example, the following equation 1 can be used for the calculation of RDO.

Figure pat00001
Figure pat00001

상기 수학식 1에서, D(), R() 및 J()는 각각 양자화에 의한 열화, 압축 스트림의 레이트 및 RD 비용을 의미한다. Φ는 부호화 모드를 의미한다. λ는 라그랑지안 승수(Lagranginan multiplier)로 에러의 양과 비트량 간의 단위를 일치시키기 위한 스케일 보정용 계수로 사용된다. 부호화 과정에서 최적의 부호화 모드로 선택되기 위해서는 해당 모드를 적용했을 때의 J() 즉, RD 비용이 다른 모드를 적용했을 때보다 작아야 한다. RD 비용을 계산할 때에는 비트율과 에러가 동시에 고려될 수 있다.In Equation (1), D (), R () and J () denote the deterioration by quantization, the rate of the compressed stream and the RD cost, respectively. Denotes a coding mode. lambda is a Lagrangian multiplier and is used as a scale correction coefficient for matching the unit of error amount and bit amount. In order to select the optimum encoding mode in the encoding process, the J (), that is, the RD cost when the corresponding mode is applied, must be smaller than that when the other modes are applied. Bit rate and error can be considered simultaneously when calculating the RD cost.

도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한 도면이다.2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(201), 역양자화부(202), 역변환부(203), 가산부(204), 필터부(205), 메모리(206) 및 예측부(207, 208)를 포함할 수 있다.2, the image decoding apparatus 200 includes an entropy decoding unit 201, an inverse quantization unit 202, an inverse transformation unit 203, an addition unit 204, a filter unit 205, a memory 206, Prediction units 207 and 208, as shown in FIG.

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

엔트로피 복호화부(201)는 영상 부호화 장치(100)의 엔트로피 부호화부(107)에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(201)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 기반으로 복호화될 수 있다. 상기 플래그만으로 표현되지 않는 계수는, 플래그를 통해 표현되는 계수와 시그날링된 계수의 합을 통해 복호화될 수 있다.The entropy decoding unit 201 can perform entropy decoding in a procedure opposite to that in which the entropy encoding unit 107 of the image encoding apparatus 100 performs entropy encoding. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied in accordance with the method performed by the image encoder. In the entropy decoding unit 201, the coefficient of the transform block is based on a non-zero coefficient, a coefficient having an absolute value of 1 or larger than 2, and various kinds of flags indicating the sign of a coefficient, etc., Lt; / RTI > A coefficient not represented by only the flag can be decoded through a sum of a coefficient represented by a flag and a signaled coefficient.

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

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

역 변환부(203)은 변환 블록에 역 변환을 수행하여 잔차 블록을 생성한다. 이때, 변환 방법은 예측 방법(인터 또는 인트라 예측), 블록의 크기 및/또는 형태, 인트라 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다. 도 1의 역 변환부(109)와 실질적으로 동일하게 동작한다. The inverse transform unit 203 performs inverse transform on the transform block to generate a residual block. At this time, the conversion method can be determined on the basis of the prediction method (inter or intra prediction), the size and / or type of the block, the intra prediction mode, and the like. And operates substantially the same as the inverse conversion unit 109 of Fig.

가산부(204)는, 화면 내 예측부(207) 혹은 화면 간 예측부(208)에서 생성된 예측 블록과 역 변환부(203)를 통해 생성된 잔차 블록를 가산하여 복원 블록을 생성한다. 도 1의 가산부(110)과 실질적으로 동일하게 동작한다.The adding unit 204 adds the residual block generated through the inverse transform unit 203 and the prediction block generated by the intra prediction unit 207 or the inter prediction unit 208 to generate a reconstruction block. And operates substantially the same as the adder 110 of Fig.

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

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

영상 부호화 장치(100)로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치(200)의 디블록킹 필터에서는 영상 부호화 장치(100)에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치(200)에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. When information on whether or not a deblocking filter has been applied to the corresponding block or picture from the image encoding apparatus 100 and a deblocking filter are applied, information on whether a strong filter or a weak filter is applied can be provided. In the deblocking filter of the image decoding apparatus 200, deblocking filter related information provided by the image encoding apparatus 100 may be provided, and the image decoding apparatus 200 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 and the offset value information during encoding.

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

메모리(206)는 가산부(204)에 의해 생성된 복원 블록을 저장한다. 도 1의 메모리(112)와 실질적으로 동일하게 동작한다.The memory 206 stores the restoration block generated by the adder 204. [ And operates substantially the same as the memory 112 of Fig.

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

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

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

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

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

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

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

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

도 3 및 도 4를 참조하여, 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 보상 필터링에 대해 설명한다.Referring to Figures 3 and 4, sample adaptive offset (SAO) compensation filtering is described.

도 3은 EO 모드를 설명하기 위한 도면이다.3 is a diagram for explaining the EO mode.

도 3의 상단 박스(301)에 나타낸 바와 같이, 현재 화소를 중심으로 인접한 화소들간의 경계 방향을 0, 45, 90, 135도의 4가지 방향 정보 중 하나로 분류할 수 있다. 또한, 현재 화소와 인접 화소들 간의 화소 값의 차이에 기초하여, 도 3의 하단 박스(302)에 나타낸 바와 같이, 4가지 범주(카테고리)중 하나로 분류할 수 있다. 도 3의 하단 박스(302)의 각 범주의 화소 색인 x-1은 상단 박스(301)의 각 방향의 주변 화소 1을 의미한다. 마찬가지로, 화소 색인 x는 현재 화소, 화소 색인 x+1은 주변 화소 2를 의미한다. 각 범주 별로 현재 화소에 적용될 오프셋의 부호는 미리 결정되어 있다. 예컨대, 범주 1과 범주 2의 오프셋의 부호는 플러스(+), 범주 3과 범주 4의 오프셋의 부호는 마이너스(-)이다. As shown in the upper box 301 of FIG. 3, the boundary direction between adjacent pixels around the current pixel can be classified into one of four directions information of 0, 45, 90, and 135 degrees. Also, based on the difference in pixel values between the current pixel and the adjacent pixels, it can be classified into one of four categories (categories) as shown in the lower box 302 in Fig. The pixel index x-1 in each category of the lower box 302 in Fig. 3 means the surrounding pixel 1 in each direction of the upper box 301. [ Similarly, the pixel index x means the current pixel, and the pixel index x + 1 means the surrounding pixel 2. The sign of the offset to be applied to the current pixel in each category is predetermined. For example, the sign of the offsets of category 1 and category 2 is plus (+), and the sign of the offsets of category 3 and category 4 is minus (-).

현재 화소 별로 4가지 방향 정보 중 최적의 방향에 대하여, 주변 화소들과의 화소 값의 차이에 따른 형태를 4가지 범주 중에서 찾고, 해당 범주 내의 오프셋 값을 더해줌으로써 필터링이 수행될 수 있다. 만약, 현재 화소와 주변 화소들과의 화소 값의 차이에 따른 형태가 도 3에 도시한 4가지 범주 내에 속하지 않는다면 해당 현재 화소에 대해서는 필터링이 수행되지 않을 수 있다.Filtering can be performed by finding the shape of the optimum direction among the four direction information for each pixel and the shape depending on the difference of the pixel value with neighboring pixels among the four categories and adding the offset value within the corresponding category. If the shape according to the difference of the pixel value between the current pixel and the surrounding pixels does not fall within the four categories shown in FIG. 3, filtering may not be performed on the current pixel.

도 4는 BO 모드를 설명하기 위한 도면이다.4 is a diagram for explaining the BO mode.

BO 모드는 입력 영상의 비트 깊이에 따른 화소의 범위(예를 들면, 8비트 영상의 경우 화소의 범위는 0~255)를 32개의 밴드로 구분하고, 밴드 오프셋의 대상인 4개의 연속된 밴드를 결정한다. 현재 화소값이 4개의 연속된 밴드에 속할 경우, 해당 밴드에 대한 오프셋 값을 현재 화소값에 더해줌으로써 필터링을 수행할 수 있다. In the BO mode, a range of pixels (for example, a pixel range of 0 to 255 in the case of an 8-bit image) is divided into 32 bands according to the bit depth of the input image, and four consecutive bands do. If the current pixel value belongs to four consecutive bands, the filtering can be performed by adding the offset value for the band to the current pixel value.

도 4의 도시된 예에서, 입력 영상의 비트 깊이에 따른 화소 범위를 32개 밴드로 구분한 후, 10~13번 밴드를 밴드 오프셋의 대상으로 결정한다. 현재 화소의 화소 값이 10~13번 밴드 중 하나에 속하면, 해당 밴드에 대한 오프셋 값을 현재 화소의 화소 값에 더해줌으로써 필터링이 수행될 수 있다.In the example shown in FIG. 4, the pixel range according to the bit depth of the input image is divided into 32 bands, and the bands 10 through 13 are determined as the band offset target. If the pixel value of the current pixel belongs to one of the bands 10 to 13, the filtering can be performed by adding the offset value for the band to the pixel value of the current pixel.

도 5는 영상 부호화 장치(100)에서 SAO 정보를 부호화하는 방법을 설명하기 위한 도면이다.FIG. 5 is a diagram for explaining a method of encoding SAO information in the image encoding apparatus 100. FIG.

S501 단계에서는 SAO가 수행되는 부호화 블록(현재 블록)을 기준으로 좌측 부호화 블록 및/또는 상단 부호화 블록의 SAO 정보를 그대로 사용할 것인지 아닌지에 대한 정보(SAO 머지 정보)를 부호화한다. 먼저, SAO Merge_좌측 정보를 부호화하고, 해당 정보가 참이면 SAO Merge_상단 정보는 부호화하지 않고 S502 단계로 이동한다. SAO Merge_좌측 정보가 거짓이라면, SAO Merge_상단 정보를 부호화하고 S502 단계로 이동한다.In step S501, information (SAO merge information) about whether to use the SAO information of the left coded block and / or the upper coded block is used as a reference based on a coding block (current block) on which SAO is performed. First, the SAO Merge_ left information is encoded. If the information is true, the SAO Merge top information is not encoded, and the process moves to step S502. If the SAO Merge_type left information is false, the SAO Merge_type top information is encoded and the process moves to step S502.

S502 단계에서는 SAO Merge_좌측 정보와 SAO Merge_상단 정보가 모두 거짓인지 아닌지를 판단한다. 두 정보가 모두 거짓이면 S503 단계로 이동하고, 하나라도 참이라면 절차를 종료한다. In step S502, it is determined whether the SAO Merge_left information and the SAO Merge_top information are both false or not. If both pieces of information are both false, the process proceeds to step S503. If any of the two pieces of information is true, the process ends.

S503 단계에서는 CIdx라는 정보가 초기값 0으로 설정된다. CIdx가 0이면 휘도(Luma) 성분을 의미하고, CIdx가 1이면 색차(Chroma) Cb 성분, CIdx가 2이면 색차 Cr 성분을 의미한다. 최초 S503 단계에서는 CIdx가 0인지 아닌지를 판단하고 0이면 S504 단계로 이동하고, 0이 아니면 S505 단계로 이동한다. In step S503, the information CIdx is set to an initial value of zero. If CIdx is 0, it means a luminance (Luma) component. If CIdx is 1, it means a chroma Cb component and when CIdx is 2, it means a chrominance chromium component. In step S503, it is determined whether CIdx is 0 or not. If the CIdx is 0, the process proceeds to step S504. Otherwise, the process proceeds to step S505.

S504 단계에서는 루마 성분의 SAO 모드 정보를 부호화한다. SAO 모드 정보는 현재 블록에 대해 EO 모드, BO 모드 및 SAO 비동작 모드 중 어떤 모드를 수행할지에 대한 정보를 의미할 수 있다. In step S504, the SAO mode information of the luma component is encoded. The SAO mode information may be information on which mode of the EO mode, the BO mode, and the SAO non-operation mode is to be performed for the current block.

S505 단계에서는 CIdx가 1인지 아닌지를 판단하고 1이면 S506 단계로 이동하고, 1이 아니면 절차를 종료한다. In step S505, it is determined whether the CIdx is 1 or not. If the CIdx is 1, the process proceeds to step S506. Otherwise, the process is terminated.

S506 단계에서는 크로마 성분의 SAO 모드 정보를 부호화한다. SAO 모드 정보는 현재 블록에 대해 EO 모드, BO 모드 및 SAO 비동작 모드 중 어떤 모드를 수행할지에 대한 정보를 의미할 수 있다. 여기서, 크로마 성분의 Cb, Cr 성분 모두 동일한 SAO 모드 정보를 공유할 수 있다. In step S506, the SAO mode information of the chroma component is encoded. The SAO mode information may be information on which mode of the EO mode, the BO mode, and the SAO non-operation mode is to be performed for the current block. Here, both the Cb and Cr components of the chroma component can share the same SAO mode information.

S507 단계에서는 현재 블록에 대한 SAO 모드가 SAO 비동작 모드이면 S516 단계로 이동하고, 현재 블록에 대한 SAO 모드가 BO 모드 또는 EO 모드이면 S508 단계로 이동한다.In step S507, if the SAO mode for the current block is the SAO non-operation mode, the process moves to step S516. If the SAO mode for the current block is the BO mode or the EO mode, the process moves to step S508.

S508 단계에서는 4개의 오프셋 절대값 정보를 부호화한다. EO 모드의 경우, 4개의 오프셋은 각 범주 별 오프셋을 의미하고, BO 모드의 경우, 4개의 오프셋은 연속된 4개의 각 밴드의 오프셋을 의미한다. In step S508, four pieces of offset absolute value information are encoded. In the case of the EO mode, the four offsets represent the offsets for each category, and in the case of the BO mode, the four offsets represent the offsets of four consecutive bands.

S509 단계에서는 현재 블록에 대한 SAO 모드가 BO 모드인지 아닌지를 판단하고, BO 모드면 S510 단계로 이동하고, BO 모드가 아니면 S512 단계로 이동한다.In step S509, it is determined whether the SAO mode for the current block is the BO mode. If the SA mode is not the BO mode, the process proceeds to step S512.

S510 단계에서는 BO 모드의 4개의 오프셋의 부호(사인) 정보를 부호화한다. In step S510, the sign (sign) information of the four offsets of the BO mode is encoded.

S511 단계에서는 BO 모드의 연속된 4개의 밴드 구간이 어떤 밴드 구간에서 시작하는지를 알려주는 초기 밴드 지점을 부호화한다. In step S511, an initial band point indicating which band section the four consecutive band sections of the BO mode starts is encoded.

S512 단계에서는 CIdx가 0인지 아닌지를 판단하고, 0이면 S513 단계로 이동하고, 0이 아니면 S514 단계로 이동한다.In step S512, it is determined whether CIdx is 0 or not. If it is 0, the process proceeds to step S513. Otherwise, the process proceeds to step S514.

S513 단계에서는 루마 성분의 EO 모드의 방향 정보를 부호화한다. In step S513, direction information of the EO mode of the luma component is encoded.

S514 단계에서는 CIdx가 1인지 아닌지를 판단하고, CIdx가 1이 아니면 절차를 종료하고, 1이라면 S515 단계로 이동한다. In step S514, it is determined whether the CIdx is 1 or not. If the CIdx is not 1, the procedure is terminated. If the CIdx is 1, the process proceeds to step S515.

S515 단계에서는 크로마 성분의 EO 모드의 방향 정보를 부호화한다. 여기서, 크로마 성분의 Cb, Cr 성분 모두 동일한 방향 정보를 공유한다. In step S515, direction information of the EO mode of the chroma component is encoded. Here, both the Cb and Cr components of the chroma component share the same directional information.

S516 단계에서는 현재 CIdx 값을 1 증가시키고 S503 단계로 이동하여 전술한 과정을 반복한다.In step S516, the current CIdx value is incremented by one, and the process proceeds to step S503, and the above-described process is repeated.

도 6은 영상 복호화 장치(200)에서 SAO 정보를 복호화하는 방법을 설명하기 위한 도면이다.FIG. 6 is a diagram for explaining a method of decoding SAO information in the video decoding apparatus 200. FIG.

S601 단계에서는 도 5의 S501 단계에서 부호화된 SAO Merge 정보를 복호화한다. In step S601, the SAO Merge information encoded in step S501 of FIG. 5 is decoded.

S602 단계에서는 SAO Merge_상단 및 SAO Merge_좌측 정보가 모두 거짓인지 아닌지를 판단한다. 두 정보가 모두 거짓이면 S603 단계로 이동하고, 하나라도 참이면 절차를 종료한다. In step S602, it is determined whether the SAO Merge_top and the SAO Merge_left information are both false or not. If both pieces of information are both false, the process goes to step S603, and if any one of them is true, the process ends.

S603 단계에서는 CIdx 값이 0으로 초기화되고, 해당 CIdx 값이 0인지 아닌지를 판단한다. CIdx 값이 0이면 S604 단계로 이동하고, 0이 아니면 S605 단계로 이동한다.In step S603, the CIdx value is initialized to 0, and it is determined whether the corresponding CIdx value is 0 or not. If the CIdx value is 0, the process proceeds to step S604. If the CIdx value is not 0, the process proceeds to step S605.

S604 단계에서는 도 5의 S504 단계에서 부호화된 루마 성분의 SAO 모드 정보를 복호화한다. In step S604, the SAO mode information of the luma component encoded in step S504 of FIG. 5 is decoded.

S605 단계에서는 CIdx가 1인지 아닌지를 판단하고 1이면 S606 단계로 이동하고 1이 아니면 절차를 종료한다.In step S605, it is determined whether the CIdx is 1 or not. If the CIdx is 1, the process proceeds to step S606. Otherwise, the process is terminated.

S606 단계에서는 도 5의 S506 단계에서 부호화된 크로마 성분의 SAO 모드 정보를 복호화한다. 여기서, 크로마 성분의 Cb, Cr 성분 모두 동일한 SAO 모드 정보를 공유할 수 있다.In step S606, the SAO mode information of the chroma component encoded in step S506 of FIG. 5 is decoded. Here, both the Cb and Cr components of the chroma component can share the same SAO mode information.

S607 단계에서는 현재 블록에 대한 SAO 모드가 SAO 비동작 모드이면 S616 단계로 이동하고, 현재 블록에 대한 SAO 모드가 BO 모드 또는 EO 모드이면 S608 단계로 이동한다. In step S607, if the SAO mode for the current block is the SAO non-operation mode, the process moves to step S616. If the SAO mode for the current block is the BO mode or the EO mode, the process moves to step S608.

S608 단계에서는 도 5의 S508 단계에서 부호화된 4개의 오프셋 절대값 정보를 복호화한다. In step S608, the four offset absolute value information encoded in step S508 of FIG. 5 is decoded.

S609 단계에서는 현재 블록에 대한 SAO 모드가 BO 모드인지 아닌지를 판단하고, 현재 블록에 대한 SAO 모드가 BO 모드이면 S610 단계로 이동하고, BO 모드가 아니면 S612 단계로 이동한다. In step S609, it is determined whether the SAO mode for the current block is the BO mode. If the SAO mode for the current block is the BO mode, the process proceeds to step S610. Otherwise, the process proceeds to step S612.

S610 단계에서는 도 5의 S510 단계에서 부호화된 BO 모드의 4개의 오프셋의 부호(사인) 정보를 복호화한다. In step S610, the sign (sign) information of the four offsets of the BO mode encoded in step S510 of FIG. 5 is decoded.

S611 단계에서는 도 5의 S511 단계에서 부호화된 BO 모드의 연속된 4개의 밴드 구간이 어떤 밴드 구간에서 시작하는지를 알려주는 초기 밴드 지점을 복호화한다. In step S611, an initial band point indicating which band section the consecutive four band sections of the BO mode encoded in step S511 of FIG. 5 starts is decoded.

S612 단계에서는 CIdx가 0인지 아닌지를 판단하고, CIdx가 0이면 S613 단계로 이동하고, 0이 아니면 S614 단계로 이동한다. In step S612, it is determined whether CIdx is 0 or not. If CIdx is 0, the process proceeds to step S613. Otherwise, the process proceeds to step S614.

S613 단계에서는 도 5의 S513 단계에서 부호화된 루마 성분의 EO 모드의 방향 정보를 복호화한다. In step S613, the direction information of the EO mode of the luma component encoded in step S513 of FIG. 5 is decoded.

S614 단계에서는 CIdx가 1인지 아닌지를 판단하고, CIdx가 1이 아니면 절차를 종료하고, 1이라면 S615 단계로 이동한다. In step S614, it is determined whether the CIdx is 1 or not. If the CIdx is not 1, the procedure is terminated. If the CIdx is 1, the process proceeds to step S615.

S615 단계에서는 도 5의 S515 단계에서 부호화된 크로마 성분의 EO 모드의 방향 정보를 복호화한다. 여기서, 크로마 성분의 Cb, Cr 성분 모두 동일한 방향 정보를 공유할 수 있다.In step S615, the direction information of the EO mode of the chroma component encoded in step S515 of FIG. 5 is decoded. Here, both Cb and Cr components of the chroma component can share the same directional information.

S616 단계에서는 현재 CIdx 값을 1 증가시키고 S603 단계로 이동하여, 전술한 과정을 반복한다.In step S616, the current CIdx value is incremented by one, and the process moves to step S603, and the above-described process is repeated.

이하의 설명에서, 입력 영상의 비트 깊이는 8비트라고 가정한다.In the following description, it is assumed that the bit depth of the input image is 8 bits.

도 7은 임의의 영역 내 클리핑 범위와 BO 모드의 이용 가능한 밴드를 설명하기 위한 도면이다.FIG. 7 is a diagram for explaining an available region clipping range and an available band of the BO mode.

픽쳐, 타일, 슬라이스 또는 블록 단위 등의 임의의 영역 단위에서 원본 화소의 최대값 및 최소값을 탐색함으로써, 클리핑 범위를 결정할 수 있다. 클리핑 범위는 SAO의 BO 모드의 밴드 구간에 적용할 수 있다. The clipping range can be determined by searching the maximum value and the minimum value of the original pixels in an arbitrary area unit such as a picture, a tile, a slice, or a block unit. The clipping range can be applied to the band section of the BO mode of SAO.

도 7에서, 8비트 깊이를 갖는 입력 영상에 대한 최소 화소값 지점은 0이고, 최대 화소값 지점은 255이다. 임의의 영역 단위로, 해당 영역 내에서 원본 화소값들을 스캔한 후, 해당 영역에 포함된 화소값들의 최대값 및 최소값을 결정할 수 있다. 도 7의 (a)에 도시된 바와 같이, 임의의 영역 내에서 화소값의 최대값은 클리핑 최대값이 되고, 최소값은 클리핑 최소값이 된다. 7, the minimum pixel value point is 0 and the maximum pixel value point is 255 for an input image having an 8-bit depth. It is possible to scan the original pixel values in the corresponding area and then determine the maximum value and the minimum value of the pixel values included in the corresponding area. As shown in Fig. 7 (a), the maximum value of the pixel value within an arbitrary region becomes the clipping maximum value, and the minimum value becomes the clipping minimum value.

상기 클리핑 과정은 영상 부호화 장치(100)에서 예측부(102, 103)를 거친 후, 가산부(110)를 거친 후 및/또는 필터부(111)를 거친 후에 수행될 수 있다. 영상 복호화 장치(200)에서는 예측부(207, 208)를 거친 후, 가산부(204)를 거친 후 및/또는 필터부(205)를 거친 후에 상기 클리핑 과정이 수행될 수 있다. The clipping process may be performed after passing through the predicting units 102 and 103 in the image encoding apparatus 100 and then through the adder 110 and / or the filter unit 111. [ In the video decoding apparatus 200, the clipping process may be performed after passing through the prediction units 207 and 208, after the addition unit 204, and / or after passing through the filter unit 205. [

전술한 SAO BO 모드에서는 전체 화소 구간(0~255)을 32개의 밴드로 구분하고, 필터링이 적용될 연속된 4개의 밴드의 오프셋 정보가 활용된다. 이 때, 클리핑 범위가 전체 화소 범위보다 작으면, 클리핑 범위 내에 있는 밴드만을 고려하여 필터링이 수행될 수 있다. In the above-described SAO BO mode, the entire pixel period (0 to 255) is divided into 32 bands, and offset information of four consecutive bands to be filtered is used. At this time, if the clipping range is smaller than the entire pixel range, filtering can be performed considering only the bands within the clipping range.

도 7의 (b)는 전체 화소 구간을 32개의 밴드로 구분한 것이며, 명암 처리가 된 밴드들은 현재 영역의 클리핑 범위에 대응하는 밴드들로서, BO 모드가 적용될 수 있는 밴드 구간을 나타낸다. FIG. 7 (b) shows the entire pixel period divided into 32 bands, and bands subjected to light and dark processing correspond to the clipping range of the current region, and represent the band periods in which the BO mode can be applied.

도 7의 (b)에서, 1~8번 밴드, 27~32번 밴드에 속하는 현재 영역의 화소는 존재하지 않으므로, 해당 밴드들은 SAO BO 모드의 밴드로서 고려하지 않을 수 있다. 또한, 클리핑 범위 내 최대값과 최소값이 동일할 경우, 도 1 및 도 2를 참조하여 설명한 모든 과정을 거치지 않고, 해당 동일한 값으로 영상을 복원할 수도 있다. 또한, 클리핑 범위 내 최대값과 최소값의 차이가 N(N은 0 이상의 정수) 미만일 경우, 도 1 및 도 2를 참조하여 설명한 모든 과정을 거치지 않고, 클리핑 최대값과 최소값의 평균값 등 임의의 정보를 이용하여 영상을 복원할 수도 있다. 여기서, 해당 N값은 현재 영역의 상위 레벨의 헤더에서 전송될 수 있다. 만약 SAO BO 모드의 이용 가능한 밴드 구간이 4개 미만일 경우, 전송되는 오프셋 값의 개수는 4개 미만일 수 있다.In FIG. 7B, since there are no pixels in the current area belonging to the bands 1 to 8 and 27 to 32, the bands may not be considered as bands in the SAO BO mode. Also, when the maximum value and the minimum value within the clipping range are the same, the image may be restored to the same value without going through all the processes described with reference to FIG. 1 and FIG. If the difference between the maximum value and the minimum value within the clipping range is less than N (N is an integer equal to or greater than 0), any information such as the clipping maximum value and the average value of the minimum value, To restore the image. Here, the corresponding N value can be transmitted in the header of the upper level of the current area. If the available band interval of the SAO BO mode is less than four, the number of transmitted offset values may be less than four.

도 8은 BO 모드의 이용 가능한 밴드 구간을 다시 32개의 밴드 구간으로 세분화한 것을 나타낸 도면이다. FIG. 8 is a diagram showing the usable band sections of the BO mode subdivided into 32 band sections again.

도 8의 (a)에 도시된 바와 같이, 임의의 영역 내 클리핑 범위에 대응하는 BO 모드의 밴드가 밴드 9 내지 밴드 26일 경우, 도 8의 (b)에 도시된 바와 같이, 이용 가능한 밴드(밴드 9 내지 밴드 26)의 구간을 다시 32개의 밴드 구간으로 나눌 수 있다. As shown in Fig. 8 (a), when the band of the BO mode corresponding to the clipping range in an arbitrary region is band 9 to band 26, as shown in Fig. 8 (b) The band 9 to the band 26) can be further divided into 32 band sections.

도 8의 (b)와 같이, 이용 가능한 밴드 구간을 다시 32개의 밴드 구간으로 나누어 부호화/복호화를 수행할 경우, 도 5 및 도 6을 참조하여 설명한 SAO 정보 부호화 및 복호화 알고리즘을 동일하게 이용할 수 있다. 이 경우, 하나의 밴드의 범위를 보다 세분화할 수 있으므로, 보다 정밀한 밴드 오프셋 필터링의 구현이 가능해진다.As shown in FIG. 8B, when encoding / decoding is performed by dividing an available band section into 32 band sections, the SAO information encoding and decoding algorithm described with reference to FIGS. 5 and 6 can be used equally . In this case, since the range of one band can be further subdivided, more precise band offset filtering can be realized.

도 9는 임의의 영역 단위의 클리핑 범위를 이용하여 잔차 블록의 계수를 보정하는 방법을 설명하기 위한 도면이다. 도 9를 참조하여 설명하는 잔차 블록의 계수의 보정은 임의의 영역 단위로 수행되거나 또는 수행되지 않을 수 있다.FIG. 9 is a diagram for explaining a method of correcting coefficients of residual blocks using a clipping range in an arbitrary area unit. FIG. The correction of the coefficients of the residual block described with reference to FIG. 9 may be performed on an arbitrary area basis or may not be performed.

도 9에 있어서, 원본 블록(901), 예측 블록(902), 잔차 블록(903) 및 최종 잔차 블록(904)의 내부 격자에 표시된 숫자는 해당 화소의 화소값을 의미한다. 원본 블록(910)의 화소값에서 예측 블록(902)의 화소값을 감산하여 잔차 블록(903)이 생성된다. 잔차 블록(903)을 보정하여 최종 잔차 블록(904)이 생성된다.9, the numbers displayed in the inner grid of the original block 901, the prediction block 902, the residual block 903, and the final residual block 904 indicate pixel values of the corresponding pixels. A residual block 903 is generated by subtracting the pixel value of the prediction block 902 from the pixel value of the original block 910. [ The residual block 904 is generated by correcting the residual block 903.

원본 블록(901) 또는 원본 블록(901)을 포함하는 임의의 영역 내의 화소값의 촤소값은 50이고, 최대값은 100이라고 가정하면, 원본 블록(901)의 클리핑 범위는 50~100이다. 원본 블록(901)에서 명암 처리가 된 화소는 현재 클리핑 범위의 최대값 또는 최소값을 갖는 화소를 의미한다. Assuming that the minimum value of the pixel values in an arbitrary area including the original block 901 or the original block 901 is 50 and the maximum value is 100, the clipping range of the original block 901 is 50 to 100. A pixel subjected to light-dark processing in the original block 901 means a pixel having a maximum value or a minimum value of the current clipping range.

잔차 블록(903)에 대한 잔차 계수 보정은, 원본 블록(901)의 명암 처리된 화소들의 위치에 해당하는 잔차 블록(903)의 명암 처리된 화소들에 대해 수행될 수 있다. 구체적으로, 잔차 블록(903)의 명암 처리가 되지 않은 잔차 화소들의 화소값의 평균값(도 9에서는 -2)을 계산한다. 이 후, 잔차 블록(903)의 명암 처리된 화소들은 상기 계산된 평균값으로 대체한다. 이러한 과정을 통해, 최종 잔차 블록(904)이 생성될 수 있다. 잔차 계수 보정에 이용되는 평균값 대신에, 최대값, 최소값, 중간값, 최빈값, 가중 평균값 등의 다른 통계적인 수치가 이용될 수도 있다. The residual coefficient correction for the residual block 903 may be performed on the lightened pixels of the residual block 903 corresponding to the positions of the lightened pixels of the original block 901. [ Specifically, an average value (-2 in Fig. 9) of the pixel values of the residual pixels which have not undergone the light and dark processing of the residual block 903 is calculated. Thereafter, the pixels subjected to light and dark processing in the residual block 903 are replaced with the calculated average value. Through this process, a final residual block 904 can be generated. Other statistical values such as maximum value, minimum value, intermediate value, mode value, and weighted average value may be used instead of the average value used for residual coefficient correction.

도 10은 픽쳐 단위로 클리핑 정보를 부호화하는 방법을 설명하기 위한 도면이다.10 is a diagram for explaining a method of coding clipping information in units of pictures.

S1001 단계에서는 현지 픽쳐 단위마다 픽쳐 내 화소값의 최대값 및 최소값을 탐색한다. S1002 단계에서는 해당 최대값 및 최소값을 부호화한다. 최대값 및 최소값은 직접 부호화될 수 있다. 또는, 최소값을 부호화한 후, 최대값과 최소값의 차이값을 부호화할 수도 있다. 또는, 최대값을 부호화한 후, 최대값과 최소값의 차이값을 부호화할 수도 있다. 이 때, 최대값 및 최소값에 대한 부호화 정보는 픽쳐 계층 혹은 슬라이스 계층 등에서 전송될 수도 있다. 상기 픽쳐 단위는 임의의 영역 단위로 변경될 수 있다. 상기 임의의 영역은 슬라이스, 타일, CTU, CU 등일 수 있다.In step S1001, the maximum value and the minimum value of the in-picture pixel values are searched for each local picture unit. In step S1002, the maximum value and the minimum value are encoded. The maximum and minimum values can be directly encoded. Alternatively, after encoding the minimum value, the difference value between the maximum value and the minimum value may be encoded. Alternatively, after coding the maximum value, the difference value between the maximum value and the minimum value may be encoded. At this time, the encoding information for the maximum value and the minimum value may be transmitted in the picture layer, the slice layer, or the like. The picture unit may be changed in an arbitrary area unit. The arbitrary area may be a slice, a tile, a CTU, a CU, or the like.

도 11은 픽쳐 단위로 클리핑 정보를 복호화하는 방법을 설명하기 위한 도면이다. S1101 단계에서는 현재 픽쳐에 대한 최대값 및 최소값에 대한 정보를 복호화할 수 있다. 상기 최대값 및 최소값에 대한 정보는 영상 부호화 장치(100)에서 전송된 전송 단위에 포함될 수 있다. 상기 전송 단위는 픽쳐 계층 혹은 슬라이스 계층일 수 있다. 상기 최대값 및 최소값에 대한 정보는 도 10을 참조하여 설명한 바와 같이 부호화되어 전송될 수 있다. 상기 픽쳐 단위는 임의의 영역 단위로 변경될 수 있다. 상기 임의의 영역은 슬라이스, 타일, CTU, CU 등일 수 있다.11 is a diagram for explaining a method of decoding clipping information on a picture-by-picture basis. In step S1101, information on the maximum and minimum values of the current picture can be decoded. Information on the maximum value and the minimum value may be included in the transmission unit transmitted from the image encoding apparatus 100. The transmission unit may be a picture layer or a slice layer. Information on the maximum value and the minimum value may be encoded and transmitted as described with reference to FIG. The picture unit may be changed in an arbitrary area unit. The arbitrary area may be a slice, a tile, a CTU, a CU, or the like.

도 12는 임의의 블록 단위로 클리핑 정보를 부호화하는 방법을 설명하기 위한 도면이다. S1201 단계에서는 현재 블록 단위마다 블록 내 최대값 및 최소 화소값을 탐색한다. S1202 단계에서는 해당 최대값 및 최소값을 부호화한다. 최대값 및 최소값은 직접 부호화될 수 있다. 또는, 최소값을 부호화한 후, 최대값과 최소값의 차이값을 부호화할 수도 있다. 또는, 최대값을 부호화한 후, 최대값과 최소값의 차이값을 부호화할 수도 있다. 이 때, 최대값 및 최소값에 대한 부호화 정보는 블록 단위로 전송될 수 있다. 상기 블록 단위는 예컨대, 임의의 부호화 블록 단위 혹은 예측 블록 단위 등일 수 있다. 12 is a diagram for explaining a method of encoding clipping information in units of blocks. In step S1201, the intra-block maximum value and the minimum pixel value are searched for each current block unit. In step S1202, the maximum value and the minimum value are encoded. The maximum and minimum values can be directly encoded. Alternatively, after encoding the minimum value, the difference value between the maximum value and the minimum value may be encoded. Alternatively, after coding the maximum value, the difference value between the maximum value and the minimum value may be encoded. At this time, the encoding information for the maximum value and the minimum value can be transmitted in block units. The block unit may be, for example, any encoding block unit or a prediction block unit.

도 13은 임의의 블록 단위로 클리핑 정보를 복호화하는 방법을 설명하기 위한 도면이다. S1301 단계에서는 현재 블록에 대한 최대값 및 최소값에 대한 정보를 복호화할 수 있다. 상기 최대값 및 최소값에 대한 정보는 영상 부호화 장치(100)에서 전송된 전송 단위에 포함될 수 있다. 상기 전송 단위는 임의의 부호화 블록 단위 혹은 예측 블록 단위일 수 있다. 상기 최대값 및 최소값에 대한 정보는 도 12를 참조하여 설명한 바와 같이 부호화되어 전송될 수 있다.13 is a diagram for explaining a method of decoding clipping information in units of blocks. In step S1301, information on the maximum value and the minimum value of the current block can be decoded. Information on the maximum value and the minimum value may be included in the transmission unit transmitted from the image encoding apparatus 100. The transmission unit may be an arbitrary encoding block unit or a prediction block unit. Information on the maximum value and the minimum value may be encoded and transmitted as described with reference to FIG.

도 14는 본 발명의 일 실시예에 따라, 클리핑 범위에 기초하여 SAO 정보를 부호화하는 방법을 설명하기 위한 도면이다.14 is a diagram for explaining a method of encoding SAO information based on a clipping range according to an embodiment of the present invention.

S1401 내지 S1406 단계에 대한 설명은 도 5의 S501 내지 S506 단계의 설명과 동일하다. The description of steps S1401 to S1406 is the same as the description of steps S501 to S506 of Fig.

S1407 단계에서는 현재 블록에 대한 SAO 모드가 SAO 비동작 모드이면 S1417 단계로 이동하고, 현재 블록에 대한 BO 모드 및 EO 모드 중 하나이면 S1408 단계로 이동한다.In step S1407, if the SAO mode for the current block is the SAO non-operation mode, the process moves to step S1417. If the SA mode is one of the BO mode and the EO mode for the current block, the process moves to step S1408.

S1408 단계에서는 현재 블록에 대한 SAO 모드가 BO 모드인지 아닌지를 판단하고, BO 모드이면 S1409 단계로 이동하고, BO 모드가 아니면 S1412 단계로 이동한다. In step S1408, it is determined whether or not the SAO mode for the current block is the BO mode. If the SA mode is the BO mode, the process proceeds to step S1409. Otherwise, the process proceeds to step S1412.

S1409 단계에서는 BO 모드의 연속된 밴드 구간이 어떤 밴드 구간에서 시작하는지를 알려주는 초기 밴드 지점을 부호화한다. In step S1409, an initial band point indicating which band section the consecutive band section of the BO mode starts is encoded.

S1410 단계에서는 BO 모드를 위한 M개의 오프셋 절대값 정보를 부호화한다. 전술한 바와 같이, 클리핑 범위에 따라 BO 모드의 이용 가능한 밴드 구간도 변경될 수 있다. 따라서, 초기 밴드 지점에 따라 전송되어야 할 오프셋의 개수가 달라질 수 있다. 또는, 이용 가능한 밴드 개수에 따라 전송되어야 할 오프셋의 개수가 달라질 수도 있다. 상기 M은 전송되어야 할 오프셋의 개수를 의미하며, 이는 클리핑 범위에 따라 달라질 수 있다. 예를 들어, 도 7에 도시된 예에서, 만약 초기 밴드 지점이 25번 밴드일 경우, 이용 가능한 밴드는 25번 밴드와 26번 밴드의 2개이므로, 오프셋 값은 2개만을 전송할 수 있다. In step S1410, M offset absolute value information for the BO mode is encoded. As described above, the available band interval of the BO mode can also be changed according to the clipping range. Accordingly, the number of offsets to be transmitted may vary depending on the initial band point. Alternatively, the number of offsets to be transmitted may vary depending on the number of available bands. The M means the number of offsets to be transmitted, which may vary depending on the clipping range. For example, in the example shown in FIG. 7, if the initial band point is the 25th band, since the available bands are the 25th band and the 26th band, only the offset value can be transmitted.

S1411 단계에서는 S1410 단계에서 전송된 오프셋의 개수(M)만큼 오프셋들의 부호 정보를 부호화한다. In step S1411, the sign information of the offsets is encoded by the number M of offsets transmitted in step S1410.

S1412 단계에서는 CIdx가 0인지 아닌지 판단하고, 0이면 S1413 단계로 이동하고, 0이 아니면 S1415 단계로 이동한다. In step S1412, it is determined whether CIdx is 0 or not. If it is 0, the process proceeds to step S1413. Otherwise, the process proceeds to step S1415.

S1413 단계에서는 EO 모드에서 사용되는 4개의 오프셋 절대값 정보를 부호화한다. In step S1413, four pieces of offset absolute value information used in the EO mode are encoded.

S1414 단계에서는 루마 성분의 EO 모드의 방향 정보를 부호화한다. In step S1414, direction information of the EO mode of the luma component is encoded.

S1415 단계에서는 CIdx가 1인지 아닌지 판단하고, 1이 아니면 절차를 종료하고, 1이면 S1416 단계로 이동한다.In step S1415, it is determined whether the CIdx is 1 or not. If the CIdx is not 1, the procedure is terminated. If the CIdx is 1, the process proceeds to step S1416.

S1416 단계에서는 크로마 성분의 EO 모드의 방향 정보를 부호화한다. 여기서, 크로마 성분의 Cb, Cr 성분 모두 동일한 방향 정보를 공유할 수 있다. In step S1416, direction information of the EO mode of the chroma component is encoded. Here, both Cb and Cr components of the chroma component can share the same directional information.

S1417 단계에서는 CIdx의 값을 1 증가시키고 S1403 단계로 이동하여 전술한 과정을 반복한다.In step S1417, the value of CIdx is incremented by one, and the process moves to step S1403 to repeat the above-described process.

도 15는 본 발명의 실시예에 따라, 클리핑 범위에 기초하여 SAO 정보를 복호화하는 방법을 설명하기 위한 도면이다.15 is a diagram for explaining a method of decoding SAO information based on a clipping range according to an embodiment of the present invention.

S1501 내지 S1506 단계에 대한 설명은 도 6의 S601 내지 S606 단계의 설명과 동일하다. The description of steps S1501 to S1506 is the same as the description of steps S601 to S606 in Fig.

S1507 단계에서는 현재 블록에 대한 SAO 모드가 SAO 비동작 모드이면 S1517 단계로 이동하고, 현재 블록에 대한 SAO 모드가 BO 모드 또는 EO 모드이면 S1508 단계로 이동한다.In step S1507, if the SAO mode for the current block is the SAO non-operation mode, the process moves to step S1517. If the SAO mode for the current block is the BO mode or the EO mode, the process moves to step S1508.

S1508 단계에서는 현재 블록에 대한 SAO 모드가 BO 모드인지 아닌지 판단하고, BO 모드이면 S1509 단계로 이동하고, BO 모드가 아니면 S1512 단계로 이동한다.In step S1508, it is determined whether or not the SAO mode for the current block is the BO mode. If the SA mode is the BO mode, the process proceeds to step S1509. Otherwise, the process proceeds to step S1512.

S1509 단계에서는 도 14의 S1409 단계에서 부호화된 BO 모드의 초기 밴드 지점을 복호화한다. In step S1509, the initial band point of the BO mode encoded in step S1409 of FIG. 14 is decoded.

S1510 단계에서는 도 14의 S1410 단계에서 부호화된 BO 모드를 위한 M개의 오프셋 절대값 정보를 복호화한다. In step S1510, M offset absolute value information for the BO mode encoded in step S1410 of FIG. 14 is decoded.

1511 단계에서는 도 14의 S1411 단계에서 부호화된 M개의 오프셋 부호 정보를 복호화한다. In step 1511, M pieces of offset code information encoded in step S1411 of FIG. 14 are decoded.

S1512 단계에서는 CIdx가 0인지 아닌지 판단하고, 0이면 S1513 단계로 이동하고, 0이 아니면 S1515 단계로 이동한다.In step S1512, it is determined whether CIdx is 0 or not. If it is 0, the process proceeds to step S1513. Otherwise, the process proceeds to step S1515.

S1513 단계에서는 도 14의 S1413 단계에서 부호화된 EO 모드에서 사용되는 4개의 오프셋 절대값 정보를 복호화한다. In step S1513, the four offset absolute value information used in the EO mode encoded in step S1413 of FIG. 14 is decoded.

S1514 단계에서는 도 14의 S1414 단계에서 부호화된 루마 성분의 EO 모드의 방향 정보를 복호화한다. In step S1514, the direction information of the EO mode of the luma component encoded in step S1414 of FIG. 14 is decoded.

S1515 단계에서는 CIdx가 1인지 아닌지 판단하고, 1이 아니면 절차를 종료하고, 1이면 S1516 단계로 이동한다.In step S1515, it is determined whether the CIdx is 1 or not. If the CIdx is not 1, the procedure is terminated. If the CIdx is 1, the process proceeds to step S1516.

S1516 단계에서는 크로마 성분의 EO 모드의 방향 정보를 복호화한다. 여기서, 크로마 성분의 Cb, Cr 성분 모두 동일한 방향 정보를 공유할 수 있다.In step S1516, direction information of the EO mode of the chroma component is decoded. Here, both Cb and Cr components of the chroma component can share the same directional information.

S1517 단계에서는 CIdx의 값을 1 증가시키고, S1503 단계로 이동하여 전술한 과정을 반복한다.In step S1517, the value of CIdx is incremented by one, and the process moves to step S1503, and the above-described process is repeated.

도 16은 본 발명의 또 다른 실시예에 따라, 클리핑 범위에 기초하여 DMVD(Decoder-side Motion Vector Derivation)을 수행하는 과정을 설명하기 위한 도면이다.16 is a diagram for explaining a process of performing DMVD (Decoder-Side Motion Vector Derivation) based on a clipping range according to another embodiment of the present invention.

일반적으로 영상 부호화 장치는 움직임 벡터에 관한 정보를 부호화하고, 이를 비트스트림에 포함시켜 영상 복호화 장치에 전송한다. 영상 복호화 장치는 비트스트림을 복호화함으로써 움직임 벡터를 복원할 수 있다. DMVD의 경우, 움직임 벡터에 관한 정보를 비트스트림에 명시적으로 부호화하는 대신, 영상 복호화 장치 측에서 소정의 알고리즘을 이용하여 움직임 벡터에 관한 정보를 유도할 수 있다. 예컨대, 상기 소정의 알고리즘은 템플릿 매칭 알고리즘(template matching algorithm)일 수 있다. Generally, an image encoding apparatus encodes information on a motion vector, and encodes the information into a bit stream and transmits the encoded image to a video decoding apparatus. The video decoding apparatus can recover a motion vector by decoding a bitstream. In the case of DMVD, instead of explicitly encoding the information on the motion vector in the bitstream, the image decoding apparatus can derive information on the motion vector using a predetermined algorithm. For example, the predetermined algorithm may be a template matching algorithm.

본 발명에 따르면, 영상 복호화 장치는 클리핑 특성에 기초하여 DMVD를 수행할 수 있다. 예컨대, 현재 블록 또는 현재 블록이 속한 영역과 동일하거나 유사한 클리핑 특성을 갖는 참조 픽쳐 내 영역을 식별함으로써, DMVD를 효율적으로 수행할 수 있다. 상기 클리핑 특성은 클리핑 범위를 의미할 수 있으나 이에 한정되지 않으며, 클리핑 범위로부터 유도되는 클리핑에 관한 다양한 정보를 포함할 수 있다. According to the present invention, the image decoding apparatus can perform DMVD based on clipping characteristics. For example, DMVD can be efficiently performed by identifying the reference picture area having the same or similar clipping characteristics as the current block or the area to which the current block belongs. The clipping property may mean, but is not limited to, a clipping range and may include various information regarding clipping derived from the clipping range.

보다 구체적으로, DMVD를 수행하기 위해서는 초기 움직임 벡터를 결정할 필요가 있는데, 초기 움직임 벡터 결정시에 클리핑 특성이 고려될 수 있다. 도 16에 도시된 예에서, 현재 블록의 클리핑 특성이 B인 경우, 참조 픽쳐 내 영역 중 클리핑 특성이 B인 영역들을 식별하고, 이들 영역들에 기초하여 초기 움직임 벡터(제1 또는 제2 초기 움직임 벡터)를 결정할 수 있다. More specifically, in order to perform the DMVD, it is necessary to determine an initial motion vector, and clipping characteristics can be considered in initial motion vector determination. In the example shown in FIG. 16, when the clipping property of the current block is B, regions of the reference picture in which the clipping property is B are identified, and an initial motion vector (first or second initial motion Vector) can be determined.

유사한 블록은 클리핑 특성도 유사하므로, 본 발명에 따를 경우 매우 높은 확률로 최적의 초기 움직임 벡터를 결정할 수 있다. 따라서, 본 발명에 따를 경우, DMVD를 수행하는 영상 복호화 장치의 움직임 추정의 복잡도를 현저히 저감시킬 수 있다.Since similar blocks have similar clipping characteristics, according to the present invention, an optimal initial motion vector can be determined with a very high probability. Therefore, according to the present invention, the complexity of motion estimation of the image decoding apparatus performing DMVD can be remarkably reduced.

본 발명의 또 다른 실시예에 따르면, 클리핑 특성을 엔트로피 부호화 및/또는 복호화에 이용함으로써, 신택스 요소의 엔트로피 부호화 효율을 향상시킬 수 있다. 구체적으로, 임의의 영상 영역의 클리핑 특성을 고려하여, 소정의 신택스 요소의 초기 확률을 적응적으로 선택할 수 있다. According to another embodiment of the present invention, the entropy encoding efficiency of the syntax element can be improved by using the clipping characteristic for entropy encoding and / or decoding. Specifically, the initial probability of a predetermined syntax element can be adaptively selected in consideration of clipping characteristics of an arbitrary video region.

예컨대, 부호화 블록의 클리핑 범위가 넓은 경우, 즉, 최대값과 최소값의 차이가 큰 경우, 해당 부호화 블록의 예측 정확도는 상대적으로 낮다. 예측 정확도가 상대적으로 낮으면, 잔차 블록이 0이 아닌 변환 계수를 포함할 확률이 높아지므로, 해당 부호화 블록의 CBF_Flag는 “1”일 확률이 “0”일 확률보다 상대적으로 높다.For example, when the clipping range of the encoded block is wide, that is, when the difference between the maximum value and the minimum value is large, the prediction accuracy of the encoded block is relatively low. If the prediction accuracy is relatively low, the probability that the residual block includes a non-zero transform coefficient increases, and therefore, the probability of CBF_Flag of the corresponding encoded block being "1" is relatively higher than the probability of being "0".

반대로, 부호화 블록의 클리핑 범위가 좁은 경우, 즉, 최대값과 최소값의 차이가 작은 경우, 해당 부호화 블록의 예측 정확도는 상대적으로 높다. 예측 정확도가 상대적으로 높으면, 잔차 블록이 0이 아닌 변환 계수를 포함할 확률이 낮아지므로, 해당 부호화 블록의 CBF_Flag는 “0”일 확률이 “1”일 확률보다 상대적으로 높다.On the contrary, when the clipping range of the encoding block is narrow, that is, when the difference between the maximum value and the minimum value is small, the prediction accuracy of the encoding block is relatively high. If the prediction accuracy is relatively high, the probability that the residual block includes a non-zero transform coefficient is low, so that the probability of CBF_Flag of the corresponding encoding block being "0" is relatively higher than the probability of being "1".

이러한 통계적 특성을 고려하여, 클리핑 범위가 넓은 부호화 블록에 대해서는 CBF_Flag가 “1”일 확률이 상대적으로 높은 초기 확률 정보를 사용할 수 있다. 반대로, 클리핑 범위가 좁은 부호화 블록에 대해서는 CBF_Flag가 “0”일 확률이 상대적으로 높은 초기 확률 정보를 사용할 수 있다.In consideration of such statistical characteristics, initial probability information having a relatively high probability that CBF_Flag is " 1 " can be used for an encoding block having a wide clipping range. Conversely, for an encoding block with a narrow clipping range, initial probability information having a relatively high probability that CBF_Flag is " 0 " can be used.

상기 CBF_Flag는 해당 블록 내에 0이 아닌 변환 계수가 포함되어 있는지를 지시하는 플래그일 수 있다. CBF_Flag가 1이면, 해당 블록은 0이 아닌 변환 계수를 적어도 하나 포함하는 것을 의미한다. CBF_Flag가 0이면, 해당 블록은 0이 아닌 변환 계수를 포함하지 않는 것을 의미한다.The CBF_Flag may be a flag indicating whether a non-zero conversion coefficient is included in the corresponding block. When CBF_Flag is 1, the corresponding block includes at least one non-zero transform coefficient. If CBF_Flag is 0, it means that the block does not contain non-zero transform coefficients.

또 다른 예로서, 부호화 블록의 클리핑 범위가 넓은 경우, 해당 부호화 블록에 대해서는 화면간 예측이 상대적으로 높은 예측 정확도를 가진다. 따라서, 해당 부호화 블록의 PredModeFlag는 “1”일 확률이 “0”일 확률보다 상대적으로 높다.As another example, when the clipping range of a coded block is wide, inter prediction between the coded blocks has a relatively high prediction accuracy. Therefore, the PredModeFlag of the coded block is relatively higher than the probability that it is " 1 "

반대로, 부호화 블록의 클리핑 범위가 좁은 경우, 해당 부호화 블록에 대해서는 화면내 예측이 상대적으로 높은 예측 정확도를 가진다. 따라서, 해당 부호화 블록의 PredModeFlag는 “0”일 확률이 “1”일 확률보다 상대적으로 높다.On the contrary, when the clipping range of the encoded block is narrow, the intra prediction has a relatively high prediction accuracy for the encoded block. Therefore, the PredModeFlag of the coded block is relatively higher than the probability that it is " 0 "

이러한 통계적 특성을 고려하여, 클리핑 범위가 넓은 부호화 블록에 대해서는 PredModeFlag가 “1”일 확률이 상대적으로 높은 초기 확률 정보를 사용할 수 있다. 반대로, 클리핑 범위가 좁은 부호화 블록에 대해서는 PredModeFlag가 “0”일 확률이 상대적으로 높은 초기 확률 정보를 사용할 수 있다.In consideration of such statistical characteristics, initial probability information having a relatively high probability that PredModeFlag is " 1 " can be used for an encoding block having a wide clipping range. Conversely, for an encoding block with a narrow clipping range, initial probability information having a relatively high probability that PredModeFlag is " 0 " can be used.

상기 PredModeFlag는 해당 블록에 적용된 예측 방법을 지시하는 플래그일 수 있다. PredModeFlag가 1이면, 해당 블록에 대해 화면간 예측이 적용된 것을 의미한다. PredModeFlag가 0이면, 해당 블록에 대해 화면내 예측이 적용된 것을 의미한다.The PredModeFlag may be a flag indicating a prediction method applied to the block. If PredModeFlag is 1, it means that inter-picture prediction is applied to the corresponding block. If PredModeFlag is 0, it means that intra prediction is applied to the block.

상기와 같이, 클리핑 범위에 관한 특성을 고려하여, 소정의 신택스 요소의 컨텍스트를 최적화할 수 있다. 상기 소정의 신택스 요소는 CBF_Flag와 PredModeFlag로 한정되지 않으며, 다른 신택스 요소에 대해서도 클리핑 범위에 따른 적응적인 컨텍스트 확률의 적용이 가능하다.As described above, the context of a predetermined syntax element can be optimized in consideration of the characteristics related to the clipping range. The predetermined syntax element is not limited to CBF_Flag and PredModeFlag, and an adaptive context probability can be applied to other syntax elements according to the clipping range.

도 17은 본 발명의 또 다른 실시예에 따라, 클리핑 범위에 기초하여 디블록킹 필터링을 수행하는 과정을 설명하기 위한 도면이다.17 is a diagram for explaining a process of performing deblocking filtering based on a clipping range according to another embodiment of the present invention.

도 17에 도시된 바와 같이, A 블록과 B 블록이 경계를 두고 인접하고 있다. A 블록의 클리핑 범위는 50 내지 160이고, B 블록의 클리핑 범위는 90 내지 200으로 가정한다. 도 17에 도시된 예에서, A 블록의 클리핑 범위와 B 블록의 클리핑 범위는 90 내지 160의 범위에서 겹친다.As shown in Fig. 17, the A block and the B block are adjacent to each other with a boundary therebetween. The clipping range of the A block is 50 to 160 and the clipping range of the B block is 90 to 200. [ In the example shown in Fig. 17, the clipping range of the A block and the clipping range of the B block are overlapped in the range of 90 to 160.

본 발명에 따르면, A 블록의 클리핑 범위와 B 블록의 클리핑 범위의 특성을 고려하여 디블록킹 필터링을 적응적으로 수행한다. 보다 구체적으로, A 블록의 클리핑 범위와 B 블록의 클리핑 범위의 겹침 정보에 기초하여 디블록킹 필터링을 적으로 수행한다.According to the present invention, deblocking filtering is adaptively performed considering characteristics of the clipping range of the A block and the clipping range of the B block. More specifically, the deblocking filtering is performed based on the overlap information of the clipping range of the A block and the clipping range of the B block.

예컨대, A 블록의 클리핑 범위와 B 블록의 클리핑 범위가 겹치지 않는 경우, 두 블록은 서로 상이한 영역에 포함된 블록이므로, 두 블록 사이의 경계를 필터링하는 것이 바람직하지 않다. 따라서, 이러한 경우, A 블록과 B 블록 사이의 경계에 대해서는 필터링을 수행하지 않을 수 있다. 또는, 필터링을 수행하더라도, 필터링 대상 화소와 동일 블록에 속하는 화소에 대한 필터링 계수를 높게(또는 극단적으로 높게) 설정하여, 인접 블록 내의 화소에 의한 영향을 줄일 수 있다.For example, when the clipping range of the A block and the clipping range of the B block do not overlap, it is not preferable to filter the boundary between the two blocks because the two blocks are included in different areas. Therefore, in such a case, filtering may not be performed on the boundary between the A block and the B block. Alternatively, even if the filtering is performed, the filtering coefficient for pixels belonging to the same block as the pixel to be filtered can be set to be high (or extremely high), and the influence of the pixels in the adjacent block can be reduced.

A 블록의 클리핑 범위와 B 블록의 클리핑 범위가 부분적으로 겹치는 경우, 필터링 대상 화소와 동일 블록에 속하는 화소에 대한 필터링 계수를 높게 설정할 수 있다. 필터링 계수를 얼마나 높게 설정할 지의 여부는 클리핑 범위의 겹침 정도에 따라 적응적으로 결정될 수 있다. 예컨대, 클리핑 범위의 겹침 정도가 낮아질수록, 필터링 대상 화소와 동일 블록에 속하는 화소에 대한 필터링 계수를 높게 설정할 수 있다.When the clipping range of the A block and the clipping range of the B block partially overlap, the filtering coefficient for the pixel belonging to the same block as the pixel to be filtered can be set high. Whether or not the filtering coefficient is set to be high can be determined adaptively according to the overlap degree of the clipping range. For example, as the overlapping degree of the clipping range is lower, the filtering coefficient for pixels belonging to the same block as the pixel to be filtered can be set higher.

본 발명의 또 다른 실시예에 따르면, 클리핑 특성을 고려하여, 예측 모드를 제한적으로 이용할 수 있다. According to another embodiment of the present invention, the prediction mode can be limitedly used in consideration of clipping characteristics.

예컨대, 부호화 블록의 클리핑 범위가 넓은 경우, 해당 부호화 블록에 대해서는 화면내 예측 및 화면간 예측의 모든 예측이 가능한 것으로 결정할 수 있다.For example, when the clipping range of the encoding block is wide, it can be determined that all predictions of intra-picture prediction and inter-picture prediction are possible for the coded block.

반대로, 부호화 블록의 클리핑 범위가 좁은 경우, 해당 부호화 블록에 대해서는 화면내 예측의 경우, DC 모드 또는 Planar 모드만이 적용 가능하거나 및/또는 화면간 예측의 경우 머지 모드만이 적용 가능한 것으로 결정할 수 있다.On the other hand, when the clipping range of the coded block is narrow, it can be determined that only DC mode or Planar mode is applicable to the coded block in the case of intra-picture prediction and / or only merge mode is applicable in case of inter-picture prediction .

화면내 예측 모드의 적용에 있어서도, 상단 인접 블록의 클리핑 특성과 현재 블록의 클리핑 특성이 유사하면, 상단 인접 블록의 화소를 참조하는 화면내 예측을 수행할 수 있다. 반대로, 좌측 인접 블록의 클리핑 특성과 현재 블록의 클리핑 특성이 유사하면, 좌측 인접 블록의 화소를 참조하는 화면내 예측을 수행할 수 있다.In the intra-picture prediction mode, intra-picture prediction referring to the pixels of the uppermost adjacent block can be performed if the clipping characteristics of the upper adjacent block and the clipping characteristics of the current block are similar. Conversely, if the clipping characteristics of the left adjacent block are similar to the clipping characteristics of the current block, intra prediction can be performed referring to the pixels of the left adjacent block.

전술한 실시예에 있어서, 클리핑 범위가 넓은지 또는 좁은지의 판단(광협의 판단)은 클리핑 범위를 소정의 임계치와 비교함으로써 수행될 수 있다. 소정의 임계치는 비트스트림을 통해 시그널링되거나, 영상 부호화 장치와 영상 복호화 장치에서 기 약속된 임계치를 이용할 수 있다. 상기 소정의 임계치는 클리핑 범위가 넓은지 여부를 판단하기 위한 제1 임계치와 클리핑 범위가 좁은지 여부를 판단하기 위한 제2 임계치를 포함할 수 있다. 클리핑 범위가 제1 임계치와 제2 임계치의 사이에 위치하는 경우, 본 발명에 따른 상기 실시예들이 적용되지 않을 수 있다.In the above-described embodiment, determination of whether the clipping range is wide or narrow (determination of the wide-angle) can be performed by comparing the clipping range with a predetermined threshold value. The predetermined threshold value may be signaled through a bitstream, or a predetermined threshold value may be used in the image encoding apparatus and the image decoding apparatus. The predetermined threshold value may include a first threshold value for determining whether the clipping range is wide or a second threshold value for determining whether the clipping range is narrow. When the clipping range is located between the first threshold and the second threshold, the embodiments according to the present invention may not be applied.

전술한 실시예에 있어서, 클리핑 범위의 겹침 정도에 대한 판단은 소정의 임계치와의 비교에 의해 수행될 수 있다. 소정의 임계치는 비트스트림을 통해 시그널링되거나, 영상 부호화 장치와 영상 복호화 장치에서 기 약속된 임계치를 이용할 수 있다. 상기 클리핑 범위의 겹침 정도는 각 블록의 클리핑 범위가 넓은지 또는 좁은지의 판단에 따라 적응적으로 결정될 수 있다. 예컨대, A 블록 및/또는 B 블록의 각각의 클리핑 범위가 좁은 경우, 두 블록의 클리핑 범위가 상대적으로 좁더라도, 많이 겹치는 것으로 판단할 수 있다. 반대로, A 블록 및/또는 B 블록의 각각의 클리핑 범위가 넓은 경우, 두 블록의 클리핑 범위가 상대적으로 넓더라도, 적게 겹치는 것으로 판단할 수 있다.In the above embodiment, determination of the degree of overlapping of the clipping range can be performed by comparison with a predetermined threshold value. The predetermined threshold value may be signaled through a bitstream, or a predetermined threshold value may be used in the image encoding apparatus and the image decoding apparatus. The degree of overlapping of the clipping range can be determined adaptively according to whether the clipping range of each block is wide or narrow. For example, when the clipping range of each of the A block and / or the B block is narrow, even if the clipping range of the two blocks is relatively narrow, it can be determined that they overlap a lot. Conversely, when the clipping range of each of the A block and / or the B block is wide, even if the clipping range of the two blocks is relatively wide, it can be determined that the overlap is small.

전술한 실시예에 있어서, 클리핑 범위의 유사 여부에 대한 판단은 클리핑 범위의 광협 및 클리핑 범위의 겹침 정도 중 적어도 하나에 의해 결정될 수 있다.In the above-described embodiment, the determination as to whether or not the clipping range is similar may be determined by at least one of the degree of clipping of the clipping range and the degree of overlap of the clipping range.

전술한 실시예에 있어서, 클리핑 범위는 임의의 영역 단위로 전송되는 클리핑 범위에 관한 정보를 복호화함으로써 유도될 수 있다. 그러나, 클리핑 범위에 관한 정보가 전송되지 않더라도 클리핑 범위를 이용하는 본 개시의 다양한 실시예를 변형함으로써 실질적으로 유사한 효과를 기대할 수 있다. 예컨대, 전술한 실시예에 있어서, 클리핑 범위가 유도되어야할 영역에 포함된 화소의 최대값 및/또는 최소값을 탐색함으로써 해당 영역의 클리핑 범위를 결정할 수 있다. 보다 구체적으로, 도 17을 참조하여 설명한 실시예에서, A 블록 및/또는 B 블록의 복원된 화소의 최대값 및/또는 최소값을 탐색함으로써, A 블록 및/또는 B 블록의 클리핑 범위를 결정할 수 있다. 상기와 같이 결정된 클리핑 범위는 클리핑 범위에 관한 정보를 복호화하여 유도된 클리핑 범위와 동일하게 사용될 수 있다.In the above-described embodiment, the clipping range can be derived by decoding information on the clipping range transmitted in arbitrary area units. However, substantially similar effects can be expected by modifying the various embodiments of the present disclosure utilizing the clipping range, even though information about the clipping extent is not transmitted. For example, in the above-described embodiment, the clipping range of the area can be determined by searching the maximum value and / or the minimum value of the pixels included in the area to which the clipping range is to be induced. More specifically, in the embodiment described with reference to Fig. 17, the clipping range of the A block and / or the B block can be determined by searching the maximum value and / or the minimum value of the restored pixel of the A block and / or the B block . The clipping range determined as described above may be used in the same manner as the clipping range derived by decoding information on the clipping range.

본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.Although the exemplary methods of this disclosure are represented by a series of acts for clarity of explanation, they are 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, the illustrative steps may additionally include other steps, include the remaining steps except for some steps, or may include additional steps other than some steps.

본 개시의 다양한 실시예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the disclosure are not intended to be all-inclusive and are intended to be illustrative of the typical aspects of the disclosure, and the features described in the various embodiments may be applied independently or in a 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. In the case of hardware implementation, 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 A general processor, a controller, a microcontroller, a microprocessor, and the like.

본 개시의 범위는 다양한 실시예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure is to be accorded the broadest interpretation as understanding of the principles of the invention, as well as software or machine-executable instructions (e.g., operating system, applications, firmware, Instructions, and the like are stored and are non-transitory computer-readable medium executable on the device or computer.

Claims (15)

현재 블록에 대한 클리핑 범위에 관한 정보를 복호화하는 단계; 및
상기 클리핑 범위에 관한 정보에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 단계를 포함하고,
상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함하는 영상 복호화 방법.
Decoding information about a clipping range for a current block; And
Performing sample adaptive offset (SAO) filtering based on information about the clipping range,
Wherein the information on the clipping range includes information on a maximum value and a minimum value of pixel values included in a current block.
제1항에 있어서,
상기 현재 블록에 대한 클리핑 범위에 관한 정보는,
상기 현재 블록 또는 상기 현재 블록을 포함하는 임의의 영역 단위로 전송되는 영상 복호화 방법.
The method according to claim 1,
Wherein the information on the clipping range for the current block includes:
And the current block or the current block.
제2항에 있어서,
상기 임의의 영역 단위는,
픽쳐 단위, 타일 단위 및 슬라이스 단위 중 적어도 하나를 포함하는 영상 복호화 방법.
3. The method of claim 2,
Wherein the arbitrary region unit is a region-
A picture unit, a tile unit, and a slice unit.
제1항에 있어서,
상기 최대값 및 최소값에 대한 정보는,
상기 최대값 및 최소값 중 하나에 대한 정보와 상기 최대값과 최소값의 차이에 대한 정보를 포함하는 영상 복호화 방법.
The method according to claim 1,
The information on the maximum value and the minimum value may be,
And information on one of the maximum value and the minimum value and information on a difference between the maximum value and the minimum value.
제1항에 있어서,
상기 현재 블록에 대한 SAO 모드가 밴드 오프셋(Band Offset, BO) 모드일 때,
상기 밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점을 복호화하는 단계; 및
상기 밴드 오프셋이 적용되는 밴드 구간에 대한 M개의 오프셋 정보를 복호화하는 단계를 더 포함하고,
상기 M은 상기 복호화된 초기 밴드 지점과 상기 최소값 및 상기 최대값 중 적어도 하나에 기초하여 결정되는 영상 복호화 방법.
The method according to claim 1,
When the SAO mode for the current block is a band offset (BO) mode,
Decoding an initial band point related to a start position of a band interval to which the band offset is applied; And
Further comprising decoding M offset information for a band interval to which the band offset is applied,
Wherein M is determined based on the decoded initial band point and at least one of the minimum value and the maximum value.
제1항에 있어서,
상기 현재 블록에 대한 SAO 모드가 밴드 오프셋 모드일 때,
상기 최대값과 상기 최소값 사이의 구간을 32개의 밴드로 재구분하는 단계를 더 포함하고,
밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점은 상기 재구분된 32개의 밴드에 대한 지점인 영상 복호화 방법.
The method according to claim 1,
When the SAO mode for the current block is a band offset mode,
Further comprising the step of classifying an interval between the maximum value and the minimum value into 32 bands,
Wherein the initial band point with respect to the starting position of the band interval to which the band offset is applied is a point for the 32 re-sorted bands.
현재 블록에 대한 클리핑 범위를 결정하는 단계;
상기 클리핑 범위에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 단계; 및
상기 클리핑 범위에 관한 정보를 부호화하는 단계를 포함하고,
상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함하는 영상 부호화 방법.
Determining a clipping range for the current block;
Performing sample adaptive offset (SAO) filtering based on the clipping range; And
Encoding the information about the clipping range,
Wherein the clipping range information includes information on a maximum value and a minimum value of pixel values included in a current block.
제7항에 있어서,
상기 현재 블록에 대한 클리핑 범위에 관한 정보는,
상기 현재 블록 또는 상기 현재 블록을 포함하는 임의의 영역 단위로 부호화되는 영상 부호화 방법.
8. The method of claim 7,
Wherein the information on the clipping range for the current block includes:
Wherein the current block or the current block is encoded in units of an arbitrary region including the current block or the current block.
제8항에 있어서,
상기 임의의 영역 단위는,
픽쳐 단위, 타일 단위 및 슬라이스 단위 중 적어도 하나를 포함하는 영상 부호화 방법.
9. The method of claim 8,
Wherein the arbitrary region unit is a region-
A picture unit, a tile unit, and a slice unit.
제7항에 있어서,
상기 최대값 및 최소값에 대한 정보는,
상기 최대값 및 최소값 중 하나에 대한 정보와 상기 최대값과 최소값의 차이에 대한 정보를 포함하는 영상 부호화 방법.
8. The method of claim 7,
The information on the maximum value and the minimum value may be,
And information on one of the maximum value and the minimum value and information on a difference between the maximum value and the minimum value.
제7항에 있어서,
상기 현재 블록에 대한 SAO 모드가 밴드 오프셋(Band Offset, BO) 모드일 때,
상기 밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점을 결정하는 단계;
상기 밴드 오프셋이 적용되는 밴드 구간에 대한 M개의 오프셋 정보를 결정하는 단계; 및
상기 초기 밴드 지점 및 상기 M개의 오프셋 정보를 부호화하는 단계를 더 포함하고,
상기 M은 상기 초기 밴드 지점과 상기 최소값 및 상기 최대값 중 적어도 하나에 기초하여 결정되는 영상 부호화 방법.
8. The method of claim 7,
When the SAO mode for the current block is a band offset (BO) mode,
Determining an initial band point for a start position of a band section to which the band offset is applied;
Determining M offset information for a band interval to which the band offset is applied; And
Further comprising the step of encoding the initial band point and the M offset information,
Wherein M is determined based on the initial band point and at least one of the minimum value and the maximum value.
제7항에 있어서,
상기 현재 블록에 대한 SAO 모드가 밴드 오프셋 모드일 때,
상기 최대값과 상기 최소값 사이의 구간을 32개의 밴드로 재구분하는 단계를 더 포함하고,
밴드 오프셋이 적용되는 밴드 구간의 시작 위치에 관한 초기 밴드 지점은 상기 재구분된 32개의 밴드에 대한 지점인 영상 부호화 방법.
8. The method of claim 7,
When the SAO mode for the current block is a band offset mode,
Further comprising the step of classifying an interval between the maximum value and the minimum value into 32 bands,
Wherein an initial band point for a starting position of a band interval to which a band offset is applied is a point for the 32 re-sorted bands.
현재 블록에 대한 클리핑 범위에 관한 정보를 복호화하는 복호화부; 및
상기 클리핑 범위에 관한 정보에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 필터링부를 포함하고,
상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함하는 영상 복호화 장치.
A decoding unit for decoding information on a clipping range of a current block; And
And a filtering unit that performs sample adaptive offset (SAO) filtering based on information about the clipping range,
Wherein the clipping range information includes information on a maximum value and a minimum value of pixel values included in a current block.
현재 블록에 대한 클리핑 범위를 결정하고, 상기 클리핑 범위에 관한 정보를 부호화하는 부호화부; 및
상기 클리핑 범위에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 필터링부 포함하고,
상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함하는 영상 부호화 장치.
An encoding unit for determining a clipping range for a current block and encoding information about the clipping range; And
And a filtering unit for performing a sample adaptive offset (SAO) filtering based on the clipping range,
Wherein the clipping range information includes information on a maximum value and a minimum value of pixel values included in a current block.
영상 부호화 방법에 의해 생성된 비트스트림을 저장한 컴퓨터 판독 가능한 기록 매체로서,
상기 영상 부호화 방법은,
현재 블록에 대한 클리핑 범위를 결정하는 단계;
상기 클리핑 범위에 기초하여 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 필터링을 수행하는 단계; 및
상기 클리핑 범위에 관한 정보를 부호화하는 단계를 포함하고,
상기 클리핑 범위에 관한 정보는 현재 블록에 포함된 화소값의 최대값 및 최소값에 대한 정보를 포함하는 컴퓨터 판독 가능한 기록 매체.
A computer-readable recording medium storing a bit stream generated by a video encoding method,
The image encoding method includes:
Determining a clipping range for the current block;
Performing sample adaptive offset (SAO) filtering based on the clipping range; And
Encoding the information about the clipping range,
Wherein the information on the clipping range includes information on a maximum value and a minimum value of pixel values included in a current block.
KR1020180005467A 2017-01-20 2018-01-16 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream KR20180086135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020230194064A KR20240005658A (en) 2017-01-20 2023-12-28 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020170009631 2017-01-20
KR20170009631 2017-01-20

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020230194064A Division KR20240005658A (en) 2017-01-20 2023-12-28 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream

Publications (1)

Publication Number Publication Date
KR20180086135A true KR20180086135A (en) 2018-07-30

Family

ID=63048358

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020180005467A KR20180086135A (en) 2017-01-20 2018-01-16 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream
KR1020230194064A KR20240005658A (en) 2017-01-20 2023-12-28 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020230194064A KR20240005658A (en) 2017-01-20 2023-12-28 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream

Country Status (1)

Country Link
KR (2) KR20180086135A (en)

Also Published As

Publication number Publication date
KR20240005658A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
KR102540995B1 (en) Intra prediction method of chrominance block using luminance sample, and apparatus using same
KR102061201B1 (en) Methods of transformation based on block information and appratuses using the same
KR101965388B1 (en) Methods of coding quantization parameter and appratuses using the same
KR101981905B1 (en) Encoding method and device, decoding method and device, and computer-readable storage medium
KR20180041575A (en) Method and apparatus for encoding/decoding an image
US11659174B2 (en) Image encoding method/device, image decoding method/device and recording medium having bitstream stored therein
US11778179B2 (en) Image encoding method/device, image decoding method/device and recording medium having bitstream stored thereon
KR20180061027A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20230110701A (en) Method and apparatus for encoding/decoding a video signal
US20220345703A1 (en) Image encoding method/device, image decoding method/device and recording medium having bitstream stored therein
US20210195238A1 (en) Method and apparatus for encoding/decoding image
KR101468078B1 (en) Method and apparatus for intra prediction
KR20190088020A (en) Video coding method and apparatus using multiple transform
KR20230118538A (en) Method and apparatus for encoding/decoding an image
KR20180041579A (en) Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream
KR20170124080A (en) Method and apparatus for encoding/decoding a video signal
KR20210035062A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20190142750A (en) Image encoding/decoding method and apparatus
KR20210003005A (en) Video encoding and decoding method and apparatus using signal change correlation between cross components
KR20180086135A (en) Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream
KR20150048637A (en) Method and apparatus for inter color component prediction
KR102557740B1 (en) Method and apparatus for encoding/decoding a video signal
KR20130100662A (en) Methods of deciding most probable mode and appratuses using the same
KR20240005659A (en) Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream
KR20210033834A (en) Transform Coefficient Coding and Decoding Method and Device according to Block Division Tree Structure

Legal Events

Date Code Title Description
A201 Request for examination
AMND Amendment
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
E601 Decision to refuse application
E801 Decision on dismissal of amendment