KR20150093969A - Method and apparatus for early mode decision of video - Google Patents

Method and apparatus for early mode decision of video Download PDF

Info

Publication number
KR20150093969A
KR20150093969A KR1020140014658A KR20140014658A KR20150093969A KR 20150093969 A KR20150093969 A KR 20150093969A KR 1020140014658 A KR1020140014658 A KR 1020140014658A KR 20140014658 A KR20140014658 A KR 20140014658A KR 20150093969 A KR20150093969 A KR 20150093969A
Authority
KR
South Korea
Prior art keywords
unit
coding
mode
prediction
encoding
Prior art date
Application number
KR1020140014658A
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 KR1020140014658A priority Critical patent/KR20150093969A/en
Publication of KR20150093969A publication Critical patent/KR20150093969A/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/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/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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

Abstract

The method of determining encoding of a coding unit according to the present invention includes the following steps of: coding by applying a first prediction mode as to the coding unit; calculating a rate-distortion cost and a bit rate when the first prediction mode is applied; determining whether the rate-distortion cost and a preset cost are less than a threshold rate, or the bit rate is less than a preset bit rate threshold rate; and determining the prediction mode as to the coding unit as the first prediction mode if the rate-distortion cost and a preset cost are less than a threshold rate, or the bit rate is less than a preset bit rate threshold rate. Accordingly, provided are a method for encoding of an image and an encoding apparatus for decreasing a calculation amount when determining the prediction mode.

Description

영상의 고속 부호화를 위한 방법 및 이를 이용한 장치{Method and apparatus for early mode decision of video}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for fast encoding an image,

본 발명은 영상 부호화 방법 및 이를 이용한 장치에 관한 것으로서, 더 구체적으로는 고속으로 부호화 모드를 결정하는 영상의 부호화 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding method and an apparatus using the same, and more particularly, to a method and apparatus for encoding an image to determine an encoding mode at a high speed.

최근 HD(High Definition) 해상도(1280x1024 혹은 1920x1080)를 가지는 방송 서비스가 국내뿐만 아니라 세계적으로 확대되면서, 이제 많은 사용자들이 고해상도, 고화질의 영상에 많이 익숙해지고 있으며 그에 발맞춰서 많은 기관에서는 차세대 영상기기에 대한 개발에 박차를 가하고 있다. 또한 HDTV와 더불어 HDTV의 4배 이상의 해상도를 갖는 UHD(Ultra High Definition)에 대한 관심이 증대되면서 동영상 표준화 단체들은 보다 높은 해상도, 고화질의 영상에 대한 압축기술의 필요성을 인식하게 되었다. With the recent expansion of HD (High Definition) resolution (1280x1024 or 1920x1080) broadcasting service not only in Korea but also in the world, many users are now getting used to high definition and high definition video. It is spurring development. In addition, as interest in UHD (Ultra High Definition) with resolution more than four times that of HDTV with HDTV increased, video standardization organizations became aware of the necessity of compression technology for higher resolution, high image quality.

또한 현재 HDTV, 휴대전화, 블루레이 플레이어에 사용되는 H.264/AVC보다 높은 압축 효율을 통해 동일한 화질을 유지하면서도 주파수 대역이나 저장 측면에서 많은 이득을 얻을 수 있는 새로운 표준이 절실한 실정이다. In addition, there is a need for a new standard that can achieve the same picture quality through the compression efficiency higher than H.264 / AVC used in HDTV, cell phone, and Blu-ray player,

현재 MPEG(Moving Picture Experts Group)과 VCEG(Video Coding Experts Group)는 공동으로 차세대 비디오 코덱인 HEVC(High Efficiency Video Coding)를 표준화하고 있으며, UHD 영상까지 포함한 영상을 H.264/AVC 대비 2배의 압축효율로 부호화를 하는 것을 목표로 하고 있다. 이는 HD, UHD 영상뿐만 아니라 3D 방송 및 이동통신망에서도 현재보다 낮은 주파수로 고화질의 영상을 제공할 수 있다.Currently, Moving Picture Experts Group (MPEG) and Video Coding Experts Group (VCEG) jointly standardize High Efficiency Video Coding (HEVC), the next generation video codec. The video including UHD video is twice as high as H.264 / AVC And aims at encoding with compression efficiency. In addition to HD and UHD images, 3D broadcasting and mobile communication networks can provide high-quality images at lower frequencies.

HEVC는 현재 2010년 4월에 첫 JCT-VC(Joint Collaboration Team Video Coding) 회의가 열린 이후 각 기관의 기고를 통해 HM(HEVC Test Model)이라는 명칭의 코덱을 표준의 성능을 측정하기 위해 책정하였다.Since the first JCT-VC (Joint Collaboration Team Video Coding) conference was held in April 2010, HEVC has made a codec named HM (HEVC Test Model) to measure the performance of standards through contributions of various organizations.

HEVC 기술에서는 높은 부호화 성능을 달성하기 위해서 많은 기술들이 추가되었고, 이로 인해 부호화기의 복잡도가 크게 증가하였다. 따라서 HEVC 기술이 시장에서 활용되기 위해서는 부호화기의 복잡도 감소를 통한 부호화 속도 개선이 꼭 필요하다.In HEVC technology, many techniques have been added to achieve high coding performance, which has greatly increased the complexity of the encoder. Therefore, in order to use HEVC technology in the market, it is necessary to improve the coding speed by reducing the complexity of the encoder.

본 발명의 일 실시예는 코딩 블록에 대하여 코딩을 수행할지 여부를 신속하게 결정할 수 있는 영상의 부호화 방법 및 부호화 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide an image coding method and apparatus capable of quickly determining whether coding is to be performed on a coding block.

본 발명의 일 실시예는 예측 모드 결정 시 연산량을 감소시킬 수 있는 영상의 부호화 방법 및 부호화 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide an image encoding method and apparatus capable of reducing the amount of computation when determining a prediction mode.

또한, 본 발명의 일 실시예는 불필요한 화면간 부호화 예측 모드 계산을 감소시킬 수 있는 영상의 부호화 방법 및 부호화 장치를 제공하는 것을 목적으로 한다.It is another object of the present invention to provide an image coding method and apparatus capable of reducing unnecessary inter-picture coding prediction mode calculation.

본 발명에 따른 코딩 유닛의 부호화 결정 방법은 코딩 유닛에 대하여 제1 예측 모드를 적용하여 코딩하는 단계와; 상기 제1 예측 모드를 적용하였을 때의 율-왜곡 비용과 비트량을 연산하는 단계와; 상기 율-왜곡 비용과 기설정된 비용 임계값 보다 작거나 상기 비트량이 기설정된 비트량 임계값 보다 작은지 여부를 판단하는 단계와; 상기 율-왜곡 비용과 기설정된 비용 임계값 보다 작거나 상기 비트량이 기설정된 비트량 임계값 보다 작은 경우, 상기 코딩 유닛에 대한 예측 모드를 상기 제1 예측 모드로 결정하는 단계를 포함할 수 있다.A coding method of a coding unit according to the present invention includes coding a coding unit by applying a first prediction mode to the coding unit; Calculating a rate-distortion cost and a bit amount when the first prediction mode is applied; Determining whether the rate-distortion cost is less than a predetermined cost threshold or the bit amount is less than a predetermined bit amount threshold; Determining a prediction mode for the coding unit to be the first prediction mode when the rate-distortion cost is less than a predetermined cost threshold or the bit amount is less than a preset bit amount threshold.

본 발명의 일 실시예에 따르면 코딩 블록에 대하여 코딩을 수행할지 여부를 신속하게 결정할 수 있는 영상의 부호화 방법 및 부호화 장치가 제공된다. According to an embodiment of the present invention, there is provided an image encoding method and apparatus capable of quickly determining whether to perform coding on a coding block.

본 발명의 일 실시예에 따르면 예측 모드 결정 시 연산량을 감소시킬 수 있는 영상의 부호화 방법 및 부호화 장치가 제공된다.According to an embodiment of the present invention, there is provided an image encoding method and an encoding apparatus capable of reducing a computation amount when a prediction mode is determined.

또한, 본 발명의 일 실시예에 따르면 불필요한 화면간 부호화 예측 모드 계산을 감소시킬 수 있는 영상의 부호화 방법 및 부호화 장치가 제공된다.According to an embodiment of the present invention, there is provided an image encoding method and apparatus capable of reducing unnecessary inter-picture encoding prediction mode calculation.

도 1은 본 발명이 적용되는 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 3은 하나의 유닛이 복수의 하위 유닛으로 분할되는 실시예를 개략적으로 나타내는 개념도이다.
도 4는 쿼드 트리 코딩를 설명하기 위한 도면이다.
도 5는 본 발명에 따라 코딩 유닛이 포함할 수 있는 예측 유닛의 형태를 도시한 도면이다.
도 6은 개별적인 CU에 대하여 부호화 모드를 결정하기 위한 방법을 설명하기위한 제어 흐름도이다.
도 7은 본 발명에 따라 개별적인 CU에 대하여 부호화 모드를 결정하기 위한 방법을 설명하기위한 제어 흐름도이다.
도 8a와 도 8b는 본 발명에 따른 부호화 모드 결정 방법에 의한 실험 결과를 테이블로 도시한 것이다.
도 9a와 도 9b는 기존의 부호화 모드 결정 방법에 의한 실험 결과를 테이블로 도시한 것이다.
1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.
3 is a conceptual diagram schematically showing an embodiment in which one unit is divided into a plurality of lower units.
4 is a diagram for explaining quad-tree coding.
5 is a diagram showing a form of a prediction unit that a coding unit may include according to the present invention.
6 is a control flowchart for explaining a method for determining an encoding mode for each CU.
7 is a control flowchart for explaining a method for determining an encoding mode for individual CUs according to the present invention.
8A and 8B are tables showing experimental results of the encoding mode decision method according to the present invention.
9A and 9B are tables showing experimental results of the conventional encoding mode determination method.

이하, 도면을 참조하여 본 발명의 실시예에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 해당 설명을 생략할 수도 있다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of the present invention, if the detailed description of related known structures or functions is deemed to obscure the subject matter of the present specification, the description may be omitted.

본 명세서에서 어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있는 것을 의미할 수도 있고, 중간에 다른 구성 요소가 존재하는 것을 의미할 수도 있다. 아울러, 본 명세서에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다. When an element is referred to herein as being "connected" or "connected" to another element, it may mean directly connected or connected to the other element, Element may be present. In addition, the content of " including " a specific configuration in this specification does not exclude a configuration other than the configuration, and means that additional configurations can be included in the scope of the present invention or the scope of the present invention.

제1, 제2 등의 용어는 다양한 구성들을 설명하는데 사용될 수 있지만, 상기 구성들은 상기 용어에 의해 한정되지 않는다. 상기 용어들은 하나의 구성을 다른 구성으로부터 구별하는 목적으로 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성은 제2 구성으로 명명될 수 있고, 유사하게 제2 구성도 제1 구성으로 명명될 수 있다.The terms first, second, etc. may be used to describe various configurations, but the configurations are not limited by the term. The terms are used for the purpose of distinguishing one configuration from another. For example, without departing from the scope of the present invention, the first configuration may be referred to as the second configuration, and similarly, the second configuration may be named as the first configuration.

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

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

우선, 설명의 편의를 도모하고 발명을 이해를 돕기 위해, 본 명세서에서 사용되는 용어들에 대하여 간략하게 설명한다. First, in order to facilitate the description and to facilitate understanding of the invention, terms used in this specification will be briefly described.

유닛(unit)은 영상 부호화 및 복호화의 단위를 의미한다. 다시 말하면, 영상 부호화/복호화에 있어서 부호화 단위 혹은 복호화 단위라 함은, 하나의 영상을 세분화된 유닛으로 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 말한다. 블록(block), 매크로 블록, 부호화 유닛(coding unit) 또는 예측 유닛(prediction unit) 또는 변환 유닛(transform unit) 또는 부호화 블록(coding block) 또는 예측 블록(prediction block) 또는 변환 블록(transform block) 등으로 부를 수 있다. 하나의 유닛은 크기가 더 작은 하위 유닛으로 분할될 수 있다.A unit is a unit of image encoding and decoding. In other words, a coding unit or a decoding unit in image coding / decoding refers to a divided unit when one image is divided into subdivided units and is then encoded or decoded. A block, a macroblock, a coding unit or a prediction unit, a transform unit, a coding block, a prediction block or a transform block, etc. . One unit may be divided into smaller-sized lower units.

변환 유닛(transform unit)은 변환, 역변환, 양자화, 역양자화, 변환 계수 부호화/복호화와 같이 잔차 블록(residual block)의 부호화/복호화를 수행함에 있어 기본 유닛 혹은 단위 유닛이며, 하나의 변환 유닛은 분할되어 크기가 다수의 작은 변환 유닛으로 분할될 수 있다. 또한, 변환 블록과 동일한 의미로 사용될 수 있으며, 휘도와 색차 신호에 대한 변환 블록에 관련된 구문 요소(syntax element)가 포함된 형태를 변환 유닛이라 지칭할 수도 있다.A transform unit is a basic unit or a unit unit for performing coding / decoding of residual blocks such as transform, inverse transform, quantization, inverse quantization, and transform coefficient coding / decoding, and one transform unit is divided So that the size can be divided into a plurality of small conversion units. In addition, it can be used in the same sense as a conversion block, and a form including a syntax element related to a conversion block for luminance and chrominance signals may be referred to as a conversion unit.

양자화 행렬(quantization matrix)은 영상의 주관적 화질 혹은 객관적 화질을 향상시키기 위해서 양자화 혹은 역양자화 과정에서 이용되는 행렬을 의미한다. 양자화 행렬은 스케일링 리스트(scaling list)라고도 불린다. A quantization matrix means a matrix used in a quantization or inverse quantization process to improve the subjective or objective image quality of an image. The quantization matrix is also called a scaling list.

양자화/역양자화에 사용되는 양자화 행렬은 비트스트림(bitstream)으로 전송될 수도 있고, 영상 부호화 장치 및/혹은 영상 복호화 장치가 이미 보유한 기본 행렬(default matrix)이 사용될 수도 있다. 전송되는 양자화 행렬의 정보는 시퀀스 파라미터 세트(SPS: sequence parameter set) 또는 픽처 파라미터 세트(PPS: picture parameter set)을 통해 양자화 행렬의 크기 혹은 양자화 행렬이 적용되는 변환 블록 크기 별로 일괄 전송될 수 있다. 예컨대, 4x4 변환 블록을 위한 4x4 양자화 행렬들이 전송되고, 8x8 변환 블록을 위한 8x8 행렬들이 전송되고, 16x16 변환 블록을 위한 16x16 행렬들이 전송되고, 32x32 변환 블록을 위한 32x32 행렬들이 전송될 수 있다.The quantization matrix used for quantization / dequantization may be transmitted as a bitstream, or a default matrix already possessed by the image encoding apparatus and / or the image decoding apparatus may be used. The information of the quantization matrix to be transmitted may be collectively transmitted according to the size of the quantization matrix through a sequence parameter set (SPS) or a picture parameter set (PPS) or the size of a transform block to which a quantization matrix is applied. For example, 4x4 quantization matrices for a 4x4 transform block may be sent, 8x8 matrices for an 8x8 transform block may be sent, 16x16 matrices for a 16x16 transform block may be sent, and 32x32 matrices for a 32x32 transform block may be sent.

현재 블록에 적용되는 양자화 행렬은 (1) 동일한 크기의 양자화 행렬을 복사하여 획득될 수도 있고, (2) 양자화 행렬 내 이전 행렬 계수(matrix coefficient)로부터 예측에 의해 생성될 수도 있다. 동일한 크기의 행렬은 이전에 부호화 혹은 복호화 혹은 사용된 양자화 행렬일 수도 있고, 참조 양자화 행렬일 수도 있으며 기본 양자화 행렬일 수도 있다. 혹은 이전에 부호화 혹은 복호화 혹은 사용된 양자화 행렬, 참조 양자화 행렬, 기본 양자화 행렬 중 적어도 둘을 포함하는 조합으로부터 선택적으로 결정될 수도 있다. The quantization matrix applied to the current block may be obtained by (1) copying a quantization matrix of the same size, or (2) by prediction from a previous matrix coefficient in the quantization matrix. A matrix of the same size may be a previously quantized, decoded, or used quantization matrix, a reference quantization matrix, or a basic quantization matrix. Or a combination including at least two of a quantization matrix, a reference quantization matrix, and a basic quantization matrix which have been previously encoded or decoded or used.

파라미터 세트(parameter set)는 비트스트림 내의 구조 중 헤더 정보에 해당하며, 시퀀스 파라미터 세트, 픽처 파라미터 세트, 적응 파라미터 세트(adaptation parameter set) 등을 통칭하는 의미를 가진다.A parameter set corresponds to header information in a structure in a bitstream, and has a meaning collectively referred to as a sequence parameter set, a picture parameter set, an adaptation parameter set, and the like.

양자화 매개변수(quantization parameter)는 양자화 및 역양자화에서 사용되는 값으로서, 양자화 매개변수는 양자화 스텝 크기(step size)에 매핑된 값일 수 있다.The quantization parameter may be a value used in quantization and inverse quantization, and the quantization parameter may be a value mapped to a quantization step size.

기본 행렬은 영상 부호화 장치 및/혹은 영상 복호화 장치에서 미리 정의되어 있는 소정의 양자화 행렬을 의미할 수 있으며, 본 명세서에서 후술될 기본 양자화 행렬은 기본 행렬과 동일한 의미로 사용될 수 있다. 비-기본 행렬(non-default matrix)은 영상 부호화 장치 및/혹은 영상 복호화 장치에서 미리 정의되지 않고, 영상 부호화 장치에서 영상 복호화 장치로 전송되는 즉, 사용자에 의해서 전송/수신되는 양자화 행렬을 의미할 수 있으며, 본 명세서에서 후술될 비-기본 양자화 행렬은 비-기본 행렬과 동일한 의미로 사용될 수 있다.The basic matrix may denote a predetermined quantization matrix predefined in the image encoding apparatus and / or the image decoding apparatus, and the basic quantization matrix to be described later in this specification may be used in the same meaning as the basic matrix. The non-default matrix means a quantization matrix that is not previously defined in the image encoding apparatus and / or the image decoding apparatus, but is transmitted from the image encoding apparatus to the image decoding apparatus, that is, transmitted / received by the user And a non-basic quantization matrix to be described later in this specification can be used in the same sense as a non-basic matrix.

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

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

영상 부호화 장치(100)는 입력 영상에 대해 인트라(intra) 모드 또는 인터(inter) 모드로 부호화를 수행하고 비트스트림을 출력할 수 있다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 인트라 모드인 경우 스위치(115)가 인트라로 전환되고, 인터 모드인 경우 스위치(115)가 인터로 전환될 수 있다. 영상 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분을 부호화할 수 있다. 이때, 입력 영상은 원 영상(original picture)를 의미할 수 있다.The image encoding apparatus 100 may encode an input image in an intra mode or an inter mode and output a bit stream. Intra prediction is intra prediction, and inter prediction is inter prediction. In the intra mode, the switch 115 is switched to the intra mode, and in the inter mode, the switch 115 can be switched to the inter mode. The image encoding apparatus 100 may generate a prediction block for an input block of the input image, and may then code the difference between the input block and the prediction block. At this time, the input image may mean an original picture.

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

