KR20180096194A - Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same - Google Patents

Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same Download PDF

Info

Publication number
KR20180096194A
KR20180096194A KR1020170022560A KR20170022560A KR20180096194A KR 20180096194 A KR20180096194 A KR 20180096194A KR 1020170022560 A KR1020170022560 A KR 1020170022560A KR 20170022560 A KR20170022560 A KR 20170022560A KR 20180096194 A KR20180096194 A KR 20180096194A
Authority
KR
South Korea
Prior art keywords
block
unit
information
coefficient
prediction
Prior art date
Application number
KR1020170022560A
Other languages
Korean (ko)
Inventor
임성창
김종호
정세윤
김휘용
이대열
이주영
최진수
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR1020170022560A priority Critical patent/KR20180096194A/en
Publication of KR20180096194A publication Critical patent/KR20180096194A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/142Detection of scene cut or scene change
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Abstract

The present invention relates to a coding device and a decoding device for a transform coefficient at high speed. According to the present invention, the coding device for a transform coefficient can code at least one of a syntax element for coded sub-block flag (CSBF) information and a syntax element for a position of the last important coefficient with a preset value based on a size and/or a shape of a transform block while coding at least one among the syntax element for the position of the last important coefficient representing a transform coefficient other than zero which is present at the final scan order in the transform block, a syntax element for whether the transform coefficient other than zero in a sub-block is at least one of the transform blocks (which is called CSBF information), and a syntax element for whether a value of each transform coefficient in the sub-block is zero or not.

Description

변환 계수 부호화 및 복호화 장치와 이를 구비하는 부호화 장치 및 복호화 장치{APPARATUS FOR CODING AND DECODING A TRANSFORM COEFFICIENT, AND CODING DEVICE AND DECODING DEVICE FOR THE SAME}TECHNICAL FIELD [0001] The present invention relates to a transform coefficient encoding and decoding apparatus, and a coding apparatus and a decoding apparatus having the same.

본 개시는 영상 부호화 및 복호화 방법 및 장치에 관한 것으로, 특히 변환 계수를 부호화 및 복호화하는 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present disclosure relates to an image encoding and decoding method and apparatus, and more particularly to an apparatus for encoding and decoding a transform coefficient.

최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고 품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, the demand for high resolution and high quality images such as high definition (HD) image and ultra high definition (UHD) image is increasing in various applications. As the image data has high resolution and high quality, the amount of data increases relative to the existing image data. Therefore, when the image data is transmitted using a medium such as a wired / wireless broadband line or stored using an existing storage medium, The storage cost is increased. High-efficiency image compression techniques can be used to solve these problems caused by high-resolution and high-quality image data.

영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 픽셀값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 픽셀 정보를 이용하여 현재 픽쳐에 포함된 픽셀값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.An inter picture prediction technique for predicting a pixel value included in a current picture from a previous or a subsequent picture of a current picture using an image compression technique, an intra picture prediction technique for predicting a pixel value included in a current picture using pixel information in the current picture, There are various techniques such as an entropy encoding technique in which a short code is assigned to a value having a high appearance frequency and a long code is assigned to a value having a low appearance frequency. Image data can be effectively compressed and transmitted or stored using such an image compression technique.

한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 콘텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.On the other hand, demand for high resolution images is increasing, and demand for stereoscopic image contents as a new image service is also increasing. Video compression techniques are being discussed to effectively provide high resolution and ultra-high resolution stereoscopic content.

본 개시는, 부호화해야 할 변환 계수가 많이 존재하는 상황에서도 부호화의 복잡도를 감소시키는 것을 제공하는 것을 목적으로 한다.It is an object of the present disclosure to provide a method for reducing the complexity of encoding even in the presence of a large number of transform coefficients to be encoded.

본 개시는, 율-왜곡 최적화 과정 내의 변환 계수 부호화에서 레귤러 모드로 부호화되는 구문 요소 중 적어도 하나 이상의 조합에 대해 바이패스 모드로 부호화하는 것을 다른 목적으로 한다.It is another object of the present disclosure to encode a combination of at least one of syntax elements to be encoded in the regular mode in the transform coefficient encoding in the rate-distortion optimization process in the bypass mode.

본 개시는, 부호화해야 할 변환 계수 중, 마지막 중요 계수의 위치 및 부블록의 중요 맵에 포함되는 변환 계수를 바이패스 모드로 부호화하는 것을 또 다른 목적으로 한다.Another object of the present disclosure is to encode the position of the last significant coefficient among the transform coefficients to be coded and the transform coefficient included in the important map of the subblock in the bypass mode.

본 개시의 일 측면에 따른 변환 계수 부호화 장치는 변환 블록 내 스캔 순서의 마지막에 존재하는 0이 아닌 변환 계수를 나타내는 마지막 중요 계수의 위치에 대한 구문 요소, 상기 변환 블록 중 부블록(sub-block) 내 0이 아닌 변환 계수가 적어도 하나인지(Coded sub block flag; 이하, 'CSBF 정보'라 함)에 대한 구문 요소, 및 상기 부블록 내 각 변환 계수의 값이 0인지 0이 아닌지에 대한 구문 요소 중, 적어도 하나를 부호화 처리하되, 상기 마지막 중요 계수의 위치에 대한 구문 요소 및 상기 CSBF 정보 중, 적어도 하나는 상기 변환 블록의 크기 및/또는 상기 변환 블록의 형태에 기초하여 미리 설정된 값으로 부호화할 수 있다.A transform coefficient encoding apparatus according to an aspect of the present disclosure includes a syntax element for a location of a last significant coefficient indicating a non-zero transform coefficient existing at the end of a scan order in a transform block, a sub-block of the transform block, A syntax element for at least one non-zero transform coefficient (CSBF information), and a syntax element for determining whether the value of each transform coefficient in the subblock is 0 or not. , At least one of the syntax element and the CSBF information for the position of the last significant coefficient is encoded into a preset value based on the size of the conversion block and / or the shape of the conversion block .

본 개시는, 부호화해야 할 변환 계수가 많이 존재하는 상황에서도 부호화기의 복잡도를 감소시키는 효과가 있다.The present disclosure has the effect of reducing the complexity of the encoder even in the presence of a large number of transform coefficients to be coded.

본 개시는, 율-왜곡 최적화 과정 내의 변환 계수 부호화에서 레귤러 모드로 부호화되는 구문 요소 중 적어도 하나 이상의 조합에 대해 바이패스 모드로 부호화하는 것을 제공할 수 있다. 그러므로, 본 개시는, 고 비트율 응용 분야와 같이 부호화해야 할 변환 계수가 많이 존재하는 상황에서도 부호화기의 복잡도를 감소시킨다는 효과가 있다.The present disclosure can provide encoding in bypass mode for at least one or more combinations of syntax elements encoded in regular mode in the transform coefficient encoding in the rate-distortion optimization process. Therefore, the present disclosure has the effect of reducing the complexity of the encoder even in the presence of a large number of transform coefficients to be encoded, such as a high bit rate application field.

도 1은 본 개시의 일 실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 개시의 일 실시예에 따른 영상 부호화 장치에 구비되는 엔트로피 부호화부의 구성을 예시하는 블록도이다.
도 3a 및 3b는 본 개시의 일 실시예에 따라 설정되는 마지막 중요 계수의 위치를 예시하는 도면이다.
도 4a 및 4b는 본 개시의 일 실시예에 따라 설정되는 마지막 중요 계수의 위치를 예시하는 도면이다.
도 5a 내지 5c는 본 개시의 일 실시예에 따라 설정되는 CSBF 정보를 예시하는 도면이다.
도 6a 내지 6c는 본 개시의 일 실시예에 따라 설정되는 CSBF 정보를 예시하는 도면이다.
도 7은 본 개시의 일 실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 8은 본 개시의 일 실시예에 따른 변환 계수 부호화 방법의 순서를 도시하는 흐름도이다.
도 9는 본 개시의 일 실시예에 따른 변환 계수 복호화 방법의 순서를 도시하는 흐름도이다.
1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
2 is a block diagram illustrating a configuration of an entropy encoding unit included in an image encoding apparatus according to an embodiment of the present disclosure.
Figures 3A and 3B are diagrams illustrating the location of the last significant coefficient set in accordance with one embodiment of the present disclosure.
Figures 4A and 4B are diagrams illustrating the location of the last significant coefficient set in accordance with one embodiment of the present disclosure.
Figures 5A-5C are diagrams illustrating CSBF information set in accordance with one embodiment of the present disclosure.
6A-6C are diagrams illustrating CSBF information set in accordance with one embodiment of the present disclosure.
7 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
8 is a flowchart showing a procedure of a transform coefficient encoding method according to an embodiment of the present disclosure.
9 is a flowchart showing a procedure of a transform coefficient decoding method according to an embodiment of the present disclosure.

이하에서는 첨부한 도면을 참고로 하여 본 개시의 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나, 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings, which will be easily understood by those skilled in the art. However, the present disclosure may be embodied in many different forms and is not limited to the embodiments described herein.

본 개시의 실시 예를 설명함에 있어서 공지 구성 또는 기능에 대한 구체적인 설명이 본 개시의 요지를 흐릴 수 있다고 판단되는 경우에는 그에 대한 상세한 설명은 생략한다. 그리고, 도면에서 본 개시에 대한 설명과 관계없는 부분은 생략하였으며, 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.In the following description of the embodiments of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present disclosure rather unclear. Parts not related to the description of the present disclosure in the drawings are omitted, and like parts are denoted by similar reference numerals.

본 개시에 있어서, 어떤 구성요소가 다른 구성요소와 "연결", "결합" 또는 "접속"되어 있다고 할 때, 이는 직접적인 연결관계뿐만 아니라, 그 중간에 또 다른 구성요소가 존재하는 간접적인 연결관계도 포함할 수 있다. 또한 어떤 구성요소가 다른 구성요소를 "포함한다" 또는 "가진다"고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 배제하는 것이 아니라 또 다른 구성요소를 더 포함할 수 있는 것을 의미한다.In the present disclosure, when an element is referred to as being "connected", "coupled", or "connected" to another element, it is understood that not only a direct connection relationship but also an indirect connection relationship May also be included. Also, when an element is referred to as " comprising "or" having "another element, it is meant to include not only excluding another element but also another element .

본 개시에 있어서, 제1, 제2 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용되며, 특별히 언급되지 않는 한 구성요소들간의 순서 또는 중요도 등을 한정하지 않는다. 따라서, 본 개시의 범위 내에서 일 실시 예에서의 제1 구성요소는 다른 실시 예에서 제2 구성요소라고 칭할 수도 있고, 마찬가지로 일 실시 예에서의 제2 구성요소를 다른 실시 예에서 제1 구성요소라고 칭할 수도 있다. In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one element from another, and do not limit the order or importance of elements, etc. unless specifically stated otherwise. Thus, within the scope of this disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly a second component in one embodiment may be referred to as a first component .

본 개시에 있어서, 서로 구별되는 구성요소들은 각각의 특징을 명확하게 설명하기 위함이며, 구성요소들이 반드시 분리되는 것을 의미하지는 않는다. 즉, 복수의 구성요소가 통합되어 하나의 하드웨어 또는 소프트웨어 단위로 이루어질 수도 있고, 하나의 구성요소가 분산되어 복수의 하드웨어 또는 소프트웨어 단위로 이루어질 수도 있다. 따라서, 별도로 언급하지 않더라도 이와 같이 통합된 또는 분산된 실시 예도 본 개시의 범위에 포함된다. In the present disclosure, the components that are distinguished from each other are intended to clearly illustrate each feature and do not necessarily mean that components are separate. That is, a plurality of components may be integrated into one hardware or software unit, or a single component may be distributed into a plurality of hardware or software units. Thus, unless otherwise noted, such integrated or distributed embodiments are also included within the scope of this disclosure.

본 개시에 있어서, 다양한 실시 예에서 설명하는 구성요소들이 반드시 필수적인 구성요소들은 의미하는 것은 아니며, 일부는 선택적인 구성요소일 수 있다. 따라서, 일 실시 예에서 설명하는 구성요소들의 부분집합으로 구성되는 실시 예도 본 개시의 범위에 포함된다. 또한, 다양한 실시 예에서 설명하는 구성요소들에 추가적으로 다른 구성요소를 포함하는 실시 예도 본 개시의 범위에 포함된다.In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some may be optional components. Thus, embodiments consisting of a subset of the components described in one embodiment are also included within the scope of the present disclosure. Also, embodiments that include other elements in addition to the elements described in the various embodiments are also included in the scope of the present disclosure.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred 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 disclosure.

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

도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 개시의 본질에서 벗어나지 않는 한 본 개시의 권리범위에 포함된다.Each of the components shown in FIG. 1 is 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 and separate embodiments of the components are also included in the scope of the present disclosure without departing from the spirit of the present disclosure.

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

픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.The picture division unit 110 may divide the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture division unit 110 divides one picture into a plurality of coding units, a prediction unit, and a combination of conversion units, and generates a coding unit, a prediction unit, and a conversion unit combination So that the picture can be encoded.

예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, one picture may be divided into a plurality of coding units. In order to divide a coding unit in a picture, a recursive tree structure such as a quad tree structure can be used. In a coding or decoding scheme in which one picture or a largest coding unit is used as a root and divided into other coding units A unit can be divided with as many child nodes as the number of divided coding units. Under certain constraints, an encoding unit that is no longer segmented becomes a leaf node. That is, when it is assumed that only one square division is possible for one coding unit, one coding unit can be divided into a maximum of four different coding units.

이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.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.

예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.The prediction unit may be one divided into at least one square or rectangular shape having the same size in one coding unit, and one of the prediction units in one coding unit may be divided into another prediction Or may have a shape and / or size different from the unit.

부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN 으로 분할하지 않고 인트라 예측을 수행할 수 있다.If a prediction unit performing intra prediction on the basis of an encoding unit is not the minimum encoding unit at the time of generation, intraprediction can be performed without dividing the prediction unit into a plurality of prediction units NxN.

예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction units 120 and 125 may include an inter prediction unit 120 for performing inter prediction and an intra prediction unit 125 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. The residual value (residual block) between the generated prediction block and the original block can be input to the conversion unit 130. [ In addition, the prediction mode information, motion vector information, and the like used for prediction can be encoded by the entropy encoding unit 165 together with the residual value and transmitted to the decoder. When a particular encoding mode is used, it is also possible to directly encode the original block and transmit it to the decoding unit without generating a prediction block through the prediction units 120 and 125.

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

참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 픽셀 이하의 픽셀 정보를 생성할 수 있다. 휘도 픽셀의 경우, 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 155 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 (DCT) based on a different filter coefficient may be used to generate pixel information of less than an integer number of pixels in quarter-pixel units. In the case of a color difference signal, a DCT-based 4-tap interpolation filter may be used that generates a 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) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.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, an AMVP (Advanced Motion Vector Prediction) method, and an Intra Block Copy method can be used as the motion prediction method.

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

인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction, and a non-directional mode in which 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.

인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 N x N 분할을 사용하는 인트라 예측을 사용할 수 있다.When intraprediction is performed, when the size of the prediction unit is the same as the size of the conversion unit, intra prediction is performed on the prediction unit based on pixels existing on the left side of the prediction unit, pixels existing on the upper left side, Can be performed. However, when intra prediction is performed, when the size of the prediction unit differs from the size of the conversion unit, intraprediction can be performed using the reference pixel based on the conversion unit. It is also possible to use intra prediction using N x N divisions for only the minimum coding units.

인트라 예측 방법은 예측 모드에 따라 참조 픽셀에 적응형 인트라 평활 필터(AISF; Adaptive Intra Smoothing Filter)를 적용한 후 예측 블록을 생성할 수 있다. 참조 픽셀에 적용되는 적응형 인트라 평활 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.The intra prediction method can generate a prediction block after applying an adaptive intra-smoothing filter (AISF) to a reference pixel according to a prediction mode. The type of adaptive intra smoothing filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit. In the case where the prediction mode of the current prediction unit is predicted using the mode information predicted from the peripheral prediction unit, if the intra prediction mode of the current prediction unit is the same as the intra prediction mode of the current prediction unit, The prediction mode information of the current block can be encoded by performing entropy encoding if the prediction mode of the current prediction unit is different from the prediction mode of the neighbor prediction unit.

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

변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen-Loeve Transform)와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. The transforming unit 130 transforms the residual block including the residual information of the prediction unit generated through the original block and the predictors 120 and 125 into a DCT (Discrete Cosine Transform), a DST (Discrete Sine Transform), a KLT Karhunen-Loeve Transform). The decision to apply the DCT, DST, or KLT to transform the residual block may be based on the intra prediction mode information of the prediction unit used to generate the residual block.

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

재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The reordering unit 160 can reorder the coefficient values with respect to the quantized residual values.

재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 계수를 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The reordering unit 160 may change the two-dimensional block type coefficient to a one-dimensional vector form through a coefficient scanning method. For example, the rearranging unit 160 may scan a coefficient by using a Zig-Zag scan method and change it into a one-dimensional vector form. Instead of the jig-jag scan, a vertical scan may be used to scan two-dimensional block type coefficients in a column direction, and a horizontal scan to scan a two-dimensional block type coefficient in a row direction depending on the size of the conversion unit and the intra prediction mode. That is, it is possible to determine whether any scanning method among the jig-jag scan, the vertical direction scan and the horizontal direction scan is used according to the size of the conversion unit and the intra prediction mode.

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

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

엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.The entropy encoding unit 165 can entropy-encode the coefficient value of the encoding unit input by the reordering unit 160. [

엔트로피 부호화부(165)는 변환 블록 내에서 마지막 중요 계수(last significant coefficient)의 위치에 대한 구문 요소를 부호화할 수 있다. 마지막 중요 계수는 변환 블록 내에서 스캔 순서 상에서 가장 마지막에 존재하는 0이 아닌 변환 계수를 의미할 수 있다. 이때, 스캔 순서는 순방향 스캔 순서일 수 있다.The entropy encoding unit 165 may encode the syntax element for the position of the last significant coefficient in the transform block. The last significant coefficient may mean the last non-zero transform coefficient in the scan block in the scan block. At this time, the scan order may be a forward scan order.

마지막 중요 계수의 위치에 대한 구문 요소를 부호화하는 신택스 엘리먼트(Syntax Element)는 표 1과 같이 예시될 수 있다. 여기서, 신택스 엘리먼트는 구문 요소를 의미할 수 있다.Syntax elements that encode the syntax elements for the position of the last significant coefficient may be illustrated in Table 1. Here, the syntax element may mean a syntax element.

Figure pat00001
Figure pat00001

특히, 엔트로피 부호화부(165)는 변환 블록 내에서 마지막 중요 계수의 위치에 대한 구문 요소를 블록 크기 및 블록 형태 중 적어도 하나에 기초하여 설정하고, 이렇게 설정된 구문 요소에 따라 마지막 중요 계수의 위치에 대한 구문 요소를 부호화할 수 있다. 여기서, 상기 블록의 크기는 변환 유닛의 크기 및 변환 블록의 크기 중 적어도 하나로 설정될 수 있고, 블록 형태는 변환 유닛의 형태 및 변환 블록의 형태 중 적어도 하나로 설정될 수 있다.In particular, the entropy encoding unit 165 sets the syntax element for the position of the last significant coefficient in the transform block based on at least one of the block size and the block type, and according to the set syntax element, Syntax elements can be encoded. Here, the size of the block may be set to at least one of the size of the conversion unit and the size of the conversion block, and the block shape may be set to at least one of the shape of the conversion unit and the shape of the conversion block.

엔트로피 부호화부(165)는 부호화를 처리함에 있어서, 문맥 모델에 대한 도출과 업데이트 연산을 처리하는 레귤러 모드와 문맥 모델에 대한 도출 등의 처리 없이 미리 정해진 규칙에 따라 부호화를 처리하는 바이패스 모드를 처리할 수 있다. 이를 기반으로, 마지막 중요 계수의 위치에 대한 정보는 블록 크기 및 블록 형태 중 적어도 하나에 기초하여 바이패스 모드로 부호화 처리될 수 있다. 따라서, 엔트로피 부호화부(165)는 낮은 복잡도로 율 계산이 가능하다. In processing the encoding, the entropy encoding unit 165 processes a regular mode for processing derivation and update operations for the context model and a bypass mode for processing the encoding in accordance with predetermined rules without deriving the context model can do. Based on this, information on the position of the last significant coefficient can be encoded in the bypass mode based on at least one of the block size and the block type. Therefore, the entropy encoding unit 165 can calculate the rate with a low complexity.

엔트로피 부호화부(165)는 마지막 중요 계수의 위치에 대한 구문 요소를 부호화 한 후, 중요 맵(significance map)에 대한 부호화를 진행할 수 있다. 중요 맵은 부블록(sub-block) 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보, 및 부블록 내의 각 변환 계수의 값이 0인지 아닌지에 대한 정보 중 적어도 하나를 포함할 수 있다. 이때, 부블록은 4×4 단위일 수 있다.The entropy encoding unit 165 may encode a syntax element corresponding to the position of the last significant coefficient and then perform encoding on a significance map. The important map may include at least one of information indicating whether a non-zero transform coefficient exists in a sub-block and information on whether or not the value of each transform coefficient in the sub-block is zero or not. At this time, the subblock may be 4x4 units.

부블록(sub-block) 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보에 대한 구문 요소는 coded_sub_block_flag로 나타낼 수 있으며, 부블록 내의 각 변환 계수의 값이 0인지 아닌지에 대한 정보에 대한 구문 요소는 sig_coeff_flag로 나타낼 수 있다.A syntax element for information indicating whether a non-zero transform coefficient exists in a sub-block can be represented as coded_sub_block_flag, and a syntax element for information on whether or not the value of each transform coefficient in the sub-block is 0 sig_coeff_flag.

부블록(sub-block) 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보에 대한 구문 요소(coded_sub_block_flag)와, 부블록 내의 각 변환 계수의 값이 0인지 아닌지에 대한 정보에 대한 구문 요소(sig_coeff_flag)를 부호화하는 신택스는 표 1에 예시될 수 있다.A syntax element (coded_sub_block_flag) for information indicating whether a non-zero transform coefficient exists in a sub-block and a syntax element (sig_coeff_flag) for information on whether or not the value of each transform coefficient in the sub- May be exemplified in Table 1. < tb > < TABLE >

엔트로피 부호화부(165)는 부블록(sub-block) 내의 0이 아닌 변환 계수가 하나라도 존재하는지에 대한 정보에 대한 구문 요소인 coded_sub_block_flag 값을 블록 크기 및 블록 형태 중 적어도 하나에 기반하여 부호화할 수 있다. The entropy encoding unit 165 may encode coded_sub_block_flag, which is a syntax element for information on whether any non-zero transform coefficient exists in a sub-block, based on at least one of a block size and a block type have.

엔트로피 부호화부(165)가 블록 크기 및 블록 형태 중 적어도 하나에 기반하여 부블록(sub-block) 내의 0이 아닌 변환 계수가 하나라도 존재하는지에 대한 정보(coded_sub_block_flag)를 값을 설정함으로써, 주파수 영역으로 변환된 변환 계수들 중 저주파수(low frequency)에 해당하는 중요 변환 계수들에 대해서만 율 계산을 수행할 수 있으며, 부호화 처리의 복잡도를 감소할 수 있는 시킬 수 있다.The entropy encoding unit 165 sets the value (coded_sub_block_flag) as to whether any non-zero transform coefficient exists in the sub-block based on at least one of the block size and the block type, It is possible to perform the rate calculation only on the significant transform coefficients corresponding to the low frequency among the transform coefficients transformed into the transform coefficients, thereby making it possible to reduce the complexity of the encoding process.

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

필터부(150)는 디블록킹 필터, 오프셋 보정부, 적응형 루프 필터(ALF; Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 150 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.

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.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, pixels included in an image are divided into a predetermined number of areas, and then an area to be offset is determined and an offset is applied to the area. Alternatively, Can be used.

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

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

도 2는 본 개시의 일 실시예에 따른 영상 부호화 장치에 구비되는 엔트로피 부호화부의 구성을 예시하는 블록도이다.2 is a block diagram illustrating a configuration of an entropy encoding unit included in an image encoding apparatus according to an embodiment of the present disclosure.

도 2를 참조하면, 엔트로피 부호화부(165)는 이진화부(Binarizer)(21), 컨텍스트 모델러(Context modeler)(22) 및 이진 산술 부호화부(Binary arithmetic coder)(23)를 포함한다. 또한, 이진 산술 부호화부(23)는 레귤러 코딩부(Regular coding engine)(24)와 바이패스 코딩부(Bypass coding engine)(25)를 포함할 수 있다.2, the entropy encoding unit 165 includes a binarizer 21, a context modeler 22, and a binary arithmetic coder 23. The binary arithmetic coding unit 23 may include a regular coding engine 24 and a bypass coding engine 25.

이진화부(21)는 신택스 엘리먼트(Syntax Element)들이 이진값이 아닌 경우 신택스 엘리먼트를 이진화하여 0 또는 1의 이진값들로 구성된 비트열, 즉 빈(Bin) 스트링을 출력한다. 빈(Bin)은 0 또는 1로 구성된 비트열의 각 비트를 나타낸다. 신택스 엘리먼트의 유형에 따라, 단항 이진화 방식(Unary Binarization), 절삭형 단형 이진화 방식(Truncated Unary Binarization), 지수 골롬 결합형 이진화 방식(Exponential Golomb Binarization) 및 고정길이 이진화 방식(Fixed Length Binarization) 중 하나의 이진화 방식이 적용될 수 있다.The binarization unit 21 binarizes a syntax element when Syntax Elements are not binary values, and outputs a bit string composed of binary values of 0 or 1, that is, a Bin string. Bin represents each bit of a bit string composed of 0 or 1. Depending on the type of syntax element, one of the following may be used: Unary Binarization, Truncated Unary Binarization, Exponential Golomb Binarization, and Fixed Length Binarization. A binarization method can be applied.

이진화부(21)는 현재 블록의 크기에 기초하여 결정된 임계값을 기준으로 현재 부호화되는 신택스 엘리먼트를 프리픽스(prefix) 및 서픽스(suffix)로 분류하고, 프리픽스 및 서픽스에 대해서 서로 독립적인 소정 이진화 방식을 적용하여 이진화하여 프리픽스 비트열 및 서픽스 비트열을 출력할 수 있다. 예를 들어, 이진화부(21)는 현재 블록의 폭(width)에 기초하여 결정된 임계치를 기준으로, 마지막 중요 계수(last significant coefficient)의 열(column) 위치를 프리픽스(last_sig_coeff_x_prefix) 및 서픽스(last_sig_coeff_x_suffix)로 분류하고, 열 위치의 프리픽스(last_sig_coeff_x_prefix)에 대해 소정의 제 1 이진화 방식을 적용하여 열 위치의 프리픽스 비트열을 출력하고, 열 위치의 서픽스(last_sig_coeff_x_suffix)에 대해 소정의 제 2 이진화 방식을 적용하여 열 위치에 대한 서픽스 비트열을 출력할 수 있다. The binarization unit 21 classifies a syntax element currently coded on the basis of a threshold value determined based on the size of a current block into a prefix and a suffix and performs a predetermined binarization Method, so that a prefix bit string and a suffix bit string can be output. For example, the binarization unit 21 sets the column position of the last significant coefficient as a prefix (last_sig_coeff_x_prefix) and a suffix (last_sig_coeff_x_suffix) based on the threshold determined based on the width of the current block, ), A predetermined first binarization method is applied to the column position prefix (last_sig_coeff_x_prefix) to output a prefix bit string at the column position, and a predetermined second binarization method is applied to the column position suffix (last_sig_coeff_x_prefix) Can be applied to output the suffix bit string for the column position.

유사하게, 이진화부(21)는 현재 블록의 높이(height)에 기초하여 결정된 임계치를 기준으로, 마지막 중요 계수(last significant coefficient)의 행 위치를 프리픽스(last_sig_coeff_y_prefix) 및 서픽스(last_sig_coeff_y_ suffix)로 분류하고, 행 위치의 프리픽스(last_sig_coeff_y_prefix)에 대해 제 1 이진화 방식을 적용하여 행위치의 프리픽스 비트열을 출력하고, 행 위치의 서픽스(last_sig_coeff_y_ suffix)에 대해 제 2 이진화 방식을 적용하여 행 위치의 서픽스 비트열을 출력할 수 있다. Similarly, the binarization unit 21 classifies the row position of the last significant coefficient into a prefix (last_sig_coeff_y_prefix) and a suffix (last_sig_coeff_y_supix) based on a threshold determined based on the height of the current block A prefix bit string of an action value is applied by applying a first binarization method to a prefix (last_sig_coeff_y_prefix) of a row position, and a second binary method is applied to a suffix of a row position (last_sig_coeff_y_prefix) It is possible to output a bit stream.

전술한 제 1 이진화 방식과 제 2 이진화 방식은 서로 독립적으로, 동일하거나 다른 이진화 방식일 수 있다.The first binarization method and the second binarization method may be the same or different from each other.

신택스 엘리먼트의 유형에 따라서, 비트열의 각 빈(Bin)은 레귤러 코딩부(24)에서 컨텍스트 모델을 적용하여 산술 부호화되거나, 바이패스 코딩부(25)에 의하여 산술 부호화될 수 있다. Depending on the type of the syntax element, each bin Bin of the bit string can be arithmetically encoded by applying the context model in the regular coding unit 24, or arithmetic-coded by the bypass coding unit 25. [

레귤러 코딩부(24)는 마지막 중요 계수의 위치를 프리픽스 비트열 및 서픽스 비트열로 분류한 경우, 먼저 프리픽스로 분류된 비트열들을 순차적으로 CABAC에 따른 컨텍스트 모델을 적용하여 산술 부호화하고, 바이패스 코딩부(25)는 서픽스로 분류된 비트열들을 바이패스(bypass) 모드로 산술 부호화할 수 있다.When the position of the last significant coefficient is classified into a prefix bit string and a suffix bit string, the regular coding section 24 firstly performs arithmetic coding on bit strings classified into a prefix by sequentially applying a context model according to CABAC, The coding unit 25 may arithmetic-code the bit streams classified as the suffix in a bypass mode.

특히, 본 개시에 따른 이진화부(21)는 마지막 중요 계수(last significant coefficient)의 위치에 대한 구문 요소를 블록 크기에 기초하여 설정하고, 이렇게 설정된 구문 요소에 따라 마지막 중요 계수의 위치에 대한 구문 요소를 부호화할 수 있다. 여기서, 상기 블록의 크기는 변환 유닛의 크기 및 변환 블록의 크기 중 적어도 하나로 설정될 수 있다.In particular, the binarization unit 21 according to the present disclosure sets the syntax element for the position of the last significant coefficient on the basis of the block size, and sets the syntax element for the position of the last significant coefficient Can be encoded. Here, the size of the block may be set to at least one of the size of the conversion unit and the size of the conversion block.

도 3a 및 3b는 본 개시의 일 실시예에 따라 설정되는 마지막 중요 계수의 위치를 예시하는 도면이다. 도 3a는 4×4 단위의 변환 블록을 예시하고, 도 3b는 8×8 단위의 변환 블록을 예시한다. Figures 3A and 3B are diagrams illustrating the location of the last significant coefficient set in accordance with one embodiment of the present disclosure. FIG. 3A illustrates a transform block of 4 × 4 units, and FIG. 3B illustrates a transform block of 8 × 8 units.

본 개시에 따른 이진화부(21)는 현재 블록의 크기가 4×4인 경우 마지막 중요 계수의 위치를, 4×4 블록 내의 (N, M)의 설정할 수 있다(N, M은 자연수, 1≤N≤4, 1≤M≤4). 본 발명의 일 실시예에서는 4×4 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치를 (4,4)로 설정함을 예시한다. 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 크기가 4×4의 크기일 경우 모두 동일하게 (N, M), 즉 (4, 4)로 설정할 수 있다. The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to (N, M) in the 4x4 block when the current block size is 4x4 (N, M is a natural number, N? 4, 1? M? 4). In an embodiment of the present invention, the position of the significant coefficient is set to (4, 4) for a block having a size of 4 × 4 block. The binarization unit 21 according to the present disclosure is identical to (N, M), i.e., (4, 4) if the size of the current block is 4 x 4, irrespective of the region where the last significant coefficient is actually located Can be set.

본 개시에 따른 이진화부(21)는 현재 블록의 크기가 8×8인 경우 마지막 중요 계수의 위치를, 8×8 블록 내의 (O, P)의 설정될 수 있다(O, P는 자연수, 1≤O≤4, 1≤P≤4). 본 발명의 일 실시예에서는 8×8 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치를 (4,4)로 설정함을 예시한다. 마찬가지로, 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 크기가 8×8의 크기일 경우 모두 동일하게 (O, P), 즉 (4, 4)로 설정할 수 있다.The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient in the 8x8 block (O, P) when the current block size is 8x8 (O, P is a natural number, 1 4, 1? P? 4). In an embodiment of the present invention, the position of the significant coefficient is set to (4, 4) for a block having a size of 8x8 block. Similarly, the binarization unit 21 according to the present disclosure can obtain the same (O, P), i.e., (4, 4), if the current block size is 8x8, irrespective of the region where the last significant coefficient is actually located. ).

본 개시에 따른 이진화부(21)는 현재 블록의 크기가 16×16인 경우 마지막 중요 계수의 위치를, 16×16 블록 내의 (Q, R) 위치로 설정할 수 있다(Q, R 은 자연수, 1≤Q≤16, 1≤R≤16). 본 발명의 일 실시예에서는 16×16 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치를 (8, 8)로 설정함을 예시한다. 마찬가지로, 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 크기가 16×16의 크기일 경우 모두 동일하게 (Q, R), 즉 (8, 8)로 설정할 수 있다.The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to the (Q, R) position in the 16x16 block when the current block size is 16x16 (Q, R are natural numbers, 1 16, 1? R? 16). In an embodiment of the present invention, the position of the significant coefficient is set to (8, 8) for a block having a size of 16 × 16 blocks. Likewise, the binarization unit 21 according to the present disclosure can obtain the same (Q, R), i.e., (8, 8), if the current block size is 16x16, irrespective of the region where the last significant coefficient is actually located. ).

본 개시에 따른 이진화부(21)는 현재 블록의 크기가 32×32인 경우 마지막 중요 계수의 위치를, 32×32 블록 내의 (S, T) 위치로 설정할 수 있다(S, T는 자연수, 1≤S≤16, 1≤T≤16). 본 발명의 일 실시예에서는 32×32 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치를 (16, 16)로 설정함을 예시한다. 마찬가지로, 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 크기가 32×32의 크기일 경우 모두 동일하게 (S, T), 즉 (16, 16)로 설정할 수 있다.The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to the (S, T) position within the 32x32 block when the current block size is 32x32 (S, T are natural numbers, 1 16, 1? T? 16). In an embodiment of the present invention, the position of the significant coefficient is set to (16, 16) for a block having a size of 32x32 blocks. Likewise, the binarization unit 21 according to the present disclosure is identical to (S, T), i.e., (16, 16) if the size of the current block is 32 x 32, ).

한편, 이와 같이 블록 크기에 기초하여 설정된 마지막 중요 계수(last significant coefficient)의 위치에 대한 구문 요소는 바이패스 코딩부(25)로 전달 될 수 있다. 따라서, 바이패스 코딩부(25)는 마지막 중요 계수의 위치의 서픽스 비트열 및 프리픽스 비트열을 모두 바이패스 모드에 따라 산술 부호화한다. Meanwhile, the syntax element for the position of the last significant coefficient set based on the block size may be transmitted to the bypass coding unit 25. Therefore, the bypass coding unit 25 performs arithmetic coding on both the suffix bit string and the prefix bit string at the position of the last significant coefficient according to the bypass mode.

본 개시의 일 실시예에서, 이진화부(21)가 마지막 중요 계수의 위치를 실제 위치한 영역과는 상관 없이, 블록 크기에 따라 미리 정해진 영역으로 설정하고, 바이패스 코딩부(25)가 마지막 중요 계수의 위치의 서픽스 비트열 및 프리픽스 비트열을 바이패스 모드에 따라 산술 부호화하는 것을 예시하였으나, 본 개시가 이를 한정하는 것은 아니다.In one embodiment of the present disclosure, the binarization section 21 sets the position of the last significant coefficient to a predetermined region according to the block size, regardless of the actual position, and the bypass coding section 25 sets the last significant coefficient The arithmetic coding of the suffix bit string and the prefix bit string at the position of " 1 " is performed according to the bypass mode, but the present disclosure is not limited thereto.

본 개시는 마지막 중요 계수의 위치가 실제 위치한 영역과는 상관 없이, 블록 크기에 따라 미리 정해진 영역으로 설정될 수 있으면 충분하다. 따라서, 이진화부(21)는 마지막 중요 계수의 위치가 블록 크기에 기초하여 설정되었음을 나타내는 정보, 블록 크기를 지시하는 정보를 바이패스 코딩부(25)로 전달하고, 바이패스 코딩부(25)는 마지막 중요 계수의 위치가 블록 크기에 기초하여 설정되었음을 나타내는 정보, 블록 크기를 지시하는 정보를 바이패스 모드에 따라 산술 부호화할 수 있다. It is sufficient that the present disclosure can be set to a predetermined region according to the block size irrespective of the region where the position of the last significant coefficient is actually located. Therefore, the binarization unit 21 transmits to the bypass coding unit 25 information indicating the block size, information indicating that the position of the last significant coefficient is set based on the block size, and the bypass coding unit 25 Information indicating that the position of the last significant coefficient is set based on the block size, and information indicating the block size may be arithmetic-coded according to the bypass mode.

다른 예로서, 본 개시에 따른 이진화부(21)는 마지막 중요 계수의 위치에 대한 구문 요소를 블록 형태에 기초하여 설정하고, 이렇게 설정된 구문 요소에 따라 마지막 중요 계수의 위치에 대한 구문 요소를 부호화할 수 있다. 여기서, 상기 블록의 형태는 변환 유닛의 형태 및 변환 블록의 형태 중 적어도 하나로 설정될 수 있다.As another example, the binarization unit 21 according to the present disclosure sets the syntax element for the position of the last significant coefficient based on the block type, and encodes the syntax element for the position of the last significant coefficient according to the set syntax element . Here, the shape of the block may be set to at least one of the shape of the conversion unit and the shape of the conversion block.

도 4a 및 4b는 본 개시의 일 실시예에 따라 설정되는 마지막 중요 계수의 위치를 예시하는 도면이다. 도 4a는 4×2 단위의 변환 블록을 예시하고, 도 4b는 4×8 단위의 변환 블록을 예시한다. Figures 4A and 4B are diagrams illustrating the location of the last significant coefficient set in accordance with one embodiment of the present disclosure. FIG. 4A illustrates a 4x2 transform block, and FIG. 4B illustrates a 4X8 transform block.

본 개시에 따른 이진화부(21)는 현재 블록의 형태가 4×2인 경우 마지막 중요 계수의 위치를, 4×2 블록 내의 (N', M')의 설정할 수 있다(N', M'은 자연수, 1≤N'≤4, 1≤M'≤2). 본 발명의 일 실시예에서는 4×2 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치를 (2, 1)로 설정함을 예시한다. 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 4×2의 크기일 경우 모두 동일하게 (N', M'), 즉 (2, 1)로 설정할 수 있다. The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to (N ', M') in the 4x2 block if the current block type is 4x2 (N ', M' Natural number, 1? N '? 4, 1? M'? 2). In an embodiment of the present invention, it is exemplified that the position of the significant coefficient is set to (2, 1) for a block having a shape of 4 × 2 blocks. The binarization unit 21 according to the present disclosure is identical to (N ', M'), i.e., (2, 1) if the current block has a size of 4 × 2, ).

본 개시에 따른 이진화부(21)는 현재 블록의 형태가 4×8인 경우 마지막 중요 계수의 위치를, 4×8 블록 내의 (O', P')의 설정될 수 있다(O', P'는 자연수, 1≤O'≤4, 1≤P'≤4). 본 발명의 일 실시예에서는 4×8 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치를 (2, 4)로 설정함을 예시한다. 마찬가지로, 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 4×8 크기일 경우 모두 동일하게 (O', P'), 즉 (2, 4)로 설정할 수 있다.The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to (O ', P') in the 4x8 block if the current block type is 4x8 (O ', P' Is a natural number, 1? O'? 4, 1? P '? 4). In an embodiment of the present invention, it is exemplified that the position of the significant coefficient is set to (2, 4) for a block having the shape of 4x8 block. Likewise, the binarization unit 21 according to the present disclosure is identical (O ', P'), that is, when the current block has a size of 4 × 8, regardless of the area where the last significant coefficient is actually located, 4).

본 개시에 따른 이진화부(21)는 현재 블록의 형태가 16×4인 경우 마지막 중요 계수의 위치를, 16×4 블록 내의 (Q', R') 위치로 설정할 수 있다(Q', R'은 자연수, 1≤Q'≤16, 1≤R'≤4). 본 발명의 일 실시예에서는 16×4 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치를 (4, 1)로 설정함을 예시한다. 마찬가지로, 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 16×4의 크기일 경우 모두 동일하게 (Q', R'), 즉 (4, 1)로 설정할 수 있다.The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to the position (Q ', R') in the 16x4 block when the current block type is 16x4 (Q ', R' Is a natural number, 1? Q '? 16, 1? R'? 4). In the embodiment of the present invention, it is exemplified that the position of the significant coefficient is set to (4, 1) for a block having the shape of 16x4 block. Likewise, the binarization unit 21 according to the present disclosure is identical to (Q ', R'), i.e., (4) if the current block has a size of 16x4, irrespective of the region where the last significant coefficient is actually located. , 1).

본 개시에 따른 이진화부(21)는 현재 블록의 형태가 16×32인 경우 마지막 중요 계수의 위치를, 16×32 블록 내의 (S', T') 위치로 설정할 수 있다(S', T'는 자연수, 1≤S'≤16, 1≤T'≤16). 본 발명의 일 실시예에서는 16×32 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치를 (8, 8)로 설정함을 예시한다. 마찬가지로, 본 개시에 따른 이진화부(21)는 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 16×32의 크기일 경우 모두 동일하게 (S', T'), 즉 (8, 8)로 설정할 수 있다.The binarization unit 21 according to the present disclosure can set the position of the last significant coefficient to the (S ', T') position within the 16x32 block if the current block type is 16x32 (S ', T' Is a natural number, 1? S '? 16, 1? T'? 16). In an embodiment of the present invention, it is exemplified that the position of the significant coefficient is set to (8, 8) for a block having a shape of 16x32 blocks. Likewise, the binarization unit 21 according to the present disclosure is identical (S ', T'), that is, when the shape of the current block is 16 × 32, , 8).

한편, 이와 같이 블록 형태에 기초하여 설정된 마지막 중요 계수(last significant coefficient)의 위치에 대한 구문 요소는 바이패스 코딩부(25)로 전달 될 수 있다. 따라서, 바이패스 코딩부(25)는 마지막 중요 계수의 위치의 서픽스 비트열 및 프리픽스 비트열을 모두 바이패스 모드에 따라 산술 부호화한다. On the other hand, the syntax element for the position of the last significant coefficient set on the basis of the block type may be transmitted to the bypass coding unit 25. Therefore, the bypass coding unit 25 performs arithmetic coding on both the suffix bit string and the prefix bit string at the position of the last significant coefficient according to the bypass mode.

본 개시의 일 실시예에서, 이진화부(21)가 마지막 중요 계수의 위치를 실제 위치한 영역과는 상관 없이, 블록 형태에 따라 미리 정해진 영역으로 설정하고, 바이패스 코딩부(25)가 마지막 중요 계수의 위치의 서픽스 비트열 및 프리픽스 비트열을 바이패스 모드에 따라 산술 부호화하는 것을 예시하였으나, 본 개시가 이를 한정하는 것은 아니다.In the embodiment of the present disclosure, the binarization unit 21 sets the position of the last significant coefficient to a predetermined region according to the block shape, regardless of the actual position, and the bypass coding unit 25 sets the last significant coefficient The arithmetic coding of the suffix bit string and the prefix bit string at the position of " 1 " is performed according to the bypass mode, but the present disclosure is not limited thereto.

본 개시는 마지막 중요 계수의 위치가 실제 위치한 영역과는 상관 없이, 블록 형태에 따라 미리 정해진 영역으로 설정될 수 있으면 충분하다. 따라서, 이진화부(21)는 마지막 중요 계수의 위치가 블록 형태에 기초하여 설정되었음을 나타내는 정보, 블록 형태를 지시하는 정보를 바이패스 코딩부(25)로 전달하고, 바이패스 코딩부(25)는 마지막 중요 계수의 위치가 블록 형태에 기초하여 설정되었음을 나타내는 정보, 블록 형태를 지시하는 정보를 바이패스 모드에 따라 산술 부호화할 수 있다.It is sufficient that the present disclosure can be set to a predetermined region according to the block shape irrespective of the region where the position of the last significant coefficient is actually located. Accordingly, the binarization unit 21 transmits to the bypass coding unit 25 information indicating that the position of the last significant coefficient is set based on the block type, indicating the block type, and the bypass coding unit 25 Information indicating that the position of the last significant coefficient is set based on the block type, and information indicating the block type can be arithmetically encoded according to the bypass mode.

나아가, 전술한 실시예에서, 이진화부(21)가 마지막 중요 계수의 위치를 블록의 크기에 따라 미리 정해진 영역으로 설정하거나, 블록 형태에 따라 미리 정해진 영역으로 설정하는 것을 예시하였으나, 이진화부(21)가 블록의 크기와 블록 형태를 모두 고려하여 마지막 중요 계수의 위치를 미리 정해진 영역으로 설정하는 것도 가능하다. 이 경우, 이진화부(21)는 블록의 크기 및 블록 형태 중 적어도 하나에 의해 마지막 중요 계수의 위치를 설정하였음을 지시하는 정보, 블록의 크기 또는 블록 형태를 지시하는 정보 등을 바이패스 코딩부(25)로 전달하고, 바이패스 코딩부(25)는 이러한 정보를 바이패스 모드에 따라 산술 부호화할 수 있다.Furthermore, in the above-described embodiment, the binarization unit 21 sets the position of the last significant coefficient as a predetermined region according to the size of the block, or sets the predetermined important region according to the block type. However, the binarization unit 21 ) Can set the position of the last significant coefficient to a predetermined region in consideration of both the size of the block and the block shape. In this case, the binarization unit 21 outputs information indicating that the position of the last significant coefficient is set by at least one of the size of the block and the block type, the information indicating the size of the block or the block type, 25, and the bypass coding unit 25 can arithmetically encode such information according to the bypass mode.

추가적으로, 본 개시에 따른 이진화부(21)는 중요 맵(significance map)에 대한 부호화를 진행할 수 있다. 중요 맵은 부블록(sub-block) 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보(coded_sub_block_flag) (이하, 'CSBF 정보'라 함.), 및 부블록 내의 각 변환 계수의 값이 0인지 아닌지에 대한 정보(sig_coeff_flag)(이하, 'CSF 정보'라 함.) 중 적어도 하나를 포함할 수 있다. In addition, the binarization unit 21 according to the present disclosure can proceed with coding for a significance map. The important map includes information (coded_sub_block_flag) indicating whether non-zero transform coefficients exist in a sub-block (hereinafter referred to as 'CSBF information') and whether or not the value of each transform coefficient in the sub- Information (sig_coeff_flag) (hereinafter, referred to as 'CSF information').

도 5a 내지 5c는 본 개시의 일 실시예에 따라 설정되는 CSBF 정보를 예시하는 도면이다. 도 5a는 4×4 단위의 변환 블록을 예시하고, 도 5b는 8×8 단위의 변환 블록을 예시하고, 도 5c는 16×16 단위의 변환 블록을 예시한다. Figures 5A-5C are diagrams illustrating CSBF information set in accordance with one embodiment of the present disclosure. Fig. 5A illustrates a transform block of 4x4 units, Fig. 5B illustrates a transform block of 8x8 units, and Fig. 5C illustrates a transform block of 16x16 units.

도 5a를 참조하면, 본 개시에 따른 이진화부(21)는 현재 블록이 4×4 크기의 부블록(51)인 경우 현재 부블록의 CSBF 정보를 0으로 설정할 수 있다. 본 발명의 일 실시예에서는 4×4 블록의 크기를 갖는 부블록에 대해서 CSBF 정보를 0으로 설정함을 예시한다. 본 개시에 따른 이진화부(21)는 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 크기가 4×4의 크기일 경우 모두 동일하게 CSBF 정보를 0으로 설정할 수 있다. 이때, CSBF 정보가 0으로 설정된 경우 부블록 내의 0이 아닌 변환 계수가 존재하지 않는 것을 지시할 수 있고, CSBF 정보가 1로 설정된 경우 부블록 내의 0이 아닌 변환 계수가 존재하는 것을 지시할 수 있다.Referring to FIG. 5A, when the current block is a 4 × 4 subblock 51, the binarization unit 21 according to the present disclosure can set the CSBF information of the current subblock to 0. In an embodiment of the present invention, it is exemplified that CSBF information is set to 0 for a subblock having a size of 4x4 block. The binarization unit 21 according to the present disclosure can set the CSBF information to be equal to 0 when the size of the current subblock is 4x4 regardless of whether a nonzero transform coefficient exists in the subblock. At this time, when CSBF information is set to 0, it indicates that there is no non-zero transform coefficient in the subblock, and when CSBF information is set to 1, it indicates that a non-zero transform coefficient exists in the subblock .

도 5b를 참조하면, 본 개시에 따른 이진화부(21)는 현재 블록이 8×8 크기의 부블록(52)인 경우 CSBF 정보는 스캔 순서상 마지막에 위치한 부블록의 CSBF 정보를 0으로 설정할 수 있다. 예컨대, 스캔 순서가 대각 스캔 순서일 경우, 이진화부(21)는 좌측 상단에 존재하는 첫번째 부블록(521)을 제외한 나머지 부블록(522,523,524)의 CSBF 정보를 0으로 설정할 수 있다. 본 개시에 따른 이진화부(21)는 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 블록의 크기가 8×8의 크기일 경우 스캔 순서상 마지막에 위치한 부블록을 제외한 나머지 부블록의 CSBF 정보를 모두 0으로 설정할 수 있다.Referring to FIG. 5B, in the case where the current block is the sub-block 52 of 8 × 8 size, the CSBF information may be set to 0 in the CSBF information of the subblock located at the end in the scanning order have. For example, if the scan order is a diagonal scan order, the binarization unit 21 may set the CSBF information of the remaining subblocks 522, 523, and 524 to 0 except for the first subblock 521 located at the upper left corner. The binary unit 21 according to the present disclosure determines whether or not a non-zero transform coefficient exists in a subblock, if the size of the current block is 8x8, the remaining subblocks All of the CSBF information of " 0 "

도 5c를 참조하면, 본 개시에 따른 이진화부(21)는 현재 블록이 16×16 크기의 블록(53)인 경우 CSBF 정보는 대각 스캔 순서상 마지막에 존재하는 U개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 0으로 설정할 수 있다. 이때, U는 0 또는 양의 정수일 수 있으며, 도 5c의 예에서는 3으로 표현할 수 있다. 예컨대, 스캔 순서가 대각 스캔 순서일 경우, 이진화부(21)는 좌측 상단에 존재하는 U개의 부블록(531,532,533)을 제외한 나머지 부블록(534,535,536,537,538,539,540,541,542,543,544,545,546)의 CSBF 정보를 0으로 설정할 수 있다. 본 개시에 따른 이진화부(21)는 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 블록의 크기가 16×16의 크기일 경우 스캔 순서상 마지막에 위치한 U개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 모두 0으로 설정할 수 있다.Referring to FIG. 5C, in the case where the current block is a 16 × 16 block 53, the binarization unit 21 according to the present disclosure sets the CSBF information to the remaining sub-blocks excluding the U sub- Can be set to zero. In this case, U may be 0 or a positive integer, and may be expressed as 3 in the example of FIG. 5C. For example, when the scan order is the diagonal scan order, the binarization unit 21 may set the CSBF information of the remaining subblocks 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546 excluding the U subblocks 531, The binarization unit 21 according to the present disclosure determines whether or not the non-zero transform coefficient exists in the subblock, if the size of the current block is 16 x 16, excluding the U subblocks positioned at the end in the scan order All the CSBF information of the subblock can be set to zero.

또한, 본 개시에 따른 이진화부(21)는 현재 블록이 32×32 크기의 블록(504)인 경우 CSBF 정보는 스캔 순서상 마지막에 존재하는 V개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 0으로 설정할 수 있다. 이때, V는 0 또는 양의 정수일 수 있으며, 본 개시에서는 10일 수 있다.In the case where the current block is a 32 × 32 block 504, the CSBF information of the remaining subblocks excluding V subblocks existing last in the scan order is set to 0 . At this time, V may be 0 or a positive integer, which may be 10 in the present disclosure.

이와 같이 블록 크기에 기초하여 설정된 CSBF 정보에 대한 구문 요소는 바이패스 코딩부(25)로 전달 될 수 있다. 따라서, 바이패스 코딩부(25)는 CSBF 정보의 비트열을 모두 바이패스 모드에 따라 산술 부호화한다. The syntax elements for the CSBF information set based on the block size can be transferred to the bypass coding unit 25. [ Therefore, the bypass coding unit 25 performs arithmetic coding on all the bit strings of the CSBF information according to the bypass mode.

본 개시의 일 실시예에서, 이진화부(21)가 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 블록 크기에 따라 CSBF 정보를 설정하고, 바이패스 코딩부(25)가 CSBF 정보 비트열을 바이패스 모드에 따라 산술 부호화하는 것을 예시하였으나, 본 개시가 이를 한정하는 것은 아니다.In an embodiment of the present disclosure, the binarization unit 21 sets the CSBF information according to the block size regardless of whether or not the non-zero conversion coefficient in the subblock exists, and the bypass coding unit 25 sets the CSBF information bit Although arithmetic coding of the columns according to the bypass mode is exemplified, the present disclosure is not limited thereto.

본 개시는 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 블록 크기에 따라 CSBF 정보를 설정할 수 있으면 충분하다. 따라서, 이진화부(21)는 부블록 내의 0이 아닌 변환 계수가 존재하는지가 블록 크기에 기초하여 설정되었음을 나타내는 정보, 블록 크기를 지시하는 정보를 바이패스 코딩부(25)로 전달하고, 바이패스 코딩부(25)는 부블록 내의 0이 아닌 변환 계수가 존재하는지가 블록 크기에 기초하여 설정되었음을 나타내는 정보, 블록 크기를 지시하는 정보를 바이패스 모드에 따라 산술 부호화할 수 있다. It is sufficient for this disclosure to be able to set the CSBF information according to the block size regardless of whether there is a non-zero conversion coefficient in the subblock. Therefore, the binarization unit 21 transmits to the bypass coding unit 25 information indicating that the non-zero transform coefficient in the subblock exists, based on the block size, and information indicating the block size, The coding unit 25 can perform arithmetic coding on information indicating that the non-zero transform coefficient in the subblock exists, based on the block size, and information indicating the block size, according to the bypass mode.

다른 예로서, 본 개시에 따른 이진화부(21)는 CSBF 정보를 블록 형태에 기초하여 설정하고, 이렇게 설정된 구문 요소에 따라 CSBF 정보를 부호화할 수 있다. As another example, the binarization unit 21 according to the present disclosure may set the CSBF information based on the block type, and may code the CSBF information according to the set syntax element.

도 6a 내지 6c는 본 개시의 일 실시예에 따라 설정되는 CSBF 정보를 예시하는 도면이다. 도 6a는 4×8 단위의 변환 블록을 예시하고, 도 6b는 8×4 단위의 변환 블록을 예시하고, 도 6c는 16×4 단위의 변환 블록을 예시한다.6A-6C are diagrams illustrating CSBF information set in accordance with one embodiment of the present disclosure. FIG. 6A illustrates a transform block of 4 × 8 units, FIG. 6B illustrates a transform block of 8 × 4 units, and FIG. 6C illustrates a transform block of 16 × 4 units.

도 6a를 참조하면, 본 개시에 따른 이진화부(21)는 블록이 4×8 형태의 블록(61)인 경우, 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 상단에 위치한 부블록(611)을 제외한 나머지 부블록(612)의 CSBF 정보를 0으로 설정할 수 있다. Referring to FIG. 6A, in the case where the block is a 4x8 block 61, the binarization unit 21 according to the present disclosure determines whether or not a nonzero transform coefficient exists in the subblock, The CSBF information of the remaining subblocks 612 excluding the subblock 611 located in the subblock 611 can be set to zero.

도 6b를 참조하면, 본 개시에 따른 이진화부(21)는 블록이 8×4 형태의 블록(62)인 경우, 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 좌측에 위치한 부블록(621)을 제외한 나머지 부블록(622)의 CSBF 정보를 0으로 설정할 수 있다. Referring to FIG. 6B, in the case where the block is an 8x4 block 62, the binarization unit 21 according to the present disclosure determines whether or not a nonzero transform coefficient exists in the subblock, The CSBF information of the remaining subblocks 622 excluding the subblock 621 located in the subblock 622 can be set to zero.

도 6c를 참조하면, 본 개시에 따른 이진화부(21)는 블록이 16×4 형태의 블록(63)인 경우, 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 스캔 순서상 마지막에 존재하는 W개의 부블록(631,632)을 제외한 나머지 부블록(633,634)의 CSBF 정보를 0으로 설정할 수 있다. 이때, W는 0 또는 양의 정수일 수 있으며, 본 개시에서는 2일 수 있다.Referring to FIG. 6C, in the case where the block is a 16x4 block 63, the binarization unit 21 according to the present disclosure determines whether or not the current sub-block is scanned The CSBF information of the remaining subblocks 633 and 634 excluding the W subblocks 631 and 632 existing at the end of the sequence can be set to zero. At this time, W may be 0 or a positive integer and may be 2 in this disclosure.

추가적으로, 본 개시에 따른 이진화부(21)는 블록이 32×16 형태의 블록인 경우, 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 스캔 순서상 마지막에 존재하는 Z개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 0으로 설정할 수 있다. 이때, Z는 0 또는 양의 정수일 수 있으며, 본 개시에서는 6일 수 있다.In addition, in the case where the block is a 32x16 block, the binarization unit 21 according to the present disclosure determines whether the non-zero conversion coefficient in the sub-block exists or not, The CSBF information of the remaining subblocks excluding the subblocks can be set to zero. Z may be zero or a positive integer, and may be six in this disclosure.

한편, 컨텍스트 모델러(22)는 레귤러 코딩부(24)에 현재 신택스 엘리먼트의 산술 부호화를 위한 컨텍스트 모델을 제공한다. 특히, 컨텍스트 모델러(22)는 레귤러 코딩부(24)에서 변환 계수의 비트열을 산술 부호화할 때, 비트열의 각 빈(bin)을 부호화하기 위한 이진값의 발생 확률을 레귤러 코딩부(24)로 출력한다. 컨텍스트 모델은 빈(bin)에 대한 확률 모델로써, 0과 1 중 어떤 값이 MPS(Most Probable Symbol)및 LPS(Least Probable Symbol)에 해당하는지에 대한 정보와, MPS 또는 LPS의 확률을 포함한다. 컨텍스트 모델러(22)는 레귤러 코딩부(24)에서 부호화된 빈(bin)의 값이 0인지 1인지에 따라서 컨텍스트 모델을 업데이트한다.On the other hand, the context modeler 22 provides the regular coding unit 24 with a context model for arithmetic coding of the current syntax element. In particular, when the regular modeling unit 22 performs arithmetic coding on the bit stream of the transform coefficient in the regular coding unit 24, the context modeler 22 sends the occurrence probability of the binary value for coding each bin of the bit stream to the regular coding unit 24 Output. The context model is a probability model for a bin. It contains information about which values 0 and 1 correspond to MPS (Most Probable Symbol) and LPS (Least Probable Symbol), and MPS or LPS probabilities. The context modeler 22 updates the context model according to whether the bin value encoded in the regular coding unit 24 is 0 or 1.

레귤러 코딩부(24)는 컨텍스트 모델러(22)로부터 제공된 컨텍스트 모델, 즉 MPS(Most Probable Symbol), LPS(Least Probable Symbol)에 대한 정보 및 MPS 또는 LPS의 확률 정보에 기초하여 상기 변환 계수 비트열을 구성하는 각 빈(bin)들을 산술 부호화한다.The regular coding unit 24 receives the conversion coefficient bit string based on the context model provided from the context modeler 22, that is, information on MPS (Most Probable Symbol), LPS (Least Probable Symbol), and MPS or LPS probability information And arithmetic-codes each bin constituting it.

본 개시의 일 실시예에 따른 바이패스 코딩부(25)는 마지막 중요 계수의 위치에 대한 비트열과, CSBF 정보에 대한 비트열을 바이패스 모드에 따라 산술 부호화한다. 바이패스 모드는 0과 1의 이진 신호의 발생 확률이 고정된 값을 갖는다. 따라서, 본 개시의 일 실시예에 따른 엔트로피 부호화기(20)는 마지막 중요 계수의 위치에 대한 비트열과, CSBF 정보에 대한 비트열을 산출하는게 소모되는 자원을 최소화하여, 효율적으로 부호화를 처리할 수 있다.The bypass coding unit 25 according to an embodiment of the present disclosure arithmetically codes the bit string for the position of the last significant coefficient and the bit string for the CSBF information according to the bypass mode. In the bypass mode, the probability of occurrence of binary signals of 0 and 1 has a fixed value. Therefore, the entropy encoder 20 according to an embodiment of the present disclosure can efficiently process the encoding by minimizing the resource consumed in calculating the bit stream for the position of the last significant coefficient and the bit stream for the CSBF information .

나아가, 본 개시의 일 실시예에 따른 엔트로피 부호화기를 통해, 마지막 중요 계수의 위치에 대한 구문 요소와, CSBF 정보에 대한 구문 요소를 미리 정해진 규칙으로 고정함으로써, 주파수 영역으로 변환된 변환 계수들 중 저주파수에 해당하는 중요 변환 계수들에 대해서만 율 계산을 수행하여 부호화기의 복잡도를 감소시킬 수 있다.Further, by fixing the syntax element for the position of the last significant coefficient and the syntax element for the CSBF information to the predetermined rule through the entropy encoder according to the embodiment of the present disclosure, the low frequency It is possible to reduce the complexity of the encoder by performing the rate calculation only on the significant transform coefficients.

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

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

영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.When an image bitstream is input in the image encoder, the input bitstream may be decoded in a procedure opposite to that of the image encoder.

엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit 210 can perform entropy decoding in a procedure opposite to that in which entropy encoding is performed in the entropy encoding unit of the image encoder. 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.

신택스 엘리먼트는 전술한 비디오 부호화 장치(10)에 의하여 이진화 및 산술 부호화 과정을 통해 부호화되었으므로, 엔트로피 복호화부(210)는 부호화 과정의 역과정으로 신택스 엘리먼트를 산술 복호화 및 역이진화하여 복원한다.Since the syntax element is coded by the above-described video coding apparatus 10 through the binarization and arithmetic coding processes, the entropy decoding unit 210 restores the syntax element by performing arithmetic decoding and inverse binarization on the inverse process of the coding process.

엔트로피 복호화부(210)는 수신된 비트스트림으로부터 현재 블록의 마지막 중요 계수의 위치와 관련된 신택스 엘리먼트(예, 마지막 중요 계수 위치의 x축 성분 프리픽스 비트열 및 x축 성분 서픽스 비트열 각각에 대응되는 x축 성분 프리픽스 신택스 엘리먼트 및 x축 서픽스 신택스 엘리먼트와, 마지막 중요 계수 위치의 y축 성분 프리픽스 비트열 및 y축 성분 서픽스 비트열 각각에 대응되는 y축 성분 프리픽스 신택스 엘리먼트 및 y축 성분 서픽스 신택스 엘리먼트)를 획득한다.The entropy decoding unit 210 extracts, from the received bitstream, a syntax element related to the position of the last significant coefficient of the current block (e.g., an x-axis component prefix bit string and an x-axis component suffix bit string axis component prefix syntax element and an x-axis suffix syntax element corresponding to the y-axis component prefix bit string and the y-axis component suffix bit string of the last significant coefficient position, and a y-axis component prefix syntax element and a y- Syntax element).

그리고, 엔트로피 복호화부(210)는 마지막 중요 계수의 위치와 관련된 신택스 엘리먼트(x축 성분 프리픽스 신택스 엘리먼트 및 y축 성분 프리픽스 신택스 엘리먼트)에 대응되는 산술 복호화 방식, 즉 컨텍스트 모델을 적용하여 산술 복호화를 수행함으로써, 마지막 중요 계수의 위치에 대한 비트열(예, x축 성분 프리픽스 비트열 및 y축 성분 프리픽스 비트열)을 획득할 수 있다. The entropy decoding unit 210 performs arithmetic decoding by applying an arithmetic decoding method corresponding to a syntax element (x-axis component prefix syntax element and y-axis component prefix syntax element) related to the position of the last significant coefficient, i.e., a context model (E.g., an x-axis component prefix bit string and a y-axis component prefix bit string) for the position of the last significant coefficient.

또한, 엔트로피 복호화부(210)는 마지막 중요 계수의 위치와 관련된 신택스 엘리먼트(예, x축 성분 서픽스 신택스 엘리먼트 및 y축 성분 서픽스 신택스 엘리먼트)에 대응되는 산술 복호화 방식, 즉 바이패스 모드에 따라서 산술 복호화를 수행함으로써, 마지막 중요 계수의 위치에 대한 비트열(예, x축 성분 서픽스 비트열 및 y축 성분 서픽스 비트열)을 획득할 수 있다. In addition, the entropy decoding unit 210 may perform an arithmetic decoding corresponding to the position of the last significant coefficient (e.g., an x-axis component suffix syntax element and a y-axis component suffix syntax element) By performing arithmetic decoding, it is possible to obtain a bit string (e.g., an x-axis component suffix bit string and a y-axis component suffix bit string) for the position of the last significant coefficient.

전술한 바와 같이, 마지막 중요 계수의 위치에 대한 비트열(예, x축 성분 프리픽스 비트열 및 y축 성분 프리픽스 비트열, x축 성분 서픽스 비트열 및 y축 성분 서픽스 비트열)이 획득되면, 엔트로피 복호화부(210)는 마지막 중요 계수의 위치에 대한 비트열을 역이진화하고, 역이진화된 정보를 조합하여 마지막 중요 계수의 위치를 복원할 수 있다. As described above, when a bit string (e.g., an x-axis component prefix bit string and a y-axis component prefix bit string, an x-axis component suffix bit string and a y-axis component suffix bit string) , The entropy decoding unit 210 can reverse-binarize the bit stream for the position of the last significant coefficient, and combine the inverse binarized information to restore the position of the last significant coefficient.

특히, 엔트로피 복호화부(210)는 블록 크기 및 블록 형태 중 적어도 하나에 기초하여 설정된 신택스 엘리먼트를 반영하여, 바이패스 모드에 따른 산술 복호화를 수행함으로써, CSBF 정보(부블록 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보)를 획득할 수 있다. In particular, the entropy decoding unit 210 performs arithmetic decoding according to the bypass mode by reflecting the syntax element set based on at least one of the block size and the block type, so that the CSBF information (the non-zero conversion coefficient in the sub- Information indicative of whether or not the information exists).

또한, 본 개시의 일 실시예에 따른 엔트로피 복호화부(210)는 블록 크기 및 블록 형태 중 적어도 하나에 기초하여 설정된 마지막 중요 계수의 위치의 신택스 엘리먼트를 반영하여, 바이패스 모드에 따른 산술 복호화를 수행함으로써, 변환 블록 내에서 마지막 중요 계수의 위치를 획득할 수 있다. In addition, the entropy decoding unit 210 according to an embodiment of the present disclosure may perform arithmetic decoding according to the bypass mode by reflecting the syntax element at the position of the last significant coefficient set based on at least one of the block size and the block type , It is possible to obtain the position of the last significant coefficient in the transform block.

본 개시의 일 실시예에 따른 엔트로피 복호화부(210)는 복호화를 처리함에 있어서, CSBF 정보(부블록 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보) 및 마지막 중요 계수의 위치 중 적어도 하나를 바이패스 모드에 따른 산술 복호화를 통해 획득함으로써, 효율적으로 복호화 처리를 수행할 수 있다.The entropy decoding unit 210 according to an embodiment of the present disclosure decodes at least one of the CSBF information (information indicating whether a non-zero transform coefficient exists in the subblock exists) and the position of the last significant coefficient By acquiring through arithmetic decoding according to the path mode, it is possible to efficiently perform decoding processing.

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

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

역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values of the re-arranged blocks.

역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit 225 may perform an inverse DCT, an inverse DST, and an inverse KLT on the DCT, DST, and KLT transformations performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit 225 of the image decoder, a transform technique (e.g., DCT, DST, KLT) may be selectively performed according to a plurality of information such as a prediction method, a size of a current block, and a prediction direction.

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

전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 N x N 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when intra prediction is performed in the same manner as in the image encoder, when the size of the prediction unit is the same as the size of the conversion unit, pixels existing on the left side of the prediction unit, pixels existing on the upper left side, However, when the size of the prediction unit differs from the size of the prediction unit in intra prediction, intraprediction is performed using a reference pixel based on the conversion unit . It is also possible to use intra prediction using N x N divisions for only the minimum coding unit.

예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information such as prediction unit information input from the entropy decoding unit 210, 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 prediction unit 230 predicts the current prediction based on the information included in at least one of the previous picture of the current picture or the following picture including the current prediction unit by using information necessary for inter prediction of the current prediction unit provided by the image encoder, 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 inter prediction, a motion prediction method of a prediction unit included in a corresponding encoding unit on the basis of an encoding unit includes a skip mode, a merge mode, an AMVP mode, and an intra block copy mode It is possible to judge whether or not it is any method.

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

참조 픽셀 보간부는 예측 단위의 예측 모드가 참조 픽셀을 보간한 픽셀값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 픽셀을 보간하여 정수값 이하의 픽셀 단위의 참조 픽셀을 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 픽셀을 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 픽셀은 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolator may interpolate the reference pixel to generate a reference pixel in units of pixels less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value obtained by interpolating the reference pixel. The reference pixel may not be interpolated in the prediction mode in which the prediction mode of the current prediction unit generates a 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.

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

영상 부호화기로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. When information on whether a deblocking filter is applied to a corresponding block or picture from the image encoder or a deblocking filter is applied, information on whether a strong filter or a weak filter is applied can be provided. In the deblocking filter of the video decoder, the deblocking filter related information provided by the video encoder is provided, and the video decoder can perform deblocking filtering for 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.

적응형 루프 필터는 부호화기로부터 제공된 적응형 루프 필터 적용 여부 정보, 적응형 루프 필터 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 적응형 루프 필터 정보는 특정한 파라미터 셋에 포함되어 제공될 수 있다.The adaptive loop filter can be applied to an encoding unit based on adaptive loop filter application information provided from an encoder, adaptive loop filter coefficient information, and the like. Such adaptive loop filter information may be provided in a particular set of parameters.

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

도 8은 본 개시의 일 실시예에 따른 변환 계수 부호화 방법의 순서를 도시하는 흐름도이다. 8 is a flowchart showing a procedure of a transform coefficient encoding method according to an embodiment of the present disclosure.

변환 계수 부호화 방법은 영상 부호화 장치에 구비되는 변환 계수 부호화 장치에 의해 수행될 수 있으며, 상기 변환 계수 부호화 장치는 엔트로피 부호화를 처리하는 장치 일 수 있다. The transform coefficient encoding method may be performed by a transform coefficient encoder included in the image encoding apparatus, and the transform coefficient encoder may be an apparatus for processing entropy encoding.

단계(S801)에서, 변환 계수 부호화 장치는, 대각 스캔(diagonal scan), 수평 스캔(horizontal scan), 수직 스캔(vertical scan) 중에서 적어도 하나를 이용하여 변환 계수를 배열 형태로 재정렬하는 스캔을 할 수 있다.In step S801, the transform coefficient encoding apparatus may perform a scan for rearranging the transform coefficients in an array form using at least one of a diagonal scan, a horizontal scan, and a vertical scan. have.

단계(S802)에서, 변환 계수 부호화 장치는, 변환 블록 내에서 마지막에 존재하는 0이 아닌 변환 계수인 마지막 중요 계수의 위치에 대한 구문 요소를 부호화할 수 있다. 이때, 변환 블록 내 마지막에 존재하는 0이 아닌 변환 계수는 순방향 스캔 순서의 경우에서 마지막에 존재하는 0이 아닌 변환 계수를 의미할 수 있다.In step S802, the transform coefficient encoding apparatus can encode the syntax element for the position of the last significant coefficient, which is the last non-zero transform coefficient existing in the transform block. At this time, the non-zero transform coefficient existing at the end of the transform block may mean the last non-zero transform coefficient in the forward scan order case.

구체적으로, 변환 계수 부호화 장치는, 현재 블록의 크기에 기초하여 현재 부호화되는 신택스 엘리먼트를 프리픽스 및 서픽스로 분류하고, 프리픽스 및 서픽스에 대해서 서로 독립적인 소정 이진화 방식을 적용하여 이진화하여 프리픽스 비트열 및 서픽스 비트열을 출력할 수 있다. 예를 들어, 변환 계수 부호화 장치는, 현재 블록의 폭(width)에 기초하여, 마지막 중요 계수(last significant coefficient)의 열(column) 위치를 프리픽스(last_sig_coeff_x_prefix) 및 서픽스(last_sig_coeff_x_suffix)로 분류하고, 열 위치의 프리픽스(last_sig_coeff_x_prefix)에 대해 소정의 제 1 이진화 방식을 적용하여 열 위치의 프리픽스 비트열을 출력하고, 열 위치의 서픽스(last_sig_coeff_x_suffix)에 대해 소정의 제 2 이진화 방식을 적용하여 열 위치에 대한 서픽스 비트열을 출력할 수 있다. Specifically, the transform coefficient encoding apparatus classifies the syntax element currently encoded based on the size of the current block into a prefix and a suffix, applies a predetermined binarization method independent of each other to the prefix and the suffix, and binarizes the prefix and the suffix, And a suffix bit string. For example, the transform coefficient encoding apparatus classifies the column position of the last significant coefficient into a prefix (last_sig_coeff_x_prefix) and a suffix (last_sig_coeff_x_suffix) based on the width of the current block, A predetermined first binarization method is applied to the prefix of the column position (last_sig_coeff_x_prefix) to output a prefix bit string at the column position, and a predetermined second binarization method is applied to the suffix at the column position (last_sig_coeff_x_suffix) It is possible to output the suffix bit string for the bit stream.

또한, 변환 계수 부호화 장치는, 현재 블록의 높이(height)에 기초하여 결정된 임계치를 기준으로, 마지막 중요 계수(last significant coefficient)의 행 위치를 프리픽스(last_sig_coeff_y_prefix) 및 서픽스(last_sig_coeff_y_ suffix)로 분류하고, 행 위치의 프리픽스(last_sig_coeff_y_prefix)에 대해 제 1 이진화 방식을 적용하여 행위치의 프리픽스 비트열을 출력하고, 행 위치의 서픽스(last_sig_coeff_y_ suffix)에 대해 제 2 이진화 방식을 적용하여 행 위치의 서픽스 비트열을 출력할 수 있다. The transform coefficient encoding apparatus classifies the row position of the last significant coefficient into a prefix (last_sig_coeff_y_prefix) and a suffix (last_sig_coeff_y_prefix) based on a threshold determined based on the height of the current block , A prefix bit string of an action value is output by applying a first binarization method to a prefix (last_sig_coeff_y_prefix) of a row position, and a second binary method is applied to a suffix of a row position (last_sig_coeff_y_prefix) You can output the heat.

전술한 제 1 이진화 방식과 제 2 이진화 방식은 서로 독립적으로, 동일하거나 다른 이진화 방식일 수 있다.The first binarization method and the second binarization method may be the same or different from each other.

신택스 엘리먼트의 유형에 따라서, 비트열의 각 빈(Bin)은 컨텍스트 모델을 적용하여 산술 부호화되거나, 바이패스 모드에 의하여 산술 부호화될 수 있다. Depending on the type of syntax element, each bin of the bitstream may be arithmetically encoded by applying a context model, or arithmetically encoded by bypass mode.

변환 계수 부호화 장치는, 마지막 중요 계수의 위치를 프리픽스 비트열 및 서픽스 비트열로 분류한 경우, 먼저 프리픽스로 분류된 비트열들을 순차적으로 CABAC에 따른 컨텍스트 모델을 적용하여 산술 부호화하고, 서픽스로 분류된 비트열들을 바이패스(bypass) 모드로 산술 부호화할 수 있다. 바람직하게, 변환 계수 부호화 장치는, 마지막 중요 계수(last significant coefficient)의 위치에 대한 구문 요소를 블록 크기에 기초하여 설정하고, 이렇게 설정된 구문 요소에 따라 마지막 중요 계수의 위치에 대한 구문 요소를 부호화할 수 있다. 여기서, 상기 블록의 크기는 변환 유닛의 크기 및 변환 블록의 크기 중 적어도 하나로 설정될 수 있다. When the position of the last significant coefficient is categorized into a prefix bit string and a suffix bit string, the transformation coefficient coding device first performs arithmetic coding on the bitstreams classified into the prefix by sequentially applying the context model according to CABAC, The classified bitstreams can be arithmetically encoded in a bypass mode. Preferably, the transform coefficient encoding apparatus sets the syntax element for the position of the last significant coefficient on the basis of the block size, and encodes the syntax element for the position of the last significant coefficient according to the set syntax element . Here, the size of the block may be set to at least one of the size of the conversion unit and the size of the conversion block.

이하, 도 3a 및 3b를 참조하여, 블록의 크기에 기초하여 마지막 중요 계수의 위치에 대한 구문 요소를 부호화 하는 과정을 상세히 설명한다.Hereinafter, with reference to FIGS. 3A and 3B, the process of encoding the syntax element for the position of the last significant coefficient based on the size of the block will be described in detail.

현재 블록의 크기가 4×4인 경우 마지막 중요 계수의 위치가, 4×4 블록 내의 (N, M)으로 설정될 수 있다(N, M은 자연수, 1≤N≤4, 1≤M≤4). 본 발명의 일 실시예에서는 4×4 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치가 (4,4)로 설정됨을 예시한다. 따라서, 마지막 중요 계수는 실제 위치한 영역과는 상관 없이, 현재 블록이 4×4 크기의 블록일 경우 모두 동일하게 (O, P), 즉 (4, 4)로 설정될 수 있다.If the current block size is 4x4, the position of the last significant coefficient can be set to (N, M) in the 4x4 block (where N, M are natural numbers, 1? N? 4, 1? ). In an embodiment of the present invention, it is illustrated that the position of the significant coefficient is set to (4, 4) for a block having a size of 4 × 4 block. Therefore, the last significant coefficient can be set to (O, P), i.e., (4, 4), if the current block is a 4 × 4 block, irrespective of the actual positioned region.

현재 블록의 크기가 8×8인 경우 마지막 중요 계수의 위치가, 8×8 블록 내의 (O, P)로 설정될 수 있다(O, P는 자연수, 1≤O≤4, 1≤P≤4). 본 발명의 일 실시예에서는 8×8 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치가 (4,4)로 설정됨을 예시한다. 따라서, 현재 블록이 8×8의 크기의 블록일 경우, 마지막 중요 계수는 실제 위치한 영역과는 상관 없이 (O, P), 즉 (4, 4)로 설정될 수 있다.If the current block size is 8x8, the position of the last significant coefficient can be set to (O, P) in the 8x8 block (where O, P are natural numbers, 1 < ). In an embodiment of the present invention, it is illustrated that the position of the significant coefficient is set to (4, 4) for a block having a size of 8x8 block. Therefore, if the current block is a block of 8 × 8 size, the last significant coefficient can be set to (O, P), ie, (4, 4), regardless of the actual location.

현재 블록의 크기가 16×16인 경우 마지막 중요 계수의 위치가, 16×16 블록 내의 (Q, R) 위치로 설정될 수 있다(Q, R 은 자연수, 1≤Q≤16, 1≤R≤16). 본 발명의 일 실시예에서는 16×16 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치가 (8, 8)로 설정됨을 예시한다. 따라서, 현재 블록이 16×16의 크기의 블록일 경우, 마지막 중요 계수는 실제 위치한 영역과는 상관 없이, (Q, R), 즉 (8, 8)로 설정할 수 있다.If the current block size is 16x16, the position of the last significant coefficient can be set to the (Q, R) position within the 16x16 block (Q, R are natural numbers, 1? Q? 16, 16). In an embodiment of the present invention, it is illustrated that the position of a significant coefficient is set to (8, 8) for a block having a size of 16 × 16 blocks. Therefore, if the current block is a 16 × 16 block, the last significant coefficient can be set to (Q, R), ie, (8, 8), irrespective of the actual location.

현재 블록의 크기가 32×32인 경우 마지막 중요 계수의 위치는, 32×32 블록 내의 (S, T) 위치로 설정될 수 있다(S, T는 자연수, 1≤S≤16, 1≤T≤16). 본 발명의 일 실시예에서는 32×32 블록의 크기를 갖는 블록에 대해서 중요 계수의 위치를 (16, 16)로 설정함을 예시한다. 마찬가지로, 마지막 중요 계수는 실제 위치한 영역과는 상관 없이, 현재 블록의 크기(예, 32×32)에 따라, (S, T), 즉 (16, 16)로 설정할 수 있다.If the current block size is 32 x 32, the position of the last significant coefficient can be set to the (S, T) position within the 32x32 block (S, T are natural numbers, 1? S? 16, 1? T? 16). In an embodiment of the present invention, the position of the significant coefficient is set to (16, 16) for a block having a size of 32x32 blocks. Similarly, the last significant coefficient can be set to (S, T), i.e., (16, 16), depending on the size of the current block (e.g., 32 x 32), irrespective of the actual located region.

이와 같이 블록 크기에 기초하여 마지막 중요 계수의 위치가 설정될 수 있으며, 변환 계수 부호화 장치는, 현재 블록의 크기를 기준으로 설정된 마지막 중요 계수의 위치를 산술 부호화 할 수 있다. 특히, 변환 계수 부호화 장치는, 마지막 중요 계수의 위치에 대한 구문 요소를 바이패스 모드로 산술 부호화하는 장치로 전달 할 수 있으며, 마지막 중요 계수의 위치에 대한 구문 요소의 서픽스와 프리픽스 모두 바이패스 모드로 처리할 수 있다. In this way, the position of the last significant coefficient can be set based on the block size, and the transform coefficient encoding apparatus can perform arithmetic coding on the position of the last significant coefficient set based on the size of the current block. In particular, the transform coefficient encoding device may pass a syntax element for the position of the last significant coefficient to an arithmetic coding device in bypass mode, and both the suffix and the prefix of the syntax element for the position of the last significant coefficient . ≪ / RTI >

변환 계수 부호화 장치는, 마지막 중요 계수의 위치를 실제 위치한 영역과는 상관 없이, 블록 크기에 따라 미리 정해진 영역으로 설정하고, 마지막 중요 계수의 위치의 서픽스 비트열 및 프리픽스 비트열을 바이패스 모드에 따라 산술 부호화하는 것을 예시하였으나, 본 개시가 이를 한정하는 것은 아니다.The transform coefficient encoding apparatus sets the position of the last significant coefficient to a predetermined region according to the block size regardless of the actual positioned region and sets the suffix bit string and the prefix bit string at the position of the last significant coefficient in the bypass mode The arithmetic coding is exemplified, but the present disclosure is not limited thereto.

본 개시는 마지막 중요 계수의 위치가 실제 위치한 영역과는 상관 없이, 블록 크기에 따라 미리 정해진 영역으로 설정될 수 있으면 충분하다. 따라서, 변환 계수 부호화 장치는, 마지막 중요 계수의 위치가 블록 크기에 기초하여 설정되었음을 나타내는 정보, 블록 크기를 지시하는 정보를 바이패스 모드에 따라 산술 부호화할 수도 있다. It is sufficient that the present disclosure can be set to a predetermined region according to the block size irrespective of the region where the position of the last significant coefficient is actually located. Therefore, the transform coefficient encoding apparatus may perform arithmetic coding on information indicating that the position of the last significant coefficient is set based on the block size, information indicating the block size, according to the bypass mode.

또한 다른 예로서, 변환 계수 부호화 장치는, 마지막 중요 계수의 위치에 대한 구문 요소를 블록 형태에 기초하여 설정하고, 이렇게 설정된 구문 요소에 따라 마지막 중요 계수의 위치에 대한 구문 요소를 부호화할 수 있다. As another example, the transform coefficient encoding apparatus may set the syntax element for the position of the last significant coefficient based on the block type, and may code the syntax element for the position of the last significant coefficient according to the set syntax element.

이하, 도 4a 및 4b를 참조하여, 블록 형태에 기초하여 마지막 중요 계수의 위치에 대한 구문 요소를 부호화하는 동작을 예시한다.Hereinafter, referring to Figs. 4A and 4B, the operation of encoding the syntax element for the position of the last significant coefficient based on the block form is illustrated.

현재 블록의 형태가 4×2인 경우, 변환 계수 부호화 장치는, 마지막 중요 계수의 위치를, 4×2 블록 내의 (N', M')의 설정할 수 있다(N', M'은 자연수, 1≤N'≤4, 1≤M'≤2). 본 발명의 일 실시예에서는 4×2 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치를 (2, 1)로 설정함을 예시한다. 이에 따라, 변환 계수 부호화 장치는, 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 4×2의 크기일 경우 모두 동일하게 (N', M'), 즉 (2, 1)로 설정할 수 있다. (N ', M') in the 4 × 2 block (N ', M' is a natural number, 1 ? N? 4, 1? M'? 2). In an embodiment of the present invention, it is exemplified that the position of the significant coefficient is set to (2, 1) for a block having a shape of 4 × 2 blocks. Accordingly, the transform coefficient encoding apparatus can obtain the same (N ', M'), i.e., (2, 1) when the shape of the current block is 4 × 2, irrespective of the region where the last significant coefficient is actually located. .

현재 블록의 형태가 4×8인 경우 마지막 중요 계수의 위치는, 4×8 블록 내의 (O', P')의 설정될 수 있고(O', P'는 자연수, 1≤O'≤4, 1≤P'≤4), 본 발명의 일 실시예에서는 4×8 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치가 (2, 4)로 설정될 수 있다. 따라서, 변환 계수 부호화 장치는, 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 4×8 크기일 경우 모두 동일하게 (O', P'), 즉 (2, 4)로 설정할 수 있다.If the current block type is 4x8, the position of the last significant coefficient can be set to (O ', P') in a 4x8 block (O ', P' is a natural number, 1 & 1 ≤ P ≤ 4). In an embodiment of the present invention, the position of the significant coefficient may be set to (2, 4) for a block having the form of 4x8 block. Therefore, regardless of the area where the last significant coefficient is actually located, the transform coefficient encoding apparatus can set the same (O ', P'), i.e., (2, 4) .

현재 블록의 형태가 16×4인 경우 마지막 중요 계수의 위치는, 16×4 블록 내의 (Q', R') 위치로 설정할 수 있다(Q', R'은 자연수, 1≤Q'≤16, 1≤R'≤4). 본 발명의 일 실시예에서는 16×4 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치가 (4, 1)로 설정됨을 예시한다. 마찬가지로, 변환 계수 부호화 장치는, 마지막 중요 계수가 실제 위치한 영역과는 상관 없이, 현재 블록의 형태가 16×4의 형태의 블록에 대해 마지막 중요 계수의 위치를 모두 동일하게 (Q', R'), 즉 (4, 1)로 설정할 수 있다.If the current block type is 16 × 4, the position of the last significant coefficient can be set to the position (Q ', R') in the 16 × 4 block (Q ', R' is a natural number, 1≤Q'≤16, Lt; = 4). In an embodiment of the present invention, it is illustrated that the position of the significant coefficient is set to (4, 1) for a block having a shape of 16x4 blocks. Likewise, regardless of the region where the last significant coefficient is actually located, the transform coefficient encoding apparatus may be configured so that the positions of the last significant coefficients are all the same (Q ', R') with respect to the block of the 16x4 form of the current block, , I.e., (4, 1).

현재 블록의 형태가 16×32인 경우 마지막 중요 계수의 위치는, 16×32 블록 내의 (S', T') 위치로 설정될 수 있다(S', T'는 자연수, 1≤S'≤16, 1≤T'≤16). 본 발명의 일 실시예에서는 16×32 블록의 형태를 갖는 블록에 대해서 중요 계수의 위치가 (8, 8)로 설정됨을 예시한다. 이를 고려하여, 변환 계수 부호화 장치는 현재 블록의 형태가 16×32의 형태의 블록에 대해, 마지막 중요 계수의 위치를 (S', T'), 즉 (8, 8)로 설정할 수 있다.If the current block type is 16 x 32, the position of the last significant coefficient can be set to a position (S ', T') within a 16x32 block (S ', T' is a natural number, 1 S ' , 1? T '? 16). In an embodiment of the present invention, it is illustrated that the position of the significant coefficient is set to (8, 8) for a block having a shape of 16x32 blocks. In consideration of this, the transform coefficient encoding apparatus can set the position of the last significant coefficient as (S ', T'), i.e., (8, 8), for the block of the current block type of 16x32.

이와 같이 블록 형태에 기초하여 설정된 마지막 중요 계수의 위치에 대한 구문 요소는 모두 바이패스 모드에 따라 산술 부호화 될 수 있다. 특히, 마지막 중요 계수의 위치의 서픽스 비트열 및 프리픽스 비트열을 모두 바이패스 모드에 따라 산술 부호화될 수 있다. Thus, the syntax elements for the position of the last significant coefficient set based on the block type can be arithmetically encoded according to the bypass mode. In particular, both the suffix bit string and the prefix bit string at the position of the last significant coefficient can be arithmetically encoded according to the bypass mode.

본 개시는 마지막 중요 계수의 위치가 실제 위치한 영역과는 상관 없이, 블록 형태에 따라 미리 정해진 영역으로 설정될 수 있으면 충분하다. 따라서, 변환 계수 부호화 장치는 마지막 중요 계수의 위치가 블록 형태에 기초하여 설정되었음을 나타내는 정보, 블록 형태를 지시하는 정보를 바이패스 모드에 따라 산술 부호화할 수 있다.It is sufficient that the present disclosure can be set to a predetermined region according to the block shape irrespective of the region where the position of the last significant coefficient is actually located. Therefore, the transform coefficient encoding apparatus can arithmetically encode information indicating that the position of the last significant coefficient is set based on the block type, information indicating the block type according to the bypass mode.

나아가, 전술한 실시예에서, 변환 계수 부호화 장치가 마지막 중요 계수의 위치를 블록의 크기에 따라 미리 정해진 영역으로 설정하거나, 블록 형태에 따라 미리 정해진 영역으로 설정하는 것을 예시하였으나, 변환 계수 부호화 장치는 블록의 크기와 블록 형태를 모두 고려하여 마지막 중요 계수의 위치를 미리 정해진 영역으로 설정하는 것도 가능하다. 이 경우, 변환 계수 부호화 장치는 블록의 크기 및 블록 형태 중 적어도 하나에 의해 마지막 중요 계수의 위치를 설정하였음을 지시하는 정보, 블록의 크기 또는 블록 형태를 지시하는 정보 등을 바이패스 모드에 따라 산술 부호화할 수 있다.Furthermore, in the above-described embodiment, it is exemplified that the transform coefficient encoding apparatus sets the position of the last significant coefficient to a predetermined region according to the size of the block, or sets the predetermined significant region according to the block type. However, It is also possible to set the position of the last significant coefficient to a predetermined area in consideration of both the size of the block and the block shape. In this case, the transformation-coefficient encoding apparatus may perform an arithmetic operation according to the bypass mode, such as information indicating that the position of the last significant coefficient is set by at least one of the size of the block and the block type, information indicating the size of the block, Can be encoded.

한편, 단계(S803)에서, 변환 계수 부호화 장치는, 중요 맵(significance map)에 대한 부호화를 진행할 수 있다. 중요 맵은 부블록(sub-block) 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보(coded_sub_block_flag) (이하, 'CSBF 정보'라 함.), 및 부블록 내의 각 변환 계수의 값이 0인지 아닌지에 대한 정보(sig_coeff_flag)(이하, 'CSF 정보'라 함.) 중 적어도 하나를 포함할 수 있다. On the other hand, in step S803, the transform coefficient encoding apparatus can proceed to encoding the significance map. The important map includes information (coded_sub_block_flag) indicating whether non-zero transform coefficients exist in a sub-block (hereinafter referred to as 'CSBF information') and whether or not the value of each transform coefficient in the sub- Information (sig_coeff_flag) (hereinafter, referred to as 'CSF information').

도 5a를 참조하면, 변환 계수 부호화 장치는, 4×4 크기의 부블록(51)에 대해 CSBF 정보를 0으로 설정할 수 있다. 변환 계수 부호화 장치는, 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 크기가 4×4의 크기일 경우 모두 동일하게 CSBF 정보를 0으로 설정할 수 있다. Referring to FIG. 5A, the transform coefficient encoding apparatus can set the CSBF information to 0 for the 4 × 4 subblock 51. The transform coefficient encoding apparatus can set the CSBF information to be equal to 0 when the size of the current subblock is 4 x 4 regardless of whether or not the non-zero transform coefficient exists in the subblock.

도 5b를 참조하면, 변환 계수 부호화 장치는, 8×8크기의 부블록(52)에 대해 스캔 순서상 마지막에 위치한 부블록의 CSBF 정보를 0으로 설정할 수 있다. 예컨대, 스캔 순서가 대각 스캔 순서일 경우, 좌측 상단에 존재하는 첫번째 부블록(521)을 제외한 나머지 부블록(522,523,524)의 CSBF 정보를 0으로 설정할 수 있다. 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 8×8크기의 부블록(52)에 대해 스캔 순서상 마지막에 위치한 부블록을 제외한 나머지 부블록의 CSBF 정보를 모두 0으로 설정할 수 있다.Referring to FIG. 5B, the transform coefficient encoding apparatus may set the CSBF information of the subblock located at the end in the scan order to 0 for the subblock 52 of size 8x8. For example, when the scan order is the diagonal scan order, the CSBF information of the remaining subblocks 522, 523, and 524 except for the first subblock 521 at the upper left can be set to zero. The CSBF information of the remaining subblocks except for the subblock located at the end in the scan order with respect to the subblock 52 of the size of 8x8 can be set to all 0 regardless of whether or not the non-zero conversion coefficient in the subblock exists .

도 5c를 참조하면, 16×16 크기의 부블록(53)에 대해 대각 스캔 순서상 마지막에 존재하는 U개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 0으로 설정할 수 있다. 이때, U는 0 또는 양의 정수일 수 있으며, 도 5c의 예에서는 3으로 표현할 수 있다. 예컨대, 스캔 순서가 대각 스캔 순서일 경우, 좌측 상단에 존재하는 U개의 부블록(531,532,533)을 제외한 나머지 부블록(534,535,536,537,538,539,540,541,542,543,544,545,546)의 CSBF 정보를 0으로 설정할 수 있다. 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 크기가 16×16의 크기일 경우 스캔 순서상 마지막에 위치한 U개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 모두 0으로 설정할 수 있다.Referring to FIG. 5C, the CSBF information of the remaining subblocks excluding the U subblocks existing at the end of the diagonal scan order with respect to the 16x16 subblock 53 can be set to zero. In this case, U may be 0 or a positive integer, and may be expressed as 3 in the example of FIG. 5C. For example, when the scan order is the diagonal scan order, the CSBF information of the remaining subblocks 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546 excluding the U subblocks 531, If the size of the current subblock is 16 × 16, regardless of whether there is a non-zero transform coefficient in the subblock, the CSBF information of the remaining subblocks except for the U subblocks positioned at the end of the scan order is all set to 0 Can be set.

또한, 32×32 크기의 부블록(504)은 스캔 순서상 마지막에 존재하는 V개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 0으로 설정할 수 있다. 이때, V는 0 또는 양의 정수일 수 있으며, 본 개시에서는 10일 수 있다.In addition, the 32 × 32 subblock 504 may set the CSBF information of the remaining subblocks excluding the V subblocks existing at the end of the scan order to zero. At this time, V may be 0 or a positive integer, which may be 10 in the present disclosure.

이와 같이 블록 크기에 기초하여 설정된 CSBF 정보에 대한 구문 요소는 모두 바이패스 모드에 따라 산술 부호화처리 할 수 있다. In this manner, all the syntax elements for the CSBF information set based on the block size can be arithmetic-coded according to the bypass mode.

본 개시는 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 블록 크기에 따라 CSBF 정보를 설정할 수 있으면 충분하다. 따라서, 부블록 내의 0이 아닌 변환 계수가 존재하는지가 블록 크기에 기초하여 설정되었음을 나타내는 정보, 블록 크기를 지시하는 정보를 바이패스 모드에 따라 산술 부호화할 수 있다. It is sufficient for this disclosure to be able to set the CSBF information according to the block size regardless of whether there is a non-zero conversion coefficient in the subblock. Therefore, information indicating that a non-zero transform coefficient in the subblock exists is set based on the block size, and information indicating the block size can be arithmetically encoded according to the bypass mode.

다른 예로서, CSBF 정보는 블록 형태에 기초하여 설정되고, 이렇게 설정된 구문 요소에 따라 CSBF 정보를 부호화할 수 있다. As another example, the CSBF information is set based on the block type, and the CSBF information can be encoded according to the set syntax elements.

도 6a 내지 6c는 본 개시의 일 실시예에 따라 설정되는 CSBF 정보를 예시하는 도면이다. 도 6a는 4×8 단위의 변환 블록을 예시하고, 도 6b는 8×4 단위의 변환 블록을 예시하고, 도 6c는 16×4 단위의 변환 블록을 예시한다.6A-6C are diagrams illustrating CSBF information set in accordance with one embodiment of the present disclosure. FIG. 6A illustrates a transform block of 4 × 8 units, FIG. 6B illustrates a transform block of 8 × 4 units, and FIG. 6C illustrates a transform block of 16 × 4 units.

도 6a를 참조하면, 4×8 형태의 부블록(61)에 대해서, 부블록 내의 0이 아닌 변환 계수가 존재하는지와 상관 없이, 현재 부블록의 상단에 위치한 부블록(611)을 제외한 나머지 부블록(612)의 CSBF 정보를 0으로 설정할 수 있다. Referring to FIG. 6A, for a 4 × 8 subblock 61, regardless of whether a non-zero transform coefficient exists in the subblock, the remaining part excluding the subblock 611 located at the top of the current subblock, The CSBF information of block 612 can be set to zero.

도 6b를 참조하면, 8×4 형태의 부블록(62)인 경우, 현재 부블록의 좌측에 위치한 부블록(621)을 제외한 나머지 부블록(622)의 CSBF 정보를 0으로 설정할 수 있다. Referring to FIG. 6B, in the case of the 8 × 4 subblock 62, the CSBF information of the remaining subblocks 622 excluding the subblock 621 located at the left of the current subblock may be set to zero.

도 6c를 참조하면, 16×4 형태의 블록(63)에 대해서는, 현재 부블록의 스캔 순서상 마지막에 존재하는 W개의 부블록(631,632)을 제외한 나머지 부블록(633,634)의 CSBF 정보를 0으로 설정할 수 있다. 이때, W는 0 또는 양의 정수일 수 있으며, 본 개시에서는 2일 수 있다.6C, the CSBF information of the remaining subblocks 633 and 634 excluding the W subblocks 631 and 632 existing at the end of the current subblock scan sequence is set to 0 Can be set. At this time, W may be 0 or a positive integer and may be 2 in this disclosure.

추가적으로, 32×16 형태의 부블록인 경우, 현재 부블록의 스캔 순서상 마지막에 존재하는 Z개의 부블록을 제외한 나머지 부블록의 CSBF 정보를 0으로 설정할 수 있다. 이때, Z는 0 또는 양의 정수일 수 있으며, 본 개시에서는 6일 수 있다.In addition, in the case of a 32 × 16 subblock, the CSBF information of the remaining subblocks excluding Z subblocks existing at the end of the current subblock scan order can be set to zero. Z may be zero or a positive integer, and may be six in this disclosure.

나아가, 본 개시의 일 실시예에 따른 엔트로피 부호화기를 통해, 마지막 중요 계수의 위치에 대한 구문 요소와, CSBF 정보에 대한 구문 요소를 미리 정해진 규칙으로 고정함으로써, 주파수 영역으로 변환된 변환 계수들 중 저주파수에 해당하는 중요 변환 계수들에 대해서만 율 계산을 수행하여 부호화기의 복잡도를 감소시킬 수 있다.Further, by fixing the syntax element for the position of the last significant coefficient and the syntax element for the CSBF information to the predetermined rule through the entropy encoder according to the embodiment of the present disclosure, the low frequency It is possible to reduce the complexity of the encoder by performing the rate calculation only on the significant transform coefficients.

단계(S803)에서, 변환 계수 부호화 장치는, CSBF 정보가 0으로 강제 설정된 영역의 부블록 외에 다른 부블록을 대상으로 CSF(sig_coeff_flag)정보를 부호화 할 수 있다. CSF 정보는 레귤러 모드로 부호화될 수 있으며, 문맥 모델은 변환 블록 내 위치 혹은 주변 변환 계수의 CSF 정보를 이용해서 유도될 수 있다.In step S803, the transform coefficient encoding apparatus can encode CSF (sig_coeff_flag) information on a subblock other than the subblock in the region for which the CSBF information is forcibly set to 0. The CSF information can be coded in regular mode, and the context model can be derived using the CSF information of the position in the transform block or the transform coefficient of the surroundings.

일실시예에 따르면, 변환 계수 부호화 장치는, CSF 정보에 대해 율-왜곡 최적화 과정 내 율 계산 시에 레귤러 모드가 아닌 바이패스 모드로 부호화할 수도 있다.According to one embodiment, the transform coefficient encoding apparatus may encode the CSF information in a bypass mode instead of the regular mode in calculating the rate-distortion optimization in-process rate.

이때, 단계(S803)에서, 변환 계수 부호화 장치는, 구문 요소 중 적어도 하나에 대하여 율-왜곡 최적화시 바이패스 모드로 부호화함으로써 계산할 수 있다.At this time, in step S803, the conversion-coefficient encoding apparatus can calculate by coding in at least one of the syntax elements in the bypass mode at the rate-distortion optimization.

도 9는 본 개시의 일 실시예에 따른 변환 계수 복호화 방법의 순서를 도시하는 흐름도이다. 9 is a flowchart showing a procedure of a transform coefficient decoding method according to an embodiment of the present disclosure.

변환 계수 복호화 방법은 변환 계수 복호화 장치에 의해 수행될 수 있으며, 상기 변환 계수 복호화 장치는 영상 복호화기에 구비되는 엔트로피 복호화부를 포함할 수 있다. The transform coefficient decoding method may be performed by a transform coefficient decoding apparatus, and the transform coefficient decoding apparatus may include an entropy decoding unit included in the image decoder.

우선, 단계(S901)에서, 변환 계수 복호화 장치는 변환 계수 부호화 과정의 역과정으로 신택스 엘리먼트를 산술 복호화 및 역이진화하여 마지막 중요 계수의 위치를 복원한다.First, in step S901, the transform coefficient decoding apparatus performs arithmetic decoding and inverse binarization of the syntax element in an inverse process of the transform coefficient encoding process to restore the position of the last significant coefficient.

구체적으로, 변환 계수 복호화 장치는 수신된 비트스트림으로부터 현재 블록의 마지막 중요 계수의 위치와 관련된 신택스 엘리먼트(예, 마지막 중요 계수 위치의 x축 성분 프리픽스 비트열 및 x축 성분 서픽스 비트열 각각에 대응되는 x축 성분 프리픽스 신택스 엘리먼트 및 x축 서픽스 신택스 엘리먼트와, 마지막 중요 계수 위치의 y축 성분 프리픽스 비트열 및 y축 성분 서픽스 비트열 각각에 대응되는 y축 성분 프리픽스 신택스 엘리먼트 및 y축 성분 서픽스 신택스 엘리먼트)를 획득한다.Specifically, the conversion coefficient decoding apparatus receives, from the received bitstream, a syntax element associated with the position of the last significant coefficient of the current block (e.g., corresponding to each of the x-axis component prefix bit string and the x-axis component suffix bit string of the last significant coefficient position Axis component prefix syntax element and the x-axis suffix syntax element corresponding to the y-axis component prefix bit string and the y-axis component suffix bit string of the last significant coefficient position and the y-axis component prefix syntax element and the y- Fix syntax element).

그리고 변환 계수 복호화 장치는 마지막 중요 계수의 위치와 관련된 신택스 엘리먼트(예, x축 성분 서픽스 신택스 엘리먼트 및 y축 성분 서픽스 신택스 엘리먼트)에 대응되는 산술 복호화 방식, 즉 바이패스 모드에 따라서 산술 복호화를 수행함으로써, 마지막 중요 계수의 위치에 대한 비트열(예, x축 성분 서픽스 비트열 및 y축 성분 서픽스 비트열)을 획득할 수 있다. 특히, 변환 계수 복호화 장치는 블록 크기 및 블록 형태 중 적어도 하나에 기초하여 설정된 마지막 중요 계수의 위치의 신택스 엘리먼트를 획득할 수 있다.The transformation coefficient decoding apparatus then performs arithmetic decoding according to an arithmetic decoding method corresponding to a syntax element (e.g., an x-axis component suffix syntax element and a y-axis component suffix syntax element) related to the position of the last significant coefficient (E.g., the x-axis component suffix bit string and the y-axis component suffix bit string) for the position of the last significant coefficient can be obtained. In particular, the transform coefficient decoding apparatus may obtain the syntax element of the position of the last significant coefficient set based on at least one of the block size and the block shape.

전술한 바와 같이, 마지막 중요 계수의 위치에 대한 비트열(예, x축 성분 프리픽스 비트열 및 y축 성분 프리픽스 비트열, x축 성분 서픽스 비트열 및 y축 성분 서픽스 비트열)이 획득되면, 변환 계수 복호화 장치는 마지막 중요 계수의 위치에 대한 비트열을 역이진화하고, 역이진화된 정보를 조합하여 마지막 중요 계수의 위치를 복원할 수 있다. 단계(S902)에서, 변환 계수 복호화 장치는 바이패스 모드에 따른 산술 복호화를 수행하여, 블록 크기 및 블록 형태 중 적어도 하나에 기초하여 설정된 CSBF 정보(부블록 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보)에 대한 신택스 엘리먼트를 확인할 수 있다. 또한, 변환 계수 복호화 장치는 CSBF 정보에 대한 신택스 엘리먼트에 대응되는 산술 복호화 방식, 즉 컨텍스트 모델을 적용하여 산술 복호화를 수행함으로써, CSBF 정보(즉, 부블록 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 비트열)를 획득할 수 있다.As described above, when a bit string (e.g., an x-axis component prefix bit string and a y-axis component prefix bit string, an x-axis component suffix bit string and a y-axis component suffix bit string) , The transform coefficient decoding apparatus can reverse-binarize the bit stream for the position of the last significant coefficient, and combine the inverse binarized information to restore the position of the last significant coefficient. In step S902, the transform coefficient decoding apparatus performs arithmetic decoding according to the bypass mode, and sets CSBF information (based on at least one of the block size and the block type) indicating whether there is a non-zero transform coefficient in the subblock Information) can be identified. In addition, the transformation coefficient decoding apparatus performs arithmetic decoding by applying an arithmetic decoding method corresponding to a syntax element for CSBF information, i.e., a context model, to thereby generate CSBF information (i.e., indicating whether a non- Bit string) can be obtained.

변환 계수 복호화 장치는 CSF(sig_coeff_flag)정보에 대한 신택스 엘리먼트를 확인할 수 있다. 또한, 변환 계수 복호화 장치는 CSF 정보에 대한 신택스 엘리먼트에 대응되는 산술 복호화 방식, 즉 컨텍스트 모델을 적용하여 산술 복호화를 수행함으로써, CSF 정보(즉, 부블록 내의 각 변환 계수의 값이 0인지 아닌지를 지시하는 비트열)를 획득할 수 있다.The conversion coefficient decoding apparatus can confirm the syntax element for the CSF (sig_coeff_flag) information. In addition, the transformation coefficient decoding apparatus performs arithmetic decoding by applying an arithmetic decoding method corresponding to a syntax element for the CSF information, i.e., a context model, so that the CSF information (i.e., whether or not the value of each transform coefficient in the sub- A bit stream indicating the bit stream) can be obtained.

본 개시의 일 실시예에 따라, 복호화를 처리함에 있어서, CSBF 정보(부블록 내의 0이 아닌 변환 계수가 존재하는지를 지시하는 정보)와 마지막 중요 계수의 위치를 바이패스 모드에 따른 산술 복호화를 통해 획득함으로써, 효율적으로 복호화 처리를 수행할 수 있다.According to one embodiment of the present disclosure, in processing the decoding, the position of the last significant coefficient and the CSBF information (information indicating whether a non-zero transform coefficient exists in the subblock) and the position of the last significant coefficient are obtained through arithmetic decoding according to the bypass mode Thus, the decoding process can be performed efficiently.

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

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPA(field programmable array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The apparatus described above may be implemented as a hardware component, a software component, and / or a combination of hardware components and software components. For example, the apparatus and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable array (FPA) A programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device , Or may be permanently or temporarily embodied in a transmitted signal wave. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다. 그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced. Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (1)

영상의 변환 계수를 부호화하는 장치에 있어서,
변환 블록 내 스캔 순서의 마지막에 존재하는 0이 아닌 변환 계수를 나타내는 마지막 중요 계수의 위치에 대한 구문 요소, 상기 변환 블록 중 부블록(sub-block) 내 0이 아닌 변환 계수가 적어도 하나인지(Coded sub block flag; 이하, 'CSBF 정보'라 함)에 대한 구문 요소, 및 상기 부블록 내 각 변환 계수의 값이 0인지 0이 아닌지에 대한 구문 요소 중, 적어도 하나를 부호화 처리하되,
상기 마지막 중요 계수의 위치에 대한 구문 요소 및 상기 CSBF 정보 중, 적어도 하나는 상기 변환 블록의 크기 및/또는 상기 변환 블록의 형태에 기초하여 미리 설정된 값으로 부호화 하는 것을
특징으로 하는 변환 계수 부호화 장치.
An apparatus for encoding a transform coefficient of an image,
A syntax element for a position of a last significant coefficient indicating a non-zero transform coefficient existing at the end of a scan order in a transform block, and a non-zero transform coefficient in a sub-block of the transform block, a syntax element for a sub block flag (hereinafter, referred to as 'CSBF information'), and a syntax element for determining whether the value of each transform coefficient in the subblock is 0 or not,
At least one of the syntax element and the CSBF information for the position of the last significant coefficient is encoded into a preset value based on the size of the conversion block and /
Wherein the transform coefficient encoding apparatus comprises:
KR1020170022560A 2017-02-20 2017-02-20 Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same KR20180096194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170022560A KR20180096194A (en) 2017-02-20 2017-02-20 Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170022560A KR20180096194A (en) 2017-02-20 2017-02-20 Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same

Publications (1)

Publication Number Publication Date
KR20180096194A true KR20180096194A (en) 2018-08-29

Family

ID=63434645

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170022560A KR20180096194A (en) 2017-02-20 2017-02-20 Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same

Country Status (1)

Country Link
KR (1) KR20180096194A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020166977A1 (en) * 2019-02-12 2020-08-20 엘지전자 주식회사 Method and apparatus for processing video signal
WO2021025530A1 (en) * 2019-08-08 2021-02-11 엘지전자 주식회사 Method and apparatus for image coding based on transform
CN115442608A (en) * 2018-12-17 2022-12-06 Lg电子株式会社 Image encoding/decoding method and method for transmitting data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442608A (en) * 2018-12-17 2022-12-06 Lg电子株式会社 Image encoding/decoding method and method for transmitting data
WO2020166977A1 (en) * 2019-02-12 2020-08-20 엘지전자 주식회사 Method and apparatus for processing video signal
WO2021025530A1 (en) * 2019-08-08 2021-02-11 엘지전자 주식회사 Method and apparatus for image coding based on transform

Similar Documents

Publication Publication Date Title
KR102006235B1 (en) Methods of coding block information using quadtree and appararuses for using the same
KR20220151140A (en) Method for image encoding and computer readable redording meduim thereof
KR101549910B1 (en) Adaptive transform method based on in-screen rediction and apparatus using the method
KR101883932B1 (en) Intra prediction method and apparatus using the method
JP2020022171A (en) Intra-prediction method and encoder and decoder using the same
KR102140331B1 (en) Method for intra prediction and apparatus thereof
KR20170108367A (en) Method and apparatus for processing a video signal based on intra prediction
KR101974952B1 (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR20160118945A (en) Method and apparatus for processing a video signal
KR20160088243A (en) Method and apparatus for processing a video signal
KR20160037111A (en) Method and apparatus for processing a video signal
KR20160046297A (en) Method and apparatus for processing a video signal
KR20160093565A (en) Method and apparatus for processing a video signal
KR20180033030A (en) Method and apparatus for processing a video signal based on adaptive block patitioning
KR20160093564A (en) Method and apparatus for processing a video signal
KR20210008105A (en) Video encoding/decoding method and apparatus
KR102378803B1 (en) A method of decoding a video signal and an apparatus having the same
KR20180096194A (en) Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same
KR101802375B1 (en) Methods of derivation of temporal motion vector predictor and appratuses using the same
KR20200060282A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20200026394A (en) A method and an apparatus for encoding/decoding a intra prediction
KR102516137B1 (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR20170125297A (en) Method and apparatus for coding image compensation information and decoding using the same
KR101981687B1 (en) Method and apparatus for coding offset information and decoding using the same
KR20160037110A (en) Method and apparatus for processing a video signal