KR101659343B1 - Method and apparatus for processing moving image - Google Patents

Method and apparatus for processing moving image Download PDF

Info

Publication number
KR101659343B1
KR101659343B1 KR1020130054837A KR20130054837A KR101659343B1 KR 101659343 B1 KR101659343 B1 KR 101659343B1 KR 1020130054837 A KR1020130054837 A KR 1020130054837A KR 20130054837 A KR20130054837 A KR 20130054837A KR 101659343 B1 KR101659343 B1 KR 101659343B1
Authority
KR
South Korea
Prior art keywords
unit
picture
coding unit
divided
dividing
Prior art date
Application number
KR1020130054837A
Other languages
Korean (ko)
Other versions
KR20140135855A (en
Inventor
이영렬
홍성욱
고재현
Original Assignee
세종대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Priority to KR1020130054837A priority Critical patent/KR101659343B1/en
Publication of KR20140135855A publication Critical patent/KR20140135855A/en
Application granted granted Critical
Publication of KR101659343B1 publication Critical patent/KR101659343B1/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/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding
    • 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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Abstract

본 발명은 동영상 처리 방법 및 장치에 관한 것으로, 그 장치는 동영상 처리 장치에 있어서, 비디오 신호를 분석하여 픽쳐를 부호화 단위로 분할하는 픽쳐 결정부; 상기 부호화 단위별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 변환부; 상기 잔차 신호에 대한 양자화를 수행하는 양자화부; 및 상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 엔트로피 부호화부를 포함하고, 상기 픽쳐 결정부는 전체 부호화 단위에 대한 움직임 벡터의 절대차 합, 분할된 부호화 단위에 대한 움직임 벡터의 절대차 합 및 임계값에 따라 분할한다.The present invention relates to a moving picture processing method and apparatus, and more particularly, to a moving picture processing apparatus which includes a picture determining unit for analyzing a video signal and dividing a picture into units of coding; A transform unit for performing predictive encoding for each encoding unit and transforming a residual signal according to the predictive encoding; A quantizer for performing quantization on the residual signal; And an entropy coding unit for performing entropy coding on the quantized signal and outputting the quantized signal, wherein the picture determination unit determines an absolute difference sum of a motion vector for an entire coding unit, an absolute difference sum of a motion vector for the divided coding unit, Divide by value.

Description

동영상 처리 방법 및 장치{Method and apparatus for processing moving image}TECHNICAL FIELD [0001] The present invention relates to a video processing method and apparatus,

본 발명은 동영상 처리 방법 및 장치에 관한 것으로, 더욱 상세하게는 동영상 처리를 위한 코딩 유닛의 분할 구조를 결정하는 방법 및 그 장치에 관한 것이다.The present invention relates to a moving image processing method and apparatus, and more particularly, to a method and apparatus for determining a division structure of a coding unit for moving image processing.

일반적으로 비디오 코딩 시, 인트라 예측과 인터 예측을 이용하여 잔차 신호(residual signal)를 만든다. 잔차 신호를 구하는 이유는 잔차 신호를 가지고 코딩을 했을 때 데이터의 양이 작아서 데이터 압축률이 높아지고, 예측이 좋을수록 잔차 신호의 값이 작게 된다.Generally, in video coding, intra prediction and inter prediction are used to generate a residual signal. The reason why the residual signal is obtained is that when the data is coded with the residual signal, the amount of data is small, so that the data compression rate is high, and the better the prediction, the smaller the value of the residual signal is.

인트라 예측 방법은 현재 블록의 주변의 픽셀을 이용하여 현재 블록의 데이터를 예측한다. 실제 값과 예측 값의 차이를 잔차 신호 블록이라고 한다. HEVC의 경우는 인트라 예측 방법이 기존 H.264/AVC에서 사용되던 9개의 예측모드에서 35개의 예측모드로 증가하여 더욱 세분화하여 예측을 한다.The intraprediction method predicts the data of the current block by using the pixels around the current block. The difference between the actual value and the predicted value is called a residual signal block. In case of HEVC, the intra prediction method increases to 35 prediction modes in nine prediction modes used in the existing H.264 / AVC, and further subdivided prediction is performed.

인터 예측 방법의 경우는 현재 블록을 주변의 픽쳐들 내의 블록들과 비교하여 가장 비슷한 블록을 찾는다. 이때 찾은 블록에 대한 위치정보(Vx, Vy)를 모션 벡터라고 한다. 현재블록과 모션 벡터에 의하여 예측된 예측블록간의 블록내 화소 값들의 차이를 잔차 신호(residual signal) 블록이라고 한다 (motion-compensated residual block).In the case of the inter prediction method, the current block is compared with the blocks in the neighboring pictures to find the closest block. At this time, the position information (Vx, Vy) of the found block is referred to as a motion vector. The difference between the intra-block pixel values of the current block and the prediction block predicted by the motion vector is called a residual-signal block (motion-compensated residual block).

이와 같이 인트라 예측과 인터 예측이 더 세분화 되어 잔차 신호의 데이터 양이 줄어들고 있으나, 동영상의 처리를 위한 연산량은 크게 증가하였다.In this way, although intra prediction and inter prediction are further refined, the amount of data of the residual signal is decreasing, but the amount of computation for processing a moving image is greatly increased.

특히, 코딩을 위한 픽쳐 내 분할 구조를 결정하는 과정에서의 복잡도 증가량으로 인해 파이프라인 구현 등에 있어서의 어려움이 존재하고 있다.Particularly, there is a difficulty in the pipeline implementation due to the increase in complexity in the process of determining intra-picture partitioning structure for coding.

본 발명의 실시 예는 상기와 같은 연산량 증가의 문제점을 해결하기 위한 분할 구조 결정 방법 및 그 장치를 제공하는데 그 목적이 있다.Embodiments of the present invention are directed to a method and apparatus for determining a partition structure for solving the problem of increase in the amount of computation.

또한, 본 발명의 실시 예는 상기와 같은 파이프라인 및 워스트 케이스 복잡도로 인한 구현 문제점을 해결하기 위한 분할 구조 결정 방법 및 그 장치를 제공하는데 그 목적이 있다.It is another object of the present invention to provide a method and apparatus for determining a division structure for solving the implementation problems due to the pipeline and worst case complexity as described above.

상기한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 실시예에 따른 동영상 처리 장치는 동영상 처리 장치에 있어서, 비디오 신호를 분석하여 픽쳐를 부호화 단위로 분할하는 픽쳐 결정부; 상기 부호화 단위별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 변환부; 상기 잔차 신호에 대한 양자화를 수행하는 양자화부; 및 상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 엔트로피 부호화부를 포함하고, 상기 픽쳐 결정부는 전체 부호화 단위에 대한 움직임 벡터의 절대차 합, 분할된 부호화 단위에 대한 움직임 벡터의 절대차 합 및 임계값에 따라 분할한다.According to an aspect of the present invention, there is provided a motion picture processing apparatus comprising: a picture determination unit for analyzing a video signal and dividing a picture into units of coding; A transform unit for performing predictive encoding for each encoding unit and transforming a residual signal according to the predictive encoding; A quantizer for performing quantization on the residual signal; And an entropy coding unit for performing entropy coding on the quantized signal and outputting the quantized signal, wherein the picture determination unit determines an absolute difference sum of a motion vector for an entire coding unit, an absolute difference sum of a motion vector for the divided coding unit, Divide by value.

또한, 본 발명의 실시예에 따른 동영상 처리 방법은 동영상 처리 방법에 있어서, 비디오 신호를 분석하여 픽쳐를 부호화 단위로 분할하는 단계; 상기 부호화 단위별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 단계; 상기 잔차 신호에 대한 양자화를 수행하는 단계; 및 상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 단계를 포함하고, 상기 부호화 단위로 분할하는 단계는, 전체 부호화 단위에 대한 움직임 벡터의 평균 제곱 오차 합, 분할된 부호화 단위에 대한 움직임 벡터의 평균 제곱 오차 합 및 임계값에 따라 분할하는 단계를 포함한다.According to another aspect of the present invention, there is provided a moving image processing method comprising: analyzing a video signal to divide a picture into units of coding; Performing predictive encoding for each encoding unit and converting a residual signal according to the predictive encoding; Performing quantization on the residual signal; And outputting the quantized signal by performing entropy encoding and outputting the quantized signal, wherein the step of dividing the quantized signal by the encoding unit comprises: calculating a mean square error sum of a motion vector for the entire encoding unit, And dividing it according to a mean square error sum and a threshold value.

한편, 상기 동영상 처리 방법은 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체로 구현될 수 있다.The moving picture processing method may be embodied as a computer-readable recording medium having recorded thereon a program for execution on a computer.

본 발명에 따르면, 픽쳐의 부호화 단위 분할에 있어서, 움직임 벡터의 절대차 합 및 임계값을 이용하여 복잡도가 낮으면서도 부호화 효율을 유지시킬 수 있는 부호화 단위 분할 방법을 제공할 수 있다.According to the present invention, it is possible to provide a coding unit dividing method that can maintain the coding efficiency while the complexity is low by using the absolute difference sum and the threshold value of the motion vector in dividing the coding unit of the picture.

또한, 본 발명에 따르면, 픽쳐의 부호화 단위 분할에 있어서, 움직임 벡터의 평균 제곱 오차 및 임계값을 이용하여 복잡도가 낮으면서도 부호화 효율을 유지시킬 수 있는 부호화 단위 분할 방법을 제공할 수 있다.Also, according to the present invention, it is possible to provide a coding unit dividing method that can maintain the coding efficiency while the complexity is low by using the mean square error and the threshold value of the motion vector in the division of the coding unit of the picture.

따라서, 본 발명의 실시 예에 따르면, 분할 구조 결정시의 RDO-Q를 구하는 복잡한 과정들을 단축시킴으로써 상기와 같은 파이프라인 및 워스트 케이스 복잡도로 인한 구현 문제점을 해결할 수 있게 된다.Therefore, according to the embodiment of the present invention, it is possible to solve the implementation problem due to the pipeline and worst case complexity by shortening the complex processes of obtaining the RDO-Q at the time of the division structure determination.

도 1은 본 발명의 일실시예에 따른 동영상 부호화 장치의 구성을 나타내는 블록도이다.
도 2는 영상을 블록단위로 분할하여 처리하는 방법에 대한 일예를 설명하기 위한 도면이다.
도 3은 부호화 장치에서 인터 예측을 수행하는 구성에 대한 일실시예를 나타내는 블록도이다.
도 4는 본 발명의 일실시예에 따른 동영상 복호화 장치의 구성을 나타내는 블록도이다.
도 5는 복호화 장치에서 인터 예측을 수행하는 구성에 대한 일실시예를 나타내는 블록도이다.
도 6 및 도 7은 시퀀스 파라미터 셋(SPS, Sequence Parameter Set)의 구성에 대한 일예를 나타내는 도면이다.
도 8 및 도 9는 픽쳐 파라미터 셋(PPS, Picture Parameter Set)의 구성에 대한 일예를 나타내는 도면이다.
도 10 내지 도 12는 슬라이스 헤더(SH, Slice Header)의 구성에 대한 일예를 나타내는 도면이다.
도 13은 본 발명의 실시 예에 따른 분할 구조 결정 방법을 설명하기 위한 흐름도이다.
도 14는 본 발명의 실시 예에 따라 결정되는 분할 구조를 나타내는 도면이다.
1 is a block diagram illustrating a configuration of a moving picture encoding apparatus according to an embodiment of the present invention.
FIG. 2 is a diagram for explaining an example of a method of dividing and processing an image into blocks.
3 is a block diagram showing an embodiment of an arrangement for performing inter prediction in an encoding apparatus.
4 is a block diagram illustrating a configuration of a moving picture decoding apparatus according to an embodiment of the present invention.
5 is a block diagram showing an embodiment of a configuration for performing inter prediction in a decoding apparatus.
6 and 7 are views showing an example of the configuration of a sequence parameter set (SPS).
8 and 9 are diagrams showing an example of the configuration of a picture parameter set (PPS).
10 to 12 are views showing an example of the configuration of a slice header (SH).
13 is a flowchart illustrating a method of determining a division structure according to an embodiment of the present invention.
14 is a diagram showing a divided structure determined according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본원이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본원의 실시 예를 상세히 설명한다. 그러나 본원은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본원을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. It should be understood, however, that the present invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In the drawings, the same reference numbers are used throughout the specification to refer to the same or like parts.

본원 명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다.Throughout this specification, when a part is referred to as being "connected" to another part, it is not limited to a case where it is "directly connected" but also includes the case where it is "electrically connected" do.

본원 명세서 전체에서, 어떤 부재가 다른 부재상에 위치하고 있다고 할 때, 이는 어떤 부재가 다른 부재에 접해 있는 경우뿐 아니라 두 부재 사이에 또 다른 부재가 존재하는 경우도 포함한다.Throughout this specification, when a member is located on another member, this includes not only when a member is in contact with another member but also when another member is present between the two members.

본원 명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함" 한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것을 의미한다. 본원 명세서 전체에서 사용되는 정도의 용어 "약", "실질적으로" 등은 언급된 의미에 고유한 제조 및 물질 허용오차가 제시될 때 그 수치에서 또는 그 수치에 근접한 의미로 사용되고, 본원의 이해를 돕기 위해 정확하거나 절대적인 수치가 언급된 개시 내용을 비양심적인 침해자가 부당하게 이용하는 것을 방지하기 위해 사용된다. 본원 명세서 전체에서 사용되는 정도의 용어 ~(하는) 단계 또는 ~의 단계는 ~ 를 위한 단계를 의미하지 않는다.Throughout this specification, when an element is referred to as "including " an element, it is understood that the element may include other elements as well, without departing from the other elements unless specifically stated otherwise. The terms "about "," substantially ", etc. used to the extent that they are used throughout the specification are intended to be taken to mean the approximation of the manufacturing and material tolerances inherent in the stated sense, Accurate or absolute numbers are used to help prevent unauthorized exploitation by unauthorized intruders of the referenced disclosure. The term (or step) or step of (~) used in the specification throughout does not imply a step for.

본원 명세서 전체에서, 마쿠시 형식의 표현에 포함된 이들의 조합의 용어는 마쿠시 형식의 표현에 기재된 구성 요소들로 이루어진 군에서 선택되는 하나 이상의 혼합 또는 조합을 의미하는 것으로서, 상기 구성 요소들로 이루어진 군에서 선택되는 하나 이상을 포함하는 것을 의미한다.Throughout the present specification, the term of a combination of these in the expression of a mark-up form means a combination or combination of at least one selected from the group consisting of the constituents described in the expression of the mark-up form, Quot; is meant to include one or more selected from the group consisting of

실제 영상과 그것의 깊이 정보 맵을 부호화하는 방법의 일예로, 현재까지 개발된 비디오 부호화 표준 중에서 최고의 부호화 효율을 가지는 MPEG(Moving Picture Experts Group)과 VCEG(Video Coding Experts Group)에서 공동으로 표준화를 진행 중인 HEVC(High Efficiency Video Coding)를 이용하여 부호화를 수행할 수 있으나, 이에 한정되지는 아니한다.As an example of a method of encoding an actual image and its depth information map, the Moving Picture Experts Group (MPEG) and the Video Coding Experts Group (VCEG) having the highest coding efficiency among the video coding standards developed so far jointly standardize Encoding is performed using HEVC (High Efficiency Video Coding), but the present invention is not limited thereto.

통상, 부호화 장치는 인코딩 과정과 디코딩 과정을 포함하고, 복호화 장치는 디코딩 과정을 구비한다. 복호화 장치의 디코딩 과정은 부호화 장치의 디코딩 과정과 동일하다. 따라서, 이하에서는 부호화 장치를 위주로 설명하기로 한다.Generally, the encoding apparatus includes an encoding process and a decoding process, and the decoding apparatus has a decoding process. The decoding process of the decoding apparatus is the same as the decoding process of the encoding apparatus. Therefore, the encoding apparatus will be mainly described below.

도 1은 본 발명의 일실시예에 따른 동영상 부호화 장치의 구성을 블록도로 도시한 것이다.1 is a block diagram illustrating a configuration of a moving image encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 발명에 따른 동영상 부호화 장치(100)는 픽쳐 분할부(110), 변환부(120), 양자화부(130), 스캐닝부(131), 엔트로피 부호화부(140), 인트라 예측부(150), 인터 예측부(160), 역양자화부(135), 역변환부(125), 후처리부(170), 픽쳐 저장부(180), 감산부(190) 및 가산부(195)를 포함한다.1, a moving picture encoding apparatus 100 according to the present invention includes a picture dividing unit 110, a transform unit 120, a quantization unit 130, a scanning unit 131, an entropy coding unit 140, An inter prediction unit 160, an inverse quantization unit 135, an inverse transformation unit 125, a post-processing unit 170, a picture storage unit 180, a subtraction unit 190, and an addition unit 195, .

픽쳐 분할부(110)는 입력되는 비디오 신호를 분석하여 픽쳐를 가장 큰 코딩 유닛(LCU:Largest Coding Unit)마다 소정 크기의 코딩 유닛으로 분할하여 예측 모드를 결정하고, 상기 코딩 유닛별로 예측 유닛의 크기를 결정한다.The picture division unit 110 analyzes the input video signal to determine a prediction mode by dividing a picture into a coding unit of a predetermined size for each largest coding unit (LCU: Largest Coding Unit), and determines a prediction unit size .

그리고, 픽쳐 분할부(110)는 부호화할 예측 유닛을 예측 모드(또는 예측 방법)에 따라 인트라 예측부(150) 또는 인터 예측부(160)로 보낸다. 또한, 픽쳐 분할부(110)는 부호화할 예측 유닛을 감산부(190)로 보낸다.The picture division unit 110 sends the prediction unit to be encoded to the intra prediction unit 150 or the inter prediction unit 160 according to a prediction mode (or a prediction method). Further, the picture division unit 110 sends the prediction unit to be encoded to the subtraction unit 190.

픽쳐는 복수의 슬라이스로 구성되고, 슬라이스는 복수개의 최대 부호화 단위(Largest coding unit: LCU)로 구성될 수 있다.The picture may be composed of a plurality of slices, and the slice may be composed of a plurality of maximum coding units (LCU).

상기 LCU는 복수개의 부호화 단위(CU)로 분할될 수 있고, 부호기는 분할여부를 나타내는 정보(flag)를 비트스트림에 추가할 수 있다. 복호기는 LCU의 위치를 어드레스(LcuAddr)를 이용하여 인식할 수 있다.The LCU can be divided into a plurality of coding units (CUs), and the encoder can add information indicating whether or not to be divided to a bit stream. The decoder can recognize the position of the LCU by using the address (LcuAddr).

분할이 허용되지 않는 경우의 부호화 단위(CU)는 예측 단위(Prediction unit: PU)로 간주되고, 복호기는 PU의 위치를 PU인덱스를 이용하여 인식할 수 있다.The coding unit CU in the case where division is not allowed is regarded as a prediction unit (PU), and the decoder can recognize the position of the PU using the PU index.

예측 단위(PU)는 복수개의 파티션으로 나뉠 수 있다. 또한 예측 단위(PU)는 복수개의 변환 단위(Transform unit: TU)로 구성될 수 있다.The prediction unit PU may be divided into a plurality of partitions. Also, the prediction unit PU may be composed of a plurality of conversion units (TUs).

이 경우, 픽쳐 분할부(110)는 결정된 부호화 모드에 따른 소정 크기의 블록 단위(예를 들면, PU 단위 또는 TU 단위)로 영상 데이터를 감산부(190)로 보낼 수 있다.In this case, the picture division unit 110 may send the image data to the subtraction unit 190 in units of blocks of a predetermined size (for example, in units of PU or TU) according to the determined coding mode.

도 2를 참조하면, 동영상 부호화 단위로 CTB (Coding Tree Block)을 사용하며, 이 때 CTB는 다양한 정사각형 모양으로 정의된다. CTB는 코딩단위 CU(Coding Unit)라고 부른다.Referring to FIG. 2, a CTB (Coding Tree Block) is used as a unit of moving picture encoding, and the CTB is defined as various square shapes. The CTB is called the coding unit CU (coding unit).

코딩단위(CU)는 쿼드트리(Quad Tree)의 모습을 하고 있으며, 크기가 64ㅧ64인 최대 코딩단위 LCU(Largest Coding Unit)일 때 깊이(Depth)를 0으로 하여 깊이가 3이 될 때까지, 즉 8ㅧ8크기의 코딩단위(CU)까지 재귀적(Recursive)으로 최적의 예측단위를 찾아 부호화를 수행한다.The coding unit (CU) is a quad tree and has a depth of 0 when the LCU (Largest Coding Unit) is the maximum coding unit of size 64 64, , That is, encoding units of 8 × 8 (CU) are recursively selected to find an optimal prediction unit.

예측을 수행하는 예측단위는 PU(Prediction Unit)로 정의되며, 각 코딩단위(CU)는 다수개의 블록으로 분할된 단위의 예측이 수행되며, 정사각형과 직사각형의 형태로 나뉘어 예측을 수행한다. A prediction unit for performing prediction is defined as a PU (Prediction Unit). Each coding unit (CU) is predicted by a unit divided into a plurality of blocks, and is divided into a square and a rectangle to perform prediction.

변환부(120)는 입력된 예측 유닛의 원본 블록과 인트라 예측부(150) 또는 인터 예측부(160)에서 생성된 예측 블록의 잔차신호인 잔차 블록을 변환한다. 상기 잔차 블록은 코딩 유닛 또는 예측 유닛으로 구성된다. 코딩 유닛 또는 예측 유닛으로 구성된 잔차 블록은 최적의 변환 단위로 분할되어 변환된다. 예측 모드(intra or inter)에 따라 서로 다른 변환 매트릭스가 결정될 수 있다. 또한, 인트라 예측의 잔차 신호는 인트라 예측 모드에 따라 방향성을 가지므로 인트라 예측 모드에 따라 적응적으로 변환 매트릭스가 결정될 수 있다.The transforming unit 120 transforms the residual block, which is a residual signal of the prediction block generated by the intra prediction unit 150 or the inter prediction unit 160, with the original block of the input prediction unit. The residual block is composed of a coding unit or a prediction unit. A residual block composed of a coding unit or a prediction unit is divided into optimum conversion units and converted. Different transformation matrices may be determined depending on the prediction mode (intra or inter). Also, since the residual signal of the intra prediction has directionality according to the intra prediction mode, the transformation matrix can be adaptively determined according to the intra prediction mode.

변환 단위는 2개(수평, 수직)의 1차원 변환 매트릭스에 의해 변환될 수 있다. 예를 들어, 인터 예측의 경우에는 미리 결정된 1개의 변환 매트릭스가 결정된다.The transformation unit can be transformed by two (horizontal, vertical) one-dimensional transformation matrices. For example, in the case of inter prediction, a predetermined conversion matrix is determined.

반면에, 인트라 예측의 경우, 인트라 예측 모드가 수평인 경우에는 잔차 블록이 수직방향으로의 방향성을 가질 확률이 높아지므로, 수직방향으로는 DCT 기반의 정수 매트릭스를 적용하고, 수평방향으로는 DST 기반 또는 KLT 기반의 정수 매트릭스를 적용한다. 인트라 예측 모드가 수직인 경우에는 수직방향으로는 DST 기반 또는 KLT 기반의 정수 매트릭스를, 수평 방향으로는 DCT 기반의 정수 매트릭스를 적용한다.On the other hand, in case of the intra prediction, when the intra prediction mode is horizontal, the probability that the residual block has the direction in the vertical direction becomes high. Therefore, the DCT-based integer matrix is applied in the vertical direction, Or a KLT-based integer matrix. When the intra prediction mode is vertical, a DST-based or KLT-based integer matrix is applied in the vertical direction and a DCT-based integer matrix is applied in the horizontal direction.

DC 모드의 경우에는 양방향 모두 DCT 기반 정수 매트릭스를 적용한다. 또한, 인트라 예측의 경우, 변환 단위의 크기에 의존하여 변환 매트릭스가 적응적으로 결정될 수도 있다.In case of DC mode, DCT-based integer matrix is applied in both directions. Further, in the case of intra prediction, the transformation matrix may be adaptively determined depending on the size of the conversion unit.

양자화부(130)는 상기 변환 매트릭스에 의해 변환된 잔차 블록의 계수들을 양자화하기 위한 양자화 스텝 사이즈를 결정한다. 양자화 스텝 사이즈는 미리 정해진 크기 이상의 부호화 단위(이하, 양자화 유닛이라 함)별로 결정된다.The quantization unit 130 determines a quantization step size for quantizing the coefficients of the residual block transformed by the transform matrix. The quantization step size is determined for each coding unit of a predetermined size or larger (hereinafter referred to as a quantization unit).

상기 미리 정해진 크기는 8x8 또는 16x16일 수 있다. 그리고, 결정된 양자화 스텝 사이즈 및 예측 모드에 따라 결정되는 양자화 매트릭스를 이용하여 상기 변환 블록의 계수들을 양자화한다.The predetermined size may be 8x8 or 16x16. And quantizes the coefficients of the transform block using a quantization matrix determined according to the determined quantization step size and the prediction mode.

양자화부(130)는 현재 양자화 유닛의 양자화 스텝 사이즈 예측자로서 현재 양자화 유닛에 인접한 양자화 유닛의 양자화 스텝 사이즈를 이용한다.The quantization unit 130 uses the quantization step size of the quantization unit adjacent to the current quantization unit as the quantization step size predictor of the current quantization unit.

양자화부(130)는 현재 양자화 유닛의 좌측 양자화 유닛, 상측 양자화 유닛, 좌상측 양자화 유닛 순서로 검색하여 1개 또는 2개의 유효한 양자화 스텝 사이즈를 이용하여 현재 양자화 유닛의 양자화 스텝 사이즈 예측자를 생성할 수 있다.The quantization unit 130 searches the left quantization unit, the upper quantization unit, and the upper left quantization unit of the current quantization unit in order, and can generate a quantization step size predictor of the current quantization unit using one or two effective quantization step sizes have.

예를 들어, 상기 순서로 검색된 유효한 첫번째 양자화 스텝 사이즈를 양자화 스텝 사이즈 예측자로 결정할 수 있다. 또한, 상기 순서로 검색된 유효한 2개의 양자화 스텝 사이즈의 평균값을 양자화 스텝 사이즈 예측자로 결정할 수도 있고, 1개만이 유효한 경우에는 이를 양자화 스텝 사이즈 예측자로 결정할 수 있다.For example, the effective first quantization step size searched in the above order can be determined as a quantization step size predictor. In addition, the average value of the two effective quantization step sizes searched in the above order may be determined as a quantization step size predictor, or when only one is effective, it may be determined as a quantization step size predictor.

상기 양자화 스텝 사이즈 예측자가 결정되면, 현재 부호화 단위의 양자화 스텝 사이즈와 상기 양자화 스텝 사이즈 예측자 사이의 차분값을 엔트로피 부호화부(140)로 전송한다.When the quantization step size predictor is determined, the difference value between the quantization step size of the current encoding unit and the quantization step size predictor is transmitted to the entropy encoding unit 140.

한편, 현재 코딩 유닛의 좌측 코딩 유닛, 상측 코딩 유닛, 좌상측 코딩 유닛 모두가 존재하지 않을 가능성이 있다. 반면에 최대 코딩 유닛 내의 부호화 순서 상으로 이전에 존재하는 코딩 유닛이 존재할 수 있다.On the other hand, there is a possibility that the left coding unit, the upper coding unit, and the upper left coding unit of the current coding unit do not exist. On the other hand, there may be coding units that were previously present on the coding order in the maximum coding unit.

따라서, 현재 코딩 유닛에 인접한 양자화 유닛들과 상기 최대 코딩 유닛 내에서는 부호화 순서상 바로 이전의 양자화 유닛의 양자화 스텝 사이즈가 후보자가 될 수 있다.Therefore, the quantization step sizes of the quantization units adjacent to the current coding unit and the quantization unit immediately before the coding order in the maximum coding unit can be candidates.

이 경우, 1) 현재 코딩 유닛의 좌측 양자화 유닛, 2) 현재 코딩 유닛의 상측 양자화 유닛, 3) 현재 코딩 유닛의 좌상측 양자화 유닛, 4) 부호화 순서상 바로 이전의 양자화 유닛 순서로 우선순위를 둘 수 있다. 상기 순서는 바뀔 수 있고, 상기 좌상측 양자화 유닛은 생략될 수도 있다.In this case, 1) the left quantization unit of the current coding unit, 2) the upper quantization unit of the current coding unit, 3) the upper left side quantization unit of the current coding unit, 4) . The order may be changed, and the upper left side quantization unit may be omitted.

상기 양자화된 변환 블록은 역양자화부(135)와 스캐닝부(131)로 제공된다.The quantized transform block is provided to the inverse quantization unit 135 and the scanning unit 131.

스캐닝부(131)는 양자화된 변환 블록의 계수들을 스캐닝하여 1차원의 양자화 계수들로 변환한다. 양자화 후의 변환 블록의 계수 분포가 인트라 예측 모드에 의존적일 수 있으므로, 스캐닝 방식은 인트라 예측 모드에 따라 결정된다.The scanning unit 131 scans the coefficients of the quantized transform block and converts them into one-dimensional quantization coefficients. Since the coefficient distribution of the transform block after quantization may be dependent on the intra prediction mode, the scanning scheme is determined according to the intra prediction mode.

또한, 계수 스캐닝 방식은 변환 단위의 크기에 따라 달리 결정될 수도 있다. 상기 스캔 패턴은 방향성 인트라 예측 모드에 따라 달라질 수 있다. 양자화 계수들의 스캔순서는 역방향으로 스캔한다.The coefficient scanning method may be determined depending on the size of the conversion unit. The scan pattern may vary according to the directional intra prediction mode. The scan order of the quantization coefficients is scanned in the reverse direction.

상기 양자화된 계수들이 복수개의 서브셋으로 분할된 경우에는 각각의 서브셋 내의 양자화 계수들에 동일한 스캔패턴을 적용한다. 서브셋 간의 스캔패턴은 지그재그 스캔 또는 대각선 스캔을 적용한다. 스캔 패턴은 DC를 포함하는 메인 서브셋으로부터 순방향으로 잔여 서브셋들로 스캔하는 것이 바람직하나, 그 역방향도 가능하다.When the quantized coefficients are divided into a plurality of subsets, the same scan pattern is applied to the quantization coefficients in each subset. The scan pattern between subset applies zigzag scan or diagonal scan. The scan pattern is preferably scanned to the remaining subsets in the forward direction from the main subset containing the DC, but vice versa.

또한, 서브셋 내의 양자화된 계수들의 스캔패턴과 동일하게 서브셋 간의 스캔패턴을 설정할 수도 있다. 이 경우, 서브셋 간의 스캔패턴이 인트라 예측 모드에 따라 결정된다. 한편, 부호기는 상기 변환 유닛내의 0이 아닌 마지막 양자화 계수의 위치를 나타낼 수 있는 정보를 복호기로 전송한다.In addition, a scan pattern between subsets can be set in the same manner as a scan pattern of quantized coefficients in a subset. In this case, the scan pattern between the sub-sets is determined according to the intra-prediction mode. On the other hand, the encoder transmits to the decoder information indicating the position of the last non-zero quantization coefficient in the transform unit.

각 서브셋 내의 0이 아닌 마지막 양자화 계수의 위치를 나타낼 수 있는 정보도 복호기로 전송할 수 있다.Information that can indicate the position of the last non-zero quantization coefficient in each subset can also be transmitted to the decoder.

역양자화(135)는 상기 양자화된 양자화 계수를 역양자화한다. 역변환부(125)는 역양자화된 변환 계수를 공간 영역의 잔차 블록으로 복원한다. 가산기는 상기 역변환부에 의해 복원된 잔차블록과 인트라 예측부(150) 또는 인터 예측부(160)로부터의 수신된 예측 블록을 합쳐서 복원 블록을 생성한다.The inverse quantization unit 135 dequantizes the quantized quantized coefficients. The inverse transform unit 125 restores the inversely quantized transform coefficients into residual blocks in the spatial domain. The adder combines the residual block reconstructed by the inverse transform unit with the intra prediction unit 150 or the received prediction block from the inter prediction unit 160 to generate a reconstruction block.

후처리부(170)는 복원된 픽쳐에 발생하는 블록킹 효과의 제거하기 위한 디블록킹 필터링 과정, 화소 단위로 원본 영상과의 차이값을 보완하기 위한 적응적 오프셋 적용 과정 및 코딩 유닛으로 원본 영상과의 차이값을 보완하기 위한 적응적 루프 필터링 과정을 수행한다.The post-processing unit 170 performs a deblocking filtering process for eliminating the blocking effect generated in the reconstructed picture, an adaptive offset application process for compensating a difference value from the original image on a pixel-by-pixel basis, and a coding unit And performs an adaptive loop filtering process to compensate the value.

디블록킹 필터링 과정은 미리 정해진 크기 이상의 크기를 갖는 예측 유닛 및 변환 단위의 경계에 적용하는 것이 바람직하다. 상기 크기는 8x8일 수 있다. 상기 디블록킹 필터링 과정은 필터링할 경계(boundary)를 결정하는 단계, 상기 경계에 적용할 경계 필터링 강도(bounary filtering strength)를 결정하는 단계, 디블록킹 필터의 적용 여부를 결정하는 단계, 상기 디블록킹 필터를 적용할 것으로 결정된 경우, 상기 경계에 적용할 필터를 선택하는 단계를 포함한다.The deblocking filtering process is preferably applied to the boundary of a prediction unit and a conversion unit having a size larger than a predetermined size. The size may be 8x8. The deblocking filtering process may include determining a boundary to be filtered, determining a bounary filtering strength to be applied to the boundary, determining whether to apply a deblocking filter, And selecting a filter to be applied to the boundary if it is determined to apply the boundary.

상기 디블록킹 필터의 적용 여부는 i) 상기 경계 필터링 강도가 0보다 큰지 여부 및 ii) 상기 필터링할 경계에 인접한 2개의 블록(P 블록, Q블록) 경계 부분에서의 화소값들이 변화 정도를 나타내는 값이 양자화 파라미터에 의해 결정되는 제1 기준값보다 작은지 여부에 의해 결정된다.Whether or not the deblocking filter is applied is determined based on i) whether the boundary filtering strength is greater than 0 and ii) whether a pixel value at a boundary between two blocks adjacent to the boundary to be filtered (P block, Q block) Is smaller than a first reference value determined by the quantization parameter.

상기 필터는 적어도 2개 이상인 것이 바람직하다. 블록 경계에 위치한 2개의 화소들간의 차이값의 절대값이 제2 기준값보다 크거나 같은 경우에는 상대적으로 약한 필터링을 수행하는 필터를 선택한다.The filter is preferably at least two or more. If the absolute value of the difference between two pixels located at the block boundary is greater than or equal to the second reference value, a filter that performs relatively weak filtering is selected.

상기 제2 기준값은 상기 양자화 파라미터 및 상기 경계 필터링 강도에 의해 결정된다.And the second reference value is determined by the quantization parameter and the boundary filtering strength.

적응적 오프셋 적용 과정은 디블록킹 필터가 적용된 영상내의 화소와 원본 화소간의 차이값(distortion)을 감소시키기 위한 것이다. 픽쳐 또는 슬라이스 단위로 상기 적응적 오프셋 적용 과정을 수행할지 여부를 결정할 수 있다.The adaptive offset application process is to reduce a distortion between a pixel in the image to which the deblocking filter is applied and the original pixel. It may be determined whether to perform the adaptive offset applying process in units of pictures or slices.

픽쳐 또는 슬라이스는 복수개의 오프셋 영역들로 분할될 수 있고, 각 오프셋 영역별로 오프셋 타입이 결정될 수 있다. 오프셋 타입은 미리 정해진 개수(예를 들어, 4개)의 에지 오프셋 타입과 2개의 밴드 오프셋 타입을 포함할 수 있다.The picture or slice may be divided into a plurality of offset regions, and an offset type may be determined for each offset region. The offset type may include a predetermined number (e.g., four) of edge offset types and two band offset types.

오프셋 타입이 에지 오프셋 타입일 경우에는 각 화소가 속하는 에지 타입을 결정하여, 이에 대응하는 오프셋을 적용한다. 상기 에지 타입은 현재 화소와 인접하는 2개의 화소값의 분포를 기준으로 결정한다.If the offset type is an edge offset type, the edge type to which each pixel belongs is determined and the corresponding offset is applied. The edge type is determined based on the distribution of two pixel values adjacent to the current pixel.

적응적 루프 필터링 과정은 디블록킹 필터링 과정 또는 적응적 오프셋 적용 과정을 거친 복원된 영상과 원본 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 적응적 루프 필터링은 상기 결정된 ALF는 4x4 크기 또는 8x8 크기의 블록에 포함된 화소 전체에 적용될 수 있다.The adaptive loop filtering process can perform filtering based on a value obtained by comparing a reconstructed image and an original image through a deblocking filtering process or an adaptive offset applying process. The adaptive loop filtering can be applied to the entire pixels included in the 4x4 block or the 8x8 block.

적응적 루프 필터의 적용 여부는 코딩 유닛별로 결정될 수 있다. 각 코딩 유닛에 따라 적용될 루프 필터의 크기 및 계수는 달라질 수 있다. 코딩 유닛별 상기 적응적 루프 필터의 적용 여부를 나타내는 정보는 각 슬라이스 헤더에 포함될 수 있다.Whether or not the adaptive loop filter is applied can be determined for each coding unit. The size and the coefficient of the loop filter to be applied may vary depending on each coding unit. Information indicating whether or not the adaptive loop filter is applied to each coding unit may be included in each slice header.

색차 신호의 경우에는, 픽쳐 단위로 적응적 루프 필터의 적용 여부를 결정할 수 있다. 루프 필터의 형태도 휘도와 달리 직사각형 형태를 가질 수 있다.In the case of the color difference signal, it is possible to determine whether or not the adaptive loop filter is applied in units of pictures. The shape of the loop filter may have a rectangular shape unlike the luminance.

적응적 루프 필터링은 슬라이스별로 적용 여부를 결정할 수 있다. 따라서, 현재 슬라이스에 적응적 루프 필터링이 적용되는지 여부를 나타내는 정보는 슬라이스 헤더 또는 픽쳐 헤더에 포함된다.Adaptive loop filtering can be applied on a slice-by-slice basis. Therefore, information indicating whether or not adaptive loop filtering is applied to the current slice is included in the slice header or the picture header.

현재 슬라이스에 적응적 루프 필터링이 적용됨을 나타내면, 슬라이스 헤더 또는 픽쳐 헤더는 추가적으로 적응적 루프 필터링 과정에 사용되는 휘도 성분의 수평 및/또는 수직 방향의 필터 길이를 나타내는 정보를 포함한다.If the current slice indicates that adaptive loop filtering is applied, the slice header or picture header additionally includes information indicating the horizontal and / or vertical direction filter length of the luminance component used in the adaptive loop filtering process.

슬라이스 헤더 또는 픽쳐 헤더는 필터 세트의 수를 나타내는 정보를 포함할 수 있다. 이때 필터 세트의 수가 2 이상이면, 필터 계수들이 예측 방법을 사용하여 부호화될 수 있다. 따라서, 슬라이스 헤더 또는 픽쳐 헤더는 필터 계수들이 예측 방법으로 부호화되는지 여부를 나타내는 정보를 포함할 수 있으며, 예측 방법이 사용되는 경우에는 예측된 필터 계수를 포함한다.The slice header or picture header may include information indicating the number of filter sets. At this time, if the number of filter sets is two or more, the filter coefficients can be encoded using the prediction method. Accordingly, the slice header or the picture header may include information indicating whether or not the filter coefficients are encoded in the prediction method, and may include predicted filter coefficients when the prediction method is used.

한편, 휘도 뿐만 아니라, 색차 성분들도 적응적으로 필터링될 수 있다. 따라서, 색차 성분 각각이 필터링되는지 여부를 나타내는 정보를 슬라이스 헤더 또는 픽쳐 헤더가 포함할 수 있다. 이 경우, 비트수를 줄이기 위해 Cr과 Cb에 대한 필터링 여부를 나타내는 정보를 조인트 코딩(즉, 다중화 코딩)할 수 있다.On the other hand, not only luminance but also chrominance components can be adaptively filtered. Accordingly, the slice header or the picture header may include information indicating whether or not each of the color difference components is filtered. In this case, in order to reduce the number of bits, information indicating whether or not to filter Cr and Cb can be joint-coded (i.e., multiplexed coding).

이때, 색차 성분들의 경우에는 복잡도 감소를 위해 Cr과 Cb를 모두 필터링하지 않는 경우가 가장 빈번할 가능성이 높으므로, Cr과 Cb를 모두 필터링하지 않는 경우에 가장 작은 인덱스를 할당하여 엔트로피 부호화를 수행한다.At this time, in the case of chrominance components, since Cr and Cb are not all filtered in order to reduce the complexity, it is most likely to be the most frequent. Therefore, if Cr and Cb are not all filtered, the smallest index is allocated and entropy encoding is performed .

그리고, Cr 및 Cb를 모두 필터링하는 경우에 가장 큰 인덱스를 할당하여 엔트로피 부호화를 수행한다.When both Cr and Cb are filtered, the largest index is allocated and entropy encoding is performed.

픽쳐 저장부(180)는 후처리된 영상 데이터를 후처리부(170)로부터 입력받아 픽쳐(picture) 단위로 영상을 복원하여 저장한다. 픽쳐는 프레임 단위의 영상이거나 필드 단위의 영상일 수 있다. 픽쳐 저장부(180)는 다수의 픽쳐를 저장할 수 있는 버퍼(도시되지 않음)를 구비한다.The picture storage unit 180 receives the post-processed image data from the post-processing unit 170, and restores and restores the pictures on a picture-by-picture basis. The picture may be a frame-based image or a field-based image. The picture storage unit 180 has a buffer (not shown) capable of storing a plurality of pictures.

인터 예측부(160)는 상기 픽쳐 저장부(180)에 저장된 적어도 하나 이상의 참조 픽쳐를 이용하여 움직임 추정을 수행하고, 참조 픽쳐를 나타내는 참조 픽쳐 인덱스 및 움직임 벡터를 결정한다.The inter-prediction unit 160 performs motion estimation using at least one reference picture stored in the picture storage unit 180, and determines a reference picture index and a motion vector indicating a reference picture.

그리고, 결정된 참조 픽쳐 인덱스 및 움직임 벡터에 따라, 픽쳐 저장부(180)에 저장된 다수의 참조 픽쳐들 중 움직임 추정에 이용된 참조 픽쳐로부터, 부호화하고자 하는 예측 유닛에 대응하는 예측 블록을 추출하여 출력한다.Based on the determined reference picture index and motion vector, a prediction block corresponding to a prediction unit to be coded is extracted from a reference picture used for motion estimation among a plurality of reference pictures stored in the picture storage unit 180 and output .

인트라 예측부(150)는 현재 예측 유닛이 포함되는 픽처 내부의 재구성된 화소값을 이용하여 인트라 예측 부호화를 수행한다.The intraprediction unit 150 performs intraprediction encoding using the reconstructed pixel values in a picture including the current prediction unit.

인트라 예측부(150)는 예측 부호화할 현재 예측 유닛을 입력받아 현재 블록의 크기에 따라 미리 설정된 개수의 인트라 예측 모드 중에 하나를 선택하여 인트라 예측을 수행한다.The intra prediction unit 150 receives the current prediction unit to be predictively encoded and selects one of a predetermined number of intra prediction modes according to the size of the current block to perform intra prediction.

인트라 예측부(150)는 인트라 예측 블록을 생성하기 위해 참조 화소를 적응적으로 필터링한다. 참조 화소가 이용 가능하지 않은 경우에는 이용 가능한 참조 화소들을 이용하여 참조 화소들을 생성할 수 있다.The intraprediction unit 150 adaptively filters the reference pixels to generate intra prediction blocks. If reference pixels are not available, reference pixels may be generated using available reference pixels.

엔트로피 부호화부(140)는 양자화부(130)에 의해 양자화된 양자화 계수, 인트라 예측부(150)로부터 수신된 인트라 예측 정보, 인터 예측부(160)로부터 수신된 움직임 정보 등을 엔트로피 부호화한다.The entropy coding unit 140 entropy-codes the quantized coefficients quantized by the quantization unit 130, the intra prediction information received from the intra prediction unit 150, the motion information received from the inter prediction unit 160, and the like.

도 3은 부호화 장치에서 인터 예측을 수행하는 구성에 대한 일실시예를 블록도로 도시한 것으로, 도시된 인터 예측 부호화 장치는 움직임 정보 결정부(161), 움직임 정보 부호화 모드 결정부(162), 움직임 정보 부호화부(163), 예측 블록 생성부(164), 잔차 블록 생성부(165), 잔차 블록 부호화부(166) 및 멀티플렉서(167)를 포함하여 구성될 수 있다.FIG. 3 is a block diagram of an embodiment of a configuration for performing inter-prediction in the encoding apparatus. The illustrated inter-prediction encoding apparatus includes a motion information determination unit 161, a motion information encoding mode determination unit 162, The information encoding unit 163, the prediction block generating unit 164, the residual block generating unit 165, the residual block encoding unit 166, and the multiplexer 167.

도 3을 참조하면, 움직임 정보 결정부(161)는 현재 블록의 움직임 정보를 결정한다. 움직임 정보는 참조 픽쳐 인덱스와 움직임 벡터를 포함한다. 참조 픽쳐 인덱스는 이전에 부호화되어 복원된 픽쳐 중 어느 하나를 나타낸다.Referring to FIG. 3, the motion information determination unit 161 determines motion information of a current block. The motion information includes a reference picture index and a motion vector. The reference picture index indicates any one of the previously coded and reconstructed pictures.

현재 블록이 단방향 인터 예측 부호화되는 경우에는 리스트 0(L0)에 속하는 참조 픽쳐들 중의 어느 하나를 나타낸다. 반면에, 현재 블록이 양방향 예측 부호화되는 경우에는 리스트 0(L0)의 참조 픽쳐들 중 하나를 나타내는 참조픽쳐 인덱스와 리스트 1(L1)의 참조 픽쳐들 중의 하나를 나타내는 참조픽쳐 인덱스를 포함할 수 있다.And indicates one of the reference pictures belonging to the list 0 (L0) when the current block is unidirectionally inter-predictive-coded. On the other hand, when the current block is bi-directionally predictive-coded, a reference picture index indicating one of the reference pictures of the list 0 (L0) and a reference picture index indicating one of the reference pictures of the list 1 (L1) .

또한, 현재 블록이 양방향 예측 부호화되는 경우에는 리스트 0과 리스트 1을 결합하여 생성된 복합 리스트(LC)의 참조 픽쳐들 중의 1개 또는 2개의 픽쳐를 나타내는 인덱스를 포함할 수 있다.In addition, when the current block is bi-directionally predictive-coded, it may include an index indicating one or two pictures among the reference pictures of the composite list LC generated by combining the list 0 and the list 1.

움직임 벡터는 각각의 참조픽쳐 인덱스가 나타내는 픽쳐 내의 예측 블록의 위치를 나타낸다. 움직임 벡터는 화소단위(정수단위)일수도 있으나, 서브화소단위일 수도 있다.The motion vector indicates the position of the prediction block in the picture indicated by each reference picture index. The motion vector may be a pixel unit (integer unit) or a sub-pixel unit.

예를 들어, 1/2, 1/4, 1/8 또는 1/16 화소의 해상도를 가질 수 있다. 움직임 벡터가 정수단위가 아닐 경우에는 예측 블록은 정수 단위의 화소들로부터 생성된다.For example, it may have a resolution of 1/2, 1/4, 1/8 or 1/16 pixels. When the motion vector is not an integer unit, the prediction block is generated from the pixels of the integer unit.

움직임 정보 부호화 모드 결정부(162)는 현재 블록의 움직임 정보를 스킵 모드로 부호화할지, 머지 모드로 부호화할지, AMVP 모드로 부호화할지를 결정한다.The motion information encoding mode determination unit 162 determines whether the motion information of the current block is to be coded in the skip mode, the merge mode, or the AMVP mode.

스킵 모드는 현재 블록의 움직임 정보와 동일한 움직임 정보를 갖는 스킵 후보자가 존재하고, 잔차신호가 0인 경우에 적용된다. 또한, 스킵 모드는 현재 블록이 코딩 유닛과 사이즈가 같을 때 적용된다. 현재 블록은 예측 유닛으로 볼 수 있다.The skip mode is applied when there is a skip candidate having the same motion information as the current block motion information, and the residual signal is zero. The skip mode is also applied when the current block is the same size as the coding unit. The current block can be viewed as a prediction unit.

머지 모드는 현재 블록의 움직임 정보와 동일한 움직임 정보를 갖는 머지 후보자가 존재할 때 적용된다. 머지 모드는 현재 블록이 코딩 유닛과 사이즈가 다르거나, 사이즈가 같을 경우에는 잔차 신호가 존재하는 경우에 적용된다. 머지 후보자와 스킵 후보자는 동일할 수 있다.The merge mode is applied when there is a merge candidate having the same motion information as the current block motion information. The merge mode is applied when there is a residual signal when the current block is different in size from the coding unit or the size is the same. The merge candidate and the skip candidate can be the same.

AMVP 모드는 스킵 모드 및 머지 모드가 적용되지 않을 때 적용된다. 현재 블록의 움직임 벡터와 가장 유사한 움직임 벡터를 갖는 AMVP 후보자를 AMVP 예측자로 선택한다.AMVP mode is applied when skip mode and merge mode are not applied. The AMVP candidate having the motion vector most similar to the motion vector of the current block is selected as the AMVP predictor.

움직임 정보 부호화부(163)는 움직임 정보 부호화 모드 결정부(162)에 의해 결정된 방식에 따라 움직임 정보를 부호화한다. 움직임 정보 부호화 모드가 스킵 모드 또는 머지 모드일 경우에는 머지 움직임 벡터 부호화 과정을 수행한다. 움직임 정보 부호화 모드가 AMVP일 경우에는 AMVP 부호화 과정을 수행한다.The motion information encoding unit 163 encodes the motion information according to a method determined by the motion information encoding mode deciding unit 162. [ When the motion information encoding mode is a skip mode or a merge mode, a merge motion vector encoding process is performed. When the motion information encoding mode is AMVP, the AMVP encoding process is performed.

예측 블록 생성부(164)는 현재 블록의 움직임 정보를 이용하여 예측 블록을 생성한다. 움직임 벡터가 정수 단위일 경우에는, 참조픽쳐 인덱스가 나타내는 픽쳐 내의 움직임 벡터가 나타내는 위치에 대응하는 블록을 복사하여 현재 블록의 예측 블록을 생성한다.The prediction block generation unit 164 generates a prediction block using the motion information of the current block. If the motion vector is an integer unit, the block corresponding to the position indicated by the motion vector in the picture indicated by the reference picture index is copied to generate a prediction block of the current block.

그러나, 움직임 벡터가 정수 단위가 아닐 경우에는, 참조픽쳐 인덱스가 나타내는 픽쳐내의 정수 단위 화소들로 부터 예측 블록의 화소들을 생성한다.However, when the motion vector is not an integer unit, the pixels of the prediction block are generated from the pixels in the integer unit in the picture indicated by the reference picture index.

이 경우, 휘도 화소의 경우에는 8탭의 보간 필터를 사용하여 예측 화소를 생성할 수 있다. 색차 화소의 경우에는 4탭 보간 필터를 사용하여 예측 화소를 생성할 수 있다.In this case, in the case of a luminance pixel, a prediction pixel can be generated using an 8-tap interpolation filter. In the case of a chrominance pixel, a 4-tap interpolation filter can be used to generate a predictive pixel.

잔차 블록 생성부(165)는 현재 블록과 현재 블록의 예측 블록을 이용하여 잔차 블록을 생성한다. 현재 블록의 크기가 2Nx2N인 경우에는 현재 블록과 현재 블록에 대응하는 2Nx2N 크기의 예측 블록을 이용하여 잔차 블록을 생성한다.The residual block generating unit 165 generates a residual block using the current block and the prediction block of the current block. If the current block size is 2Nx2N, a residual block is generated using a 2Nx2N prediction block corresponding to the current block and the current block.

그러나, 예측에 이용되는 현재 블록의 크기가 2NxN 또는 Nx2N인 경우에는 2Nx2N을 구성하는 2개의 2NxN 블록 각각에 대한 예측 블록을 구한 후, 상기 2개의 2NxN 예측 블록을 이용하여 2Nx2N 크기의 최종 예측 블록을 생성할 수 있다.However, if the current block size used for prediction is 2NxN or Nx2N, a prediction block for each of the 2NxN blocks constituting 2Nx2N is obtained, and the 2Nx2N final prediction block using the 2NxN prediction blocks is calculated Can be generated.

그리고, 상기 2Nx2N 크기의 예측 블록을 이용하여 2Nx2N 의 잔차 블록을 생성할 수도 있다. 2NxN 크기의 2개의 예측블록들의 경계부분의 불연속성을 해소하기 위해 경계 부분의 픽셀들을 오버랩 스무딩할 수 있다.The 2Nx2N residual block may be generated using the 2Nx2N prediction block. It is possible to overlap-smoothing the pixels of the boundary portion to solve the discontinuity of the boundary portion of 2NxN-sized two prediction blocks.

잔차 블록 부호화부(166)는 생성된 잔차 블록을 하나 이상의 변환 유닛으로 나눈다. 그리고, 각 변환 유닛을 변환 부호화, 양자화 및 엔트로피 부호화된다. 이때, 변환 유닛의 크기는 잔차 블록의 크기에 따라 쿼드트리 방식으로 결정될 수 있다.The residual block coding unit 166 divides the generated residual block into one or more conversion units. Then, each conversion unit is transcoded, quantized, and entropy encoded. At this time, the size of the conversion unit may be determined according to the size of the residual block in a quadtree manner.

잔차 블록 부호화부(166)는 인터 예측 방법에 의해 생성된 잔차 블록을 정수기반 변환 매트릭스를 이용하여 변환한다. 상기 변환 매트릭스는 정수기반 DCT 매트릭스이다.The residual block coding unit 166 transforms the residual block generated by the inter prediction method using an integer-based transform matrix. The transform matrix is an integer-based DCT matrix.

잔차 블록 부호화부(166)는 상기 변환 매트릭스에 의해 변환된 잔차 블록의 계수들을 양자화하기 위해 양자화 매트릭스를 이용한다. 상기 양자화 매트릭스는 양자화 파라미터에 의해 결정된다.The residual block coding unit 166 uses a quantization matrix to quantize the coefficients of the residual block transformed by the transform matrix. The quantization matrix is determined by a quantization parameter.

상기 양자화 파라미터는 미리 정해진 크기 이상의 코딩 유닛별로 결정된다. 상기 미리 정해진 크기는 8x8 또는 16x16일 수 있다. 따라서, 현재 코딩 유닛이 상기 미리 정해진 크기보다 작은 경우에는 상기 미리 정해진 크기 내의 복수개의 코딩 유닛 중 부호화 순서상 첫번째 코딩 유닛의 양자화 파라미터만을 부호화하고, 나머지 코딩 유닛의 양자화 파라미터는 상기 파라미터와 동일하므로 부호화할 필요가 없다.The quantization parameter is determined for each coding unit equal to or larger than a predetermined size. The predetermined size may be 8x8 or 16x16. Therefore, when the current coding unit is smaller than the predetermined size, only the quantization parameters of the first coding unit are encoded in the coding order among the plurality of coding units within the predetermined size, and the quantization parameters of the remaining coding units are the same as the parameters. You do not have to.

그리고, 결정된 양자화 파라미터 및 예측 모드에 따라 결정되는 양자화 매트릭스를 이용하여 상기 변환 블록의 계수들을 양자화한다.The coefficients of the transform block are quantized using a quantization matrix determined according to the determined quantization parameter and the prediction mode.

상기 미리 정해진 크기 이상의 코딩 유닛별로 결정되는 양자화 파라미터는 현재 코딩 유닛에 인접한 코딩 유닛의 양자화 파라미터를 이용하여 예측 부호화된다. 현재 코딩 유닛의 좌측 코딩 유닛, 상측 코딩 유닛 순서로 검색하여 유효한 1개 또는 2개의 유효한 양자화 파라미터를 이용하여 현재 코딩 유닛의 양자화 파라미터 예측자를 생성할 수 있다.The quantization parameter determined for each coding unit equal to or larger than the predetermined size is predictively encoded using a quantization parameter of a coding unit adjacent to the current coding unit. A quantization parameter predictor of the current coding unit can be generated by searching the left coding unit of the current coding unit, the upper coding unit order, and using one or two valid quantization parameters available.

예를 들어, 상기 순서로 검색된 유효한 첫번째 양자화 파라미터를 양자화 파라미터 예측자로 결정할 수 있다. 또한, 좌측 코딩 유닛, 부호화 순서상 바로 이전의 코딩 유닛 순으로 검색하여 유효한 첫번째 양자화 파라미터를 양자화 파라미터 예측자로 결정할 수 있다.For example, a valid first quantization parameter retrieved in the above order may be determined as a quantization parameter predictor. In addition, the first coding unit may be searched in order of the coding unit immediately before in the coding order, and the first validation parameter may be determined as a quantization parameter predictor.

양자화된 변환 블록의 계수들은 스캐닝되어 1차원의 양자화 계수들로 변환한다. 스캐닝 방식은 엔트로피 부호화 모드에 따라 달리 설정될 수 있다. 예를 들어, CABAC으로 부호화될 경우에는 인터 예측 부호화된 양자화 계수들은 미리 정해진 하나의 방식(지그재그, 또는 대각선 방향으로의 래스터 스캔)으로 스캐닝될 수 있다. 반면에 CAVLC으로 부호화될 경우에는 상기 방식과 다른 방식으로 스캐닝될 수 있다.The coefficients of the quantized transform block are scanned and converted into one-dimensional quantization coefficients. The scanning scheme can be set differently according to the entropy encoding mode. For example, in the case of CABAC encoding, the inter prediction encoded quantized coefficients can be scanned in a predetermined manner (zigzag or raster scan in the diagonal direction). On the other hand, when encoded by CAVLC, it can be scanned in a different manner from the above method.

예를 들어, 스캐닝 방식이 인터의 경우에는 지그재그, 인트라의 경우에는 인트라 예측 모드에 따라 결정될 수 있다. 또한, 계수 스캐닝 방식은 변환 단위의 크기에 따라 달리 결정될 수도 있다.For example, the scanning method may be determined according to the intra-prediction mode in the case of interlacing, or the intra-prediction mode in the case of intra. The coefficient scanning method may be determined depending on the size of the conversion unit.

상기 스캔 패턴은 방향성 인트라 예측 모드에 따라 달라질 수 있다. 양자화 계수들의 스캔순서는 역방향으로 스캔한다.The scan pattern may vary according to the directional intra prediction mode. The scan order of the quantization coefficients is scanned in the reverse direction.

멀티플렉서(167)는 상기 움직임 정보 부호화부(163)에 의해 부호화된 움직임 정보들과 상기 잔차 블록 부호화부에 의해 부호화된 잔차 신호들을 다중화한다. 상기 움직임 정보는 부호화 모드에 따라 달라질 수 있다.The multiplexer 167 multiplexes the motion information encoded by the motion information encoder 163 and the residual signals encoded by the residual block encoder. The motion information may vary depending on the encoding mode.

즉, 스킵 또는 머지일 경우에는 예측자를 나타내는 인덱스만을 포함한다. 그러나, AMVP일 경우에는 현재 블록의 참조 픽쳐 인덱스, 차분 움직임 벡터 및 AMVP 인덱스를 포함한다.That is, in the case of skipping or merge, only the index indicating the predictor is included. However, in the case of AMVP, the reference picture index, the difference motion vector, and the AMVP index of the current block are included.

이하, 인트라 예측부(150)의 동작에 대한 일실시예를 상세히 설명하기로 한다.Hereinafter, an operation of the intra predictor 150 will be described in detail.

먼저, 픽쳐 분할부(110)에 의해 예측 모드 정보 및 예측 블록의 크기를 수신하며, 예측 모드 정보는 인트라 모드를 나타낸다. 예측 블록의 크기는 64x64, 32x32, 16x16, 8x8, 4x4등의 정방형일 수 있으나, 이에 한정하지 않는다. 즉, 상기 예측 블록의 크기가 정방형이 아닌 비정방형일 수도 있다. First, the prediction mode information and the size of the prediction block are received by the picture division unit 110, and the prediction mode information indicates an intra mode. The size of the prediction block may be a square of 64x64, 32x32, 16x16, 8x8, 4x4, or the like, but is not limited thereto. That is, the size of the prediction block may be non-square instead of square.

다음으로, 예측 블록의 인트라 예측 모드를 결정하기 위해 참조 화소를 픽쳐 저장부(180)로부터 읽어 들인다.Next, the reference pixel is read from the picture storage unit 180 to determine the intra-prediction mode of the prediction block.

상기 이용 가능하지 않은 참조화소가 존재하는지 여부를 검토하여 참조 화소 생성 여부를 판단한다. 상기 참조 화소들은 현재 블록의 인트라 예측 모드를 결정하는데 사용된다.It is determined whether or not the reference pixel is generated by examining whether or not the unavailable reference pixel exists. The reference pixels are used to determine the intra prediction mode of the current block.

현재 블록이 현재 픽쳐의 상측 경계에 위치하는 경우에는 현재 블록의 상측에 인접한 화소들이 정의되지 않는다. 또한, 현재 블록이 현재 픽쳐의 좌측 경계에 위치하는 경우에는 현재 블록의 좌측에 인접한 화소들이 정의되지 않는다.If the current block is located at the upper boundary of the current picture, pixels adjacent to the upper side of the current block are not defined. In addition, when the current block is located at the left boundary of the current picture, pixels adjacent to the left side of the current block are not defined.

이러한 화소들은 이용 가능한 화소들이 아닌 것으로 판단한다. 또한, 현재 블록이 슬라이스 경계에 위치하여 슬라이스의 상측 또는 좌측에 인접하는 화소들이 먼저 부호화되어 복원되는 화소들이 아닌 경우에도 이용 가능한 화소들이 아닌 것으로 판단한다.It is determined that these pixels are not usable pixels. In addition, it is determined that the pixels are not usable even if the current block is located at the slice boundary and pixels adjacent to the upper or left side of the slice are not encoded and reconstructed.

상기와 같이 현재 블록의 좌측 또는 상측에 인접한 화소들이 존재하지 않거나, 미리 부호화되어 복원된 화소들이 존재하지 않는 경우에는 이용 가능한 화소들만을 이용하여 현재 블록의 인트라 예측 모드를 결정할 수도 있다.As described above, if there are no pixels adjacent to the left or upper side of the current block, or if there are no pixels that have been previously coded and reconstructed, the intra prediction mode of the current block may be determined using only available pixels.

그러나, 현재 블록의 이용 가능한 참조화소들을 이용하여 이용 가능하지 않은 위치의 참조화소들을 생성할 수도 있다. 예를 들어, 상측 블록의 화소들이 이용 가능하지 않은 경우에는 좌측 화소들의 일부 또는 전부를 이용하여 상측 화소들을 생성할 수 있고, 그 역으로도 가능하다.However, it is also possible to use the available reference pixels of the current block to generate reference pixels of unusable positions. For example, if the pixels of the upper block are not available, the upper pixels may be created using some or all of the left pixels, or vice versa.

즉, 이용 가능하지 않은 위치의 참조화소로부터 미리 정해진 방향으로 가장 가까운 위치의 이용 가능한 참조화소를 복사하여 참조화소로 생성할 수 있다. 미리 정해진 방향에 이용 가능한 참조화소가 존재하지 않는 경우에는 반대 방향의 가장 가까운 위치의 이용 가능한 참조화소를 복사하여 참조화소로 생성할 수 있다.That is, available reference pixels at positions closest to the predetermined direction from the reference pixels at unavailable positions can be copied and generated as reference pixels. When there is no usable reference pixel in a predetermined direction, the usable reference pixel at the closest position in the opposite direction can be copied and generated as a reference pixel.

한편, 현재 블록의 상측 또는 좌측 화소들이 존재하는 경우에도 상기 화소들이 속하는 블록의 부호화 모드에 따라 이용 가능하지 않은 참조 화소로 결정될 수 있다.On the other hand, even if the upper or left pixels of the current block exist, the reference pixel may be determined as an unavailable reference pixel according to the encoding mode of the block to which the pixels belong.

예를 들어, 현재 블록의 상측에 인접한 참조 화소가 속하는 블록이 인터 부호화되어 복원된 블록일 경우에는 상기 화소들을 이용 가능하지 않은 화소들로 판단할 수 있다.For example, if the block to which the reference pixel adjacent to the upper side of the current block belongs is inter-coded and the reconstructed block, the pixels can be determined as unavailable pixels.

이 경우에는 현재 블록에 인접한 블록이 인트라 부호화되어 복원된 블록에 속하는 화소들을 이용하여 이용 가능한 참조 화소들을 생성할 수 있다. 이 경우에는 부호기에서 부호화 모드에 따라 이용 가능한 참조 화소를 판단한다는 정보를 복호기로 전송해야 한다.In this case, it is possible to generate usable reference pixels by using pixels belonging to the restored block by intra-coded blocks adjacent to the current block. In this case, information indicating that the encoder determines available reference pixels according to the encoding mode must be transmitted to the decoder.

다음으로, 상기 참조 화소들을 이용하여 현재 블록의 인트라 예측 모드를 결정한다. 현재 블록에 허용 가능한 인트라 예측 모드의 수는 블록의 크기에 따라 달라질 수 있다. 예를 들어, 현재 블록의 크기가 8x8, 16x16, 32x32인 경우에는 34개의 인트라 예측 모드가 존재할 수 있고, 현재 블록의 크기가 4x4인 경우에는 17개의 인트라 예측 모드가 존재할 수 있다.Next, an intra prediction mode of the current block is determined using the reference pixels. The number of intra prediction modes that can be allowed in the current block may vary depending on the size of the block. For example, if the current block size is 8x8, 16x16, or 32x32, there may be 34 intra prediction modes. If the current block size is 4x4, 17 intra prediction modes may exist.

상기 34개 또는 17개의 인트라 예측 모드는 적어도 하나 이상의 비방향성 모드(non-directional mode)와 복수개의 방향성 모드들(directional modes)로 구성될 수 있다.The 34 or 17 intra prediction modes may include at least one non-directional mode and a plurality of directional modes.

하나 이상의 비방향성 모드는 DC 모드 및/또는 플래너(planar) 모드일수 있다. DC 모드 및 플래너모드가 비방향성 모드로 포함되는 경우에는, 현재 블록의 크기에 관계없이 35개의 인트라 예측 모드가 존재할 수도 있다.The one or more non-directional modes may be a DC mode and / or a planar mode. When the DC mode and the planar mode are included in the non-directional mode, there may be 35 intra-prediction modes regardless of the size of the current block.

이 때에는 2개의 비방향성 모드(DC 모드 및 플래너 모드)와 33개의 방향성 모드를 포함할 수 있다.At this time, it may include two non-directional modes (DC mode and planar mode) and 33 directional modes.

플래너 모드는 현재 블록의 우하측(bottom-right)에 위치하는 적어도 하나의 화소값(또는 상기 화소값의 예측값, 이하 제1 참조값이라 함)과 참조화소들을 이용하여 현재 블록의 예측 블록을 생성한다.The planner mode generates a prediction block of the current block using at least one pixel value (or a predicted value of the pixel value, hereinafter referred to as a first reference value) located at the bottom-right of the current block and the reference pixels .

상기한 바와 같이, 본 발명의 일실시예에 따른 동영상 복호화 장치의 구성은 도 1 내지 도 3을 참조하여 설명한 동영상 부호화 장치의 구성으로부터 도출될 수 있으며, 예를 들어 도 1을 참조하여 설명한 바와 같은 부호화 과정의 역과정을 수행함으로써 영상을 복호화할 수 있다.As described above, the configuration of the moving picture decoding apparatus according to an embodiment of the present invention can be derived from the configuration of the moving picture coding apparatus described with reference to FIG. 1 to FIG. 3. For example, The image can be decoded by performing an inverse process of the encoding process.

도 4는 본 발명의 일실시예에 따른 동영상 복호화 장치의 구성을 블록도로 도시한 것이다.4 is a block diagram illustrating a configuration of a moving picture decoding apparatus according to an embodiment of the present invention.

도 4를 참조하면, 본 발명에 따른 동영상 복호화 장치는, 엔트로피 복호화부(210), 역양자화/역변환부(220), 가산기(270), 디블록킹 필터(250), 픽쳐 저장부(260), 인트라 예측부(230), 움직임 보상 예측부(240) 및 인트라/인터전환 스위치(280)를 구비한다.4, the moving picture decoding apparatus according to the present invention includes an entropy decoding unit 210, an inverse quantization / inverse transform unit 220, an adder 270, a deblocking filter 250, a picture storage unit 260, An intra prediction unit 230, a motion compensation prediction unit 240, and an intra / inter changeover switch 280.

엔트로피 복호화부(210)는, 동영상 부호화 장치로부터 전송되는 부호화 비트 스트림을 복호하여, 인트라 예측 모드 인덱스, 움직임 정보, 양자화 계수 시퀀스 등으로 분리한다. 엔트로피 복호화부(210)는 복호된 움직임 정보를 움직임 보상 예측부(240)에 공급한다.The entropy decoding unit 210 decodes the encoded bit stream transmitted from the moving picture encoding apparatus into an intra prediction mode index, motion information, a quantized coefficient sequence, and the like. The entropy decoding unit 210 supplies the decoded motion information to the motion compensation prediction unit 240. [

엔트로피 복호화부(210)는 상기 인트라 예측 모드 인덱스를 상기 인트라 예측부(230), 역양자화/역변환부(220)로 공급한다. 또한, 상기 엔트로피 복호화부(210)는 상기 역양자화 계수 시퀀스를 역양자화/역변환부(220)로 공급한다.The entropy decoding unit 210 supplies the intra prediction mode index to the intraprediction unit 230 and the inverse quantization / inverse transformation unit 220. In addition, the entropy decoding unit 210 supplies the inverse quantization coefficient sequence to the inverse quantization / inverse transformation unit 220.

역양자화/역변환부(220)는 상기 양자화 계수 시퀀스를 2차원 배열의 역양자화 계수로 변환한다. 상기 변환을 위해 복수개의 스캐닝 패턴 중에 하나를 선택한다. 현재 블록의 예측모드(즉, 인트라 예측 및 인터 예측 중의 어느 하나)와 인트라 예측 모드 중 적어도 하나에 기초하여 복수개의 스캐닝 패턴 중 하나를 선택한다.The inverse quantization / inverse transform unit 220 transforms the quantized coefficient sequence into an inverse quantization coefficient of the two-dimensional array. One of a plurality of scanning patterns is selected for the conversion. One of a plurality of scanning patterns is selected based on at least one of a prediction mode of the current block (i.e., one of intra prediction and inter prediction) and the intra prediction mode.

상기 인트라 예측 모드는 인트라 예측부 또는 엔트로피 복호화부로부터 수신한다.The intraprediction mode is received from an intraprediction unit or an entropy decoding unit.

역양자화/역변환부(220)는 상기 2차원 배열의 역양자화 계수에 복수개의 양자화 매트릭스 중 선택된 양자화 매트릭스를 이용하여 양자화 계수를 복원한다. 복원하고자 하는 현재 블록의 크기에 따라 서로 다른 양자화 매트릭스가 적용되며, 동일 크기의 블록에 대해서도 상기 현재 블록의 예측 모드 및 인트라 예측 모드 중 적어도 하나에 기초하여 양자화 매트릭스를 선택한다.The inverse quantization / inverse transform unit 220 restores the quantization coefficients using the selected quantization matrix among the plurality of quantization matrices to the inverse quantization coefficients of the two-dimensional array. A different quantization matrix is applied according to the size of the current block to be restored and a quantization matrix is selected based on at least one of a prediction mode and an intra prediction mode of the current block with respect to the same size block.

그리고, 상기 복원된 양자화 계수를 역변환하여 잔차 블록을 복원한다.Then, the reconstructed quantized coefficient is inversely transformed to reconstruct the residual block.

가산기(270)는 역양자화/역변환부(220)에 의해 복원된 잔차 블록과 인트라 예측부(230) 또는 움직임 보상 예측부(240)에 의해 생성되는 예측 블록을 가산함으로써, 영상 블록을 복원한다.The adder 270 reconstructs the image block by adding the residual block reconstructed by the inverse quantization / inverse transforming unit 220 to the intra prediction unit 230 or the prediction block generated by the motion compensation prediction unit 240.

디블록킹 필터(250)는 가산기(270)에 의해 생성된 복원 영상에 디블록킹 필터 처리를 실행한다. 이에 따라, 양자화 과정에 따른 영상 손실에 기인하는 디블록킹 아티펙트를 줄일 수 있다.The deblocking filter 250 performs deblocking filter processing on the reconstructed image generated by the adder 270. Accordingly, the deblocking artifact due to the video loss due to the quantization process can be reduced.

픽쳐 저장부(260)는 디블록킹 필터(250)에 의해 디블록킹 필터 처리가 실행된 로컬 복호 영상을 유지하는 프레임 메모리이다.The picture storage unit 260 is a frame memory for holding a local decoded picture in which the deblocking filter process is performed by the deblocking filter 250.

인트라 예측부(230)는 엔트로피 복호화부(210)로부터 수신된 인트라 예측 모드 인덱스에 기초하여 현재 블록의 인트라 예측 모드를 복원한다. 그리고, 복원된 인트라 예측 모드에 따라 예측 블록을 생성한다.The intraprediction unit 230 restores the intra prediction mode of the current block based on the intra prediction mode index received from the entropy decoding unit 210. A prediction block is generated according to the restored intra prediction mode.

움직임 보상 예측부(240)는 움직임 벡터 정보에 기초하여 픽쳐 저장부(260)에 저장된 픽쳐로부터 현재 블록에 대한 예측 블록을 생성한다. 소수 정밀도의 움직임 보상이 적용될 경우에는 선택된 보간 필터를 적용하여 예측 블록을 생성한다.The motion compensation prediction unit 240 generates a prediction block for the current block from the picture stored in the picture storage unit 260 based on the motion vector information. When motion compensation with a decimal precision is applied, a prediction block is generated by applying a selected interpolation filter.

인트라/인터 전환 스위치(280)는 부호화 모드에 기초하여 인트라 예측부(230)와 움직임 보상 예측부(240)의 어느 하나에서 생성된 예측 블록을 가산기(270)에 제공한다.The intra / inter selector switch 280 provides the adder 270 with a prediction block generated in either the intra prediction unit 230 or the motion compensation prediction unit 240 based on the coding mode.

도 5는 복호화 장치에서 인터 예측을 수행하는 구성에 대한 일실시예를 블록도로 도시한 것으로, 인터 예측 복호화 장치는 디멀티플렉서(241), 움직임 정보 부호화 모드 판단부(242), 머지 모드 움직임 정보 복호화부(243), AMVP 모드 움직임 정보 복호화부(244), 예측블록 생성부(245), 잔차 블록 복호화부(246) 및 복원블록 생성부(247)를 포함한다.FIG. 5 is a block diagram of an embodiment for performing inter prediction in a decoding apparatus. The inter prediction decoding apparatus includes a demultiplexer 241, a motion information encoding mode determination unit 242, a merge mode motion information decoding unit 242, An AMVP mode motion information decoding unit 244, a prediction block generating unit 245, a residual block decoding unit 246, and a restoration block generating unit 247.

도 5를 참조하면, 디멀티플렉서(241)는 수신된 비트스트림으로부터 현재 부호화된 움직임 정보와 부호화된 잔차 신호들을 역다중화한다. 디멀티플렉서(241)는 상기 역다중화된 움직임 정보를 움직임 정보 부호화 모드 판단부(242)로 전송하고, 역다중화된 잔차신호를 잔차블록 복호화부(246)로 전송한다.Referring to FIG. 5, the demultiplexer 241 demultiplexes the current encoded motion information and the encoded residual signals from the received bitstream. The demultiplexer 241 transmits the demultiplexed motion information to the motion information encoding mode determination unit 242 and transmits the demultiplexed residual signal to the residual block decoding unit 246.

움직임 정보 부호화 모드 판단부(242)는 현재 블록의 움직임 정보 부호화 모드를 판단한다. 움직임 정보 부호화 모드 판단부(242)는 수신된 비트스트림의 skip_flag가 1의 값을 갖는 경우에는 현재 블록의 움직임 정보 부호화 모드가 스킵 부호화 모드로 부호화된 것으로 판단한다.The motion information encoding mode determination unit 242 determines a motion information encoding mode of the current block. When the skip_flag of the received bitstream has a value of 1, the motion information encoding mode determination unit 242 determines that the motion information encoding mode of the current block is encoded in the skip encoding mode.

움직임 정보 부호화 모드 판단부(242)는 수신된 비트스트림의 skip_flag가 0의 값을 갖고, 디멀티블렉서(241)로부터 수신된 움직임 정보가 머지 인덱스만을 갖는 현재 블록의 움직임 정보 부호화 모드가 머지 모드로 부호화된 것으로 판단한다.The motion information encoding mode determination unit 242 determines that the skip_flag of the received bitstream has a value of 0 and the motion information encoding mode of the current block having only the merge index of the motion information received from the demultiplexer 241 is the merge mode As shown in FIG.

움직임 정보 부호화 모드 판단부(242)는 수신된 비트스트림의 skip_flag가 0의 값을 갖고, 디멀티블렉서(241)로부터 수신된 움직임 정보가 참조 픽쳐 인덱스와 차분 움직임 벡터와 AMVP인덱스를 갖는 경우에는 현재 블록의 움직임 정보 부호화 모드가 AMVP 모드로 부호화된 것으로 판단한다.When the skip_flag of the received bitstream has a value of 0 and the motion information received from the demultiplexer 241 has a reference picture index, a differential motion vector, and an AMVP index, the motion information encoding mode determination unit 242 determines It is determined that the motion information encoding mode of the current block is coded in the AMVP mode.

머지 모드 움직임 정보 복호화부(243)는 움직임 정보 부호화 모드 판단부(242)가 현재 블록의 움직임 정보 부호화 모드를 스킵 또는 머지 모드로 판단한 경우에 활성화된다.The merge mode motion information decoding unit 243 is activated when the motion information encoding mode determination unit 242 determines the motion information encoding mode of the current block as a skip or merge mode.

AMVP 모드 움직임 정보 복호화부(244)는 움직임 정보 부호화 모드 판단부(242)가 현재 블록의 움직임 정보 부호화 모드를 AMVP 모드로 판단한 경우에 활성화된다.The AMVP mode motion information decoding unit 244 is activated when the motion information encoding mode determination unit 242 determines that the motion information encoding mode of the current block is the AMVP mode.

예측블록 생성부(245)는 상기 머지 모드 움직임 정보 복호화부(243) 또는 AMVP 모드 움직임 정보 복호화부(244)에 의해 복원된 움직임 정보를 이용하여 현재 블록의 예측 블록을 생성한다.The prediction block generator 245 generates a prediction block of the current block using the motion information reconstructed by the merge mode motion information decoding unit 243 or the AMVP mode motion information decoding unit 244. [

움직임 벡터가 정수 단위일 경우에는, 참조픽쳐 인덱스가 나타내는 픽쳐 내의 움직임 벡터가 나타내는 위치에 대응하는 블록을 복사하여 현재 블록의 예측 블록을 생성한다.If the motion vector is an integer unit, the block corresponding to the position indicated by the motion vector in the picture indicated by the reference picture index is copied to generate a prediction block of the current block.

그러나, 움직임 벡터가 정수 단위가 아닐 경우에는, 참조픽쳐 인덱스가 나타내는 픽쳐내의 정수 단위 화소들로부터 예측 블록의 화소들을 생성한다. 이 경우, 휘도 화소의 경우에는 8탭의 보간 필터를 사용하여 예측 화소를 생성할 수 있다. 색차 화소의 경우에는 4탭 보간 필터를 사용하여 예측 화소를 생성할 수 있다.However, when the motion vector is not an integer unit, the pixels of the prediction block are generated from the integer unit pixels in the picture indicated by the reference picture index. In this case, in the case of a luminance pixel, a prediction pixel can be generated using an 8-tap interpolation filter. In the case of a chrominance pixel, a 4-tap interpolation filter can be used to generate a predictive pixel.

잔차 블록 복호화부(246)는 잔차신호를 엔트로피 복호화한다. 그리고, 엔트로피 복호화된 계수들을 역스캐닝하여 2차원의 양자화된 계수 블록을 생성한다. 역스캐닝 방식은 엔트로피 복호화 방식에 따라 달라질 수 있다.The residual block decoding unit 246 entropy decodes the residual signal. Then, the entropy-decoded coefficients are inversely scanned to generate a two-dimensional quantized coefficient block. The inverse scanning method can be changed according to the entropy decoding method.

즉, CABAC 기반으로 복호화된 경우와 CAVLC 기반으로 복호화된 경우의 인터 예측 잔차신호의 역스캐닝 방식이 달라질 수 있다. 예를 들어, CABAC 기반으로 복호화된 경우에는 대각선 방향의 래스터 역스캔 방식으로, CAVLC 기반으로 복호화된 경우에는 지그재그 역스캔 방식이 적용될 수 있다.That is, the inverse scanning method of the inter-prediction residual signal in case of decoding based on CABAC and decoding based on CAVLC can be changed. For example, in case of decoding based on CABAC, a raster inverse scanning method in a diagonal direction, and a case in which decoding is based on CAVLC, a zigzag reverse scanning method can be applied.

또한, 예측 블록의 크기에 따라 역스캐닝 방식이 달리 결정될 수도 있다.In addition, the inverse scanning method may be determined depending on the size of the prediction block.

잔차블록 복호화부(246)는 생성된 계수블록을 역양자화 매트릭스를 이용하여 역양자화한다. 상기 양자화 매트릭스를 유도하기 위해 양자화 파리미터를 복원한다. 양자화 스텝 사이즈는 미리 정해진 크기 이상의 코딩 유닛별로 복원된다.The residual block decoding unit 246 dequantizes the generated coefficient block using an inverse quantization matrix. And restores the quantization parameter to derive the quantization matrix. The quantization step size is restored for each coding unit of a predetermined size or more.

상기 미리 정해진 크기는 8x8 또는 16x16일 수 있다. 따라서, 현재 코딩 유닛이 상기 미리 정해진 크기보다 작은 경우에는 상기 미리 정해진 크기 내의 복수개의 코딩 유닛 중 부호화 순서상 첫번째 코딩 유닛의 양자화 파라미터만을 복원하고, 나머지 코딩 유닛의 양자화 파라미터는 상기 파라미터와 동일하므로 부호화할 필요가 없다.The predetermined size may be 8x8 or 16x16. Accordingly, when the current coding unit is smaller than the predetermined size, only the quantization parameters of the first coding unit are restored in the coding order among the plurality of coding units within the predetermined size, and the quantization parameters of the remaining coding units are the same as the parameters, You do not have to.

상기 미리 정해진 크기 이상의 코딩 유닛별로 결정된 양자화 파라미터를 복원하기 위해 현재 코딩 유닛에 인접한 코딩 유닛의 양자화 파라미터를 이용한다. 현재 코딩 유닛의 좌측 코딩 유닛, 상측 코딩 유닛 순서로 검색하여 유효한 첫번째 양자화 파라미터를 현재 코딩 유닛의 양자화 파라미터 예측자로 결정할 수 있다.The quantization parameter of the coding unit adjacent to the current coding unit is used to recover the quantization parameter determined for each coding unit equal to or larger than the predetermined size. The first coding unit of the current coding unit, the upper coding unit order, and determine a valid first quantization parameter as a quantization parameter predictor of the current coding unit.

또한, 좌측 코딩 유닛, 부호화 순서상 바로 이전의 코딩 유닛 순으로 검색하여 유효한 첫번째 양자화 파라미터를 양자화 파라미터 예측자로 결정할 수 있다. 상기 결정된 양자화 파라미터 예측자와 차분 양자화 파라미터를 이용하여 현재 예측 유닛의 양자화 파라미터를 복원한다.In addition, the first coding unit may be searched in order of the coding unit immediately before in the coding order, and the first validation parameter may be determined as a quantization parameter predictor. And restores the quantization parameter of the current prediction unit using the determined quantization parameter predictor and the difference quantization parameter.

잔차블록 복호화부(260)는 상기 역양자화된 계수 블록을 역변환하여 잔차블록을 복원한다.The residual block decoding unit 260 inversely transforms the dequantized coefficient block to recover the residual block.

복원블록 생성부(270)는 상기 예측블록 생성부(250)에 의해 생성된 예측블록과 상기 잔차블록 복호화부(260)에 의하여 생성된 잔차블록을 더하여 복원블록을 생성한다.The reconstruction block generation unit 270 adds the prediction blocks generated by the prediction block generation unit 250 and the residual blocks generated by the residual block decoding unit 260 to generate reconstruction blocks.

이하, 상기 도 3를 참조하여, 현재 블록을 인트라 예측을 통해 복원하는 과정을 설명한다.Hereinafter, a process of restoring a current block through intraprediction will be described with reference to FIG.

먼저, 수신된 비트스트림으로부터 현재 블록의 인트라 예측 모드를 복호한다. 이를 위해, 엔트로피 복호화부(210)는 복수개의 인트라 예측 모드 테이블 중 하나를 참조하여 현재 블록의 제1 인트라 예측 모드 인덱스를 복원한다.First, the intra prediction mode of the current block is decoded from the received bitstream. For this, the entropy decoding unit 210 recovers the first intra prediction mode index of the current block by referring to one of the plurality of intra prediction mode tables.

상기 복수개의 인트라 예측 모드 테이블은 부호기와 복호기가 공유하는 테이블로서, 현재 블록에 인접한 복수개의 블록들의 인트라 예측 모드의 분포에 따라 선택된 어느 하나의 테이블이 적용될 수 있다.The plurality of intra prediction mode tables are tables shared by the encoder and the decoder, and may be any one selected according to the distribution of intra prediction modes of a plurality of blocks adjacent to the current block.

일예로써, 현재 블록의 좌측 블록의 인트라 예측 모드와 현재 블록의 상측 블록의 인트라 예측 모드가 동일하면 제1 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원하고, 동일하지 않으면 제2 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원할 수 있다.For example, if the intra prediction mode of the left block of the current block and the intra prediction mode of the upper block of the current block are the same, the first intra prediction mode table of the current block is restored by applying the first intra prediction mode table, The first intra prediction mode index of the current block can be restored by applying the second intra prediction mode table.

또 다른 예로써, 현재 블록의 상측 블록과 좌측 블록의 인트라 예측 모드가 모두 방향성 예측 모드(directional intra prediction mode)일 경우에는, 상기 상측 블록의 인트라 예측 모드의 방향과 상기 좌측 블록의 인트라 예측 모드의 방향이 소정 각도 이내이면, 제 1 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원하고, 소정 각도를 벗어나면 제2 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원할 수도 있다.As another example, when the intra prediction modes of the upper block and the left block of the current block are all the directional intra prediction modes, the direction of the intra prediction mode of the upper block and the intra prediction mode of the left block If the direction is within a predetermined angle, the first intra-prediction mode table of the current block is restored by applying the first intra-prediction mode table. If the direction is outside the predetermined angle, the second intra- The mode index can also be restored.

엔트로피 복호화부(210)는 복원된 현재 블록의 제1 인트라 예측 모드 인덱스를 인트라 예측부(230)로 전송한다.The entropy decoding unit 210 transmits the first intra-prediction mode index of the restored current block to the intra-prediction unit 230.

상기 제1 인트라 예측 모드를 인덱스를 수신한 인트라 예측부(230)는 상기 상기 인덱스가 최소값을 가질 경우(즉, 0)에는 현재 블록의 최대가능모드를 현재 블록의 인트라 예측 모드로 결정한다.The intraprediction unit 230 receiving the index of the first intraprediction mode determines the maximum possible mode of the current block as the intra prediction mode of the current block when the index has the minimum value (i.e., 0).

그러나, 상기 인덱스가 0 이외의 값을 가질 경우에는 현재 블록의 최대가능모드가 나타내는 인덱스와 상기 제1 인트라 예측 모드 인덱스를 비교한다. 비교 결과, 상기 제1 인트라 예측 모드 인덱스가 상기 현재 블록의 최대가능모드가 나타내는 인덱스보다 작지 않으면, 상기 제 1 인트라 예측 모드 인덱스에 1을 더한 제2 인트라 예측 모드 인덱스에 대응하는 인트라 예측 모드를 현재 블록의 인트라 예측 모드로 결정하고, 그렇지 않으면 상기 제 1 인트라 예측 모드 인덱스에 대응하는 인트라 예측 모드를 현재 블록의 인트라 예측 모드를 결정한다.However, if the index has a value other than 0, the index indicating the maximum possible mode of the current block is compared with the first intra-prediction mode index. If the first intra-prediction mode index is not smaller than the index indicated by the maximum possible mode of the current block, the intra-prediction mode corresponding to the second intra-prediction mode index obtained by adding 1 to the first intra- The intra prediction mode of the current block is determined as the intra prediction mode corresponding to the first intra prediction mode index.

현재 블록에 허용 가능한 인트라 예측 모드는 적어도 하나 이상의 비방향성 모드(non-directional mode)와 복수 개의 방향성 모드들(directional modes)로 구성될 수 있다.The intra prediction mode acceptable for the current block may be composed of at least one non-directional mode and a plurality of directional modes.

하나 이상의 비방향성 모드는 DC 모드 및/또는 플래너(planar) 모드일수 있다. 또한, DC 모드와 플래너 모드 중 어느 하나가 적응적으로 상기 허용 가능한 인트라 예측 모드 셋에 포함될 수 있다.The one or more non-directional modes may be a DC mode and / or a planar mode. In addition, either the DC mode or the planar mode may be adaptively included in the allowable intra prediction mode set.

이를 위해, 픽쳐 헤더 또는 슬라이스 헤더에 상기 허용 가능한 인트라 예측 모드 셋에 포함되는 비방향성 모드를 특정하는 정보가 포함될 수 있다.To this end, information specifying the non-directional mode included in the allowable intra prediction mode set may be included in the picture header or slice header.

다음으로, 인트라 예측부(230)는 인트라 예측 블록을 생성하기 위해, 참조 화소들을 픽쳐 저장부(260)로터 읽어들이고, 이용 가능하지 않은 참조 화소가 존재하는지 여부를 판단한다.Next, in order to generate an intra prediction block, the intra predictor 230 rotors the reference pixels stored in the picture storage unit 260, and determines whether there is a reference pixel that is not available.

상기 판단은 현재 블록의 복호된 인트라 예측 모드를 적용하여 인트라 예측 블록을 생성하는데 이용되는 참조 화소들의 존재 여부에 따라 행해질 수도 있다.The determination may be made according to the presence or absence of the reference pixels used to generate the intra prediction block by applying the decoded intra prediction mode of the current block.

다음으로, 인트라 예측부(230)는 참조 화소를 생성할 필요가 있을 경우에는 미리 복원된 이용 가능한 참조 화소들을 이용하여 이용 가능하지 않은 위치의 참조화소들을 생성한다.Next, when it is necessary to generate a reference pixel, the intra predictor 230 generates reference pixels of a position that is not available using the reconstructed available reference pixels.

이용 가능하지 않은 참조 화소에 대한 정의 및 참조 화소의 생성 방법은 도 1에 따른 인트라 예측부(150)에서의 동작과 동일하다. 다만, 현재 블록의 복호된 인트라 예측 모드에 따라 인트라 예측 블록을 생성하는데 이용되는 참조 화소만들을 선택적으로 복원할 수도 있다.The definition of a reference pixel that is not available and the method of generating a reference pixel are the same as those in the intra prediction unit 150 shown in FIG. However, it is also possible to selectively reconstruct a reference pixel used for generating an intra prediction block according to the decoded intra prediction mode of the current block.

다음으로, 인트라 예측부(230)는 예측 블록을 생성하기 위하여, 참조 화소들에 필터를 적용할지 여부를 판단한다. 즉, 인트라 예측부(230)는 현재 블록의 인트라 예측 블록을 생성하기 위하여 참조 화소들에 대해 필터링을 적용할지 여부를 상기 복호된 인트라 예측 모드 및 현재 예측 블록의 크기에 기초하여 결정한다.Next, the intraprediction unit 230 determines whether to apply a filter to the reference pixels to generate a prediction block. That is, the intra-prediction unit 230 determines whether to apply filtering on the reference pixels to generate an intra-prediction block of the current block based on the decoded intra-prediction mode and the size of the current prediction block.

블록킹 아티펙트의 문제는 블록의 크기가 커질수록 커지므로, 블록의 크기가 커질수록 참조화소를 필터링하는 예측모드의 수를 증가시킬 수 있다. 그러나, 블록이 소정 크기보다 커지는 경우에는 평탄한 영역으로 볼 수 있으므로 복잡도 감소를 위해 참조화소를 필터링하지 않을 수 있다.Since the problem of blocking artifacts increases as the size of the block increases, the larger the size of the block, the larger the number of prediction modes for filtering reference pixels. However, when the block is larger than a predetermined size, it can be regarded as a flat area, so that reference pixels may not be filtered to reduce the complexity.

상기 참조 화소에 필터 적용이 필요하다고 판단된 경우에는 필터를 이용하여 상기 참조 화소들을 필터링한다.If it is determined that the filter needs to be applied to the reference pixel, the reference pixels are filtered using a filter.

상기한 참조 화소들 간의 단차의 차이 정도에 따라 적어도 2개 이상의 필터를 적응적으로 적용할 수도 있다. 상기 필터의 필터계수는 대칭적인 것이 바람직하다.At least two or more filters may be adaptively applied according to the difference in level difference between the reference pixels. The filter coefficient of the filter is preferably symmetrical.

또한, 상기한 2개 이상의 필터가 현재 블록의 크기에 따라 적응적으로 적용될 수도 있다. 즉, 필터를 적용할 경우, 크기가 작은 블록에 대해서는 대역폭이 좁은 필터를, 크기가 큰 블록들에 대해서는 대역폭이 넓은 필터를 적용할 수도 있다.In addition, the above two or more filters may be adaptively applied according to the size of the current block. That is, when a filter is applied, a filter having a narrow bandwidth may be applied to a block having a small size, and a filter having a wide bandwidth may be applied to a block having a large size.

DC 모드의 경우에는 참조 화소들의 평균값으로 예측 블록이 생성되므로, 필터를 적용할 필요가 없다. 즉, 필터를 적용할 경우 불필요한 연산량만이 많아지게 된다.In the case of the DC mode, since a prediction block is generated with an average value of reference pixels, there is no need to apply a filter. That is, when the filter is applied, only unnecessary calculation amount is increased.

또한, 영상이 수직 방향으로 연관성(correlation)이 있는 수직 모드에서는 참조화소에 필터를 적용할 필요가 없다. 영상이 수평 방향으로 연관성이 있는 수평 모드에서도 참조화소에 필터를 적용할 필요가 없다.In addition, it is not necessary to apply the filter to the reference pixel in the vertical mode in which the image has vertical correlation. It is not necessary to apply the filter to the reference pixel even in the horizontal mode in which the image is related to the horizontal direction.

이와 같이, 필터링의 적용 여부는 현재 블록의 인트라 예측 모드와도 연관성이 있으므로, 현재 블록의 인트라 예측 모드 및 예측 블록의 크기에 기초하여 참조화소를 적응적으로 필터링할 수 있다.Since the filtering is applied to the intra-prediction mode of the current block, the reference pixel can be adaptively filtered based on the intra-prediction mode of the current block and the size of the prediction block.

다음으로, 상기 복원된 인트라 예측 모드에 따라, 상기 참조 화소 또는 상기 필터링된 참조 화소들을 이용하여 예측 블록을 생성한다. 상기 예측 블록의 생성은 부호기에서의 동작과 동일하므로 생략한다. 플래너 모드의 경우에도 부호기에서의 동작과 동일하므로 생략한다.Next, according to the reconstructed intra prediction mode, a prediction block is generated using the reference pixel or the filtered reference pixels. Since the generation of the prediction block is the same as the operation in the encoder, it is omitted. Even in the planar mode, the operation is the same as that in the encoder, so it is omitted.

다음으로, 상기 생성된 예측 블록을 필터링할지 여부를 판단한다. 상기 필터링 여부의 판단은 슬라이스 헤더 또는 부호화 유닛 헤더에 포함된 정보를 이용할 수 있다. 또한, 현재 블록의 인트라 예측 모드에 따라 결정될 수도 있다.Next, it is determined whether to filter the generated prediction block. The determination as to whether to perform the filtering may use information included in the slice header or the encoding unit header. It may also be determined according to the intra prediction mode of the current block.

상기 생성된 예측 블록을 필터링할 것으로 판단할 경우, 생성된 예측 블록을 필터링한다. 구체적으로, 현재 블록에 인접한 이용 가능한 참조 화소들을 이용하여 생성된 예측 블록의 특정 위치의 화소를 필터링하여 새로운 화소를 생성한다.If it is determined that the generated prediction block is to be filtered, the generated prediction block is filtered. Specifically, a new pixel is generated by filtering pixels at a specific position of a prediction block generated using available reference pixels adjacent to the current block.

이는 예측 블록 생성시에 함께 적용될 수도 있다. 예를 들어, DC 모드에서는 예측 화소들 중 참조화소들과 접하는 예측 화소는 상기 예측 화소와 접하는 참조화소를 이용하여 필터링한다.This may be applied together at the time of generating the prediction block. For example, in the DC mode, a prediction pixel in contact with reference pixels among prediction pixels is filtered using a reference pixel in contact with the prediction pixel.

따라서, 예측 화소의 위치에 따라 1개 또는 2개의 참조화소를 이용하여 예측 화소를 필터링한다. DC 모드에서의 예측화소의 필터링은 모든 크기의 예측 블록에 적용할 수 있다. 수직 모드에서는 예측 블록의 예측 화소들 중 좌측 참조 화소와 접하는 예측화소들은 상기 예측블록을 생성하는데 이용되는 상측화소 이외의 참조화소들을 이용하여 변경될 수 있다.Therefore, the predictive pixel is filtered using one or two reference pixels according to the position of the predictive pixel. The filtering of the prediction pixel in the DC mode can be applied to the prediction block of all sizes. In the vertical mode, the prediction pixels adjacent to the left reference pixel among the prediction pixels of the prediction block may be changed using reference pixels other than the upper pixel used to generate the prediction block.

마찬가지로, 수평 모드에서는 생성된 예측 화소들 중 상측 참조화소와 접하는 예측화소들은 상기 예측블록을 생성하는데 이용되는 좌측화소 이외의 참조화소들을 이용하여 변경될 수 있다.Likewise, in the horizontal mode, the prediction pixels adjacent to the upper reference pixel among the generated prediction pixels may be changed using reference pixels other than the left pixel used to generate the prediction block.

이와 같은 방식으로 복원된 현재 블록의 예측 블록과 복호화한 현재 블록의 잔차 블록을 이용하여 현재 블록이 복원된다.The current block is reconstructed using the predicted block of the current block restored in this manner and the residual block of the decoded current block.

본 발명의 일실시예에 따른 동영상 비트스트림은 하나의 픽처에서의 부호화된 데이터를 저장하는데 사용되는 단위로서, PS(parameter sets)와 슬라이스 데이터를 포함할 수 있다.The moving picture bitstream according to an embodiment of the present invention may include PS (parameter sets) and slice data as a unit used to store coded data in one picture.

PS(parameter sets)는, 각 픽처의 헤드에 상당하는 데이터인 픽처 파라미터 세트(이하 간단히 PPS라 한다)와 시퀀스 파라미터 세트(이하 간단히 SPS라 한다)로 분할된다. 상기 PPS와 SPS는 각 부호화를 초기화하는데 필요한 초기화 정보를 포함할 수 있다.A PS (parameter set) is divided into a picture parameter set (hereinafter, simply referred to as PPS) and a sequence parameter set (hereinafter simply referred to as SPS) which are data corresponding to the heads of each picture. The PPS and the SPS may include initialization information required to initialize each encoding.

SPS는 램덤 액세스 유닛(RAU)으로 부호화된 모든 픽처를 복호화하기 위한 공통 참조 정보로서, 프로파일, 참조용으로 사용 가능한 픽처의 최대 수 및 픽처 크기 등을 포함하며, 도 6 및 도 7에 도시된 바와 같이 구성될 수 있다.The SPS is common reference information for decoding all pictures coded in a random access unit (RAU), and includes a profile, a maximum number of pictures usable for reference, a picture size, and the like, as shown in Figs. 6 and 7 .

PPS는, 랜덤 액세스 유닛(RAU)으로 부호화된 각 픽처에 대해, 픽처를 복호화하기 위한 참조 정보로서 가변 길이 부호화 방법의 종류, 양자화 단계의 초기값 및 다수의 참조 픽처들을 포함하며, 도 8 및 도 9에 도시된 바와 같이 구성될 수 있다.The PPS includes, for each picture coded by the random access unit (RAU), the kind of the variable length coding method as the reference information for decoding the picture, the initial value of the quantization step, and a plurality of reference pictures, 9 as shown in FIG.

한편, 슬라이스 헤더(SH)는 슬라이스 단위의 코딩시 해당 슬라이스에 대한 정보를 포함하며, 도 10 내지 도 12에 도시된 바와 같이 구성될 수 있다.
On the other hand, the slice header SH includes information on the corresponding slice when coding in units of slices, and can be configured as shown in FIGS. 10 to 12.

이하에서는 이와 같이 구성된 본 발명의 실시 예에 따른 부호화 장치(100)의 픽처 분할 동작을 설명한다.Hereinafter, the picture dividing operation of the encoding apparatus 100 according to the embodiment of the present invention will be described.

앞서 설명한 바와 같이, 픽쳐 분할부(110)는 쿼드 트리(Quad-tree)방식을 기반으로 하여 코딩 유닛(CU)의 분할 구조를 결정할 수 있다. 이 때 픽쳐 분할부(110)는 분할 구조를 결정할 때 RDO-Q(Rate distortion Optimization- Quantization)를 수행하면서 비트레이트와 디스토션(distortion) 측면에서 최적의 CU(Coding Unit) partition을 구할 수 있으며, 이에 따라 가장 효율이 높은 분할 구조를 결정할 수 있다. As described above, the picture dividing unit 110 can determine a division structure of a coding unit (CU) based on a quad-tree scheme. At this time, the picture partitioning unit 110 can obtain the optimal CU (Coding Unit) partition in terms of bit rate and distortion while performing the Rate Distortion Optimization-Quantization (RDO-Q) The most efficient partition structure can be determined.

앞서 설명한 도 2는 64x64 LCU를 기준으로 CU를 partition 하여 나온 한가지 예를 나타낸다.Figure 2 illustrates one example of partitioning a CU based on a 64x64 LCU.

그러나, 픽쳐 분할부(110)가 RDO-Q를 각 분할 구조에 따라 모두 계산하는 과정에 있어서 많은 문제점이 존재한다. 특히, 픽쳐 분할부(110)는 통상적으로 각 코딩 유닛에 대하여 움직임 벡터, 잔차신호 연산, 잔차신호의 변환(Transform) 및 양자화 및 CABAC(Context Adaptive Binary Arithmetic Coding) 산술 이진부호화를 모두 수행하고, 최적의 효율을 갖는 분할 구조를 결정하게 된다. 이러한 과정은 소프트웨어 기반 부호화 시스템에서는 문제가 없을 수 있으나, 하드웨어 기반 부호화 시스템 또는 소프트웨어 및 하드웨어 병합 부호화 시스템에서는 복잡도의 증가로 인해 구현이 어려운 문제점이 있다. 특히, 파이프라인(Pipeline) 처리 등의 병렬 처리 또는 워스트 케이스(Worst case) 복잡도를 가정하고 구현하는 경우 RDO-Q 방식으로는 현실적인 구현 및 상용화가 불가능한 문제점이 있다.However, there are many problems in the process of calculating the RDO-Q according to each division structure by the picture division unit 110. [ In particular, the picture divider 110 typically performs a motion vector, a residual signal calculation, a transform of a residual signal, and quantization and CABAC (arithmetic coding) binary coding for each coding unit, Lt; RTI ID = 0.0 > efficiency. ≪ / RTI > Such a process may have no problem in a software-based encoding system, but is difficult to implement due to an increase in complexity in a hardware-based encoding system or a software and hardware merge encoding system. In particular, when implementing parallel processing such as pipeline processing or assuming complexity of worst case, there is a problem that it is impossible to realistically implement and commercialize the RDO-Q method.

따라서, 본 발명의 일 실시 예에 따르면, 픽쳐 분할부(110)는 SAD (Sum of Absolute difference) 또는 MSE(Mean Square Error)를 이용하여 분할 구조를 결정함으로써 복잡도를 저감시키면서도 적절한 효율을 유지할 수 있다. Therefore, according to the embodiment of the present invention, the picture division unit 110 can determine the division structure using Sum of Absolute Difference (SAD) or Mean Square Error (MSE) to reduce complexity and maintain proper efficiency .

도 13은 본 발명의 실시 예에 따른 부호화 장치(100)의 동작 방법을 설명하기 위한 흐름도이다.13 is a flowchart illustrating an operation method of the encoding apparatus 100 according to an embodiment of the present invention.

먼저, 부호화 장치(100)의 픽쳐 결정부(110)는 전체 CU에 대한 SAD를 연산한다(S100).First, the picture determination unit 110 of the encoding apparatus 100 calculates the SAD for the entire CU (S100).

SAD는 다음의 수학식 1으로 연산될 수 있다.The SAD can be calculated by the following equation (1).

Figure 112013042801698-pat00001
Figure 112013042801698-pat00001

수학식 1은 k번째 픽쳐 Fk의 임의의 전체 CU에서 이미 복원된 k-1 번째 픽쳐로부터 최적의 움직임벡터 (mx, my)에서 SAD를 구할 수 있는 식을 나타낸다. 여기서 전체 CU가 LCU(Largest Coding Unit)인 경우, M=64일 수 있다. 또한 수학식 1 에서 i=0와 j=0는 CU의 시작점을 의미할 수 있다.Equation (1) expresses an equation that can obtain SAD from the optimal motion vector (mx, my) from the (k-1) th picture already reconstructed in any of all CUs of the kth picture Fk. Here, if the total CU is an LCU (Largest Coding Unit), M = 64. In Equation (1), i = 0 and j = 0 may indicate the starting point of the CU.

그리고, 픽쳐 결정부(110)는 전체 CU를 4분할하고, 분할된 CU 각각에 대한 SAD를 연산한다(S110).Then, the picture determination unit 110 divides the entire CU into four, and calculates the SAD for each of the divided CUs (S110).

예를 들어, 픽쳐 결정부(110)는 64x64 LCU를 Quad-tree 구조로 분할한 4개의 32x32 CU 각각을 획득할 수 있다. 그리고, 각각의 분할된 CU에 대하여 상기의 수학식 1을 적용하여 최적의 움직임 벡터에 대한 SAD를 구할 수 있다. 본 발명의 실시 예에서 각각 분할된 CU에 대한 SAD는 SAD1, SAD2, SAD3 및 SAD4로 표현될 수 있다. 또한, 전체 CU의 M=64인 경우, 분할된 CU의 M=32일 수 있다. For example, the picture determination unit 110 may acquire four 32x32 CUs each obtained by dividing a 64x64 LCU into a quad-tree structure. Then, SAD for the optimal motion vector can be obtained by applying Equation (1) to each divided CU. In the embodiment of the present invention, the SAD for each divided CU can be expressed as SAD1, SAD2, SAD3 and SAD4. Further, when M = 64 of the entire CU, M = 32 of the divided CUs.

그리고, 픽쳐 결정부(110)는 (전체 CU의 SAD ?? Threshold) 가 분할된 CU의 SAD 총합보다 작은지 판단한다.Then, the picture determination unit 110 determines whether or not the SAD ?? threshold of the entire CU is smaller than the SAD sum of the divided CUs.

예를 들어, 픽쳐 결정부(110)는 ((SAD-Threshold) < SAD1+SAD2+SAD3+SAD4)인지를 판단할 수 있다. Threshold 값은 미리 설정될 수 있으며, 설정에 따라 가변될 수 있다.For example, the picture determination unit 110 can determine whether ((SAD-Threshold) <SAD1 + SAD2 + SAD3 + SAD4). The threshold value may be preset and may vary depending on the setting.

그리고, 픽쳐 결정부(110)는 (전체 CU의 SAD ?? Threshold) 가 분할된 CU의 SAD 총합보다 작은 경우에는 분할하지 않는 것으로 분할 구조를 결정하고(S140), 분할을 종료하며(S150), 결정된 분할 구조를 출력한다(S160).If the SAD of the CU is smaller than the sum of the SADs of the divided CUs, the picture determination unit 110 determines the partition structure by not dividing the partition structure (S140), ends the partitioning (S150) And outputs the determined division structure (S160).

그러나, 그렇지 않은 경우 픽쳐 결정부(110)는 각각의 CU로 분할하는 것으로 분할 구조를 결정하고(S135), 결정된 분할 구조의 분할된 CU가 8x8인지를 판단한다(S145). 분할된 CU가 8x8인 경우에는 더 이상 분할하지 않고, 분할을 종료한다(S150). 그러나, 8x8이 아닌 경우, 즉 8x8보다 큰 경우에는 분할된 CU 각각을 전체 CU로 설정하고(S155), 각 전체 CU에 대하여 S100부터 다시 분할 구조 결정 과정을 수행한다.However, if not, the picture determination unit 110 determines the division structure by dividing each CU into S135 and S815, and determines whether the divided CU of the determined division structure is 8x8 (S145). If the divided CU is 8x8, the division is terminated without further division (S150). However, if it is not 8x8, that is, if it is larger than 8x8, each divided CU is set to the entire CU (S155), and the divided structure determination process is performed again for all the CUs starting from S100.

예를 들어, LCU인 64x64에서 분할되는 것으로 결정된 경우, 픽쳐 결정부(110)는 각각의 32x32 CU에 대하여 독립적으로 Quad-tree로 분할하여 S100 과정부터 다시 반복 수행할 수 있다.For example, when it is determined that the image is divided at 64x64, which is an LCU, the picture determination unit 110 may divide the 32x32 CU independently into quad-trees and repeat the process from S100.

도 14는 본 발명의 실시 예에 따른 CU 분할 구조 결정 과정을 나타내는 도면이다.14 is a diagram illustrating a CU division structure determination process according to an embodiment of the present invention.

도 14를 참조하면, 도 14에는 수학식 1을 통해 64x64와 32x32의 SAD를 구하는 과정이 나타나 있다. 픽쳐 결정부(110)는 각각 분할된 CU의 사이즈가 8x8이 될 때까지 SAD 연산 및 비교 과정을 반복 수행할 수 있다. Referring to FIG. 14, FIG. 14 shows a procedure for obtaining SADs of 64x64 and 32x32 through Equation (1). The picture determination unit 110 can repeat the SAD operation and the comparison process until the size of each divided CU becomes 8x8.

또한, 본 발명의 실시 예에서, Threshold 값은 설정에 따라 달라질 수 있다. 예를 들어, 구현 시 큰 CU partition이 필요한 경우 아주 큰 값을 할당할 수 있다. 또한, 예를 들어 64x64가 많이 선택되도록 하려면 Threshold = 64x64x2로 할당할 수 있다. 뿐만 아니라, 작은 CU partition을 원하는 경우 작은 값을 할당할 수 있다. 예를 들어, Threshold = 64x64/4 로 할당할 수 있다. Also, in the embodiment of the present invention, the threshold value may vary depending on the setting. For example, if your implementation requires a large CU partition, you can allocate a very large value. In addition, for example, in order to select a large number of 64x64, it can be assigned to Threshold = 64x64x2. In addition, if you want a small CU partition, you can assign a small value. For example, you can assign it as Threshold = 64x64 / 4.

이와 같이, 본 발명의 실시 예에 따르면, Threshold 조절을 통해 구현할 인코더가 LCU를 선호하는지, 작은 CU단위의 처리를 선호하는지에 따른 부호화 장치(100)의 성능을 조절할 수 있게 된다.As described above, according to the embodiment of the present invention, it is possible to control the performance of the encoding apparatus 100 according to whether the encoder to be implemented through the threshold adjustment prefers the LCU or the small CU unit.

한편, 본 발명의 다른 일 실시 예에 따르면, 픽쳐 결정부(110)는 SAD가 아닌 다른 연산을 수행함으로써 분할 구조를 결정할 수도 있다.
Meanwhile, according to another embodiment of the present invention, the picture determination unit 110 may determine a division structure by performing an operation other than SAD.

수학식 2는 MSE(Mean Square Error)의 연산 과정을 나타낸다.Equation (2) represents a calculation process of Mean Square Error (MSE).

Figure 112013042801698-pat00002
Figure 112013042801698-pat00002

수학식 2는 k번째 픽쳐 Fk의 임의의 전체 CU에서 이미 복원된 k-1 번째 픽쳐로부터 최적의 움직임벡터 (mx, my)에서 MSE를 구할 수 있는 식을 나타낸다. 여기서 전체 CU가 LCU(Largest Coding Unit)인 경우, M=64일 수 있다. 또한 수학식 1 에서 i=0와 j=0는 CU의 시작점을 의미할 수 있다.
Equation (2) expresses an equation that an MSE can be obtained from an optimal motion vector (mx, my) from a (k-1) th picture already reconstructed in an arbitrary whole CU of the kth picture Fk. Here, if the total CU is an LCU (Largest Coding Unit), M = 64. In Equation (1), i = 0 and j = 0 may indicate the starting point of the CU.

앞서 설명한 SAD 과정과 유사하게 본 발명의 다른 일 실시 예에 따른 분할 구조 결정 과정이 진행될 수 있다.Similar to the SAD process described above, the partition structure determination process according to another embodiment of the present invention can be performed.

픽쳐 결정부(110)는 전체 CU를 4분할하고, 분할된 CU 각각에 대한 SAD를 연산한다. 예를 들어, 픽쳐 결정부(110)는 64x64 LCU를 Quad-tree 구조로 분할한 4개의 32x32 CU 각각을 획득할 수 있다. The picture determination unit 110 divides the entire CU into four, and calculates the SAD for each of the divided CUs. For example, the picture determination unit 110 may acquire four 32x32 CUs each obtained by dividing a 64x64 LCU into a quad-tree structure.

픽쳐 결정부(110)는 그리고, 각각의 분할된 CU에 대하여 상기의 수학식 2를 적용하여 최적의 움직임 벡터에 대한 MSE를 구할 수 있다. 본 발명의 실시 예에서 각각 분할된 CU에 대한 MSE는 MSE1, MSE2, MSE3 및 MSE4로 표현될 수 있다. 또한, 전체 CU의 M=64인 경우, 분할된 CU의 M=32일 수 있다. The picture determining unit 110 can obtain the MSE of the optimal motion vector by applying Equation (2) to each divided CU. In the embodiment of the present invention, the MSEs for each CU segmented may be expressed as MSE1, MSE2, MSE3, and MSE4. Further, when M = 64 of the entire CU, M = 32 of the divided CUs.

그리고, 픽쳐 결정부(110)는 (전체 CU의 MSE ?? Threshold) 가 분할된 CU의 MSE 총합보다 작은지 판단한다.The picture determining unit 110 determines whether the MSE ?? threshold of the entire CU is smaller than the MSE sum of the divided CUs.

예를 들어, 픽쳐 결정부(110)는 ((MSE-Threshold) < MSE1+MSE2+MSE3+MSE4)인지를 판단할 수 있다. Threshold 값은 미리 설정될 수 있으며, 설정에 따라 가변될 수 있다.For example, the picture determination unit 110 may determine whether ((MSE-Threshold) <MSE1 + MSE2 + MSE3 + MSE4). The threshold value may be preset and may vary depending on the setting.

그리고, 픽쳐 결정부(110)는 (전체 CU의 MSE ?? Threshold) 가 분할된 CU의 MSE 총합보다 작은 경우에는 분할하지 않는 것으로 분할 구조를 결정하고, 분할을 종료하며, 결정된 분할 구조를 출력한다.If the MSE ?? threshold of the entire CU is smaller than the sum of the MSEs of the divided CUs, the picture determination unit 110 determines the division structure by not dividing the division, ends the division, and outputs the determined division structure .

그러나, 그렇지 않은 경우 픽쳐 결정부(110)는 각각의 CU로 분할하는 것으로 분할 구조를 결정하고, 결정된 분할 구조의 분할된 CU가 8x8인지를 판단한다. 분할된 CU가 8x8인 경우에는 더 이상 분할하지 않고, 분할을 종료한다. 그러나, 8x8이 아닌 경우, 즉 8x8보다 큰 경우에는 분할된 CU 각각을 전체 CU로 설정하고, 각 전체 CU에 대하여 다시 MSE를 이용한 분할 구조 결정 과정을 수행한다.However, if not, the picture determination unit 110 determines the division structure by dividing the CU into each CU, and determines whether the divided CU of the determined division structure is 8x8. If the divided CU is 8x8, the division is terminated without further division. However, if it is not 8x8, that is, if it is larger than 8x8, each divided CU is set as a whole CU, and a division structure determination process is performed using MSE again for each CU.

이상에서 설명한 바와 같이, 본 발명의 실시 예에 따르면, 부호화 장치(100)구현 시 복잡한 계산과정을 요구하는 RDO-Q를 대신하여 간단하게 LCU에 대한 CU 분할을 계산할 수 있으므로 성능에 큰 영향을 주지 않는 선에서 복잡도를 감소시킬 수 있는 효과가 있다.
As described above, according to the embodiment of the present invention, since the CU division for the LCU can be calculated simply in place of the RDO-Q, which requires a complicated calculation process in the implementation of the encoding apparatus 100, There is an effect that the complexity can be reduced in the non-line.

상술한 본 발명에 따른 방법은 컴퓨터에서 실행되기 위한 프로그램으로 제작되어 컴퓨터가 읽을 수 있는 기록 매체에 저장될 수 있으며, 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다.The method according to the present invention may be implemented as a program for execution on a computer and stored in a computer-readable recording medium. Examples of the computer-readable recording medium include a ROM, a RAM, a CD- , A floppy disk, an optical data storage device, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet).

컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고, 상기 방법을 구현하기 위한 기능적인(function) 프로그램, 코드 및 코드 세그먼트들은 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하게 추론될 수 있다.The computer readable recording medium may be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner. And, functional programs, codes and code segments for implementing the above method can be easily inferred by programmers of the technical field to which the present invention belongs.

또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형 실시가 가능한 것은 물론이고, 이러한 변형 실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해 되어서는 안될 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, It should be understood that various modifications may be made by those skilled in the art without departing from the spirit and scope of the present invention.

Claims (16)

동영상 처리 방법에 있어서,
비디오 신호를 분석하여 픽쳐를 쿼드 트리(Quad-Tree) 구조의 코딩 유닛(Coding Unit, CU)으로 분할하는 단계;
상기 코딩 유닛별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 단계;
상기 잔차 신호에 대한 양자화를 수행하는 단계; 및
상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 단계를 포함하고,
상기 분할하는 단계는,
상기 픽쳐를, 최대 코딩 유닛(Largeset Coding Unit)에 대한 움직임 벡터의 절대차 합(Sum of Absolute Difference, SAD)과, 분할된 코딩 유닛(CU) 각각에 대한 움직임 벡터의 SAD를 조절 가능한 임계값과 비교 연산함에 따라, 재귀적(Recursive)으로 분할하여, 상기 쿼드 트리 구조의 분할 결과를 획득하는 단계; 및
상기 분할 결과를 출력하는 단계를 포함하는 동영상 처리 방법.
A video processing method comprising:
Analyzing the video signal to divide the picture into a coding unit (CU) of a quad-tree structure;
Performing prediction coding for each coding unit and converting a residual signal according to the prediction coding;
Performing quantization on the residual signal; And
Performing entropy encoding on the quantized signal and outputting the quantized signal,
Wherein the dividing step comprises:
The picture is divided into a sum of absolute difference (SAD) of a motion vector for a maximum coding unit (Largeset Coding Unit) and a threshold capable of adjusting the SAD of a motion vector for each divided coding unit Performing a comparison operation to obtain a division result of the quad tree structure by dividing the division result into recursive; And
And outputting the division result.
제1항에 있어서,
상기 분할하는 단계는,
상기 최대 코딩 유닛에 대한 전체 SAD를 연산하는 단계;
상기 분할된 코딩 유닛 각각에 대한 SAD의 합을 연산하는 단계; 및
상기 분할된 코딩 유닛 각각에 대한 SAD의 합과 상기 전체 SAD와의 차이에 따라 상기 픽쳐를 분할하는 단계를 포함하는 동영상 처리 방법.
The method according to claim 1,
Wherein the dividing step comprises:
Calculating a total SAD for the maximum coding unit;
Calculating a sum of SADs for each of the divided coding units; And
Dividing the picture according to the difference between the sum of the SADs for each of the divided coding units and the total SAD.
제2항에 있어서,
상기 분할하는 단계는,
상기 전체 SAD와 상기 임계값과의 차이보다 상기 분할된 코딩 유닛 각각에 대한 SAD의 총합이 큰 경우, 상기 최대 코딩 유닛을 상기 분할된 코딩 유닛들로 분할하는 단계를 더 포함하는 동영상 처리 방법.
3. The method of claim 2,
Wherein the dividing step comprises:
Further comprising dividing the maximum coding unit into the divided coding units if the sum of the SADs for each of the divided coding units is greater than the difference between the total SAD and the threshold value.
제2항에 있어서,
상기 분할하는 단계는,
상기 전체 SAD와 상기 임계값과의 차이보다 상기 분할된 코딩 유닛 각각에 대한 SAD의 합이 작은 경우, 상기 픽쳐를 상기 최대 코딩 유닛 단위로 분할하는 단계를 더 포함하는 동영상 처리 방법.
3. The method of claim 2,
Wherein the dividing step comprises:
And dividing the picture into the maximum coding unit units when the sum of the SADs for each of the divided coding units is smaller than the difference between the total SAD and the threshold value.
동영상 처리 방법에 있어서,
비디오 신호를 분석하여 픽쳐를 쿼드 트리(Quad-Tree) 구조의 코딩 유닛(Coding Unit)으로 분할하는 단계;
상기 코딩 유닛별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 단계;
상기 잔차 신호에 대한 양자화를 수행하는 단계; 및
상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 단계를 포함하고,
상기 분할하는 단계는,
상기 픽쳐를, 최대 코딩 유닛(Largest Coding Unit)에 대한 움직임 벡터의 평균 제곱 오차(Mean Square Error, MSE) 합과, 분할된 코딩 유닛 각각에 대한 움직임 벡터의 MSE 합을 조절 가능한 임계값과 비교 연산함에 따라, 재귀적(Recursive)으로 분할하여, 상기 쿼드 트리 구조의 분할 결과를 획득하는 단계; 및
상기 분할 결과를 출력하는 단계를 포함하는 동영상 처리 방법.
A video processing method comprising:
Analyzing the video signal to divide the picture into a coding unit of a quad-tree structure;
Performing prediction coding for each coding unit and converting a residual signal according to the prediction coding;
Performing quantization on the residual signal; And
Performing entropy encoding on the quantized signal and outputting the quantized signal,
Wherein the dividing step comprises:
The picture is compared with a mean square error (MSE) sum of a motion vector for a maximum coding unit and an MSE sum of a motion vector for each divided coding unit, , Dividing into a recursive and obtaining a division result of the quadtree structure; And
And outputting the division result.
제5항에 있어서,
상기 분할하는 단계는,
상기 최대 코딩 유닛에 대한 전체 MSE를 연산하는 단계;
상기 분할된 코딩 유닛 각각에 대한 MSE의 합을 연산하는 단계; 및
상기 분할된 코딩 유닛 각각에 대한 MSE의 합과 상기 전체 MSE와의 차이에 따라 상기 픽쳐를 분할하는 단계를 포함하는 동영상 처리 방법.
6. The method of claim 5,
Wherein the dividing step comprises:
Computing an overall MSE for the maximum coding unit;
Computing a sum of MSEs for each of the divided coding units; And
Dividing the picture according to a difference between a sum of MSEs for each of the divided coding units and the entire MSE.
제6항에 있어서,
상기 분할하는 단계는,
상기 전체 MSE와 상기 임계값과의 차이보다 상기 분할된 코딩 유닛 각각에 대한 MSE의 합이 큰 경우, 상기 최대 코딩 유닛을 상기 분할된 코딩 유닛들로 분할하는 단계를 더 포함하는 동영상 처리 방법.
The method according to claim 6,
Wherein the dividing step comprises:
Further comprising partitioning the maximum coding unit into the divided coding units if the sum of the MSEs for each of the divided coding units is greater than the difference between the total MSE and the threshold value.
제6항에 있어서,
상기 분할하는 단계는,
상기 전체 MSE와 임계값과의 차이보다 상기 분할된 부호화 단위 각각에 대한 MSE의 합이 작은 경우, 상기 픽쳐를 상기 최대 코딩 유닛으로 분할하는 단계를 포함하는 동영상 처리 방법.
The method according to claim 6,
Wherein the dividing step comprises:
Dividing the picture into the maximum coding unit when the sum of the MSEs for each of the divided coding units is smaller than the difference between the total MSE and the threshold value.
청구항 9은(는) 설정등록료 납부시 포기되었습니다.Claim 9 has been abandoned due to the setting registration fee. 동영상 처리 장치에 있어서,
비디오 신호를 분석하여 픽쳐를 쿼드 트리(Quad-Tree) 구조의 코딩 유닛(Coding Unit, CU)으로 분할하는 픽쳐 분할부;
상기 코딩 유닛별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 변환부;
상기 잔차 신호에 대한 양자화를 수행하는 양자화부; 및
상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 엔트로피 부호화부를 포함하고,
상기 픽쳐 분할부는, 상기 픽쳐를, 최대 코딩 유닛(Largest Coding Unit)에 대한 움직임 벡터의 평균 제곱 오차(Mean Square Error, MSE) 합과, 분할된 코딩 유닛 각각에 대한 움직임 벡터의 MSE 합을 미리 설정한 임계값과 비교 연산함에 따라, 재귀적(Recursive)으로 분할하여, 상기 쿼드 트리 구조의 분할 결과를 획득하고, 상기 분할 결과를 출력하는 동영상 처리 장치.
A video processing apparatus comprising:
A picture dividing unit for analyzing the video signal and dividing the picture into a coding unit (CU) of a quad-tree structure;
A transform unit for performing predictive coding for each coding unit and transforming a residual signal according to the predictive coding;
A quantizer for performing quantization on the residual signal; And
And an entropy encoding unit for performing entropy encoding on the quantized signal and outputting the quantized signal,
The picture dividing unit sets the picture to a sum of a mean square error (MSE) of a motion vector for a maximum coding unit (Largest Coding Unit) and an MSE sum of a motion vector for each of the divided coding units Wherein the division result of the quadtree structure is divided into a recursive division by comparing the division result with a threshold value, and the division result is output.
청구항 10은(는) 설정등록료 납부시 포기되었습니다.Claim 10 has been abandoned due to the setting registration fee. 제9항에 있어서,
상기 픽쳐 분할부는 상기 최대 코딩 유닛에 대한 전체 MSE를 연산하고, 상기 분할된 코딩 유닛 각각에 대한 MSE의 합을 연산하며, 상기 분할된 코딩 유닛 각각에 대한 MSE의 합과 상기 전체 MSE와의 차이에 따라 상기 픽쳐를 분할하는 동영상 처리 장치.
10. The method of claim 9,
Wherein the picture dividing unit calculates the total MSE for the maximum coding unit, calculates a sum of MSEs for each of the divided coding units, and compares the sum of the MSEs for each of the divided coding units with the total MSE And divides the picture.
청구항 11은(는) 설정등록료 납부시 포기되었습니다.Claim 11 has been abandoned due to the set registration fee. 제10항에 있어서,
상기 픽쳐 분할부는 상기 전체 MSE와 상기 임계값과의 차이보다 상기 분할된 코딩 유닛 각각에 대한 MSE의 합이 큰 경우, 상기 최대 코딩 유닛을 상기 분할된 코딩 유닛들로 분할하는 동영상 처리 장치.
11. The method of claim 10,
Wherein the picture dividing unit divides the maximum coding unit into the divided coding units when a sum of MSEs for each of the divided coding units is larger than a difference between the total MSE and the threshold value.
청구항 12은(는) 설정등록료 납부시 포기되었습니다.Claim 12 is abandoned in setting registration fee. 제10항에 있어서,
상기 픽쳐 분할부는 상기 전체 MSE와 임계값과의 차이보다 상기 분할된 부호화 단위 각각에 대한 MSE의 합이 작은 경우, 상기 픽쳐를 상기 최대 코딩 유닛으로 분할하는 동영상 처리 장치.
11. The method of claim 10,
Wherein the picture dividing unit divides the picture into the maximum coding unit when the sum of the MSEs for each of the divided coding units is smaller than the difference between the total MSE and the threshold value.
청구항 13은(는) 설정등록료 납부시 포기되었습니다.Claim 13 has been abandoned due to the set registration fee. 동영상 처리 장치에 있어서,
비디오 신호를 분석하여 픽쳐를 쿼드 트리(Quad-Tree) 구조의 코딩 유닛(Coding Unit, CU)으로 분할하는 픽쳐 분할부;
상기 코딩 유닛별로 예측 부호화를 수행하고, 상기 예측 부호화에 따른 잔차 신호를 변환하는 변환부;
상기 잔차 신호에 대한 양자화를 수행하는 양자화부; 및
상기 양자화된 신호에 대해 엔트로피 부호화를 수행하여 출력하는 엔트로피 부호화부를 포함하고,
상기 픽쳐 분할부는, 상기 픽쳐를, 최대 코딩 유닛(Largeset Coding Unit)에 대한 움직임 벡터의 절대차 합(Sum of Absolute Difference, SAD)과, 분할된 코딩 유닛(CU) 각각에 대한 움직임 벡터의 SAD를 미리 설정 가능한 임계값과 비교 연산함에 따라, 재귀적(Recursive)으로 분할하여, 상기 쿼드 트리 구조의 분할 결과를 획득하고, 상기 분할 결과를 출력하는 동영상 처리 장치.
A video processing apparatus comprising:
A picture dividing unit for analyzing the video signal and dividing the picture into a coding unit (CU) of a quad-tree structure;
A transform unit for performing predictive coding for each coding unit and transforming a residual signal according to the predictive coding;
A quantizer for performing quantization on the residual signal; And
And an entropy encoding unit for performing entropy encoding on the quantized signal and outputting the quantized signal,
The picture dividing unit divides the picture into a sum of absolute difference (SAD) of a motion vector for a maximum coding unit (Largestet Coding Unit) and a SAD of a motion vector for each of the divided coding units Wherein the division result of the quadtree structure is divided into a recursive division by comparing with a preset threshold value, and the division result is output.
청구항 14은(는) 설정등록료 납부시 포기되었습니다.Claim 14 has been abandoned due to the setting registration fee. 제13항에 있어서,
상기 픽쳐 분할부는 상기 최대 코딩 유닛에 대한 전체 SAD를 연산하고, 상기 분할된 코딩 유닛 각각에 대한 SAD의 합을 연산하며, 상기 분할된 코딩 유닛 각각에 대한 SAD의 합과 상기 전체 SAD와의 차이에 따라 상기 픽쳐를 분할하는 동영상 처리 장치.
14. The method of claim 13,
Wherein the picture dividing unit calculates a total SAD for the maximum coding unit, calculates a sum of SADs for each of the divided coding units, and calculates a sum of the SADs for each of the divided coding units, And divides the picture.
청구항 15은(는) 설정등록료 납부시 포기되었습니다.Claim 15 is abandoned in the setting registration fee payment. 제14항에 있어서,
상기 픽쳐 분할부는 상기 전체 SAD와 상기 임계값과의 차이보다 상기 분할된 코딩 유닛 각각에 대한 SAD의 총합이 큰 경우, 상기 최대 코딩 유닛을 상기 분할된 코딩 유닛들로 분할하는 동영상 처리 장치.
15. The method of claim 14,
Wherein the picture dividing unit divides the maximum coding unit into the divided coding units when a sum of the SADs for each of the divided coding units is larger than a difference between the total SAD and the threshold value.
청구항 16은(는) 설정등록료 납부시 포기되었습니다.Claim 16 has been abandoned due to the setting registration fee. 제14항에 있어서,
상기 픽쳐 분할부는 상기 전체 SAD와 상기 임계값과의 차이보다 상기 분할된 코딩 유닛 각각에 대한 SAD의 합이 작은 경우, 상기 픽쳐를 상기 최대 코딩 유닛 단위로 분할하는 동영상 처리 장치.
15. The method of claim 14,
Wherein the picture dividing unit divides the picture into the maximum coding unit units when the sum of the SADs for each of the divided coding units is smaller than the difference between the total SAD and the threshold value.
KR1020130054837A 2013-05-15 2013-05-15 Method and apparatus for processing moving image KR101659343B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130054837A KR101659343B1 (en) 2013-05-15 2013-05-15 Method and apparatus for processing moving image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130054837A KR101659343B1 (en) 2013-05-15 2013-05-15 Method and apparatus for processing moving image

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020160119053A Division KR101914667B1 (en) 2016-09-19 2016-09-19 Method and apparatus for processing moving image

Publications (2)

Publication Number Publication Date
KR20140135855A KR20140135855A (en) 2014-11-27
KR101659343B1 true KR101659343B1 (en) 2016-09-27

Family

ID=52456339

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130054837A KR101659343B1 (en) 2013-05-15 2013-05-15 Method and apparatus for processing moving image

Country Status (1)

Country Link
KR (1) KR101659343B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796721B (en) * 2015-04-24 2018-03-16 宏祐图像科技(上海)有限公司 The method for carrying out estimation to image light scene change using MEMC technologies
CN108322747B (en) * 2018-01-05 2020-07-10 中国软件与技术服务股份有限公司 Coding unit division optimization method for ultra-high definition video

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100742772B1 (en) 2005-04-08 2007-07-26 고려대학교 산학협력단 Variable block size motion estimation apparatus and method thereof
KR100924487B1 (en) * 2007-12-17 2009-11-03 한국전자통신연구원 Apparatus and Method for separating block in inter prediction
JP2010016697A (en) 2008-07-04 2010-01-21 Canon Inc Motion vector searching device and control method thereof
KR101036552B1 (en) 2009-11-02 2011-05-24 중앙대학교 산학협력단 Apparatus and method for fast motion estimation based on adaptive search range and partial matching error

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100742772B1 (en) 2005-04-08 2007-07-26 고려대학교 산학협력단 Variable block size motion estimation apparatus and method thereof
KR100924487B1 (en) * 2007-12-17 2009-11-03 한국전자통신연구원 Apparatus and Method for separating block in inter prediction
JP2010016697A (en) 2008-07-04 2010-01-21 Canon Inc Motion vector searching device and control method thereof
KR101036552B1 (en) 2009-11-02 2011-05-24 중앙대학교 산학협력단 Apparatus and method for fast motion estimation based on adaptive search range and partial matching error

Also Published As

Publication number Publication date
KR20140135855A (en) 2014-11-27

Similar Documents

Publication Publication Date Title
US11107253B2 (en) Image processing method, and image decoding and encoding method using same
US20190289301A1 (en) Image processing method, and image encoding and decoding method using same
KR20160106022A (en) Apparatus for encoding a moving picture
JP7293376B2 (en) Intra-prediction-based video signal processing method and apparatus
KR101586125B1 (en) Method and apparatus for encoding/decoding video
KR102354628B1 (en) A method of video processing for processing coding tree units and coding units, a method and appratus for decoding and encoding video using the processing.
KR20140129607A (en) Method and apparatus for processing moving image
KR102510696B1 (en) A method of video processing providing independent properties between coding tree units and coding units, a method and appratus for decoding and encoding video using the processing.
KR101569912B1 (en) Method and apparatus for encoding/decoding video
KR20230113661A (en) Method and device for image encoding/decoding based on effective transmission of differential quantization parameter
KR102520405B1 (en) Method of processing video, video encoding and decoding thereof
KR20170132038A (en) Method of Adaptive Loof Filtering based on block for processing video, video encoding and decoding thereof
KR101659343B1 (en) Method and apparatus for processing moving image
KR101914667B1 (en) Method and apparatus for processing moving image
KR20170132036A (en) Method for coding unit partitioning, video encoding and decoding thereof
KR101609427B1 (en) Method and apparatus for encoding/decoding video
KR102610188B1 (en) Method of video processing providing high-throughput arithmetic coding and method and appratus for decoding and encoding video using the processing
KR102657392B1 (en) A method of video processing providing independent properties between coding tree units and coding units, a method and appratus for decoding and encoding video using the processing
KR20140129632A (en) Method and apparatus for processing moving image
KR20240052921A (en) A method of video processing providing independent properties between coding tree units and coding units, a method and appratus for decoding and encoding video using the processing
KR20140130274A (en) Method and apparatus for processing moving image
KR20140130269A (en) Method and apparatus for processing moving image
KR20140130571A (en) Method and apparatus for processing moving image
KR20140129629A (en) Method and apparatus for processing moving image
KR20140130572A (en) Method and apparatus for processing moving image

Legal Events

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

Payment date: 20190722

Year of fee payment: 4