인터 모드인 경우, 움직임 예측부(111)는, 움직임 예측 과정에서 참조 영상 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 움직임 보상부(112)는 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 여기서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터이며, 현재 블록과 참조 영상 내 블록 사이의 오프셋을 나타낼 수 있다. In the inter mode, the motion predicting unit 111 may obtain a motion vector by searching an area of the reference image stored in the reference image buffer 190, which is best matched with the input block, in the motion estimation process. The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, the motion vector is a two-dimensional vector used for inter prediction, and can represent an offset between a current block and a block in the reference image.

감산기(125)는 입력 블록과 생성된 예측 블록의 차분에 의해 잔차 블록을 생성할 수 있다. 변환부(130)는 잔차 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 출력할 수 있다. 그리고 양자화부(140)는 입력된 변환 계수를 양자화 매개변수와 양자화 행렬 중 적어도 하나를 이용하여 양자화하여 양자화된 계수(quantized coefficient)를 출력할 수 있다. 이때, 양자화 행렬은 영상 부호화 장치에 입력되어질 수 있으며, 입력되어진 양자화 행렬이 영상 부호화 장치에서 사용되기로 결정될 수 있다.The subtractor 125 can generate the residual block by the difference between the input block and the generated prediction block. The transforming unit 130 may perform a transform on the residual block to output a transform coefficient. The quantization unit 140 may quantize the input transform coefficient using at least one of a quantization parameter and a quantization matrix to output a quantized coefficient. At this time, the quantization matrix may be input to the image encoding apparatus, and the input quantization matrix may be determined to be used in the image encoding apparatus.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. 엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수-골롬 코드(Exponential-Golomb Code), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. The entropy encoding unit 150 may output a bit stream by performing entropy encoding based on the values calculated by the quantization unit 140 or the encoding parameter values calculated in the encoding process. When entropy encoding is applied, 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, thereby expressing symbols, The size of the column can be reduced. Therefore, the compression performance of the image encoding can be enhanced through the entropy encoding. The entropy encoding unit 150 may use an encoding method such as Exponential-Golomb Code, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding.

도 1의 실시예에 따른 영상 부호화 장치(100)는 인터 예측 부호화, 즉 화면 간 예측 부호화를 수행하므로, 현재 부호화된 영상은 참조 영상으로 사용되기 위해 복호화되어 저장될 필요가 있다. 따라서 양자화된 계수는 역양자화부(160)에서 역양자화되고 역변환부(170)에서 역변환된다. 역양자화 및 역변환된 계수는 복원된 잔차 블록이 되어 가산기(175)를 통해 예측 블록과 더해지고 복원 블록이 생성된다. Since the image encoding apparatus 100 according to the embodiment of FIG. 1 performs inter-prediction encoding, that is, inter-view prediction encoding, the currently encoded image needs to be decoded and stored for use as a reference image. Accordingly, the quantized coefficients are inversely quantized in the inverse quantization unit 160 and inversely transformed in the inverse transformation unit 170. The inverse quantized and inverse transformed coefficients become reconstructed residual blocks and added to the prediction block through an adder 175 to generate reconstructed blocks.

복원 블록은 필터부(180)를 거치고, 필터부(180)는 디블록킹 필터(deblocking filter), SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 중 적어도 하나 이상을 복원 블록 또는 복원 픽처에 적용할 수 있다. 필터부(180)는 인루프(in-loop) 필터로 불릴 수도 있다. 디블록킹 필터는 블록 간의 경계에 생긴 블록 왜곡을 제거할 수 있다. SAO는 코딩 에러를 보상하기 위해 픽셀값에 적정 오프셋(offset) 값을 더해줄 수 있다. ALF는 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 필터부(180)를 거친 복원 블록은 참조 영상 버퍼(190)에 저장될 수 있다.
The restoration block passes through the filter unit 180 and the filter unit 180 applies at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) can do. The filter unit 180 may be referred to as an in-loop filter. The deblocking filter can remove block distortion occurring at the boundary between the blocks. The SAO may add a proper offset value to the pixel value to compensate for coding errors. ALF can perform filtering based on the comparison between the reconstructed image and the original image. The restoration block having passed through the filter unit 180 may be stored in the reference image buffer 190.

도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.

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

영상 복호화 장치(200)는 영상 부호화 장치에서 출력된 비트스트림을 입력 받아 인트라 모드 또는 인터 모드로 복호화를 수행하고 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 인트라 모드인 경우 스위치가 인트라로 전환되고, 인터 모드인 경우 스위치가 인터로 전환될 수 있다. 영상 복호화 장치(200)는 입력 받은 비트스트림으로부터 복원된 잔차 블록(reconstructed residual block)을 얻고 예측 블록을 생성한 후 복원된 잔차 블록과 예측 블록을 더하여 재구성된 블록, 즉 복원 블록을 생성할 수 있다.The video decoding apparatus 200 receives the bit stream output from the video encoding apparatus, decodes the video stream into the intra mode or the inter mode, and outputs the reconstructed video, that is, the reconstructed video. In the intra mode, the switch is switched to the intra mode, and in the inter mode, the switch can be switched to the inter mode. The image decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream, generate a prediction block, and add the reconstructed residual block and the prediction block to generate a reconstructed block, i.e., a reconstructed block .

엔트로피 복호화부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 복호화 방법은 상술한 엔트로피 부호화 방법과 유사하다.The entropy decoding unit 210 may entropy-decode the input bitstream according to a probability distribution to generate symbols including a symbol of a quantized coefficient type. The entropy decoding method is similar to the entropy encoding method described above.

엔트로피 복호화 방법이 적용되는 경우, 높은 발생 확률을 갖는 심볼에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 각 심볼들에 대한 비트열의 크기가 감소될 수 있다.When the entropy decoding method is applied, a small number of bits are assigned to a symbol having a high probability of occurrence, and a large number of bits are assigned to a symbol having a low probability of occurrence, so that the size of a bit string for each symbol is Can be reduced.

양자화된 계수는 역양자화부(220)에서 양자화 매개변수를 이용해서 역양자화되고 역변환부(230)에서 역변환되며, 양자화된 계수가 역양자화/역변환된 결과, 복원된 잔차 블록이 생성될 수 있다. The quantized coefficients are inversely quantized in the inverse quantization unit 220 using the quantization parameters and inversely transformed in the inverse transformation unit 230. The reconstructed residual blocks can be generated as a result of inverse quantization / inverse transformation of the quantized coefficients.

역양자화에 사용되는 양자화 행렬은 스케일링 리스트라고도 불린다. 역양자화부(220)는 양자화된 계수에 양자화 행렬을 적용하여 역양자화된 계수를 생성할 수 있다. The quantization matrix used for inverse quantization is also called a scaling list. The inverse quantization unit 220 may generate a dequantized coefficient by applying a quantization matrix to the quantized coefficients.

이때 역양자화부(220)는 영상 부호화 장치에서 적용된 양자화에 대응하여 역양자화를 수행할 수 있다. 예컨대, 역양자화부(220)는 영상 부호화 장치에서 적용된 양자화 행렬을 양자화된 계수에 역으로 적용하여 역양자화를 수행할 수 있다. In this case, the inverse quantization unit 220 may perform inverse quantization in response to the quantization applied in the image encoding apparatus. For example, the inverse quantization unit 220 can perform inverse quantization by applying the quantization matrix applied in the image coding apparatus to the quantized coefficients inversely.

영상 복호화 장치(200)에서 역양자화에 사용되는 양자화 행렬은 비트스트림으로부터 수신될 수도 있고, 영상 부호화 장치 및/혹은 영상 복호화 장치가 이미 보유한 기본 행렬이 사용될 수도 있다. 전송되는 양자화 행렬의 정보는 시퀀스 파라미터 세트 또는 픽처 파라미터 세트를 통해 양자화 행렬 크기 혹은 양자화 행렬이 적용되는 변환 블록 크기 별로 일괄 수신될 수 있다. 예컨대, 4x4 변환 블록을 위한 4x4 양자화 행렬들이 수신되고, 8x8 변환 블록을 위한 8x8 행렬들이 수신되고, 16x16 변환 블록을 위한 16x16 행렬들이 수신되고, 32x32 변환 블록을 위한 32x32 행렬들이 수신될 수 있다.The quantization matrix used in the inverse quantization in the video decoding apparatus 200 may be received from the bitstream, or a basic matrix already held by the video encoding apparatus and / or the video decoding apparatus may be used. The information of the quantization matrix to be transmitted may be collectively received by the quantization matrix size through the sequence parameter set or the picture parameter set or by the conversion block size to which the quantization matrix is applied. For example, 4x4 quantization matrices for a 4x4 transform block may be received, 8x8 matrices for an 8x8 transform block may be received, 16x16 matrices for a 16x16 transform block may be received, and 32x32 matrices for a 32x32 transform block may be received.

인트라 모드인 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 복호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 인터 모드인 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 영상 버퍼(270)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the intra mode, the intraprediction unit 240 may generate a prediction block by performing spatial prediction using the pixel value of the already decoded block around the current block. In the inter mode, the motion compensation unit 250 can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference image buffer 270. [

복원된 잔차 블록과 예측 블록은 가산기(255)를 통해 더해지고, 더해진 블록은 필터부(260)를 거칠 수 있다. 필터부(260)는 디블록킹 필터, SAO, ALF 중 적어도 하나 이상을 복원 블록 또는 복원 픽처에 적용할 수 있다. 필터부(260)는 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 복원 영상은 참조 영상 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다.
The reconstructed residual block and the prediction block are added through the adder 255, and the added block can be passed through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, SAO, and ALF to a restoration block or a restored picture. The filter unit 260 may output a reconstructed image, that is, a reconstructed image. The restored image is stored in the reference image buffer 270 and can be used for inter prediction.

도 3은 하나의 유닛이 복수의 하위 유닛으로 분할되는 실시예를 개략적으로 나타내는 개념도이다. 본 도면에서는 설명의 편의 상 영상의 처리 단위를 코딩 유닛(CU)를 일 예로 들어 설명한다.3 is a conceptual diagram schematically showing an embodiment in which one unit is divided into a plurality of lower units. In the figure, for convenience of explanation, the processing unit of the image is described by taking a coding unit (CU) as an example.

코딩 유닛(CU)이란 상기에서 설명한 비디오 신호의 처리 과정, 예를 들어 화면내(intra)/화면간(inter) 예측, 변환(transform), 양자화(quantization) 및/또는 엔트로피 코딩(entropy coding) 등의 과정에서 영상을 처리하기 위한 기본 단위를 의미한다. 하나의 영상을 코딩하는 데 있어서 사용되는 코딩 유닛의 크기는 일정하지 않을 수 있다. The coding unit CU is a processing unit for processing the above-described video signal, for example intra / inter prediction, transform, quantization and / or entropy coding In this paper, The size of the coding unit used in coding one image may not be constant.

코딩 유닛은 사각형 형태를 가질 수 있고, 하나의 코딩 유닛은 다시 여러 개의 코딩 유닛으로 분할 가능하다. 예를 들어, 2N x 2N 크기를 가지는 하나의 코딩 유닛은 다시 네 개의 NxN 크기를 가지는 코딩 유닛으로 분할될 수 있다. 이러한 코딩 유닛의 분할은 재귀적으로 이루어질 수 있으며, 모든 코딩 유닛들이 동일한 형태로 분할 될 필요는 없다. 다만 코딩 및 처리과정에서의 편의를 위하여 코딩 유닛의 최대 크기 또는 최소 크기에 대한 제한이 있을 수 있다. 코딩 유닛의 최대 크기가 정해졌다면 그것을 최대 코딩 유닛(Coding Tree Unit) 크기라고 하며, 최소 크기가 정해졌다면 그것을 최소 코딩 유닛 크기라고 한다.The coding unit may have a rectangular shape, and one coding unit may be divided into several coding units again. For example, one coding unit having a size of 2N x 2N may again be divided into coding units having four NxN sizes. The division of such a coding unit can be made recursively, and not all the coding units need be divided into the same form. However, there may be restrictions on the maximum or minimum size of the coding unit for convenience in coding and processing. If the maximum size of the coding unit is determined, it is called the maximum coding unit size, and if the minimum size is determined, it is called the minimum coding unit size.

HEVC 부호화기에서는 CTU(Coding Tree Unit)를 기반으로 부호화가 이루어진다. CTU는 64x64, 32x32, 16x16의 크기를 가질 수 있으며, 일반적으로 64x64를 많이 사용하고 있다. 이러한 CTU를 기반으로 재귀적인 트리 코딩(Quadtree Coding)이 이루어지게 되는데, CTU내에서 Quadtree 형태로 나누어진 각 블록에 해당하는 CU(Coding Unit)를 기반으로 예측 및 변환 부호화가 이루어진다. CU는 64x64, 32x32, 16x16, 8x8의 값을 가질 수 있으며, CTU내에서 Quadtree 구조를 가지면서 율-왜곡 비용을 최소화시킬 수 있는 형태로 구성된다. In the HEVC encoder, coding is performed based on a CTU (Coding Tree Unit). CTUs can have sizes of 64x64, 32x32, and 16x16, and generally use 64x64. Recursive tree coding is performed based on the CTU. In the CTU, prediction and transcoding are performed based on a CU (Coding Unit) corresponding to each block divided into a Quadtree type. The CU can have values of 64x64, 32x32, 16x16, and 8x8, and has a structure that can minimize the rate-distortion cost while having a quadtree structure in the CTU.

도 3에 도시된 바와 같이, 64x64 CTU에 대하여 Quadtree 구조를 가지면서 최소의 율-왜곡 비용을 갖는 구조를 찾기 위해서 부호화가 필요한 CU는 세부적으로 분할될 수 있다. As shown in FIG. 3, a CU that requires encoding in order to find a structure having a quadtree structure and a minimum rate-distortion cost for 64x64 CTUs can be finely divided.

YUV 4:2:0 포맷에서 Y성분의 경우에 최적의 구조를 찾기 위해서 1개의 64x64 CU, 4개의 32x32 CU, 16개의 16x16 CU, 64개의 8x8 CU에 대해서 부호화가 이루어진다.In the YUV 4: 2: 0 format, encoding is performed for one 64x64 CU, four 32x32 CU, 16 16x16 CU, and 64 8x8 CUs to find the optimal structure for the Y component.

하나의 코딩 유닛에 대하여, 해당 코딩 유닛이 분할 되는지 여부를 나타내는 정보를 지정할 수 있다. 예를 들어, 분할 여부를 나타내는 플래그 값이 1이면 해당 노드에 대응하는 블록은 다시 4개의 블록으로 나누어지고, 0이면 더 이상 나누어지지 않고 해당 코딩 유닛에 대한 처리 프로세스가 수행될 수 있다.
For one coding unit, information indicating whether or not the coding unit is divided may be specified. For example, if the flag indicating the division is 1, the block corresponding to the corresponding node is divided into four blocks again. If the flag is 0, the processing process for the corresponding coding unit can be performed without further division.

도 4는 쿼드 트리 코딩를 설명하기 위한 도면이다. 4 is a diagram for explaining quad-tree coding.

상기에서 설명한 코딩 유닛의 구조는 재귀적인 트리 구조를 이용하여 나타낼 수 있다. 즉, 하나의 영상 또는 최대 크기 코딩 유닛을 루트(root)로 하여, 다른 코딩 유닛으로 분할 되는 코딩 유닛은 분할된 코딩 유닛의 개수만큼의 자식(child) 노드를 가지게 된다. 따라서, 더 이상 분할되지 않는 코딩 유닛이 리프(leaf) 노드가 된다. 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정할 때, 하나의 코딩 유닛은 최대 4개의 다른 코딩 유닛으로 분할 될 수 있으므로 코딩 유닛 구조를 나타내는 트리는 쿼드 트리(Quard tree) 형태가 될 것이다. The structure of the coding unit described above can be represented using a recursive tree structure. That is, a coding unit that is divided into other coding units, with one image or a maximum size coding unit root, has as many child nodes as the number of the divided coding units. Thus, the coding unit which is not further divided becomes a leaf node. Assuming that only one square division is possible for one coding unit, one coding unit may be divided into a maximum of four different coding units, so that the tree representing the coding unit structure will be in the form of a quad tree.

인코더에서는 비디오 영상의 특성(예를 들어, 해상도)에 따라서 혹은 코딩의 효율을 고려하여 최대 및 최소 코딩 유닛 크기를 결정하고 이에 대한 정보 또는 이를 유도할 수 있는 정보가 비트스트림에 포함될 수 있다. In the encoder, the maximum and minimum coding unit sizes may be determined according to the characteristics (for example, resolution) of the video image or the efficiency of coding, and information about the maximum and minimum coding unit sizes may be included in the bitstream.

예를 들면, 최대 코딩 유닛 의 크기 및 트리의 최대 깊이가 정의되었을 때, 정방형 분할을 한다면, 코딩 유닛의 높이 및 너비는 부모 노드의 코딩 유닛의 높이 및 너비의 반이 되므로, 상기와 같은 정보를 이용하면 최소 코딩 유닛 크기를 구할 수 있다. 혹은 역으로, 최소 코딩 유닛 크기 및 트리의 최대 깊이를 미리 정의하여 이용하고, 이를 이용하여 필요할 경우에 최대 코딩 유닛의 크기를 유도하여 이용할 수 있다. 정방형 분할에서 유닛의 크기는 2의 배수 형태로 변화하기 때문에, 실제 코딩 유닛의 크기는 2를 밑으로 하는 로그 값으로 나타내어 전송 효율을 높일 수 있다.For example, when the maximum coding unit size and the maximum depth of the tree are defined, if the square division is performed, the height and width of the coding unit are half the height and width of the coding unit of the parent node, You can get the minimum coding unit size. Conversely, the minimum coding unit size and the maximum depth of the tree can be predefined and utilized, and the maximum coding unit size can be derived and used if necessary. Since the size of a unit changes in a square of 2 in a square partition, the size of the actual coding unit is expressed as a log value of 2 or less, which can increase the transmission efficiency.

디코더에서는 현재 코딩 유닛이 분할 되었는지를 나타내는 정보를 획득할 수 있다. 이러한 정보는 특정 조건 하에만 획득하게(전송되게) 하면 효율을 높일 수 있다. 예를 들어 현재 코딩 유닛이 SCU라면 더 이상 작은 코딩 유닛으로 분할되지 않으므로, 이러한 경우에는 분할되었는지 나타내는 정보를 획득할 필요가 없다. The decoder may obtain information indicating whether the current coding unit is partitioned. This information can only be obtained (sent) under certain conditions to increase efficiency. For example, if the current coding unit is an SCU, it is no longer divided into smaller coding units, so in this case, it is not necessary to acquire information indicating that it is divided.

만약 상기 정보가 코딩 유닛이 분할되었음을 나타내는 경우, 분할된 코딩 유닛의 크기는 현재 코딩 유닛의 반이 되고, 현재 처리 위치를 기준으로 4개의 정방형 코딩 유닛으로 분할된다. 각 분할된 코딩 유닛들에 대해서 상기와 같은 처리를 반복할 수 있다.If the information indicates that the coding unit has been divided, the size of the divided coding unit is half of the current coding unit, and is divided into four square coding units based on the current processing position. The above processing can be repeated for each divided coding unit.

하나의 유닛 혹은 블록은 트리 구조(tree structure)를 기초로 깊이 정보를 가지고 계층적으로 분할될 수 있다. 각각의 분할된 하위 유닛은 깊이 정보를 가질 수 있다. 상기 깊이 정보는 유닛이 분할된 회수 및/또는 정도를 나타내므로, 상기 하위 유닛의 크기에 관한 정보를 포함할 수도 있다. A unit or block can be hierarchically partitioned with depth information based on a tree structure. Each divided subunit may have depth information. The depth information may include information on the size of the lower unit, as the unit indicates the number and / or degree of division.

도 4의 410을 참조하면, 가장 상위 노드는 루트 노드(root node)로 불릴 수 있고, 가장 작은 깊이 값을 가질 수 있다. 이 때, 가장 상위 노드는 레벨 0의 깊이를 가질 수 있으며, 분할되지 않은 최초의 유닛을 나타낼 수 있다. Referring to 410 of FIG. 4, the uppermost node may be referred to as a root node and may have the smallest depth value. At this time, the uppermost node may have a depth of level 0, and may represent the first unpartitioned unit.

레벨 1의 깊이를 갖는 하위 노드는 최초 유닛이 한 번 분할된 유닛을 나타낼 수 있으며, 레벨 2의 깊이를 갖는 하위 노드는 최초의 유닛이 두 번 분할된 유닛을 나타낼 수 있다. 예를 들어, 도 4의 420에서 노드 a에 대응하는 유닛 a는 최초 유닛에서 한 번 분할된 유닛이고, 레벨 1의 깊이를 가질 수 있다.A lower node having a depth of level 1 may represent a unit in which the first unit is divided once and a lower node having a depth of level 2 may represent the unit in which the first unit is divided twice. For example, the unit a corresponding to the node a in FIG. 4 is a once-divided unit in the initial unit and may have a depth of level 1.

레벨 3의 리프 노드(leaf node)는 최초 유닛이 3번 분할된 유닛을 나타낼 수 있다. 예를 들어, 도 4의 420에서 노드 d에 대응하는 유닛 d는 최초 유닛에서 세 번 분할된 유닛이고, 레벨 3의 깊이를 가질 수 있다. 따라서, 가장 하위 노드인 레벨 3의 리프 노드는 가장 깊은 깊이를 가질 수 있다.
A level 3 leaf node may represent a unit in which the first unit is divided three times. For example, the unit d corresponding to the node d in 420 of FIG. 4 is a unit divided three times in the initial unit and can have a depth of level 3. Therefore, the leaf node of level 3, which is the lowest node, can have the deepest depth.

도 5는 본 발명에 따라 코딩 유닛이 포함할 수 있는 예측 유닛의 형태를 도시한 도면이다. 5 is a diagram showing a form of a prediction unit that a coding unit may include according to the present invention.

코딩을 위한 영상 예측은 더 이상 나누어지지 않는 코딩 유닛(즉 코딩 유닛 트리의 리프 노드)를 대상으로 이루어질 수 있다. 현재 코딩 유닛은 하나 이상의 예측 유닛(prediction unit:PU) 또는 예측 블록(prediction block) 또는 파티션(partition)으로 나뉘어지며 이 행위 자체 역시 파티션(partition)이라고 일컫는다. 예측 유닛은 예측을 수행하는 기본 단위로써, 가능한 예측 블록의 형태는 화면내 코딩 유닛과 화면간 코딩 유닛에서 각기 다르다.The image prediction for coding can be made on a coding unit that is no longer divided (i.e., the leaf node of the coding unit tree). The current coding unit is divided into one or more prediction units (PU) or prediction blocks or partitions, and this behavior itself is also referred to as a partition. The prediction unit is a basic unit for performing prediction, and the types of prediction blocks available are different in the intra-picture coding unit and the inter picture coding unit.

(a)는 화면 내 예측을 수행하는 코딩 유닛에 대한 예측 유닛을 도시한 것이다. 도시된 바와 같이, 화면내 예측을 수행하는 코딩 유닛(2Nx2N)은 코딩 유닛과 동일한 크기를 갖는 2Nx2N의 예측 유닛과 2Nx2N 단위의 코딩 유닛을 NxN으로 분할한 예측으로 분할할 수 있다.(a) shows a prediction unit for a coding unit that performs intra prediction. As shown, the coding unit 2Nx2N for performing intra prediction can divide a 2Nx2N prediction unit having the same size as the coding unit and a 2Nx2N coding unit into a prediction divided into NxN.

(b)는 화면 간 예측을 수행하는 코딩 유닛에 대한 예측 유닛을 도시한 것이다. 도시된 바와 같이, 화면 간 예측을 수행하는 코딩 유닛(2Nx2N)은 코딩 유닛과 동일한 크기를 사용하는 2Nx2N, 2NxN으로 분할한 예측 유닛, Nx2N으로 분할한 예측 유닛, NxN으로 분할한 예측 유닛, nLx2N으로 분할한 예측 유닛, nRx2N으로 분할한 예측 유닛, 2NxnU으로 분할한 예측 유닛, 2NxnD으로 분할한 예측 유닛 등으로 분할하여 사용할 수 있다.
(b) shows a prediction unit for a coding unit that performs inter picture prediction. As shown in the figure, the coding unit 2Nx2N for performing inter picture prediction includes a prediction unit divided into 2Nx2N and 2NxN using the same size as the coding unit, a prediction unit divided into Nx2N, a prediction unit divided into NxN, A prediction unit divided into nRx2N, a prediction unit divided into 2NxnU, and a prediction unit divided into 2NxnD.

현재 JCT-VC에서 차세대 비디오 표준으로 HEVC(High Efficiency Video Coding) 기술에 대한 표준을 진행하고 있다. HEVC는 기존에 최고의 압축률을 제공하는 H.264/AVC 대비 약 50% 이상의 압축효율을 목표로 하고 있으며, 이를 위해 많은 부호화 Tools이 새롭게 제안되었다. 기존의 비디오 코덱들은 매크로 블럭(16x16)단위로 부호화를 수행한 반면, HEVC에서는 고해상도 비디오에 대해 최적의 압축효율을 높이기 위해 CU (Coding Unit), PU (Prediction Unit), TU (Transform Unit)별 최적의 블록사이즈로 압축할 수 있게 디자인 되었다. Currently, JCT-VC is working on standards for High Efficiency Video Coding (HEVC) technology as the next generation video standard. HEVC aims at compression efficiency of more than 50% compared to H.264 / AVC which provides the best compression ratio. Many coding tools have been proposed for this purpose. Conventional video codecs are coded in macroblocks (16x16), while HEVC is optimized for CU (Coding Unit), PU (Prediction Unit) and TU (Transform Unit) Of the block size.

한편, HEVC에 따른 영상 부호화 방식은 화면간 부호화 모드 계산에 많은 연산량을 요구하고 있다. 이는 HEVC에 따른 영상 부호화 방식이 H.264/AVC 대비 화면간 부호화 과정은 블록의 기본 사이즈가 4배 커졌으며, 트리구조로 동일한 사이즈의 자식 CU들로 분할 되며 매번 PU와 TU에 대해서 계산을 수행하고 있기 때문이다.On the other hand, the image encoding method according to the HEVC requires a large amount of computation to calculate the inter picture coding mode. This is because the basic size of the block coding process is divided into the child CUs of the same size as the tree structure, and the calculation is performed on the PU and TU each time the image coding method according to the HEVC is H.264 / AVC. It is because.

CU는 최대 크기 64x64 (LCU: Largest Coding Unit)부터 32x32, 16x16, 8x8 크기의 블록으로 분할되고, 각각의 CU들은 최적의 PU와 TU의 최적 블록사이즈를 계산한다. 따라서 하나의 CU 사이즈에 (2Nx2N) SKIP, Inter_2Nx2N, Inter_2NxN, Inter_Nx2N, Inter_2NxnU, Inter_2NxnD, Inter_nRx2N, Inter_nLx2N, Intra_PCM mode를 지원하고 있다.The CU is divided into 32x32, 16x16, and 8x8 blocks from a maximum size 64x64 (LCU: Largest Coding Unit), and each CU calculates the optimum block size of the optimal PU and TU. Therefore, SKIP, Inter_2Nx2N, Inter_2NxN, Inter_N2N, Inter_2NxnU, Inter_2NxnD, Inter_nRx2N, Inter_nLx2N, and Intra_PCM modes are supported in one CU size.

만약 현재 CU 사이즈가 8x8인 경우에는 Inter_NxN, Intra_NxN 모드에 대해서도 율-왜곡 최적화 (RDO: Rate-Distortion Optimization)을 수행하여 하나의 CU 사이즈에서 가장 최적의 블록 모드를 결정하고 있다. If the current CU size is 8x8, Rate-Distortion Optimization (RDO) is performed for Inter_NxN and Intra_NxN modes to determine the most optimal block mode in one CU size.

화면간 부호화 자체가 가지는 복잡도가 화면내 부호화 보다 상당히 크기 때문에 효율적으로 화면간 부호화 모드를 조기 종결 할 수 있는 방법이 요구된다.There is a need for a method capable of efficiently terminating the inter-picture coding mode efficiently because the complexity of inter picture coding itself is considerably larger than that of intra picture coding.

따라서, 본 발명은 비디오 부호화 시, 현재 부호화 블록 (CU: Coding Unit)에서 블록 분할 과정을 조기에 결정하여 부호화기의 복잡도를 줄이는 방법 및 이를 이용한 장치를 제공한다. Accordingly, the present invention provides a method of reducing the complexity of an encoder by early determining a block division process in a current CU (Coding Unit) during video coding, and an apparatus using the method.

이런 CTU를 부호화할 때, 각 사이즈 별로 RDO를 계산하여 가장 양호한, 즉 가장 적은 비트량에 좋은 화질을 코딩할 수 있는 코딩 유닛 구조를 찾는 과정이 필요하다. 예를 들어 코딩 유닛 구조는 64x64로 결정될 수도 있고, 32x32의 4개의 코딩 유닛들로 결정될 수도 있고, 또는 더 복잡한 구조롤 쪼개 질 수도 있다. 본 명세서에서 최적의 블록 사이즈로 추정되는 코딩 유닛이라는 것을 임의의 CTU 중 가장 최상의 부호화를 위하여 다양한 크기의 코딩 유닛을 분할되는 코딩 유닛 구조를 갖는 것을 의미한다.
When coding these CTUs, it is necessary to calculate the RDO for each size and find a coding unit structure that can code the best, that is, the best quality for the smallest bit amount. For example, the coding unit structure may be determined to be 64x64, the coding unit may be determined to be 32x32, or a more complex structure may be split. In this specification, a coding unit estimated with an optimal block size means having a coding unit structure that is divided into coding units of various sizes for the best coding among arbitrary CTUs.

도 6은 개별적인 CU에 대하여 부호화 모드를 결정하기 위한 방법을 설명하기위한 제어 흐름도이다. 6 is a control flowchart for explaining a method for determining an encoding mode for each CU.

도 6의 우측 하단에 도시되어 있는 M(i)는 CU에 적용될 수 있는 예측 모드 및 분할 타입을 나타낸다. 첫 번째 모드(M(1))는 스킵 모드 및 머지 모드가 적용되는 2Nx2N을 의미하고, 두 번째 모드(M(2))부터는 스킵 모드 및 머지 모드가 아닌 인터 예측, 즉 움직임 벡터 예측이 적용되는 분할 타입을 나타낸다. The M (i) shown at the bottom right of FIG. 6 represents a prediction mode and a division type applicable to the CU. The first mode M (1) means 2Nx2N to which the skip mode and the merge mode are applied, and the second mode (M (2)) means inter prediction, which is not a skip mode and merge mode, Indicates the partition type.

두 번째 모드(M(2))는 움직임 벡터 예측이 적용되는 2Nx2N을 의미하고, 세 번째 모드(M(3))는 인터 예측이 적용되는 Nx2N을 의미하고, 네 번째 모드(M(4))는 인터 예측이 적용되는 2NxN을 의미한다. The second mode M (2) means 2Nx2N to which the motion vector prediction is applied, the third mode M (3) means Nx2N to which inter prediction is applied, the fourth mode M (4) Means 2NxN to which inter prediction is applied.

다섯 번째 내지 여덟 번째 모드는 비대칭 분할 타입을 나타낸다. 다섯 번째 모드(M(5))는 인터 예측이 적용되는 2NxnD을 의미하고, 여섯 번째 모드(M(6))는 인터 예측이 적용되는 는 2NxnU을 의미하고, 일곱 번째 모드(M(7))는 인터 예측이 적용되는 nLx2N을 의미하고, 여덟 번째 모드(M(8))는 인터 예측이 적용되는 nRx2N을 의미한다. The fifth through eighth modes represent an asymmetric division type. M (6) means 2NxnU to which inter prediction is applied, and seventh mode (M (7)) means 2N x nD to which inter prediction is applied. Denotes the nLx2N to which the inter prediction is applied, and the eighth mode (M (8)) denotes the nRx2N to which the inter prediction is applied.

아홉 번째 및 열 번째 모드는 인트라 예측 모드를 나타낸다. 아홉 번째 모드(M(9))는 인트라 예측이 적용되는 2Nx2N을 의미하고, 열 번째 모드(M(10))는 인트라 예측이 적용되는 NxN을 의미한다. The ninth and tenth modes indicate the intra prediction mode. The ninth mode (M (9)) means 2Nx2N to which intra prediction is applied, and the tenth mode (M (10)) means NxN to which intra prediction is applied.

우선, i에 1을 대입하고(S610), 첫 번째 모드(M(i))를 이용하여 CU를 코딩한다(S620).First, 1 is substituted into i (S610), and the CU is coded using the first mode (M (i)) (S620).

즉, CU에 대하여 예측 모드를 구하기 위하여 첫 번째부터 모드부터 순차적으로 하나씩 CU에 적용한다.That is, in order to obtain the prediction mode for the CU, the CU is sequentially applied from the first mode to the CU one by one.

i가 1인지 여부가 판단되고(S630),i가 1이면 Jbest에 J(i)가 대입된다(S640). It is determined whether i is 1 (S630). If i is 1, J (i) is assigned to Jbest (S640).

J(i)는 부호화 모드에서 발생하는 RD 비용을 의미한다. J (i) denotes the RD cost incurred in the encoding mode.

Jbest에 J(i)가 대입되면, i에 i+1이 대입된다(S660).When J (i) is substituted for Jbest, i + 1 is substituted for i (S660).

만약, i가 1이 아니면, J(i)가 Jbest 보다 작은지 여부가 판단된다(S650).If i is not 1, it is determined whether J (i) is smaller than Jbest (S650).

J(i)가 Jbest 보다 작으면, Jbest는 J(i)로 설정되고(S640), i에 i+1이 대입된다(S660).If J (i) is smaller than Jbest, Jbest is set to J (i) (S640) and i + 1 is substituted for i (S660).

J(i)가 Jbest 보다 작지 않은 경우에도, i에 i+1이 대입된다(S660).Even if J (i) is not smaller than Jbest, i + 1 is substituted for i (S660).

새롭게 설정된 i가 10보다 큰지 여부가 판단되고(S670), i가 10보다 크면 부호화 모드 판단 단계는 종료한다. 전체 부호화 모드가 10개인 경우, S670 에서 i가 10보다 큰지 여부가 판단되며, 총 부호화 모드의 개수에 따라 비교되는 값은 변경될 수 있다.It is determined whether or not the newly set i is greater than 10 (S670), and if i is greater than 10, the encoding mode determination step ends. If the total coding mode is 10, it is determined in step S670 whether i is larger than 10, and the value to be compared according to the total number of coding modes can be changed.

i가 10보다 작으면, 새롭게 설정된 i에 대한 M(i)가 고려되어야 하는지 여부가 판단된다(S680).If i is less than 10, it is determined whether M (i) for the newly set i should be considered (S680).

만약, i에 대한 M(i)가 고려되어야 하면, 단계 S620로 진입하여 모드(M(i))를 이용하여 CU를 코딩한다(S620).If M (i) for i is to be considered, step S620 is entered and the CU is coded using mode M (i) (S620).

반면, i에 대한 M(i)가 고려될 필요가 없으면, i에 i+1이 대입하는 단계 S660으로 진입한다.
On the other hand, if M (i) for i does not need to be considered, the process goes to step S660 in which i + 1 is substituted for i.

도 6과 같은 과정을 통하여 하나의 CTU는 도 4의 420과 같은 쿼드 트리 구조로 분할될 수 있다. 도 4의 420은 부호화 과정을 모두 거친 후 결정된 64x64 CTU에서 최소의 율-왜곡 비용을 갖는 쿼드 트리 구조의 한 예이다. 본 명세서에서 율-왜곡 비용과 RD 비용은 동일한 의미로 사용될 수 있다. 6, one CTU can be divided into a quad tree structure like 420 of FIG. 420 of FIG. 4 is an example of a quadtree structure having a minimum rate-distortion cost in 64x64 CTUs determined after all the encoding processes. In this specification, the rate-distortion cost and the RD cost can be used in the same sense.

설명된 바와 같이, 각 CU에서 최대 10개의 부호화 모드를 확인하여 최소의 RD(rate-distortion) 비용을 갖는 부호화 모드를 찾아내야 하므로, CTU 내에서 최소의 율-왜곡 비용을 갖는 쿼드 트리 구조를 찾는 과정은 매우 많은 복잡도를 가지고 있다.As described, since a maximum of 10 coding modes are checked in each CU to find a coding mode with a minimum rate-distortion (RD) cost, a quad tree structure with a minimum rate-distortion cost is found in the CTU The process has a lot of complexity.

한편, 부호화 모드 중에서 최소의 율-왜곡 비용을 갖는 모드와 모양을 빨리 찾기 위해서 다양한 방법들이 제안되고 있다. On the other hand, various methods have been proposed to quickly find the mode and shape having the minimum rate-distortion cost among the encoding modes.

여기서, 모드란 인트라 예측 및 인터 예측을 모두 포함하는 개념이다. 인터 예측에 따른 예측 방법의 종류에는 스킵 모드, 머지 모드, MVP(motion vector prediction) 모드등이 존재한다. 모양이란 CU가 예측 블록으로 분할될 때의 타입을 의미하는 것으로 도 5의 b 중 어느 하나를 의미한다. Here, the mode is a concept including both intra prediction and inter prediction. There are skip mode, merge mode, MVP (motion vector prediction) mode, and the like, as types of prediction methods according to inter prediction. The shape means a type when the CU is divided into the prediction blocks, which means any one of FIG. 5B.

다양한 방법들 중 하나의 예에서는 CU의 최적 부호화 모드를 결정하기 위한 과정 중 인터 예측이 이루어질 때, Y, U, V의 cbf(coded block flag)값이 모두 0이면, 나머지 모양에 대한 부호화를 생략, 즉 나머지 모양에 대한 연산을 생략하는 방법이다. In one of the various methods, when inter prediction is performed during the process of determining the optimal encoding mode of the CU, if the coded block flag (cbf) values of Y, U, and V are all 0, That is, a method of omitting the operation for the remaining shape.

또 다른 예에 따르면 CU의 최적 부호화 모드를 구함에 있어서, 해당 크기로 인터 예측 모드를 먼저 구한 후에 DMV(Differential Motion Vector)와 cbf가 모두 0이면 다른 모양과 모드에 대한 연산은 생략하는 방법이다. According to another example, if the DMV (Differential Motion Vector) and cbf are both zero after calculating the inter prediction mode in order to obtain the optimal coding mode of the CU, the calculation for the other modes and modes is omitted.

첫 번째 방법은 cbf만 확인하므로, 예측 정보의 시그널링을 위해 발생하는 부호화 비트량을 고려하지 않는다. 따라서 이로 인하여 부호화 효율 손실이 발생할 수 있다. Since only the cbf is checked in the first method, the amount of encoded bits generated for the signaling of the prediction information is not considered. Therefore, loss of coding efficiency may occur.

두 번 째 방법 경우, 예측 정보 중 움직임 벡터의 부호화를 위한 비트량까지 추가로 고려하고 있지만, 인터 예측 모드를 구하기 위한 과정을 가장 먼저 수행해야 하는 제한 조건이 존재한다.
In the second method, the amount of bits for coding a motion vector is further considered in the prediction information. However, there is a restriction condition for performing the process for obtaining the inter prediction mode first.

도 7은 본 발명에 따라 개별적인 CU에 대하여 부호화 모드를 결정하기 위한 방법을 설명하기위한 제어 흐름도이다. 7 is a control flowchart for explaining a method for determining an encoding mode for individual CUs according to the present invention.

도 7의 우측 하단에 도시되어 있는 M(i)는 CU에 적용될 수 있는 예측 모드 및 분할 타입을 나타낸다. 첫 번째 모드(M(1))는 스킵 모드 및 머지 모드가 적용되는 2Nx2N을 의미하고, 두 번째 모드(M(2)) 내지 여덟 번째 모드(M(8))는 스킵 모드 및 머지 모드가 아닌 인터 예측, 즉 움직임 벡터 예측이 적용되는 분할 타입을 나타낸다. 아홉 번째(M(9)) 및 열 번째 모드(M(10))는 인트라 예측 모드를 나타낸다. 상세한 설명은 도 6과 같으므로 생락 한다. M (i) shown in the lower right of FIG. 7 represents a prediction mode and a division type applicable to the CU. The first mode M (1) means 2Nx2N to which the skip mode and the merge mode are applied, and the second mode M (2) to the eighth mode M (8) Inter prediction, that is, a division type to which motion vector prediction is applied. The ninth (M (9)) and tenth (M (10)) modes indicate the intra prediction mode. The details are the same as in Fig.

우선, i에 1을 대입하고(S710), 첫 번째 모드(M(i))를 이용하여 CU를 코딩한다(S720). 이 과정에서 i에 1인 예측 모드에 대하여 RD 비용과 비트량이 연산된다.First, 1 is substituted into i (S710), and the CU is coded using the first mode (M (i)) (S720). In this process, the RD cost and the bit amount are calculated for the prediction mode of i = 1.

즉, CU에 대하여 예측 모드를 구하기 위하여 첫 번째부터 모드부터 순차적으로 하나씩 CU에 적용한다.That is, in order to obtain the prediction mode for the CU, the CU is sequentially applied from the first mode to the CU one by one.

i가 1인지 여부가 판단되고(S730),i가 1이면 Jbest에 J(i)가 대입되고, Bbest에 B(i)가 대입된다(S740). i is 1 (S730). If i is 1, J (i) is substituted for Jbest and B (i) is substituted for Bbest (S740).

만약, i가 1이 아니면, J(i)가 Jbest 보다 작은지 여부가 판단된다(S750).If i is not 1, it is determined whether J (i) is smaller than Jbest (S750).

J(i)는 부호화 모드를 결정하는 과정에서 각 부호화 모드에서 발생하는 RD 비용을 의미하고, B(i)는 비트량을 의미한다. J (i) denotes an RD cost generated in each coding mode in the process of determining an encoding mode, and B (i) denotes a bit amount.

S720에서 i에 1인 예측 모드에 대하여 RD 비용과 비트량이 연산되면, RD 비용의 임계값(threshold)에 해당하는 JTH이 Jbest보다 크거나 비트량의 임계값에 해당하는 BTH이 Bbest보다 큰지 여부가 판단된다(S760).When the RD cost and the bit amount are calculated for the prediction mode of i at i in S720, whether the JTH corresponding to the threshold value of the RD cost is greater than Jbest or the BTH corresponding to the bit amount threshold is greater than Bbest (S760).

본 발명에 따를 경우, 부호화 모드를 결정하는 과정에서 각 부호화 모드에서의 발생하는 RD 비용과 비트량을 각각의 임계값인 JTH, BTH와 비교하여 둘 중 하나라도 임계값 보다 작게 발생한 경우 나머지 부호화 모드에 대한 연산을 생략함으로써 부호화 모드를 조기에 결정한다. According to the present invention, in a process of determining an encoding mode, when the RD cost and the bit amount generated in each encoding mode are compared with JTH and BTH, which are threshold values, if either one of them is smaller than the threshold value, So that the encoding mode is determined early.

즉, 코딩 유닛를 특정 예측 모드를 이용하여 코딩하였을 때, RD 비용과 비트량이 각각의 임계값인 JTH, BTH와 비교하여 둘 중 하나라도 임계값 보다 작으면, 코딩 유닛에 대하여는 추가적인 예측 모드 적용 없이 상기 특정 예측 모드를 코딩 유닛의 예측 모드로 결정할 수 있다.That is, when the coding unit is coded using the specific prediction mode, if the RD cost and the bit amount are compared with the respective threshold values JTH and BTH, and if either one of them is smaller than the threshold value, The specific prediction mode can be determined as the prediction mode of the coding unit.

이러한 방법은 인터 예측 모드로 코딩되는 픽쳐에 적용될 수 있다. This method can be applied to a picture coded in the inter prediction mode.

JTH는 RD 비용에 대한 임계값으로 수식 (1)에 의해 결정될 수 있다. JTH can be determined by equation (1) as a threshold value for RD cost.

수식 (1)Equation (1)

Figure pat00001
Figure pat00001

수식 (1)에서 i는 부호화 모드, 2N은 CU의 가로 길이(픽셀 수), TL(temporal layer)는 부호화되는 픽쳐의 시간적 서브 레이어(temporal layer)를 나타낸다. WTL은 TL에 따른 가충치(weighting factor)이며, Dpred는 부호화된 픽쳐중 재생 순서 상 가장 가까운 곳에 위치하는 픽쳐의 동일 위치에 있는(co-located) CTU에서의 왜곡 값이다. 재생 순서상 가장 가까운 곳에 위치하는 픽쳐가 복수개 일 경우 최근에 부호화된 픽쳐를 사용한다. λmode는 라그랑지안(Lagrangian) 상수이며, B는 비트 코스트(bit cost)로 발생 비트량을 고려해 주기 위한 값이다. In Equation (1), i denotes an encoding mode, 2N denotes a transverse length (number of pixels) of a CU, and TL denotes a temporal layer of a picture to be encoded. WTL is a weighting factor according to TL, and Dpred is a distortion value in a co-located CTU of a picture located closest to the playback order among coded pictures. When a plurality of pictures located nearest to each other in the reproduction order are used, recently coded pictures are used. lambda mode is a Lagrangian constant, and B is a value for considering the generated bit amount at a bit cost.

BTH는 발생 비트량에 대한 임계값을 나타낸다. BTH represents a threshold value for the generated bit amount.

본 발명의 일 실시예로 랜덤 억세스 구성(random access configuration)으로 부호화 되는 경우, JTH 값을 결정하기 위해 필요한 WTL은 TL 2에서 0.7, TL 3에서 0.9, TL 4에서 1.0으로 설정하고 B는 10으로 설정될 수 있다. When coding in a random access configuration according to an embodiment of the present invention, the WTL required to determine the JTH value is 0.7 in TL 2, 0.9 in TL 3, 1.0 in TL 4, and 10 in B Can be set.

또한 비트량에 대한 임계값인 BTH를 수식 (2)와 같이 설정될 수 있다. Also, the threshold value BTH for the bit amount can be set as shown in equation (2).

수식 (2)Equation (2)

Figure pat00002
Figure pat00002

만약, Jbest가 JTH이 보다 작거나 Bbest가 BTH 보다 작으면, 나머지 부호화 모드에 대한 연산을 생략함으로써 부호화 모드를 조기에 결정한다. 즉, 부호화 모드를 결정하는 단계가 종료된다. If Jbest is smaller than JTH or Bbest is smaller than BTH, the encoding mode is determined early by omitting the operation for the remaining encoding mode. That is, the step of determining the encoding mode is ended.

반면, Jbest가 JTH이 보다 크고 Bbest가 BTH 보다 크면, i에 i+1이 대입된다(S770).On the other hand, if Jbest is larger than JTH and Bbest is larger than BTH, i + 1 is substituted for i (S770).

새롭게 설정된 i가 10보다 큰지 여부가 판단되고(S780),i가 10보다 크면 부호화 모드 판단 단계는 종료한다.It is determined whether or not the newly set i is greater than 10 (S780), and if i is greater than 10, the encoding mode determination step ends.

i가 10보다 작으면, 새롭게 설정된 i에 대한 M(i)가 고려되어야 하는지 여부가 판단된다(S790).If i is less than 10, it is determined whether M (i) for the newly set i should be considered (S790).

만약, i에 대한 M(i)가 고려되어야 하면, 단계 S720로 진입하여 모드(M(i))를 이용하여 CU를 코딩한다(S720).If M (i) for i is to be considered, step S720 is entered and the CU is coded using mode M (i) (S720).

반면, i에 대한 M(i)가 고려될 필요가 없으면, i에 i+1이 대입하는 단계 S770으로 진입한다.
On the other hand, if M (i) for i does not need to be considered, the process goes to step S770 in which i + 1 is substituted for i.

도 8a와 도 8b는 본 발명에 따른 부호화 모드 결정 방법에 의한 실험 결과를 테이블로 도시한 것이다. 즉, 도 8a와 도 8b는 도 7를 적용한 경우, 여러 영상(Sequence)에 대한 결과값을 테이블로 정리한 것이다. 8A and 8B are tables showing experimental results of the encoding mode decision method according to the present invention. That is, FIGS. 8A and 8B are tables in which the result values for various images are summarized in the case of applying FIG.

도 8a와 도 8b에서 ΔETR(Encoding Time Reduction)은 아래, 수식 (3)으로 구해지는 값으로 부호화시 소요되는 시간의 감소 폭을 나타낸다. BD-레이트(Bjontegaard Delta-rate)은 부호화 효율의 손실 정도를 나타내는 값이다. In FIGS. 8A and 8B, Encoding Time Reduction (ΔETR) is a value obtained by the following equation (3), and represents a decrease in the time required for coding. The BD-rate (Bjontegaard Delta-rate) is a value indicating the degree of loss in coding efficiency.

(수식 3)(Equation 3)

ΔETR (%) = (T1-T2)/T2 * 100% ? ETR (%) = (T1-T2) / T2 * 100%

T1: 고안된 고속 부호화 모드를 사용하여 부호화에 소요된 시간T1: Time spent coding using the designed fast coding mode

T2: 고안된 고속 부호화 모드를 사용하지 않고 부호화에 소요된 시간
T2: Time spent coding without using the designed fast coding mode

부호화 결과 A 그룹(class A)에서는 약 44%의 부호화 속도(AVG pf class’s A)를 개선시키면서 0.43%의 부호화 효율 손실을 가짐을 확인할 수 있다. B 그룹(class B)에서는 약 50%의 부호화 속도(AVG pf class’s B)를 개선시키면서 0.43%의 부호화 효율 손실(Overall AVG)을 가짐을 확인할 수 있다.As a result, it can be confirmed that the coding efficiency of the A group (class A) is 0.43% while improving the coding rate (AVG pf class A) of about 44%. In the B group (class B), the coding efficiency (overall AVG) is 0.43% while improving the coding rate (AVG pf class B) of about 50%.

A 내지 F 그룹의 전체(Overall AVG)적인 부호화 속도는 약 44.8%를 개선시켰으며, 부호화 효율 손실은 0.42%인 것으로 확인된다.
The overall AVG coding speed of the A to F groups improved by about 44.8% and the coding efficiency loss was found to be 0.42%.

도 9a와 도 9b는 기존의 부호화 모드 결정 방법에 의한 실험 결과를 테이블로 도시한 것이다. 본 발명과 비교되는 고속 부호화 모드 결정 방법은 JCTVC-F045은 상술한 CU의 최적 부호화 모드를 결정하기 위한 과정 중에서 인터 예측이 이루어질 때, Y, U, V의 cbf(coded block flag)값이 모두 0이면, 나머지 모양에 대한 율-왜곡 비용 계산을 생략하는 방법을 의미하고, JCTVC-G543는 인터 예측 모드를 먼저 수행한 후에 DMV(Differential Motion Vector)와 cbf가 모두 0이면 다른 모양과 모드에 대한 연산은 생략하는 방법을 의미한다. 9A and 9B are tables showing experimental results of the conventional encoding mode determination method. In the fast encoding mode determination method compared with the present invention, JCTVC-F045 determines that the coded block flag (cbf) values of Y, U, and V are all 0 when inter prediction is performed in the process of determining the optimal encoding mode of the CU. If the DMV (Differential Motion Vector) and cbf are both 0 after performing the inter prediction mode, then JCTVC-G543 does not perform calculation for different shapes and modes Means to omit.

기존의 첫 번째 고속 부호화 모드 결정 방법에 따르면, 약 39%의 부호화 속도를 개선시키면서 0.94%의 부호화 효율 손실을 가진다. 두 번째 고속 부호화 모드 결정 방법에 따를 경우, 약 33%의 부호화 속도를 개선시키면서 0.25%의 부호화 효율 손실을 가진다. According to the existing first fast encoding mode determination method, the coding efficiency is improved by about 39%, and the coding efficiency loss is 0.94%. According to the second fast coding mode determination method, the coding efficiency is improved by about 33%, and the coding efficiency loss is 0.25%.

즉, 도 8a 및 도 8b와 도 9a와 도 9b를 비교하였을 때, 본 발명에 따른 고속 부호화 모드 결정 방법을 따를 경우 부호화 속도는 훨씬 개선시켜면서도 적은 부호화 효율 손실을 가지는 것을 확인할 수 있다.8A and 8B are compared with FIGS. 9A and 9B, it can be seen that the coding rate is much improved and the encoding efficiency is reduced when the fast coding mode determining method according to the present invention is compared.

상술한 예시적인 시스템에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 상술한 실시예들은 다양한 양태의 예시들을 포함한다. 예컨대, 각 실시예의 조합 역시 본 발명의 일 실시예로서 이해되어야 할 것이다.In the above-described exemplary system, the methods are described on the basis of a flowchart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in different orders or simultaneously . In addition, the above-described embodiments include examples of various aspects. For example, combinations of the embodiments are also to be understood as one embodiment of the present invention.

100 : 영상 부호화 장치 111: 움직임 예측부
112: 움직임 보상부 120 : 인트라 예측부
115 : 스위치 125 : 감산기
130 : 변환부 140 : 양자화부
150 : 엔트로피 부호화부 160 : 역양자화부
170 : 역변환부 180 : 필터부
100: image encoding device 111: motion prediction unit
112: motion compensation unit 120: intra prediction unit
115: Switch 125:
130: conversion unit 140: quantization unit
150: an entropy encoding unit 160: an inverse quantization unit
170: inverting section 180: filter section

Claims (1)

코딩 유닛의 부호화 결정 방법에 있어서,
코딩 유닛에 대하여 제1 예측 모드를 적용하여 코딩하는 단계와;
상기 제1 예측 모드를 적용하였을 때의 율-왜곡 비용과 비트량을 연산하는 단계와;
상기 율-왜곡 비용과 기설정된 비용 임계값 보다 작거나 상기 비트량이 기설정된 비트량 임계값 보다 작은지 여부를 판단하는 단계와;
상기 율-왜곡 비용과 기설정된 비용 임계값 보다 작거나 상기 비트량이 기설정된 비트량 임계값 보다 작은 경우, 상기 코딩 유닛에 대한 예측 모드를 상기 제1 예측 모드로 결정하는 단계를 포함하는 것을 특징으로 하는 코딩 유닛의 부호화 결정 방법.
A coding method of a coding unit,
Coding the coding unit by applying a first prediction mode to the coding unit;
Calculating a rate-distortion cost and a bit amount when the first prediction mode is applied;
Determining whether the rate-distortion cost is less than a predetermined cost threshold or the bit amount is less than a predetermined bit amount threshold;
And determining the prediction mode for the coding unit to be the first prediction mode when the rate-distortion cost is smaller than a predetermined cost threshold value or the bit amount is smaller than a preset bit amount threshold value. Wherein the encoding unit decodes the encoded data.
KR1020140014658A 2014-02-10 2014-02-10 Method and apparatus for early mode decision of video KR20150093969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140014658A KR20150093969A (en) 2014-02-10 2014-02-10 Method and apparatus for early mode decision of video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140014658A KR20150093969A (en) 2014-02-10 2014-02-10 Method and apparatus for early mode decision of video

Publications (1)

Publication Number Publication Date
KR20150093969A true KR20150093969A (en) 2015-08-19

Family

ID=54057554

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140014658A KR20150093969A (en) 2014-02-10 2014-02-10 Method and apparatus for early mode decision of video

Country Status (1)

Country Link
KR (1) KR20150093969A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10484689B2 (en) 2016-01-05 2019-11-19 Electronics And Telecommunications Research Institute Apparatus and method for performing rate-distortion optimization based on Hadamard-quantization cost

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10484689B2 (en) 2016-01-05 2019-11-19 Electronics And Telecommunications Research Institute Apparatus and method for performing rate-distortion optimization based on Hadamard-quantization cost

Similar Documents

Publication Publication Date Title
KR102292788B1 (en) Multi-Type-Tree Framework for Video Coding
US10419765B2 (en) Method and apparatus for coding/decoding image
KR102148469B1 (en) Method and apparatus for encoding/decoding video with predicting quantization parameter of hierarchical data unit
KR20210156826A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20170058838A (en) Method and apparatus for encoding/decoding of improved inter prediction
KR102480967B1 (en) Method and apparatus for image encoding/decoding
KR20210065051A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20200039591A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20140127385A (en) Method for decision of coding unit splittng
KR102057195B1 (en) Method and apparatus for scalable video encoding based on coding units of tree structure, method and apparatus for scalable video decoding based on coding units of tree structure
KR20140104064A (en) Method and apparatus for coding mode decision
KR20150093969A (en) Method and apparatus for early mode decision of video
KR20150048637A (en) Method and apparatus for inter color component prediction
KR20140120397A (en) Prediction unit mode determining method using Block Mode Complexity
KR102107080B1 (en) Fast Video coding method
KR20140120396A (en) Fast Video coding method
KR20170021677A (en) Apparatus and method for video transform encoding

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination