KR20120100839A - Entropy encoding/decoding method - Google Patents

Entropy encoding/decoding method Download PDF

Info

Publication number
KR20120100839A
KR20120100839A KR1020120022551A KR20120022551A KR20120100839A KR 20120100839 A KR20120100839 A KR 20120100839A KR 1020120022551 A KR1020120022551 A KR 1020120022551A KR 20120022551 A KR20120022551 A KR 20120022551A KR 20120100839 A KR20120100839 A KR 20120100839A
Authority
KR
South Korea
Prior art keywords
encoding
block
mode
entropy
current
Prior art date
Application number
KR1020120022551A
Other languages
Korean (ko)
Inventor
임성창
김휘용
정세윤
김종호
이하현
이진호
최진수
김진웅
심동규
박시내
유은경
오승준
박광훈
조현호
Original Assignee
광운대학교 산학협력단
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 광운대학교 산학협력단, 한국전자통신연구원 filed Critical 광운대학교 산학협력단
Publication of KR20120100839A publication Critical patent/KR20120100839A/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/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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]

Abstract

PURPOSE: An entropy encoding/decoding method is provided to increase the compression efficiency of an image and to efficiency of entropy encoding. CONSTITUTION: An encoding unit scans a coefficient of a residual signal in a low frequency component order. The entropy encoding unit arranges the scanned coefficient(S510). The entropy encoding unit performs Last_coeff encoding of the aligned coefficients(S520). The entropy encoding unit performs explicit run/level mode encoding(S550). The encoding unit performs implicit level mode encoding(S560). [Reference numerals] (AA) Yes; (BB) No; (S510) Scanning; (S520) Encoding Last_coeff; (S530) Determining the number of explicit; (S540) The number of encoding<the number of explicit; (S550) Explicit run/level mode encoding; (S560) Implicit level mode encoding

Description

엔트로피 부호화/복호화 방법{ENTROPY ENCODING/DECODING METHOD}Entropy Encoding / Decoding Method {ENTROPY ENCODING / DECODING METHOD}

본 발명은 영상 부호화/복호화 장치에서의 엔트로피 부호화/복호화에 관한 것이다.
The present invention relates to entropy encoding / decoding in a video encoding / decoding apparatus.

최근 HD(High Definition) 해상도를 지원하는 방송 시스템이 국내뿐만 아니라 세계적으로 확대되면서, 많은 사용자가 고해상도, 고화질의 영상에 익숙해지고 있으며, 이에 따라 많은 기관들이 차세대 영상기기에 대한 개발에 박차를 가하고 있다. 또한, HDTV와 더불어 HDTV의 4배 이상의 해상도를 지원하는 UHD(Ultra High Definition)에 대한 관심이 증대되면서, 더욱 높은 해상도, 고화질의 영상에 대한 압축 기술이 요구되고 있다.Recently, as the broadcasting system supporting HD (High Definition) resolution has been expanded not only in Korea but also in the world, many users are getting used to high resolution and high quality images, and many organizations are accelerating the development of the next generation video equipment. . In addition, as interest in Ultra High Definition (UHD), which supports four times the resolution of HDTV, is increased along with HDTV, a compression technology for higher resolution and higher quality images is required.

영상의 압축을 위해, 선행하는 픽쳐 및/또는 뒤에 나오는 픽쳐로부터 현재 픽쳐에 포함된 픽셀 값을 예측하는 인터(inter) 예측 기술, 픽쳐 내의 픽셀 정보를 이용하여 픽셀 값을 예측하는 인트라(intra) 예측 기술 및/또는 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술 등이 사용될 수 있다.
For image compression, an inter prediction technique for predicting pixel values included in the current picture from preceding and / or following pictures, and intra prediction for predicting pixel values using pixel information within the picture. A technique and / or an entropy encoding technique may be used in which a short code is assigned to a symbol with a high frequency of appearance and a long code is assigned to a symbol with a low frequency of appearance.

본 발명은 엔트로피 부호화/복호화에 있어서, 부호화 대상 블록의 엔트로피 부호화 방법을 명시적으로 기술함으로써 압축 효율을 높이는 방법 및 장치를 제공한다.The present invention provides a method and apparatus for increasing compression efficiency by explicitly describing an entropy encoding method of an encoding target block in entropy encoding / decoding.

본 발명은 엔트로피 부호화/복호화에 있어서, 부호화 대상 블록의 엔트로피 부호화 방법을 명시적으로 기술하는 경우 발생할 수 있는 비트 오버헤드를 줄이는 방법 및 장치를 제공한다.
The present invention provides a method and apparatus for reducing bit overhead that may occur when explicitly describing an entropy encoding method of an encoding target block in entropy encoding / decoding.

본 발명의 일 실시예에 따르면 영상 부호화 장치에서의 엔트로피 부호화 방법이 제공된다. 상기 엔트로피 부호화 방법은 차분 신호의 계수를 고주파 성분에서 저주파 성분 순으로 스캐닝하여 1차원 배열로 정렬하는 단계, 1차원 배열을 런 모드로 부호화하여 제 1 부호화된 1차원 배열을 생성하는 단계, 제 1 부호화된 1차원 배열의 엔트로피 부호화 모드를 알려주는 비트의 명시 횟수를 결정하는 단계, 현재 부호화 횟수와 명시 횟수를 비교하는 단계 및 제 1 부호화된 1차원 배열을 비트가 알려주는 부호화 모드로 부호화하는 단계를 포함한다.
According to an embodiment of the present invention, an entropy encoding method in an image encoding apparatus is provided. The entropy encoding method includes scanning coefficients of a differential signal from high frequency components to low frequency components and arranging them in a one-dimensional array, encoding the one-dimensional array in a run mode, and generating a first coded one-dimensional array. Determining a specified number of bits indicating an entropy encoding mode of a coded one-dimensional array, comparing a current number of times with a specified number of times, and encoding a first coded one-dimensional array in an encoding mode indicated by the bits It includes.

본 발명에 따르면 엔트로피 부호화의 효율을 높일 수 있다.According to the present invention, the efficiency of entropy coding can be improved.

본 발명에 따르면 영상의 압축 효율을 높일 수 있다.
According to the present invention can increase the compression efficiency of the image.

도 1은 영상 부호화 장치의 구조의 일 예를 나타내는 블록도이다.
도 2는 영상 복호화 장치의 구조의 일 예를 나타내는 블록도이다.
도 3은 본 발명의 일 실시예에 따른 엔트로피 복호화 방법을 나타내는 흐름도이다.
도 4는 LCU(Largest Coding Unit) 레벨을 나타낸 일 예이다.
도 5는 본 발명의 일 실시예에 따른 명시적 엔트로피 부호화 방법을 나타내는 흐름도이다.
도 6은 본 발명의 다른 일 실시예에 따른 명시적 엔트로피 부호화 방법을 나타내는 흐름도이다.
도 7은 본 발명의 일 실시예에 따른 명시 횟수 결정 방법을 나타내는 흐름도이다.
도 8은 본 발명의 일 실시예에 따른 주변 블록의 문맥 정보를 이용한 명시 횟수 결정 방법을 나타내는 흐름도이다.
도 9는 본 발명의 일 실시예에 따른 주변 블록 명시 횟수 로드 방법을 나타내는 흐름도이다.
도 10은 본 발명의 일 실시예에 따른 현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 방법을 나타내는 흐름도이다.
도 11은 본 발명의 일 실시예에 따른 명시적 런/레벨 모드 부호화 방법을 나타내는 흐름도이다.
1 is a block diagram illustrating an example of a structure of a video encoding apparatus.
2 is a block diagram illustrating an example of a structure of an image decoding apparatus.
3 is a flowchart illustrating an entropy decoding method according to an embodiment of the present invention.
4 illustrates an example of a large gesture coding unit (LCU) level.
5 is a flowchart illustrating an explicit entropy encoding method according to an embodiment of the present invention.
6 is a flowchart illustrating an explicit entropy encoding method according to another embodiment of the present invention.
7 is a flowchart illustrating a method of determining a number of times according to an embodiment of the present invention.
8 is a flowchart illustrating a method of determining a number of times using context information of neighboring blocks according to an embodiment of the present invention.
9 is a flowchart illustrating a method of loading a neighboring block specification number according to an embodiment of the present invention.
10 is a flowchart illustrating a method of determining a specified number of times using only encoding parameters of a current coding block according to an embodiment of the present invention.
11 is a flowchart illustrating an explicit run / level mode encoding method according to an embodiment of the present invention.

영상 부호화/복호화 장치에서 구문 요소(syntax element)의 값들은 엔트로피 부호화/복호화의 효율을 높이기 위해 각 구문 요소의 통계적 특성에 따라 압축된다. 예를 들어, 차분 신호는 고주파 성분에서 0의 값을 가질 확률이 높기 때문에 고주파 성분의 값들은 런 모드(run-mode)로 부호화되고, 저주파 성분의 값들은 레벨 모드(level-mode)로 부호화된다.In an image encoding / decoding apparatus, values of syntax elements are compressed according to statistical characteristics of each syntax element in order to increase the efficiency of entropy encoding / decoding. For example, since a differential signal has a high probability of having a value of 0 in a high frequency component, values of the high frequency component are encoded in a run mode, and values of the low frequency component are encoded in a level mode. .

본 발명에서는 엔트로피 부호화 블록의 통계적 특성을 고려하여 엔트로피 부호화 블록의 차분 신호에 대한 엔트로피 부호화 방법을 비트스트림에 명시한다. 이러한 방법에 따르면, 현재 부호화 블록의 차분 신호를 특성에 따라 효과적으로 부호화할 수 있으므로, 부호화 효율을 높일 수 있다.In the present invention, the entropy coding method for the differential signal of the entropy coding block is specified in the bitstream in consideration of the statistical characteristics of the entropy coding block. According to this method, since the difference signal of the current coding block can be efficiently encoded according to the characteristic, the coding efficiency can be improved.

그러나, 모든 경우에 있어서, 엔트로피 부호화 모드를 명시할 경우, 추가되는 비트가 늘어나 부호화 효율이 오히려 떨어질 수도 있다. 이러한 문제점을 해결하기 위해, 본 발명에서는 런 모드와 레벨 모드의 선택을 위한 구문의 명시 횟수를 부호화 파라미터를 이용하여 적응적으로 결정한다. 이러한 명시 횟수의 결정에 있어서, 현재 부호화 블록의 부호화 파라미터뿐만 아니라 주변 블록의 문맥 정보를 이용하거나 사용자가 입력하는 오프셋(offset) 등을 이용할 수 있다.However, in all cases, when the entropy encoding mode is specified, the additional bits may be increased, thereby lowering the encoding efficiency. In order to solve this problem, the present invention adaptively determines the number of times of syntax for selecting a run mode and a level mode using an encoding parameter. In the determination of the number of specified times, not only encoding parameters of the current coding block but also context information of neighboring blocks or offsets input by a user may be used.

즉, 본 발명은 엔트로피 부호화/복호화에 있어서, 차분 신호의 특성을 고려하여 적합한 엔트로피 부호화 방법을 명시적으로 기술함으로써 압축 효율을 높이는 방법 및 장치를 제공한다.That is, the present invention provides a method and apparatus for increasing compression efficiency by explicitly describing a suitable entropy encoding method in consideration of the characteristics of a differential signal in entropy encoding / decoding.

또한, 본 발명은 엔트로피 부호화/복호화에 있어서, 부호화 대상 블록의 엔트로피 부호화 방법을 명시적으로 기술하는 경우 발생할 수 있는 비트 오버헤드를 줄이는 방법 및 장치를 제공한다.Further, the present invention provides a method and apparatus for reducing bit overhead that may occur when explicitly describing an entropy encoding method of an encoding target block in entropy encoding / decoding.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명하기로 한다. 단, 본 발명의 실시예를 설명함에 있어서, 공지의 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.EMBODIMENT OF THE INVENTION Hereinafter, embodiment of this invention is described in detail with reference to drawings. However, in describing the embodiments of the present invention, when it is determined that the detailed description of the known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.

어떤 구성 요소가 다른 구성 요소에 "연결되어" 있거나 "접속되어" 있다고 서술되어 있는 경우, 다른 구성 요소에 직접 연결되어 있거나 접속되어 있을 수 있으나, 또 다른 구성요소가 중간에 존재할 수도 있음을 의미한다. 또한, 본 발명에서 특정 구성 요소를 "포함"한다고 서술되어 있는 경우, 해당 구성 요소 이외의 구성 요소를 배제하는 것이 아니라, 추가적인 구성 요소가 본 발명의 실시예 또는 기술적 사상의 범위에 포함될 수 있음을 의미한다.When a component is described as being "connected" or "connected" to another component, it may be directly connected to or connected to another component, but another component may be present in between. . In addition, when the present invention is described as "includes" a specific component, rather than excluding components other than the component, it is understood that additional components may be included in the scope of the embodiments or technical spirit of the present invention. it means.

"제 1", "제 2" 등의 용어는 다양한 구성 요소들을 설명하는데 사용될 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되지 않는다. 즉, 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제 1 구성 요소는 제 2 구성 요소로 명명될 수 있고, 마찬가지로 제 2 구성요소도 제 1 구성 요소로 명명될 수 있다.Terms such as "first" and "second" may be used to describe various components, but the components are not limited by the terms. In other words, the terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and likewise, the second component may be referred to as the first component.

또한, 본 발명의 실시예에 나타나는 구성 요소는 서로 다른 특징적인 기능을 수행하는 것을 나타내기 위해 독립적으로 도시될 뿐, 각 구성 요소가 하나의 하드웨어 또는 소프트웨어로 구현될 수 없음을 의미하는 것은 아니다. 즉, 각 구성 요소는 설명의 편의상 구분된 것으로, 복수의 구성 요소가 합쳐져 하나의 구성 요소로 동작하거나, 하나의 구성 요소가 복수의 구성 요소로 나뉘어져 동작할 수 있고, 이는 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리 범위로 포함된다.In addition, the components shown in the embodiments of the present invention are shown independently to indicate that they perform different characteristic functions, and do not mean that each component may not be implemented in one hardware or software. That is, each component is divided for convenience of description, and a plurality of components may be combined to operate as one component, or one component may be divided into and operate as a plurality of components, which does not depart from the essence of the present invention. Unless included in the scope of the present invention.

또한, 일부 구성 요소는 본 발명의 본질적인 기능을 수행하는 필수 구성 요소가 아닌 성능의 향상을 위한 선택적 구성 요소일 수 있다. 본 발명은 선택적 구성 요소를 제외하고 필수 구성 요소만을 포함한 구조로도 구현될 수 있으며, 필수 구성 요소만을 포함한 구조 역시 본 발명의 권리 범위에 포함된다.In addition, some components may be optional components for improving performance rather than essential components for performing essential functions of the present invention. The present invention may be implemented in a structure including only essential components except for optional components, and a structure including only essential components is also included in the scope of the present invention.

도 1은 영상 부호화 장치의 구조의 일 예를 나타내는 블록도이다.1 is a block diagram illustrating an example of a structure of a video encoding apparatus.

도 1을 참조하면, 영상 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)를 포함한다.Referring to FIG. 1, the image encoding apparatus 100 may include a motion predictor 111, a motion compensator 112, an intra predictor 120, a switch 115, a subtractor 125, a transformer 130, A quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190 are included.

영상 부호화 장치(100)는 입력 영상을 인트라 예측 모드(intra prediction mode) 또는 인터 예측 모드(inter prediction mode)로 부호화하여 비트스트림(bitstream)을 출력한다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 영상 부호화 장치(100)는 스위치(115)의 전환을 통해 인트라 예측 모드와 인터 예측 모드 사이를 천이한다. 영상 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분(residual)을 부호화한다.The image encoding apparatus 100 encodes an input image in an intra prediction mode or an inter prediction mode to output a bitstream. Intra prediction means intra prediction and inter prediction means inter prediction. The image encoding apparatus 100 transitions between the intra prediction mode and the inter prediction mode through the switching of the switch 115. The image encoding apparatus 100 generates a prediction block for an input block of an input image and then encodes a residual between the input block and the prediction block.

인트라 예측 모드의 경우, 인트라 예측부(120)는 현재 블록 주변의 이미 부호화된 블록의 픽셀 값을 이용한 공간적 예측을 수행하여 예측 블록을 생성한다.In the intra prediction mode, the intra predictor 120 generates a prediction block by performing spatial prediction using pixel values of blocks already encoded around the current block.

인터 예측 모드의 경우, 움직임 예측부(111)는 움직임 예측 과정에서 참조 픽쳐 버퍼(190)에 저장되어 있는 참조 픽쳐 내에서 입력 블록과 가장 매칭이 잘 되는 참조 블록을 찾아 움직임 벡터를 구한다. 움직임 보상부(112)는 상기 움직임 벡터를 이용하여 움직임 보상을 수행하여 예측 블록을 생성한다. 여기서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터이며, 현재 부호화/복호화의 대상 블록과 참조 블록 사이의 오프셋을 나타낸다.In the inter prediction mode, the motion predictor 111 finds a motion vector that finds the best match with the input block in the reference picture stored in the reference picture buffer 190 during the motion prediction process. The motion compensation unit 112 generates a prediction block by performing motion compensation using the motion vector. Here, the motion vector is a two-dimensional vector used for inter prediction, and represents an offset between the target block of the current encoding / decoding and the reference block.

감산기(125)는 입력 블록과 예측 블록의 차분에 기반하여 차분 블록(residual block)을 생성하고, 변환부(130)는 상기 차분 블록을 변환(transform)하여 변환 계수(transform coefficient)를 출력한다. 양자화부(140)는 상기 변환 계수를 양자화하여 양자화된 계수(quantized coefficient)를 출력한다.The subtractor 125 generates a residual block based on the difference between the input block and the prediction block, and the transformer 130 transforms the difference block and outputs a transform coefficient. The quantization unit 140 quantizes the transform coefficients and outputs quantized coefficients.

엔트로피 부호화 방법은 다양한 값을 갖는 심볼(symbol)을 입력받아, 통계적 중복성을 제거하여, 복호 가능한 2진수의 열로 표현하는 방법이다. 엔트로피 부호화부(150)는 양자화부(140)에서 출력된 값 또는 부호화 과정에서 산출된 부호화 파리미터 등에 기반하여, 심볼을 확률 분포에 따라 엔트로피 부호화하여 비트스트림(bitstream)을 출력한다.The entropy encoding method is a method of receiving a symbol having various values, removing statistical redundancy, and expressing it in a decodable column. The entropy encoder 150 outputs a bitstream by entropy encoding a symbol according to a probability distribution based on a value output from the quantizer 140 or an encoding parameter calculated in an encoding process.

여기서, 심볼이란 부호화/복호화 대상인 구문 요소(syntax element), 부호화 파리미터(coding parameter) 및 차분 신호(residual signal)를 의미한다. 부호화 파라미터는 부호화 및 복호화에 필요한 매개변수로서, 부호화 장치에서 부호화되어 복호화 장치로 전달되는 정보뿐만 아니라, 부호화 또는 복호화 과정에서 유추될 수 있는 정보를 포함할 수 있다. 예를 들어, 부호화 파라미터는 인트라/인터 예측 모드, 움직임 벡터, 참조 픽쳐 색인, 부호화 블록 패턴, 차분 신호 유무, 변환 계수, 양자화된 계수, 양자화 파라미터, 블록 크기, 블록 분할 정보 등을 포함할 수 있다. 차분 신호는 원 신호와 예측 신호의 차이를 의미하며, 원 신호와 예측 신호의 차이가 변환(transform)된 신호 또는 원 신호와 예측 신호의 차이가 변환 및 양자화된 신호를 의미할 수도 있다. 따라서, 블록 단위에서는 차분 신호를 차분 블록이라 할 수 있다.Here, the symbol means a syntax element, a coding parameter, and a residual signal, which are encoding / decoding targets. The encoding parameter is a parameter necessary for encoding and decoding, and may include information that may be inferred in the encoding or decoding process, as well as information encoded in the encoding apparatus and delivered to the decoding apparatus. For example, the coding parameter may include an intra / inter prediction mode, a motion vector, a reference picture index, a coding block pattern, presence or absence of a differential signal, transform coefficients, quantized coefficients, quantization parameters, block size, block partitioning information, and the like. . The difference signal may mean a difference between the original signal and the prediction signal, and may mean a signal in which the difference between the original signal and the prediction signal is transformed or a signal in which the difference between the original signal and the prediction signal is transformed and quantized. Accordingly, the difference signal may be referred to as a difference block in block units.

엔트로피 부호화를 수행하는 경우, 높은 발생 확률을 갖는 심볼에는 적은 수의 비트가 할당되고, 낮은 발생 확률을 갖는 심볼에는 많은 수의 비트가 할당된다. 따라서, 부호화 대상 심볼들의 비트열의 크기가 감소되어, 영상 부호화의 압축 성능이 높아진다.When entropy encoding is performed, a small number of bits are allocated to a symbol having a high probability of occurrence, and a large number of bits are allocated to a symbol having a low probability of occurrence. Therefore, the size of the bit string of the encoding target symbols is reduced, thereby increasing the compression performance of the video encoding.

엔트로피 부호화를 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법이 사용될 수 있다.For entropy coding, coding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) may be used.

예를 들어, 엔트로피 부호화부(150)는 가변 길이 부호화(VLC: Variable Length Coding/Code) 테이블과 같은 엔트로피 부호화를 수행하기 위한 테이블을 저장하고, 저장된 테이블을 이용하여 엔트로피 부호화를 수행할 수 있다.For example, the entropy encoder 150 may store a table for performing entropy encoding, such as a variable length coding (VLC) table, and perform entropy encoding using the stored table.

또한, 엔트로피 부호화부(150)는 대상 심볼의 이진화(binarization) 방법 및/또는 대상 심볼/빈(bin)의 확률 모델(probability model)을 도출한 후, 도출된 이진화 방법 및/또는 확률 모델을 이용하여 엔트로피 부호화를 수행할 수도 있다.In addition, the entropy encoder 150 derives a binarization method of the target symbol and / or a probability model of the target symbol / bin, and then uses the derived binarization method and / or the probability model. Entropy encoding may be performed.

여기서, 이진화(binarization)란 심볼 값을 2진수의 열(bin sequence/string)로 표현하는 것을 의미하고, 빈(bin)은 심볼이 이진화를 통해 2진수의 열로 표현될 때, 각각의 2진수 값, 즉, 0 또는 1을 의미한다. 확률 모델이란 문맥 정보(context information)/문맥 모델(context model)을 통해 도출되는 부호화/복호화 대상 심볼/빈의 예측된 확률을 의미한다. 이때, 문맥 정보/문맥 모델은 부호화/복호화 대상 심볼/빈의 확률을 결정하기 위한 정보를 의미한다.Here, binarization means expressing a symbol value as a binary sequence (bin sequence / string), and bin means each binary value when the symbol is represented as a binary column through binarization. , Meaning 0 or 1. The probabilistic model means a predicted probability of a symbol / bin to be encoded / decoded derived from a context information / context model. In this case, the context information / context model means information for determining a probability of a symbol / bin to be encoded / decoded.

좀 더 구체적으로, CABAC에서는 심볼이 이진화되어 빈으로 변환되고, 주변 블록 및 현재 부호화 블록의 부호화 정보 또는 이미 부호화된 심볼/빈의 정보에 기반하여 문맥 모델이 결정된다. 결정된 문맥 모델에 따라 빈의 발생 확률이 예측되며, 빈의 산술 부호화(arithmetic encoding)가 수행되어 비트스트림이 생성된다. 이때, 문맥 모델 결정 후, 다음 심볼/빈의 문맥 모델의 결정을 위해 부호화된 심볼/빈의 정보를 이용하여 문맥 모델을 갱신할 수 있다.More specifically, in CABAC, a symbol is binarized and converted into a bin, and a context model is determined based on encoding information of a neighboring block and a current encoding block or information of an already encoded symbol / bin. A probability of occurrence of a bin is predicted according to the determined context model, and an arithmetic encoding of the bin is performed to generate a bitstream. In this case, after the context model is determined, the context model may be updated using information on the encoded symbol / bin to determine the context model of the next symbol / bin.

한편, 인터 예측 부호화를 수행하기 위한 참조 픽쳐로 사용되기 위해 부호화된 픽쳐는 다시 복호화되어 저장될 필요가 있다. 따라서, 역양자화부(160)는 양자화된 계수를 역양자화하고, 역변화부(170)는 역양자화된 계수를 역변환(inverse transform)하여 복원된 차분 블록을 출력한다. 가산기(175)는 예측 블록에 복원된 차분 블록을 더하여 복원 블록을 생성한다.Meanwhile, the coded picture needs to be decoded and stored again to be used as a reference picture for performing inter prediction encoding. Accordingly, the inverse quantization unit 160 inverse quantizes the quantized coefficients, and the inverse transform unit 170 inverse transforms the inverse quantized coefficients to output the reconstructed difference block. The adder 175 adds the reconstructed difference block to the prediction block to generate a reconstruction block.

필터부(180)는 적응적 인-루프(in-loop) 필터로도 불리며, 복원 블록에 디블록킹 필터링(deblocking filtering), SAO(Sample Adaptive Offset) 보상, ALF(Adaptive Loop Filtering) 중 적어도 하나 이상을 적용한다. 디블록킹 필터링은 블록 간 경계에 생긴 블록 왜곡을 제거하는 것을 의미하고, SAO 보상은 코딩 에러를 보상하기 위해 픽셀 값에 적정 오프셋(offset)을 더해주는 것을 의미한다. 또한, ALF는 복원된 영상과 원래의 영상을 비교한 값에 기반하여 필터링을 수행하는 것을 의미한다.The filter unit 180 may also be referred to as an adaptive in-loop filter, and may include at least one of deblocking filtering, sample adaptive offset (SAO) compensation, and adaptive loop filtering (ALF). Apply. Deblocking filtering means removing block distortion at an inter-block boundary, and SAO compensation means adding an appropriate offset to pixel values to compensate for coding errors. Also, ALF means filtering based on a value obtained by comparing a reconstructed image with an original image.

한편, 참조 픽쳐 버퍼(190)는 필터부(180)를 거친 복원 블록을 저장한다.The reference picture buffer 190 stores the reconstructed block that has passed through the filter unit 180.

도 2는 영상 복호화 장치의 구조의 일 예를 나타내는 블록도이다.2 is a block diagram illustrating an example of a structure of an image decoding apparatus.

도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함한다.2, the image decoding apparatus 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an intra predictor 240, a motion compensator 250, and an adder 255. ), A filter unit 260 and a reference picture buffer 270.

영상 복호화 장치(200)는 비트스트림을 인트라 예측 모드 또는 인터 예측 모드로 복호화하여 복원 영상을 출력한다. 영상 복호화 장치(200)는 스위치의 전환을 통해 인트라 예측 모드와 인터 예측 모드 사이를 천이한다. 영상 복호화 장치(200)는 비트스트림으로부터 차분 블록을 획득하여 예측 블록을 생성한 후, 차분 블록과 예측 블록을 더하여 복원 블록을 생성한다.The image decoding apparatus 200 outputs a reconstructed image by decoding the bitstream in an intra prediction mode or an inter prediction mode. The image decoding apparatus 200 transitions between the intra prediction mode and the inter prediction mode by switching a switch. The image decoding apparatus 200 obtains a difference block from a bitstream, generates a prediction block, and then adds the difference block and the prediction block to generate a reconstruction block.

엔트로피 복호화부(210)는 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient)를 생성한다. 엔트로피 복호화 과정은 전술한 엔트로피 부호화 과정과 대칭적이다.The entropy decoder 210 entropy decodes the bitstream according to a probability distribution to generate quantized coefficients. The entropy decoding process is symmetrical with the entropy encoding process described above.

예를 들어, 엔트로피 복호화부는 비트스트림으로부터 각 구문 요소에 해당하는 빈을 획득하고, 복호화 대상 구문 요소와, 주변 블록 및 복호화 대상 블록의 복호화 정보 또는 이미 복호화된 심볼/빈의 정보를 이용하여 문맥 모델을 결정할 수 있다. 결정된 문맥 모델에 따라, 엔트로피 복호화부는 빈(bin)의 발생 확률을 예측하고, 빈의 산술 복호화(arithmetic decoding)를 수행한다. 그 결과, 각 구문 요소에 해당하는 심볼이 생성된다. 이때, 문맥 모델 결정 후, 다음 심볼/빈의 문맥 모델의 결정을 위해, 복호화된 심볼/빈의 정보를 이용하여 문맥 모델을 갱신할 수 있다.For example, the entropy decoding unit obtains a bin corresponding to each syntax element from the bitstream, and uses the decoded syntax element, the decoded information of the neighboring block and the decoded block, or the information of the symbol / bin already decoded. Can be determined. According to the determined context model, the entropy decoding unit predicts a probability of occurrence of a bin and performs arithmetic decoding of the bin. As a result, a symbol corresponding to each syntax element is generated. In this case, after the context model is determined, the context model may be updated using information of the decoded symbol / bin to determine the context model of the next symbol / bin.

역양자화부(220)는 양자화된 계수를 역양자화하고, 역변환부(230)는 역양자화된 계수를 역변환하여 차분 블록을 생성한다.The inverse quantizer 220 inversely quantizes the quantized coefficients, and the inverse transformer 230 inversely transforms the inverse quantized coefficients to generate a difference block.

인트라 예측 모드의 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 복호화된 블록의 픽셀 값을 이용한 공간적 예측을 수행하여 예측 블록을 생성한다.In the intra prediction mode, the intra predictor 240 generates a predictive block by performing spatial prediction using pixel values of blocks already decoded around the current block.

인터 예측 모드의 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽쳐 버퍼(270)에 저장된 참조 픽쳐를 이용한 움직임 보상을 수행하여 예측 블록을 생성한다.In the inter prediction mode, the motion compensation unit 250 generates a prediction block by performing motion compensation using a motion picture and a reference picture stored in the reference picture buffer 270.

가산기(255)는 차분 블록에 예측 블록을 더하고, 필터부(260)는 가산기를 거친 블록에 디블록킹 필터링, SAO 보상, ALF 중 적어도 하나 이상을 적용하여 복원 영상을 출력한다.The adder 255 adds the prediction block to the difference block, and the filter unit 260 outputs the reconstructed image by applying at least one of deblocking filtering, SAO compensation, and ALF to the block that has passed through the adder.

한편, 복원 영상은 참조 픽쳐 버퍼(270)에 저장되어 움직임 보상에 사용될 수 있다.The reconstructed image may be stored in the reference picture buffer 270 to be used for motion compensation.

이하, 블록은 부호화/복호화의 단위를 의미한다. 부호화/복호화 과정에서, 영상은 소정의 크기로 분할되어 부호화/복호화된다. 따라서, 블록은 매크로 블록(MB: Macro Block), 부호화 유닛(CU: Coding Unit), 예측 유닛(PU: Prediction Unit), 변환 유닛(TU: Transform Unit) 등으로도 불릴 수도 있으며, 하나의 블록은 더 작은 크기의 하위 블록으로 분할될 수도 있다.Hereinafter, a block means a unit of encoding / decoding. In the encoding / decoding process, an image is divided into a predetermined size and encoded / decoded. Therefore, a block may also be called a macro block (MB), a coding unit (CU), a prediction unit (PU), a transform unit (TU), or the like. It may be divided into smaller blocks of smaller size.

여기서, 예측 유닛은 예측 및/또는 움직임 보상 수행의 기본 단위를 의미한다. 예측 유닛은 복수의 파티션(partition)으로 분할될 수 있으며, 각각의 파티션은 예측 유닛 파티션(prediction unit partition)으로 불린다. 예측 유닛이 복수의 파티션으로 분할된 경우, 예측 유닛 파티션은 예측 및/또는 움직임 보상 수행의 기본 단위가 될 수 있다. 이하, 본 발명의 실시예에서는 예측 유닛은 예측 유닛 파티션을 의미할 수도 있다.Here, the prediction unit means a basic unit of performing prediction and / or motion compensation. The prediction unit may be divided into a plurality of partitions, and each partition is called a prediction unit partition. When the prediction unit is divided into a plurality of partitions, the prediction unit partition may be a basic unit of performing prediction and / or motion compensation. Hereinafter, in an embodiment of the present invention, the prediction unit may mean a prediction unit partition.

한편, 엔트로피 부호화 방법 중 하나인 CAVLC에서는 차분 신호 중 0이 아닌 계수의 개수, 연속적인 1의 개수, 0이 아닌 계수의 크기 및 부호, 0이 아닌 계수 사이의 0의 개수를 순차적으로 부호화한다. 이때, 각각의 정보의 부호화는 주변 블록의 양자화된 계수의 부호화 정보를 이용하여 선택되는, 현재 부호화 블록의 매핑 테이블에 의해 진행된다.CAVLC, which is one of entropy encoding methods, sequentially encodes the number of nonzero coefficients, the number of consecutive ones, the size and sign of nonzero coefficients, and the number of zeros between nonzero coefficients among differential signals. At this time, the encoding of each information is performed by the mapping table of the current coding block, which is selected using the encoding information of the quantized coefficients of the neighboring blocks.

또한, 낮은 복잡도의 엔트로피 부호화 방법 중 하나인 LCEC(Low Complexity Entropy Coding)에서는 0이 아닌 양자화된 계수를 고정된 임계값과 비교하여 런 모드로 부호화할 것인지 또는 레벨 모드로 부호화할 것인지를 선택한다. 런 모드는 0이 아닌 계수의 크기와 0이 아닌 계수 사이의 0의 개수를 따로 부호화하는 방법으로, 0인 계수가 연속적으로 많이 분포하는 고주파 영역의 부호화에 적합하다. 반면에, 레벨 모드는 계수의 크기를 그대로 부호화하는 방법으로, 0인 계수가 상대적으로 적게 분포하는 저주파 영역의 부호화에 적합하다. LCEC는 고정된 임계값에 따라 일부 계수들에 대해서 런 모드를 적용하고, 일부 계수들에 대해서는 레벨 모드를 적용함으로써, 낮은 복잡도의 기술로도 높은 부호화 성능을 가질 수 있게 하였다.In low complexity entropy coding (LCEC), one of low complexity entropy encoding methods, a non-zero quantized coefficient is compared with a fixed threshold to select whether to encode in a run mode or a level mode. The run mode is a method of encoding the number of nonzero coefficients and the number of zeros between nonzero coefficients separately, and is suitable for encoding a high frequency region in which a large number of zero coefficients are continuously distributed. On the other hand, the level mode is a method of encoding the magnitude of the coefficient as it is, and is suitable for encoding in the low frequency region where the coefficient of zero is relatively distributed. LCEC applies a run mode for some coefficients and a level mode for some coefficients according to a fixed threshold, thereby enabling high coding performance even with low complexity techniques.

한편, 엔트로피 부호화에서는 부호화 대상의 발생 확률에 대한 통계적 특성을 고려하여 코드 길이를 가변적으로 할당한다. LCEC에서도 차분 블록을 이산변환 및 양자화한 후 지그재그 스캐닝과 같은 스캐닝 방법으로 정렬한 후 고주파 성분에서 저주파 성분 순으로 계수들을 부호화한다. 즉, LCEC에서는 계수들이 1차원으로 정렬될 때 상대적으로 뒤쪽에 오는 계수들에서 0이 연속적으로 자주 발생한다는 통계적 특성을 고려하고 있다. 그러나, 영상의 종류, 슬라이스 타입, 블록 내의 영상의 특징, 블록 내의 QP(Quantization Parameter) 값, 블록의 인트라 예측 모드, 스캐닝 방법 등에 따라 통계적 특성은 달라질 수 있다.Meanwhile, in entropy encoding, a code length is variably allocated in consideration of statistical characteristics of a probability of occurrence of an encoding target. LCEC also encodes coefficients in the order of high frequency components to low frequency components after discrete transform and quantization of a differential block and then sorting them by a scanning method such as zigzag scanning. That is, LCEC takes into account the statistical property that zero occurs frequently in coefficients that are relatively later when coefficients are aligned in one dimension. However, statistical characteristics may vary depending on the type of image, slice type, characteristics of the image in the block, QP (Quantization Parameter) value in the block, intra prediction mode of the block, scanning method, and the like.

예를 들어, 고주파 성분에서 임계값 이상의 계수가 존재하고, 그 앞쪽에 연속하는 0이 존재하는 경우가 있을 수 있다. 이때, 고정된 임계값을 사용하게 되면, 연속하는 0에 대해서도 모두 레벨 모드로 부호화를 하게 되므로 압축 효율이 떨어진다. 이를 해결하기 위해, 부호화 대상의 통계적 특성을 정확하게 예측할 경우, 압축 효율을 높일 수 있겠지만, 부호화/복호화 장치의 복잡도가 높아지게 된다.For example, there may be a case where a coefficient greater than or equal to a threshold exists in the high frequency component and there is a continuous zero in front of it. In this case, when the fixed threshold value is used, even in successive zeros, all of the encoding is performed in the level mode, thereby reducing the compression efficiency. In order to solve this problem, if the statistical characteristics of the encoding target are accurately predicted, the compression efficiency can be increased, but the complexity of the encoding / decoding device is increased.

따라서, 낮은 복잡도를 가지면서도 압축 효율이 높은 부호화/복호화 장치를 제공하기 위해, 본 발명에서는 영상의 특성과 부호화 파라미터를 고려한다. 즉, 본 발명의 일 실시예에 따르면, 최적의 모드를 선택하기 위해, 런 모드와 레벨 모드 중 사용되는 엔트로피 부호화 모드를 명시적으로 기술한다. 또한, 본 발명의 다른 일 실시예에 따르면, 사용되는 엔트로피 부호화 모드를 명시할 경우 발생할 수 있는 비트 오버헤드를 최소화하기 위해, 명시 횟수를 부호화 파라미터, 주변 블록의 문맥 정보, 사용자가 입력하는 오프셋 정보 등을 고려하여 적응적으로 결정한다.Accordingly, in order to provide an encoding / decoding apparatus having a low complexity and high compression efficiency, the present invention considers characteristics of an image and encoding parameters. That is, according to an embodiment of the present invention, in order to select the optimal mode, the entropy encoding mode used among the run mode and the level mode is explicitly described. In addition, according to another embodiment of the present invention, in order to minimize the bit overhead that may occur when specifying the entropy encoding mode to be used, the specified number of times is determined by encoding parameters, context information of neighboring blocks, and offset information input by a user. The decision is made adaptively in consideration of the

상술한 목적, 특징 및 방법은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 더욱 분명해 질 것이며, 그에 따라 본 발명이 속하는 기술 분야에서의 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 이하에서는 부호화 방법 및 장치를 기반으로 기술하지만, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자라면 복호화 방법 및 장치에도 본 발명의 기술적 사상을 용이하게 적용할 수 있을 것이다.The above objects, features and methods will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, whereby those skilled in the art to which the present invention pertains may easily implement the technical idea of the present invention. Could be. In addition, the following description is based on an encoding method and apparatus, but a person having ordinary knowledge in the art to which the present invention belongs may easily apply the technical idea of the present invention to a decoding method and apparatus.

도 3은 본 발명의 일 실시예에 따른 엔트로피 복호화 방법을 나타내는 흐름도이다.3 is a flowchart illustrating an entropy decoding method according to an embodiment of the present invention.

엔트로피 복호화부는 고정된 임계값에 기반하여 런 모드와 레벨 모드를 선택하는 묵시적 엔트로피 복호화 방법과 사용된 부호화 모드를 명시적으로 알려주는 비트에 기반하여 복호화 모드를 선택하는 명시적 엔트로피 복호화 방법을 선택적으로 사용할 수 있다. 이때, 엔트로피 복호화 방법의 선택에 있어서, mode_flag와 같은 정의된 구문 요소를 사용할 수 있다.The entropy decoder selectively selects an implicit entropy decoding method that selects a run mode and a level mode based on a fixed threshold and an explicit entropy decoding method that selects a decoding mode based on bits that explicitly indicate a coding mode used. Can be used. In this case, in selecting an entropy decoding method, a defined syntax element such as mode_flag may be used.

도 3을 참조하면, 엔트로피 복호화부는 엔트로피 복호화 방법을 선택하기 위해, mode_flag를 도출한다(S310). 엔트로피 복호화 방법의 선택에 필요한 정보는 시퀀스, 픽쳐, GOP(Group Of Picture), 슬라이스, LCU(Largest Coding Unit) 레벨에서 시그널링된다. 따라서, 엔트로피 복호화부는 시퀀스, 픽쳐, GOP, 슬라이스, LCU 레벨에서 시그널링되는 구문 요소의 파싱(parsing)을 통해 현재 복호화 블록의 mode_flag를 도출한다.Referring to FIG. 3, the entropy decoding unit derives mode_flag in order to select an entropy decoding method (S310). Information necessary for the selection of the entropy decoding method is signaled at the sequence, picture, group of picture (GOP), slice, and large coding unit (LCU) levels. Accordingly, the entropy decoding unit derives mode_flag of the current decoding block through parsing of syntax elements signaled at the sequence, picture, GOP, slice, and LCU levels.

엔트로피 복호화부는 mode_flag 도출 단계(S310)을 통해 도출된 mode_flag를 이용하여 엔트로피 복호화 방법을 선택한다(S320). 예를 들어, mode_flag가 0인 경우, 현재 복호화 블록을 묵시적 엔트로피 복호화 방법으로 복호화하고, mode_flag가 1인 경우, 명시적 엔트로피 복호화 방법으로 복호화한다.The entropy decoding unit selects an entropy decoding method using the mode_flag derived through the mode_flag derivation step (S310) (S320). For example, when mode_flag is 0, the current decoding block is decoded by an implicit entropy decoding method. When mode_flag is 1, it is decoded by an explicit entropy decoding method.

현재 복호화 블록을 묵시적 엔트로피 복호화 방법으로 복호화하는 경우, 엔트로피 복호화부는 고정된 임계값에 기반하여 엔트로피 복호화 모드를 결정하고, 결정된 복호화 모드로 복호화를 수행한다. 즉, 런 모드와 레벨 모드 중 어느 모드로 현재 복호화 블록을 복호화할 것인지를 추가 정보 없이 결정한다.When decoding the current decoding block by an implicit entropy decoding method, the entropy decoding unit determines an entropy decoding mode based on a fixed threshold value, and performs decoding in the determined decoding mode. That is, it is determined without additional information which mode is decoded in the run mode or the level mode.

현재 복호화 블록을 명시적 엔트로피 복호화 방법으로 복호화하는 경우, 엔트로피 복호화부는 사용된 부호화 모드를 명시적으로 알려주는 비트에 기반하여 엔트로피 복호화 모드를 결정하고, 결정된 복호화 모드로 복호화를 수행한다. 즉, 런 모드와 레벨 모드 중 어느 모드로 현재 복호화 블록을 복호화할 것인지를 사용된 부호화 모드를 명시적으로 알려주는 비트를 이용하여 결정한다.When the current decoding block is decoded by the explicit entropy decoding method, the entropy decoding unit determines the entropy decoding mode based on a bit that explicitly indicates the used encoding mode, and performs decoding in the determined decoding mode. In other words, whether the current decoding block is to be decoded in the run mode or the level mode is determined using a bit that explicitly indicates the encoding mode used.

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

Figure pat00003
Figure pat00003

표 1 내지 표 3은 명시적 엔트로피 부호화/복호화 방법에서 사용되는 구문의 예이다.Tables 1 to 3 show examples of syntaxes used in the explicit entropy encoding / decoding method.

본 발명의 일 실시예에 따른 영상 부호화/복호화 장치는 픽쳐 파라미터 셋(PPS: Picture Parameter Set) 레벨에서 명시되는 구문 요소인 selective_entropy_mode_flag 등을 이용할 수 있다. selective_entropy_mode_flag는 픽쳐 단위에서 선택적 엔트로피 부호화 모드의 적용 여부를 나타낸다.The image encoding / decoding apparatus according to an embodiment of the present invention may use selective_entropy_mode_flag, which is a syntax element specified at a picture parameter set (PPS) level. The selective_entropy_mode_flag indicates whether to apply the selective entropy encoding mode in picture units.

슬라이스 레벨에서 명시되는 current_slice_sem_flag는 상기 selective_entropy_mode_flag가 1인 경우 명시된다. current_slice_sem_flag는 슬라이스 단위로 선택적 엔트로피 부호화 모드의 적용 여부를 제어하기 위해 사용되는 구문 요소로서, current_slice_sem_flag가 0인 경우에는 LCU 레벨에서 어떠한 구문도 명시되지 않는다.The current_slice_sem_flag specified at the slice level is specified when the selective_entropy_mode_flag is 1. current_slice_sem_flag is a syntax element used to control whether the selective entropy encoding mode is applied in units of slices. If current_slice_sem_flag is 0, no syntax is specified at the LCU level.

LCU 레벨에서 명시되는 mode_flag는 묵시적 엔트로피 부호화 방법과 명시적 엔트로피 부호화 방법 중에서 하나를 선택하도록 하는 플래그이다. mode_flag는 current_slce_sem_flag가 1인 경우만 명시되며, current_slice_sem_flag가 0인 경우에는 엔트로피 부호화 모드 선택을 위한 어떠한 구문도 명시되지 않는다.Mode_flag specified at the LCU level is a flag for selecting one of an implicit entropy encoding method and an explicit entropy encoding method. mode_flag is specified only when current_slce_sem_flag is 1, and no syntax for entropy encoding mode selection is specified when current_slice_sem_flag is 0.

도 4는 LCU(Largest Coding Unit) 레벨을 나타낸 일 예이다.4 illustrates an example of a large gesture coding unit (LCU) level.

도 4를 참조하면 각각의 LCU에 mode_flag가 입력되어있다. 특정 LCU의 mode_flag가 1인 경우(410), 해당 LCU 내에 위치하는 모든 엔트로피 부호화 블록에는 명시적 엔트로피 부호화 방법이 사용된다. 이때, 런 모드와 레벨 모드를 결정하는데 있어서, 부호화 모드를 명시적으로 알려주는 비트를 이용한다.Referring to FIG. 4, mode_flag is input to each LCU. When mode_flag of a specific LCU is 1 (410), an explicit entropy encoding method is used for all entropy coding blocks located in the LCU. At this time, in determining the run mode and the level mode, a bit that explicitly indicates the encoding mode is used.

반면에, 특정 LCU의 mode_flag가 0인 경우(420), 해당 LCU 내에 위치하는 모든 엔트로피 부호화 블록에는 묵시적 엔트로피 부호화 방법이 사용된다. 즉, 임계값에 기반하여, 런 모드 또는 레벨 모드가 선택되고, 선택된 모드로 블록 내의 계수 값에 대한 엔트로피 부호화가 진행된다.On the other hand, when mode_flag of a specific LCU is 0 (420), an implicit entropy encoding method is used for all entropy coding blocks located in the LCU. That is, based on the threshold value, a run mode or a level mode is selected, and entropy encoding for coefficient values in a block is performed in the selected mode.

도 5는 본 발명의 일 실시예에 따른 명시적 엔트로피 부호화 방법을 나타내는 흐름도이다.5 is a flowchart illustrating an explicit entropy encoding method according to an embodiment of the present invention.

도 5를 참조하면, 본 발명의 일 실시예에 따른 명시적 엔트로피 부호화 방법은 스캐닝 단계(S510), Last_coeff 부호화 단계(S520), 명시 횟수 결정 단계(S530), 엔트로피 부호화 모드 선택 단계(S540), 명시적 런/레벨 모드 부호화 단계(S550) 및 묵시적 레벨 모드 부호화 단계(S560)를 포함한다.Referring to FIG. 5, in the explicit entropy encoding method according to an embodiment of the present invention, a scanning step (S510), a Last_coeff encoding step (S520), an explicit number determination step (S530), an entropy encoding mode selection step (S540), An explicit run / level mode encoding step S550 and an implicit level mode encoding step S560 are included.

엔트로피 부호화부는 주파수의 일반적인 특성을 이용한 엔트로피 부호화를 수행하기 위해, 양자화된 차분 신호의 계수들을 고주파 성분에서 저주파 성분 순으로 스캐닝하여 1차원 배열로 정렬한다(S510).In order to perform entropy encoding using general characteristics of frequencies, the entropy encoder scans the coefficients of the quantized differential signal in order from high frequency components to low frequency components and arranges them in a one-dimensional array (S510).

이 후, 엔트로피 부호화부는 정렬된 계수들의 Last_coeff 부호화를 수행한다(S520). Last_coeff 부호화는 스캐닝된 1차원 배열을 0이 아닌 계수를 기준으로 런 모드 부호화하여 제 1 부호화된 1차원 배열을 생성하는 것을 의미한다.Thereafter, the entropy encoder performs Last_coeff encoding of the aligned coefficients (S520). Last_coeff encoding means to generate a first coded one-dimensional array by performing run mode coding on the scanned one-dimensional array based on a non-zero coefficient.

한편, 런 모드 또는 레벨 모드를 명시적으로 나타낼 경우, 엔트로피 부호화의 성능은 향상되지만, 사용되는 부호화 모드를 명시적으로 알려주는 비트에 의한 오버헤드가 증가한다. 이러한 문제점을 해결하기 위해, 사용되는 부호화 모드를 명시적으로 알려주는 비트의 명시 횟수를 제한할 수 있다.On the other hand, when the run mode or the level mode is explicitly indicated, the performance of entropy encoding is improved, but the overhead due to the bits explicitly indicating the encoding mode to be used increases. In order to solve this problem, it is possible to limit the number of times of specifying the bit explicitly indicating the encoding mode to be used.

따라서, 본 발명의 일 실시예에 따른 엔트로피 부호화 방법에 의하면, 사용되는 부호화 모드를 명시적으로 알려주는 비트의 명시 횟수를 적응적으로 결정한다(S530). 이러한 방법으로 엔트로피 부호화의 성능은 향상시키면서, 사용되는 부호화 모드를 명시적으로 알려주는 비트에 의한 오버헤드를 최소화할 수 있다.Therefore, according to the entropy encoding method according to an embodiment of the present invention, an explicit number of bits for explicitly indicating an encoding mode to be used is adaptively determined (S530). In this way, the performance of entropy encoding can be improved while minimizing the overhead caused by bits explicitly indicating the encoding mode to be used.

한편, 명시 횟수를 선택적으로 결정하기 위해 부호화 파라미터를 이용할 수 있다. 부호화 파라미터의 종류로는 현재 부호화 블록의 예측 모드, 주변 블록의 문맥 정보, 현재 부호화 블록의 양자화된 계수의 위치, QP 값, 슬라이스 타입 등이 있다. 각각의 파라미터는 양자화된 계수의 통계적 특성을 변화시킬 수 있다.Meanwhile, an encoding parameter may be used to selectively determine the specified number of times. Types of coding parameters include a prediction mode of a current coding block, context information of a neighboring block, a position of a quantized coefficient of a current coding block, a QP value, a slice type, and the like. Each parameter can change the statistical properties of the quantized coefficients.

예를 들어, 명시 횟수 결정 단계(S530)에서 부호화 파라미트를 이용하여 명시 횟수를 3으로 결정하였다면, 사용되는 부호화 모드를 명시적으로 알려주는 비트를 3번 알려준다.For example, if the number of counts is determined to be 3 using the encoding parameter in the step of determining the number of times (S530), the bit for explicitly indicating the encoding mode to be used is informed three times.

명시 횟수가 결정되면, 엔트로피 부호화부는 현재 부호화 횟수와 명시 횟수를 비교하여 엔트로피 부호화 모드를 선택한다(S540). 즉, 명시적 런/레벨 모드 부호화를 수행할 것인지 묵시적 레벨 부호화를 수행할 것인지를 결정한다.When the number of specified times is determined, the entropy encoder selects an entropy encoding mode by comparing the current number of times with the specified number of times (S540). That is, it is determined whether to perform explicit run / level mode encoding or implicit level encoding.

현재 부호화 횟수가 명시 횟수보다 작다면, 명시적 런/레벨 모드 부호화를 수행한다(S550). 즉, 부호화 모드를 명시적으로 알려주는 비트를 읽어온 후 그 값에 따라 런 모드 또는 레벨 모드로 제 1 부호화된 1차원 배열의 엔트로피 부호화를 수행한다.If the current number of encodings is less than the specified number of times, explicit run / level mode encoding is performed (S550). That is, after reading a bit that explicitly indicates an encoding mode, entropy encoding of the first encoded one-dimensional array is performed in the run mode or the level mode according to the value.

반면에, 현재 부호화 횟수가 명시 횟수보다 크다면, 묵시적 레벨 모드 부호화를 수행한다(S560).On the other hand, if the current number of encodings is greater than the specified number, implicit level mode encoding is performed (S560).

한편, 부호화 횟수는 명시 횟수 결정 단계(S530)에서 초기화되며, 명시적 런/레벨 모드 부호화 단계(S550)에서 증가한다.On the other hand, the number of times of encoding is initialized in the specifying number determining step S530, and increases in the explicit run / level mode encoding step S550.

도 6은 본 발명의 다른 일 실시예에 따른 명시적 엔트로피 부호화 방법을 나타내는 흐름도이다.6 is a flowchart illustrating an explicit entropy encoding method according to another embodiment of the present invention.

양자화된 차분 신호의 계수들을 스캐닝(S610)하면, 일반적으로 고주파 성분에서 0이 연속적으로 발생된다. 이러한 특성을 이용하여 Last_coeff 부호화 단계(S620)에서는 고주파 성분에 존재하는 연속적인 0을 부호화한다.Scanning coefficients of the quantized differential signal (S610), generally, zero is continuously generated in the high frequency component. Using this characteristic, the last_coeff encoding step (S620) encodes continuous zeros existing in the high frequency component.

그러나, Last_coeff 부호화 단계(S620) 이후에도 여전히 0이 연속적으로 발생될 확률이 높으므로, Last_coeff 부호화 단계(S620) 이후에 묵시적 런 모드 부호화 단계(S625)를 수행할 수 있다.However, since there is still a high probability that 0 is continuously generated even after the last_coeff encoding step S620, an implicit run mode encoding step S625 may be performed after the Last_coeff encoding step S620.

Last_coeff 부호화 단계(S620)와 묵시적 런 모드 부호화 단계(S625)를 통해 엔트로피 부호화된 차분 신호는, 명시 횟수 결정 단계(S630)를 통해 결정된 명시 횟수에 따라 명시적 런/레벨 모드로 부호화되거나(S650), 묵시적 레벨 모드로 부호화된다(S660).The difference signal entropy-encoded through the last_coeff encoding step S620 and the implicit run mode encoding step S625 is encoded in the explicit run / level mode according to the specified number of times determined through the specifying number determining step S630 (S650). In operation S660, the signal is encoded in an implicit level mode.

즉, 명시 횟수 결정 단계(S630)를 통해 명시 횟수가 결정되면, 엔트로피 부호화부는 현재 부호화 횟수와 명시 횟수를 비교하여 엔트로피 부호화 모드를 선택한다(S640).That is, when the specified number of times is determined through the specifying number determining step (S630), the entropy encoding unit selects an entropy encoding mode by comparing the present encoding number with the specifying number (S640).

현재 부호화 횟수가 명시 횟수보다 작다면, 명시적 런/레벨 모드 부호화를 수행한다(S650). 즉, 부호화 모드를 명시적으로 알려주는 비트를 읽어온 후 그 값에 따라 런 모드 또는 레벨 모드로 엔트로피 부호화를 수행한다.If the current number of encodings is less than the specified number of times, explicit run / level mode encoding is performed (S650). That is, after reading a bit that explicitly indicates an encoding mode, entropy encoding is performed in a run mode or a level mode according to the value.

반면에, 현재 부호화 횟수가 명시 횟수보다 크다면, 묵시적 레벨 모드 부호화를 수행한다(S660).On the other hand, if the current number of encodings is greater than the specified number, implicit level mode encoding is performed (S660).

Figure pat00004
Figure pat00004

표 4는 명시적 엔트로피 부호화 방법에서 명시 횟수 결정을 위한 구문의 예이다.Table 4 shows an example of syntax for determining the number of times in the explicit entropy encoding method.

명시적 엔트로피 부호화 방법에 있어서, 현재 부호화 블록에 기록되는, 부호화 모드를 명시적으로 알려주는 비트의 명시 횟수는 명시 횟수 결정 단계(S530, S630)에서 결정된다. 한편, 명시 횟수가 결정될 때, 현재 부호화 블록의 부호화 파라미터만이 이용되거나 주변 블록의 문맥 정보가 함께 이용될 수 있다.In the explicit entropy encoding method, the specified number of bits for explicitly indicating the encoding mode, which is recorded in the current coding block, is determined in the specifying number determining step (S530, S630). Meanwhile, when the specified number of times is determined, only encoding parameters of the current coding block may be used or context information of neighboring blocks may be used together.

표 4의 current_neighbor_flag는, 현재 슬라이스 내의 특정 LCU에서 명시적 엔트로피 부호화 방법이 사용되는 경우, 명시 횟수를 결정할 때, 현재 부호화 블록의 부호화 파라미터만을 이용할 것인지 또는 주변 블록의 문맥 정보를 함께 이용할 것인지 나타내는 플래그이다. 예를 들어, current_neighbor_flag가 1인 경우, 해당 슬라이스 내에서의 명시 횟수는 주변 블록의 문맥 정보를 이용하여 결정하고, current_neightbor_flag가 0인 경우, 명시 횟수는 현재 부호화 블록의 부호화 파라미터만을 이용하여 결정한다.Current_neighbor_flag of Table 4 is a flag indicating whether to use only encoding parameters of the current coding block or context information of neighboring blocks when determining the number of times when an explicit entropy encoding method is used in a specific LCU in the current slice. . For example, when current_neighbor_flag is 1, the number of times specified in the slice is determined using the context information of the neighboring block. When current_neightbor_flag is 0, the number of times is determined using only the encoding parameter of the current coding block.

도 7은 본 발명의 일 실시예에 따른 명시 횟수 결정 방법을 나타내는 흐름도이다.7 is a flowchart illustrating a method of determining a number of times according to an embodiment of the present invention.

도 5와 도 6의 명시 횟수 결정 단계(S530, S630)는 명시 횟수 결정 방법 선택 단계(S710), 현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 단계(S720) 및 주변 블록의 문맥 정보를 이용한 명시 횟수 결정 단계(S730)를 포함할 수 있다.5 and 6, the specifying number determining step (S530, S630) of the specifying number determining method selection step (S710), the specifying number determining step using only encoding parameters of the current coding block (S720) and the specification using the context information of the neighboring block. The number determining step S730 may be included.

명시 횟수 결정 방법 선택 단계(S710)에서는 current_neighbor_flag에 기반하여 명시 횟수 결정 방법을 선택한다. 예를 들어, current_neighbor_flag가 0인 경우, 현재 부호화 블록의 부호화 파라미터만을 이용하여 명시 횟수를 결정하고, current_neighbor_flag가 1인 경우, 주변 블록의 문맥 정보를 이용하여 명시 횟수를 결정한다.In the selection count determining method selection step S710, the selection count determining method is selected based on current_neighbor_flag. For example, when current_neighbor_flag is 0, the number of specification is determined using only coding parameters of the current coding block. When current_neighbor_flag is 1, the number of specification is determined using context information of a neighboring block.

현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 단계(S720)에서는 예측 모드, 인트라 예측 방향, 양자화 파라미터, 슬라이스 타입과 같은 현재 부호화 블록의 부호화 파라미터를 이용하여 명시 횟수를 결정한다.In the operation of determining the number of times using only encoding parameters of the current coding block (S720), the number of times of determination is determined by using encoding parameters of the current coding block such as a prediction mode, an intra prediction direction, a quantization parameter, and a slice type.

주변 블록의 문맥 정보를 이용한 명시 횟수 결정 단계(S730)에서는 예측 모드, 인트라 예측 방향, 양자화 파라미터, 슬라이스 타입과 같은 현재 부호화 블록의 부호화 파라미터와 주변 블록의 문맥 정보를 모두 고려하여 명시 횟수를 결정한다. 예를 들어, 주변 블록의 명시 횟수를 고려하여 현재 부화 블록의 명시 횟수를 결정할 수 있다.In the step S730 of determining the number of specified times using context information of the neighboring block, the number of specified times is determined by considering both encoding parameters of the current coding block such as prediction mode, intra prediction direction, quantization parameter, and slice type, and context information of the neighboring block. . For example, the number of times of the current incubation block may be determined in consideration of the number of times of the neighboring block.

한편, 현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 방법은 현재 부호화 블록 기반의 문맥 적응적 명시 횟수 결정 방법으로, 주변 블록의 문맥 정보를 이용한 명시 횟수 결정 방법은 현재 부호화 블록 및 주변 블록 기반의 문맥 적응적 명시 횟수 결정 방법으로 명명될 수 있다.Meanwhile, the method of determining the number of times using only encoding parameters of the current coding block is a context-adaptive number of times determining method based on the current coding block, and the method of determining the number of times using context information of the neighboring blocks is based on the current coding block and the surrounding blocks. It may be named as an adaptive specification number determination method.

도 8은 본 발명의 일 실시예에 따른 주변 블록의 문맥 정보를 이용한 명시 횟수 결정 방법을 나타내는 흐름도이다.8 is a flowchart illustrating a method of determining a number of times using context information of neighboring blocks according to an embodiment of the present invention.

도 7의 주변 블록의 문맥 정보를 이용한 명시 횟수 결정 단계(S730)는 왼쪽 블록 명시 횟수 로드 단계(S810), 위쪽 블록 명시 횟수 단계(S820), 현재 부호화 블록 명시 횟수 로드 단계(S830) 및 최종 명시 횟수 결정 단계(S840)를 포함할 수 있다.In the step S730 of determining the number of times of using the context information of the neighboring block of FIG. The number determining step S840 may be included.

왼쪽 블록 명시 횟수 로드 단계(S810)에서는 현재 부호화 블록을 기준으로 왼쪽에 위치하는 블록의 명시 횟수를 로드하고, 위쪽 블록 명시 횟수 로드 단계(S820)에서는 위쪽에 위치하는 블록의 명시 횟수를 로드한다.In the step of loading the left block specification number (S810), the number of specification of the block located on the left side is loaded based on the current coding block, and in the step of loading the upper block specification (S820), the number of specifying the block located above is loaded.

현재 부호화 블록 명시 횟수 로드 단계(S830)에서는 현재 부호화 블록의 부호화 파리미터를 이용하여 현재 부호화 블록의 명시 횟수를 결정하고, 결정된 명시 횟수를 로드한다. 현재 부호화 블록 명시 횟수 로드 단계(S830)는 도 7의 현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 단계(S720)에서 결정된 명시 횟수를 이용하거나, 부호화 파라미터만을 이용한 명시 횟수 결정 단계(S720)를 포함할 수 있다.In the step of loading the current coded block specification number (S830), the number of specified times of the current coded block is determined using the coding parameter of the current coded block, and the determined number of times is loaded. The current coded block specifying number loading step S830 includes a specifying number determining step S720 using only the number of times determined in the specifying number determining step S720 using only encoding parameters of the current encoding block of FIG. 7 or using only encoding parameters S720. can do.

최종 명시 횟수 결정 단계(S840)에서는 왼쪽 블록, 위쪽 블록, 현재 부호화 블록의 명시 횟수 중 적어도 하나 이상을 기반하여 현재 부호화 블록에 적용할 최종 명시 횟수를 결정한다. 예를 들어, 왼쪽 블록, 위쪽 블록, 현재 부호화 블록의 명시 횟수 중 적어도 하나 이상을 조합하여 중간값, 최솟값, 최댓값 등을 계산하여 최종 명시 횟수를 결정할 수 있다.In the final specifying count determining step (S840), the final specifying count to be applied to the current encoding block is determined based on at least one or more of the specifying number of the left block, the upper block, and the current encoding block. For example, the final specification number may be determined by calculating the median value, the minimum value, the maximum value, etc. by combining at least one of the specified number of times of the left block, the upper block, and the current coding block.

도 9는 본 발명의 일 실시예에 따른 주변 블록 명시 횟수 로드 방법을 나타내는 흐름도이다.9 is a flowchart illustrating a method of loading a neighboring block specification number according to an embodiment of the present invention.

도 8의 왼쪽 블록 명시 횟수 로드 단계(S810), 위쪽 블록 명시 횟수 로드 단계(S820)는 주변 블록 명시 횟수 로드 단계의 일 예이다. 명시적 엔트로피 부호화 방법을 사용하는 경우에 있어서, 이러한 주변 블록 명시 횟수 로드 단계에서는 단순히 해당 블록의 명시 횟수를 로드하는 것이 아니라, 현재 부호화 블록의 부호화 파라미터를 고려한 명시 횟수를 로드할 수 있다.The left block specifying count loading step S810 and the upper block specifying count loading step S820 of FIG. 8 are examples of the neighbor block specifying count loading step. In the case of using the explicit entropy encoding method, in the neighbor block specification count loading step, the explicit count considering the encoding parameter of the current encoding block may be loaded instead of simply loading the explicit count of the corresponding block.

도 9를 참조하면, 본 발명의 일 실시예에 따른 주변 블록 명시 횟수 로드 방법은 타겟 블록 예측 모드 판단 단계(S910), 타겟 블록 양자화 파라미터 판단 단계(S920) 및 타켓 블록의 명시 횟수 출력 단계(S930)를 포함한다.Referring to FIG. 9, in the method of loading neighbor blocks according to an embodiment of the present invention, the target block prediction mode determination step (S910), the target block quantization parameter determination step (S920), and the target block output count step (S930) are described. ).

타겟 블록 예측 모드 판단 단계(S910)에서는 타겟 블록의 예측 모드, 즉 해당 주변 블록의 예측 모드와 현재 부호화 블록의 예측 모드가 일치하는지를 판단한다. 두 블록의 예측 모드가 일치할 경우, 타겟 블록 양자화 파라미터 판단 단계(S920)가 수행된다.In the target block prediction mode determination step (S910), it is determined whether the prediction mode of the target block, that is, the prediction mode of the corresponding neighboring block and the prediction mode of the current coding block match. If the prediction modes of the two blocks coincide, the target block quantization parameter determination step S920 is performed.

타겟 블록 양자화 파라미터 판단 단계(S920)에서는 현재 부호화 블록의 양자화 파라미터(QP: Quantization Parameter) 값과 타겟 블록의 양자화 파라미터 값의 차이를 소정의 판단 기준 값과 비교한다. 두 블록의 양자화 파라미터 값의 차이가 상기 판단 기준 값보다 작은 경우에만 타겟 블록의 명시 횟수를 이용할 수 있다.In the target block quantization parameter determination step (S920), a difference between a quantization parameter (QP) value of the current coding block and a quantization parameter value of the target block is compared with a predetermined determination reference value. The specified number of target blocks may be used only when the difference between the quantization parameter values of the two blocks is smaller than the determination reference value.

타켓 블록 명시 횟수 출력 단계(S930)에서는 타겟 블록 예측 모드 판단 단계(S910)와 타겟 블록 양자화 파라미터 판단 단계(S920)를 통하여 현재 부호화 블록과 유사하다고 판단되는 타겟 블록의 명시 횟수를 출력한다.In the target block specification count output step (S930), the target block prediction mode determination step (S910) and the target block quantization parameter determination step (S920) output the specification number of the target block determined to be similar to the current coding block.

한편, 타겟 블록 예측 모드 판단 단계(S910)와 타겟 블록 양자화 파라미터 판단 단계(S920)을 통하여 현재 부호화 블록과 유사하지 않은 것으로 판단되는 타겟 블록의 명시 횟수는 사용되지 않는다.Meanwhile, the number of times of specifying the target block determined to be not similar to the current coding block is not used through the target block prediction mode determination step S910 and the target block quantization parameter determination step S920.

예를 들어, 현재 부호화 블록을 C라고 하고, 현재 부호화 블록의 왼쪽 블록과 위쪽 블록을 각각 L, U라고 하자. For example, let the current coding block be C, and the left and upper blocks of the current coding block are L and U, respectively.

블록 L이 블록 C와 유사한 것으로 판단되는 경우, 왼쪽 블록 명시 횟수 로드 단계(S810)를 통하여 출력된 블록 L의 명시 횟수는 블록 C의 명시 횟수를 결정하는데 사용되지만, 그렇지 않은 경우, 블록 L의 명시 횟수는 블록 C의 명시 횟수를 결정하는데 사용되지 않는다. 마찬가지로, 블록 U가 블록 C와 유사한 것으로 판단되는 경우에만, 블록 U의 명시 횟수가 사용된다.If it is determined that block L is similar to block C, the number of specified blocks L output through the step of loading the left block specified number S810 is used to determine the number of specified blocks C, but otherwise, the specified block L is specified. The number of times is not used to determine the specified number of blocks C. Similarly, only when the block U is determined to be similar to the block C, the specified number of blocks U is used.

도 10은 본 발명의 일 실시예에 따른 현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 방법을 나타내는 흐름도이다.10 is a flowchart illustrating a method of determining a specified number of times using only encoding parameters of a current coding block according to an embodiment of the present invention.

도 10을 참조하면, 본 발명의 일 실시예에 따른 현재 부호화 블록의 부호화 파라미터만을 이용한 명시 횟수 결정 방법은 후보 명시 횟수 결정 단계(S1010), 오프셋 로드 단계(S1020), 최종 명시 횟수 결정 단계(S1030)를 포함한다.Referring to FIG. 10, in the method of determining the number of times using only encoding parameters of the current coding block, the method of determining the number of candidates is determined in step S1010, the offset loading step in S1020, and the step of determining the number of times in final step S1030. ).

후보 명시 횟수 결정 단계(S1010)에서는 양자화 파라미터, 예측 모드, 인트라 예측 방향, 슬라이스 타입과 같은 현재 부호화 블록의 부호화 파라미터에 기반하여 명시 횟수의 후보 값을 결정한다.In the step of determining the candidate specification number (S1010), the candidate value of the specification number of times is determined based on coding parameters of the current coding block such as a quantization parameter, a prediction mode, an intra prediction direction, and a slice type.

오프셋 로드 단계(S1020)에서는 픽쳐 파라미터 셋 또는 슬라이스 헤더에서 시그널링되는 명시 횟수의 오프셋 구문 정보를 로드한다.In the offset loading step S1020, the offset syntax information of the specified number of times signaled in the picture parameter set or the slice header is loaded.

최종 명시 횟수 결정 단계(S1030)에서는 오프셋 로드 단계(S1020)를 통해 획득한 오프셋에 기반하여 명시 횟수의 후보 값을 재조정하여 재조정된 명시 횟수를 최종 명시 횟수로 결정한다.In the final specification count determining step (S1030), the candidate value of the specification count is readjusted based on the offset obtained through the offset loading step (S1020) to determine the readjusted specification count as the final specification count.

Figure pat00005
Figure pat00005

Figure pat00006
Figure pat00006

표 5와 표 6은 명시 횟수의 오프셋 구문 정보를 로드하기 위해 사용되는 구문의 예이다.Tables 5 and 6 show examples of syntaxes used to load the specified number of offset syntax information.

본 발명의 일 실시예에 따른 명시적 엔트로피 부호화 방법에서는 사용되는 부호화 모드를 명시적으로 알려주는 비트의 명시 횟수를 결정할 때 영상의 특성을 고려하기 위해 슬라이스 단위로 오프셋을 사용할 수 있다. 이러한 오프셋의 사용은 픽처 파라미터 셋의 iter_offset_control_present_flag에 의하여 픽쳐 단위로 활성화된다. 예를 들어, iter_offset_control_present_flag가 0인 경우, 픽쳐 단위에서 해당 픽쳐 파라미터 셋을 참조하는 픽쳐들은 오프셋을 사용하지 않는다. 반면에, iter_offset_control_present_flag가 1인 경우, 각각의 슬라이스 단위에서 inter_offset을 통하여 오프셋을 시그널링한다.In the explicit entropy encoding method according to an embodiment of the present invention, an offset may be used in units of slices in order to consider characteristics of an image when determining the number of times of explicitly indicating a coding mode to be used. The use of this offset is activated on a picture basis by the iter_offset_control_present_flag of the picture parameter set. For example, when iter_offset_control_present_flag is 0, pictures referring to the picture parameter set in the picture unit do not use an offset. On the other hand, when iter_offset_control_present_flag is 1, an offset is signaled through inter_offset in each slice unit.

또한, 본 발명의 일 실시예에 따른 명시적 엔트로피 부호화 방법에서는 현재 부호화 블록의 부호화 파라미터, 예측 모드와 오프셋을 이용하여 현재 부호화 블록의 명시 횟수를 결정한다. 예를 들어, 현재 블록의 부호화 파라미터 값에 슬라이스 단위에서 파싱된 inter_offset 값을 더하여 색인(index) 값을 계산하고, 해당 색인 값에 따라 현재 부호화 블록의 예측 모드에 기반하여 소정의 테이블에서 명시 횟수를 결정한다.In addition, in the explicit entropy encoding method according to an embodiment of the present invention, the specified number of times of the current coding block is determined using the coding parameter, the prediction mode, and the offset of the current coding block. For example, the index value is calculated by adding the inter_offset value parsed in slice units to the encoding parameter value of the current block, and the specified number of times is specified in a predetermined table based on the prediction mode of the current coding block according to the index value. Decide

Figure pat00007
Figure pat00007

표 7은 명시 횟수를 결정하기 위한 테이블의 일 예이다.Table 7 is an example of a table for determining the specified number of times.

표 7의 색인(index) 값은 다음과 같이 계산된다.The index value in Table 7 is calculated as follows.

Figure pat00008
Figure pat00008

도 11은 본 발명의 일 실시예에 따른 명시적 런/레벨 모드 부호화 방법을 나타내는 흐름도이다.11 is a flowchart illustrating an explicit run / level mode encoding method according to an embodiment of the present invention.

도 5와 도 6을 통해 전술한 바와 같이, 명시적 런/레벨 모드 부호화는 현재 부호화 횟수가 임계 값보다 작은 경우 수행된다.As described above with reference to FIGS. 5 and 6, explicit run / level mode encoding is performed when the current number of encodings is less than a threshold value.

도 11을 참조하면, run_level_sel_flag 로드 단계(S1110)에서는 런 모드와 레벨 모드를 선택하기 위한 구문인 run_level_sel_flag를 로드한다.Referring to FIG. 11, in the run_level_sel_flag loading step (S1110), run_level_sel_flag, which is a syntax for selecting a run mode and a level mode, is loaded.

부호화 모드 선택 단계(S1120)에서는 run_level_sel_flag에 따라 런 모드 부호화 또는 레벨 모드 부호화를 선택한다. 예를 들어, run_level_sel_flag가 0인 경우, 런 모드 부호화 단계(S1130)가 수행되며, run_level_sel_flag가 1인 경우 레벨 모드 부호화 단계(SS1140)가 수행된다.In the encoding mode selection step (S1120), run mode encoding or level mode encoding is selected according to run_level_sel_flag. For example, when run_level_sel_flag is 0, the run mode encoding step S1130 is performed. When run_level_sel_flag is 1, the level mode encoding step SS1140 is performed.

상술한 실시예들은 일련의 단계 또는 블록으로 표현된 순서도를 통해 설명되고 있으나, 본 발명은 상술한 단계들의 순서에 한정되는 것은 아니며, 일부의 단계는 다른 단계와, 다른 순서 또는 동시에 발생할 수 있다. 또한, 본 발명이 속하는 기술 분야의 통상의 지식을 가진자라면 순서도에 나타낸 단계들은 배타적이지 않으며, 다른 단계가 포함되거나, 일부의 단계가 삭제될 수 있음을 이해할 수 있을 것이다.Although the above-described embodiments are described through a series of steps or a flowchart represented by blocks, the present invention is not limited to the order of the steps described above, and some steps may occur in different steps, different orders, or concurrently. In addition, one of ordinary skill in the art will appreciate that the steps shown in the flowcharts are not exclusive, that other steps may be included or some steps may be deleted.

또한, 상술한 실시예들은 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위해, 모든 가능한 조합을 기술할 수는 없지만, 본 발명이 속하는 기술 분야의 통상의 지식을 가진자라면 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.
In addition, the above-described embodiments include examples of various aspects. In order to represent various aspects, not all possible combinations may be described, but one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, it is intended that the invention include all alternatives, modifications and variations that fall within the scope of the following claims.

Claims (1)

영상 부호화 장치에서의 엔트로피 부호화 방법에 있어서,
차분 신호의 계수를 고주파 성분에서 저주파 성분 순으로 스캐닝하여 1차원 배열로 정렬하는 단계;
상기 1차원 배열을 런 모드로 부호화하여 제 1 부호화된 1차원 배열을 생성하는 단계;
상기 제 1 부호화된 1차원 배열의 엔트로피 부호화 모드를 알려주는 비트의 명시 횟수를 결정하는 단계;
현재 부호화 횟수와 상기 명시 횟수를 비교하는 단계; 및
상기 현재 부호화 횟수가 상기 명시 횟수보다 작은 경우, 상기 제 1 부호화된 1차원 배열을 상기 비트가 알려주는 부호화 모드로 부호화하는 단계를 포함하는 것을 특징으로 하는 엔트로피 부호화 방법.
In the entropy encoding method in a video encoding apparatus,
Scanning the coefficients of the differential signal from high frequency components to low frequency components and sorting the coefficients of the differential signal into a one-dimensional array;
Encoding the one-dimensional array in a run mode to generate a first encoded one-dimensional array;
Determining a specified number of bits for indicating an entropy encoding mode of the first coded one-dimensional array;
Comparing a current encoding number with the specified number of times; And
And encoding the first coded one-dimensional array in an encoding mode indicated by the bits when the current number of encoding times is smaller than the specified number of times.
KR1020120022551A 2011-03-03 2012-03-05 Entropy encoding/decoding method KR20120100839A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020110019150 2011-03-03
KR20110019150 2011-03-03

Publications (1)

Publication Number Publication Date
KR20120100839A true KR20120100839A (en) 2012-09-12

Family

ID=47110393

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120022551A KR20120100839A (en) 2011-03-03 2012-03-05 Entropy encoding/decoding method

Country Status (1)

Country Link
KR (1) KR20120100839A (en)

Similar Documents

Publication Publication Date Title
KR101867884B1 (en) Method for encoding/decoding an intra prediction mode and apparatus for the same
KR102518242B1 (en) Encoding And Decoding Methods For Video Information
US10091502B2 (en) Intra prediction mode encoding/decoding method and apparatus for same
US20220060755A1 (en) Method of Coding and Decoding Images, Coding and Decoding Device and Computer Programs Corresponding Thereto
US11700398B2 (en) Method and apparatus for entropy-encoding and entropy-decoding video signal
KR102182628B1 (en) Method and device for intra prediction
KR20230143590A (en) Method for inter prediction and apparatus thereof
KR102275730B1 (en) Method and apparatus for parallel entropy encoding/decoding
KR102548881B1 (en) Methods and apparatus for video transform encoding/decoding
WO2013048033A1 (en) Method and apparatus for encoding/decoding intra prediction mode
KR20120028262A (en) Method and apparatus for entropy encoding/decoding
KR20120100839A (en) Entropy encoding/decoding method
WO2012036436A2 (en) Method and apparatus for entropy encoding/decoding

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination