KR20220024304A - Image encoding/decoding method and image decoding apparatus using motion vector precision - Google Patents

Image encoding/decoding method and image decoding apparatus using motion vector precision Download PDF

Info

Publication number
KR20220024304A
KR20220024304A KR1020220016276A KR20220016276A KR20220024304A KR 20220024304 A KR20220024304 A KR 20220024304A KR 1020220016276 A KR1020220016276 A KR 1020220016276A KR 20220016276 A KR20220016276 A KR 20220016276A KR 20220024304 A KR20220024304 A KR 20220024304A
Authority
KR
South Korea
Prior art keywords
block
picture
current
prediction
reference picture
Prior art date
Application number
KR1020220016276A
Other languages
Korean (ko)
Other versions
KR102476230B1 (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 돌비 레버러토리즈 라이쎈싱 코오포레이션
Publication of KR20220024304A publication Critical patent/KR20220024304A/en
Application granted granted Critical
Publication of KR102476230B1 publication Critical patent/KR102476230B1/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/523Motion estimation or motion compensation with sub-pixel accuracy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An image encoding/decoding method and image decoding apparatus using motion vector precision are disclosed. A motion vector candidate selection method comprises the steps of: constructing a spatial motion vector candidate (a first candidate); determining whether the reference picture of a current block exists in a current picture; and when the determination result of the determining step is YES, adding a spatial motion vector candidate (a second candidate) in another block of the current picture encoded prior to the current block.

Description

움직임 벡터 정밀성을 이용하는 영상 부호화 및 복호화 방법과 영상 복호화 장치{IMAGE ENCODING/DECODING METHOD AND IMAGE DECODING APPARATUS USING MOTION VECTOR PRECISION}Image encoding and decoding method and image decoding apparatus using motion vector precision

본 발명은 영상 부호화 및 복호화 기술에 관한 것으로, 보다 상세하게는, 움직임 벡터 정밀성을 이용하는 영상 부호화 및 복호화 방법과 영상 복호화 장치에 관한 것이다.The present invention relates to image encoding and decoding technology, and more particularly, to an image encoding and decoding method and an image decoding apparatus using motion vector precision.

인터넷과 휴대 단말의 보급과 정보 통신 기술의 발전에 따라 멀티미디어 데이터 이용이 급증하고 있다. 따라서, 각종 시스템에서 영상 예측을 통해 다양한 서비스나 작업을 수행하기 위하여 영상 처리 시스템의 성능 및 효율 개선에 대한 필요성이 상당히 증가하고 있다.With the spread of the Internet and mobile terminals and the development of information and communication technologies, the use of multimedia data is rapidly increasing. Accordingly, in order to perform various services or tasks through image prediction in various systems, the need for improving the performance and efficiency of an image processing system is significantly increasing.

한편, 기존의 영상 부호화 및 복호화 기술에서는 화면간 예측 방식에 따라 현재 픽쳐 이전이나 이후의 적어도 하나의 참조 픽쳐에서 현재 블록의 주변 블록들에 대한 움직임 정보를 예측하거나, 화면내 예측 방식에 따라 현재 픽쳐 내 참조 블록에서 움직임 정보를 획득하여 현재 블록에 대한 움직임 벡터를 추정하고 있다.On the other hand, in the existing image encoding and decoding technology, according to the inter prediction method, motion information for neighboring blocks of the current block is predicted in at least one reference picture before or after the current picture according to the inter prediction method, or the current picture is predicted according to the intra prediction method. A motion vector for the current block is estimated by acquiring motion information from my reference block.

그러나 기존의 화면간 예측은 픽쳐들 사이의 시간적인 예측 모드를 이용하여 예측 블록을 생성하기 때문에 계산 복잡도가 높은 단점이 있고, 화면내 예측은 커다란 부호화 복잡도를 가지는 단점이 있다.However, the conventional inter prediction has a disadvantage of high computational complexity because a prediction block is generated using a temporal prediction mode between pictures, and the intra prediction has a disadvantage of high coding complexity.

이와 같이, 종래 기술의 영상 부호화 및 복호화 방법에서는 영상 부호화 또는 영상 복호화에 대한 성능 개선이 여전히 요구되고 있다.As such, in the image encoding and decoding method of the prior art, performance improvement for image encoding or image decoding is still required.

상기와 같은 과제를 해결하기 위한 본 발명의 목적은, 영상 부호화 및 복호화에서 현재 블록에 대한 움직임 정보를 유도하기 위해 현재 픽쳐를 포함한 참조 픽쳐의 참조 블록들로부터 예측 후보를 선택할 때, 움직임 벡터 정밀성을 이용하는 영상 부호화 및 복호화 방법을 제공하는데 있다.An object of the present invention for solving the above problems is to improve motion vector precision when selecting a prediction candidate from reference blocks of a reference picture including the current picture in order to derive motion information for the current block in video encoding and decoding. An object of the present invention is to provide an image encoding and decoding method used.

본 발명의 다른 목적은, 움직임 벡터 정밀성을 이용하는 영상 복호화 장치를 제공하는데 있다.Another object of the present invention is to provide an image decoding apparatus using motion vector precision.

상기 목적을 달성하기 위한 본 발명의 일 측면에서는, 참조 픽쳐의 보간 정밀도가 제1 값을 가질 때, 상기 참조 픽쳐를 참조하는 현재 블록의 제1 주변 블록의 움직임 벡터를 상기 제1 값과 동일하거나 상기 제1 값보다 큰 제2 값의 정밀도로 탐색하는 단계; 상기 제2 값보다 큰 제3 값의 정밀도로 상기 현재 블록의 제2 주변 블록의 움직임 벡터를 탐색하는 단계; 및 상기 제1 블록과 상기 제2 블록의 움직임 벡터들에 대한 제1 정보와 상기 움직임 벡터들의 정밀도에 대한 매칭 정보를 부호화하는 단계를 포함하는, 영상 부호화 방법이 제공된다.In one aspect of the present invention for achieving the above object, when the interpolation precision of the reference picture has a first value, the motion vector of the first neighboring block of the current block referring to the reference picture is the same as the first value, or searching with a precision of a second value greater than the first value; searching for a motion vector of a second neighboring block of the current block with precision of a third value greater than the second value; and encoding first information on the motion vectors of the first block and the second block and matching information on the precision of the motion vectors.

상기 목적을 달성하기 위한 본 발명의 다른 측면에서는, 참조 픽쳐의 보간 정밀도가 제1 값을 가질 때, 상기 참조 픽쳐를 참조하는 현재 블록의 제1 주변 블록의 움직임 벡터를 상기 제1 값과 동일하거나 상기 제1 값보다 큰 제2 값의 정밀도로 탐색하는 단계, 상기 제2 값보다 큰 제3 값의 정밀도로 상기 현재 블록의 제2 주변 블록의 움직임 벡터를 탐색하는 단계, 및 상기 움직임 벡터들의 정밀도에 대한 매칭 정보와 상기 제1 블록과 상기 제2 블록의 움직임 벡터들에 대한 정보를 토대로 영상을 복호화하는 단계를 포함하는, 영상 복호화 방법이 제공된다.In another aspect of the present invention for achieving the above object, when the interpolation precision of the reference picture has a first value, the motion vector of the first neighboring block of the current block referring to the reference picture is the same as the first value, or searching with a precision of a second value greater than the first value, searching for a motion vector of a second neighboring block of the current block with a precision of a third value greater than the second value, and precision of the motion vectors An image decoding method is provided, comprising decoding an image based on matching information for , and information on motion vectors of the first block and the second block.

여기서, 현재 픽쳐 또는 현재 픽쳐에 대한 정보는 참조 픽쳐 리스트 0 및 참조 픽쳐 리스트 1의 마지막에 추가될 수 있다.Here, the current picture or information on the current picture may be added to the end of the reference picture list 0 and the reference picture list 1.

여기서, 제1 값은 진분수일 수 있다. 또한, 제2 값 또는 제3 값은 정수일 수 있다.Here, the first value may be a true fraction. Also, the second value or the third value may be an integer.

여기서, 매칭 정보를 포함하는 인덱스 내에서 제2 값의 빈도가 제3 값의 빈도보다 크면, 제2 값의 이진 비트 수는 제3 값의 이진 비트 수보다 짧을 수 있다.Here, if the frequency of the second value is greater than the frequency of the third value in the index including the matching information, the number of binary bits of the second value may be shorter than the number of binary bits of the third value.

여기서, 인덱스 내에서 제3 값의 빈도가 가장 크면, 제3 값은 제로(zero) 즉 0의 정밀도를 가질 수 있다.Here, if the frequency of the third value is the greatest in the index, the third value may have a precision of zero, that is, zero.

여기서, 제1 주변 블록 또는 제2 주변 블록은, 현재 블록과 공간적으로 다른 블록을 게재하고 위치할 수 있다. 제1 주변 블록 또는 제2 주변 블록은 현재 블록에 앞서 화면간 예측으로 부호화된 블록일 수 있다.Here, the first neighboring block or the second neighboring block may place and position a block spatially different from the current block. The first neighboring block or the second neighboring block may be a block encoded by inter prediction prior to the current block.

여기서, 제1 주변 블록 또는 제2 주변 블록의 참조 픽쳐는 현재 픽쳐일 수 있다. 제1 주변 블록 또는 제2 주변 블록의 움직임 벡터는 화면간 예측에 의해 탐색될 수 있다.Here, the reference picture of the first neighboring block or the second neighboring block may be a current picture. The motion vector of the first neighboring block or the second neighboring block may be searched by inter prediction.

상기 목적을 달성하기 위한 본 발명의 또 다른 측면에서는, 영상 복호화를 위한 프로그램 또는 프로그램 코드를 저장하는 메모리, 및 상기 메모리에 연결되는 프로세서를 포함하되, 상기 프로세서는 상기 프로그램에 의해, 참조 픽쳐의 보간 정밀도가 제1 값을 가질 때, 상기 참조 픽쳐를 참조하는 현재 블록의 제1 주변 블록의 움직임 벡터를 상기 제1 값과 동일하거나 상기 제1 값보다 큰 제2 값의 정밀도로 탐색하고, 상기 제2 값보다 큰 제3 값의 정밀도로 상기 현재 블록의 제2 주변 블록의 움직임 벡터를 탐색하고, 상기 움직임 벡터들의 정밀도에 대한 매칭 정보와 상기 제1 블록과 상기 제2 블록의 움직임 벡터들에 대한 정보를 토대로 영상을 복호화하는, 영상 복호화 장치가 제공된다.In another aspect of the present invention for achieving the above object, a memory for storing a program or program code for image decoding, and a processor connected to the memory, wherein the processor interpolates a reference picture by the program When the precision has a first value, a motion vector of a first neighboring block of the current block referring to the reference picture is searched for with a precision of a second value equal to or greater than the first value, and the second value is greater than the first value. A motion vector of a second neighboring block of the current block is searched for with a precision of a third value greater than a value of 2, and matching information about the precision of the motion vectors and motion vectors of the first block and the second block are obtained. An image decoding apparatus for decoding an image based on information is provided.

상기 목적을 달성하기 위한 본 발명의 또 다른 측면에서는, 화면 내 예측에서의 참조 화소 구성에 관한 영상 부호화 방법으로서, 현재 블록에 대한 화면 내 예측에서 현재 블록의 참조 화소를 이웃 블록으로부터 획득하는 단계, 참조 화소에 적응적으로 필터링을 수행하는 단계, 적응적인 필터링이 적용된 참조 화소를 현재 블록의 예측 모드에 따라 입력값으로 사용하여 현재 블록의 예측 블록을 생성하는 단계, 예측 블록에 적응적인 후처리 필터를 적용하는 단계를 포함하는, 영상 부호화 방법이 제공된다.In another aspect of the present invention for achieving the above object, there is provided an image encoding method related to a reference pixel configuration in intra prediction, comprising: obtaining a reference pixel of the current block from a neighboring block in intra prediction for the current block; A step of adaptively filtering a reference pixel, generating a prediction block of the current block by using the reference pixel to which the adaptive filtering is applied as an input value according to the prediction mode of the current block, post-processing filter adaptive to the prediction block An image encoding method is provided, comprising the step of applying

여기서, 상기 획득하는 단계는, 현재 블록의 참조 화소를 상기 이웃 블록으로부터 획득할 수 있다.Here, the obtaining may include obtaining a reference pixel of the current block from the neighboring block.

여기서, 상기 획득하는 단계는, 이웃 블록의 이용가능성에 따라 결정될 수 있다.Here, the obtaining step may be determined according to the availability of a neighboring block.

여기서, 이웃 블록의 이용가능성은, 이웃 블록의 위치 및/또는 특정 플래그(constrained_intra_pred_flag)에 의해서 결정될 수 있다. 일례로, 특정 플래그는 이웃 블록이 이용가능할 때, 1의 값을 가질 수 있다. 이것은 이웃 블록의 예측 모드가 화면 간 모드일 때 해당 블록의 참조 화소를 현재 블록의 예측에 사용할 수 없음을 의미할 수 있다.Here, the availability of the neighboring block may be determined by the position of the neighboring block and/or a specific flag (constrained_intra_pred_flag). As an example, a specific flag may have a value of 1 when a neighboring block is available. This may mean that when the prediction mode of the neighboring block is the inter-picture mode, the reference pixel of the corresponding block cannot be used for prediction of the current block.

여기서, 특정 플래그(constrained_intra_pred_flag)는 이웃 블록의 예측 모드에 따라 결정되며, 예측 모드는 화면 내 예측 또는 화면 간 예측 중 하나일 수 있다.Here, the specific flag constrained_intra_pred_flag is determined according to the prediction mode of the neighboring block, and the prediction mode may be either intra prediction or inter prediction.

여기서, 특정 플래그(constrained_intra_pred_flag)가 0일 때는, 이웃 블록의 예측 모드에 관계없이 이웃 블록의 이용가능성이 '참(true)'가 되고, 1일 때는 이웃 블록의 예측 모드가 화면 내 예측이면 '참'이 되고, 화면 간 예측이면 이웃 블록의 이용가능성이 '거짓(false)'이 될 수 있다.Here, when the specific flag (constrained_intra_pred_flag) is 0, the availability of the neighboring block becomes 'true' regardless of the prediction mode of the neighboring block, and when the specific flag (constrained_intra_pred_flag) is 1, the prediction mode of the neighboring block is 'true' if the prediction mode is intra prediction. ', and in the case of inter-picture prediction, the availability of neighboring blocks may be 'false'.

여기서, 화면 간 예측은, 하나 이상의 참조 픽쳐로부터 참조하여 예측 블록을 생성할 수 있다.Here, the inter prediction may generate a prediction block by referring to one or more reference pictures.

여기서, 참조 픽쳐는, 참조 픽쳐 리스트 0(List 0)과 참조 픽쳐 리스트 1(List 1)을 통해 관리되며 하나 이상의 과거 픽쳐, 미래 픽쳐, 현재 픽쳐를 상기 List 0, List 1에 포함할 수 있다.Here, the reference picture is managed through the reference picture list 0 (List 0) and the reference picture list 1 (List 1), and one or more past pictures, future pictures, and current pictures may be included in List 0 and List 1.

여기서, List 0 및 List1은, 참조 픽쳐 리스트에 현재 픽쳐를 넣을지가 적응적으로 결정될 수 있다.Here, in List 0 and List 1, whether to put the current picture in the reference picture list may be adaptively determined.

여기서, 현재 픽쳐를 참조 픽쳐 리스트에 넣을지를 결정하는 정보는 시퀀스, 참조 픽쳐 파라미터 셋 등에 포함될 수 있다.Here, information for determining whether to put the current picture into the reference picture list may be included in a sequence, a reference picture parameter set, and the like.

상기 목적을 달성하기 위한 본 발명의 또 다른 측면에서는, 컴퓨팅 장치에서 수행되는 영상 복호화 방법으로서, 입력 비트스트림으로부터 이웃 블록의 참조 화소 이용가능성에 관한 플래그를 시퀀스 또는 픽쳐 단위로 획득하는 단계; 플래그에 따라 화면 내 예측을 수행할 때 이웃 블록의 참조 화소 이용가능성을 결정하는 단계; 플래그가 0일 때 이웃 블록의 예측 모드에 관계없이 이웃 블록의 참조 화소를 현재 블록의 예측에 사용하고, 플래그가 1일 때 이웃 블록의 예측 모드가 화면 내 예측인 경우에 이웃 블록의 참조 화소를 현재 블록의 예측에 사용하며, 이웃 블록의 예측 모드가 화면 간 예측인 경우에 이웃 블록의 참조 화소를 현재 블록의 예측에 사용하지 않는, 영상 복호화 방법이 제공된다.In another aspect of the present invention for achieving the above object, there is provided an image decoding method performed in a computing device, the method comprising: obtaining, from an input bitstream, a flag regarding the availability of reference pixels of a neighboring block in units of sequences or pictures; determining the reference pixel availability of a neighboring block when performing intra prediction according to the flag; When the flag is 0, the reference pixel of the neighboring block is used for prediction of the current block regardless of the prediction mode of the neighboring block, and when the flag is 1, the reference pixel of the neighboring block is used when the prediction mode of the neighboring block is intra prediction. Provided is an image decoding method that is used for prediction of a current block and does not use reference pixels of a neighboring block for prediction of the current block when the prediction mode of the neighboring block is inter prediction.

여기서, 화면 간 예측은 참조 픽쳐에서 블록 매칭을 기반으로 예측 블록을 생성할 수 있다.Here, the inter prediction may generate a prediction block based on block matching in the reference picture.

여기서, 참조 픽쳐는 P 픽쳐에서는 List 0을, B 픽쳐에서는 List 0과 List 1을 통해 관리될 수 있다.Here, the reference picture may be managed through List 0 in the P picture and List 0 and List 1 in the B picture.

여기서, 화면 간 예측에서 List 0에 현재 픽쳐를 포함할 수 있다.Here, the current picture may be included in List 0 in inter prediction.

여기서, 화면 간 예측에서 List 1에 현재 픽쳐를 포함할 수 있다.Here, the current picture may be included in List 1 in inter prediction.

여기서, 상기 List 0과 List 1에 현재 픽쳐를 포함하는 것은 시퀀스 파라미터에서 전송되는 플래그에 기반하여 결정될 수 있다.Here, the inclusion of the current picture in List 0 and List 1 may be determined based on a flag transmitted from a sequence parameter.

여기서, 상기 List 0과 List 1에 현재 픽쳐를 포함하는 것은 픽쳐 파라미터에서 전송되는 플래그에 기반하여 결정될 수 있다.Here, the inclusion of the current picture in List 0 and List 1 may be determined based on a flag transmitted from a picture parameter.

상술한 바와 같은 본 발명의 실시예에 따른 움직임 벡터 정밀성을 이용하는 영상 부호화 및 복호화 방법 및 영상 복호화 장치를 이용할 경우에는, 영상 예측 시스템의 성능을 개선할 수 있다. 즉, 현재 픽쳐 내에서 참조 블록을 복사하여 예측 블록으로 활용함으로써 영상 부호화 및 복호화에서의 성능을 향상시킬 수 있다.When the image encoding and decoding method and the image decoding apparatus using motion vector precision according to the embodiment of the present invention as described above are used, the performance of the image prediction system can be improved. That is, performance in image encoding and decoding can be improved by copying a reference block in the current picture and using it as a prediction block.

또한, 움직임 벡터의 정밀성을 확장하도록 인트라 블록 카피(intra block copy) 또는 블록 매칭(block matching)을 이용하면서 움직임 벡터의 참조 픽쳐 리스트 0(List 0) 및 참조 픽쳐 리스트 1(List 1)에 현재 픽쳐를 넣어서 부호화 및 복호화에서의 성능과 효율을 향상시킬 수 있다.In addition, the current picture in the reference picture list 0 (List 0) and the reference picture list 1 (List 1) of the motion vector while using intra block copy or block matching to extend the precision of the motion vector performance and efficiency in encoding and decoding can be improved by adding

도 1은 본 발명의 영상 부호화 장치 및/또는 영상 복호화 장치를 이용하는 시스템을 설명하기 위한 도면이다.
도 2는 본 발명의 일실시예에 따른 영상 부호화 장치에 대한 블록도이다.
도 3은 본 발명의 일실시예에 따른 영상 복호화 장치에 대한 블록도이다.
도 4는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 P 슬라이스의 화면 간 예측을 나타낸 예시도이다.
도 5는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 B 슬라이스의 화면 간 예측을 나타낸 예시도이다.
도 6은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 단방향으로 예측 블록을 생성하는 경우를 설명하기 위한 예시도이다.
도 7은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 참조 픽쳐 리스트를 구성하는 예시도이다.
도 8은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 참조 픽쳐 리스트로부터 화면 간 예측을 수행하는 경우의 다른 예를 나타낸 예시도이다.
도 9는 본 발명의 일실시예에 따른 영상 부호화 방법에서 화면 내 예측을 설명하기 위한 예시도이다.
도 10은 본 발명의 일실시예에 따른 영상 부호화 방법에서 P 슬라이스나 B 슬라이스에서의 예측 원리를 설명하기 위한 예시도이다.
도 11은 도 10의 영상 부호화 방법에서 내삽(interpolation)을 수행하는 경우를 설명하기 위한 예시도이다.
도 12는 본 발명의 일실시예에 따른 영상 부호화 방법의 주요 과정을 코딩 단위(coding unit)에서의 신택스로 설명하기 위한 도면이다.
도 13은 도 12에서 사용하는 현재 픽쳐에서 블록매칭을 통해 예측 블록을 생성할 경우, 화면 간 예측에서와 같이 대칭형(symmetric type) 분할 또는 비대칭형(asymmetric type) 분할을 지원하는 예를 설명하기 위한 예시도이다.
도 14는 도 9의 화면 내 예측(Intra)과 같이 화면 간 예측(Inter)에서 2Nx2N, NxN을 지원할 수 있음을 설명하기 위한 예시도이다.
도 15는 본 발명의 일실시예에 따른 영상 부호화 방법에서 영상의 a, b, c의 위치(x라고 가정)에 있는 화소에 대해서는 수평 1D 필터를 수행하는 과정을 설명하기 위한 도면이다.
도 16은 본 발명의 일실시예에 따른 영상 부호화 방법에 채용할 수 있는 현재 블록과 주변 블록에 대한 예시도이다.
도 17은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 임의 접근 모드에 대한 참조 구조의 예이다.
도 18은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 하나의 픽쳐이지만 2개 이상의 보간 정밀도를 가질 수 있음을 설명하기 위한 도면이다.
도 19는 도 18에서 현재 픽쳐가 I 픽쳐일 때의 참조 픽쳐 리스트를 나타낸 도면이다.
도 20은 도 18에서 현재 픽쳐가 P 픽쳐일 때의 참조 픽쳐 리스트를 나타낸 도면이다.
도 21은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 현재 픽쳐가 B(2)일 때 참조픽쳐 리스트를 나타낸 도면이다.
도 22는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 현재 픽쳐가 B(5)일 때 참조픽쳐 리스트를 나타낸 도면이다.
도 23은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 참조 픽쳐의 보간 정밀도에 따라 각 블록의 움직임 벡터 정밀도가 정해지는 과정을 설명하기 위한 도면이다.
도 24는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 각 참조 픽쳐의 보간 정밀도가 고정된 경우에 각 블록의 움직임 벡터 정밀도가 적응적으로 정해지는 과정을 설명하기 위한 도면이다.
1 is a diagram for explaining a system using an image encoding apparatus and/or an image decoding apparatus of the present invention.
2 is a block diagram of an image encoding apparatus according to an embodiment of the present invention.
3 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
4 is an exemplary diagram illustrating inter prediction of a P slice in an image encoding and decoding method according to an embodiment of the present invention.
5 is an exemplary diagram illustrating inter prediction of a B slice in a video encoding and decoding method according to an embodiment of the present invention.
6 is an exemplary diagram for explaining a case of generating a prediction block unidirectionally in an image encoding and decoding method according to an embodiment of the present invention.
7 is an exemplary diagram of configuring a reference picture list in an image encoding and decoding method according to an embodiment of the present invention.
8 is an exemplary diagram illustrating another example of performing inter prediction from a reference picture list in an image encoding and decoding method according to an embodiment of the present invention.
9 is an exemplary diagram for explaining intra prediction in an image encoding method according to an embodiment of the present invention.
10 is an exemplary diagram for explaining a prediction principle in a P slice or a B slice in an image encoding method according to an embodiment of the present invention.
11 is an exemplary diagram for explaining a case in which interpolation is performed in the image encoding method of FIG. 10 .
12 is a diagram for explaining a main process of an image encoding method according to an embodiment of the present invention with syntax in a coding unit.
13 is a diagram illustrating an example of supporting symmetric type partitioning or asymmetric type partitioning as in inter prediction when a prediction block is generated through block matching in the current picture used in FIG. 12 . It is also an example.
14 is an exemplary diagram for explaining that 2Nx2N and NxN can be supported in the inter prediction (Inter) like the intra prediction (Intra) of FIG. 9 .
15 is a diagram for explaining a process of performing a horizontal 1D filter on pixels at positions a, b, and c (assumed to be x) of an image in the image encoding method according to an embodiment of the present invention.
16 is an exemplary diagram of a current block and neighboring blocks that can be employed in an image encoding method according to an embodiment of the present invention.
17 is an example of a reference structure for a random access mode in an image encoding and decoding method according to an embodiment of the present invention.
18 is a diagram for explaining that one picture may have two or more interpolation accuracies in an image encoding and decoding method according to an embodiment of the present invention.
19 is a diagram illustrating a reference picture list when the current picture is an I picture in FIG. 18 .
20 is a diagram illustrating a reference picture list when the current picture is a P picture in FIG. 18 .
21 is a diagram illustrating a reference picture list when a current picture is B(2) in a video encoding and decoding method according to an embodiment of the present invention.
22 is a diagram illustrating a reference picture list when the current picture is B(5) in the video encoding and decoding method according to an embodiment of the present invention.
23 is a diagram for explaining a process in which motion vector precision of each block is determined according to interpolation precision of a reference picture in a video encoding and decoding method according to an embodiment of the present invention.
24 is a diagram for explaining a process in which motion vector precision of each block is adaptively determined when the interpolation precision of each reference picture is fixed in the video encoding and decoding method according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention.

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

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

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함한다" 또는 "가진다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as "comprises" or "having" are intended to designate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 것을 의미한다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in a commonly used dictionary should be interpreted as being consistent with the meaning of the context of the related art, and are not interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application.

통상적으로 동영상은 일련의 픽쳐(Picture)로 구성될 수 있으며, 각 픽쳐들은 프레임 또는 블록(Block)과 같은 소정의 영역으로 분할될 수 있다. 또한, 분할된 영역은 블록(Block)뿐 아니라, 코딩 트리 유닛(Coding Tree Unit, CTU), 코딩 유닛(Coding Unit, CU), 예측 유닛(Prediction Unit, PU), 변환 유닛(Transform Unit, TU)과 같이 다양한 크기 또는 용어로 지칭할 수 있다. 각 유닛(Unit)은 하나의 휘도 블록과 두 개의 색차 블록으로 구성될 수 있으며, 이는 컬러 포맷에 따라 달리 구성될 수 있다. 또한, 컬러 포맷에 따라 휘도 블록과 색차 블록의 크기가 결정될 수 있다. 예를 들어, 4:2:0인 경우 색차 블록의 크기는 휘도 블록의 가로, 세로가 1/2인 길이를 가질 수 있다. 이 단위 및 용어에 대해서는 기존의 HEVC(high efficiency video coding) 또는 H.264/AVC(advanced video coding) 등의 용어를 참조할 수 있다.In general, a moving picture may be composed of a series of pictures, and each picture may be divided into a predetermined area such as a frame or a block. In addition, the divided region includes a block as well as a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transform unit (TU). It can be referred to by various sizes or terms, such as Each unit may include one luminance block and two color difference blocks, which may be configured differently according to a color format. Also, sizes of the luminance block and the chrominance block may be determined according to the color format. For example, in the case of 4:2:0, the size of the chrominance block may have a length equal to 1/2 of the width and length of the luminance block. For this unit and terminology, conventional terms such as high efficiency video coding (HEVC) or H.264/advanced video coding (H.264/AVC) may be referred to.

또한, 현재 블록 또는 현재 화소를 부호화하거나 복호화하는데 참조되는 픽쳐, 블록 또는 화소를 참조 픽쳐(reference picture), 참조 블록(reference block) 또는 참조 화소(reference pixel)라고 한다. 또한, 이하에 기재된 "픽쳐(picture)"이라는 용어는 영상(image), 프레임(frame) 등과 같은 동등한 의미를 갖는 다른 용어로 대치되어 사용될 수 있음을 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 이해할 수 있다In addition, a picture, block, or pixel referenced for encoding or decoding a current block or a current pixel is referred to as a reference picture, a reference block, or a reference pixel. In addition, it is common knowledge in the technical field to which this embodiment belongs that the term “picture” described below may be used in place of other terms having the same meaning, such as an image and a frame. Grow up to understand

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In describing the present invention, in order to facilitate the overall understanding, the same reference numerals are used for the same components in the drawings, and duplicate descriptions of the same components are omitted.

도 1은 본 발명의 영상 부호화 장치 및/또는 영상 복호화 장치를 이용하는 시스템을 설명하기 위한 도면이다.1 is a diagram for explaining a system using an image encoding apparatus and/or an image decoding apparatus of the present invention.

도 1을 참조하면, 영상 부호화 장치 및/또는 영상 복호화 장치를 이용하는 시스템은 개인용 컴퓨터(personal computer, PC), 노트북 컴퓨터, 개인 휴대 단말기(personal digital assistant, PDA), 휴대형 멀티미디어 플레이어(portable multimedia player, PMP), 플레이스테이션 포터블(playstation portable, PSP), 무선 통신 단말기(wireless communication terminal), 스마트폰(smart phone), 텔레비전(TV) 등과 같은 사용자 단말기(11)이거나 응용 서버와 서비스 서버 등 서버 단말기(12)일 수 있다. 이러한 시스템은 컴퓨팅 장치로 지칭될 수 있다.1 , a system using an image encoding apparatus and/or an image decoding apparatus includes a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player, PMP), PlayStation portable (playstation portable, PSP), wireless communication terminal (wireless communication terminal), smart phone (smart phone), a user terminal 11 such as a television (TV) or a server terminal such as an application server and a service server ( 12) can be Such a system may be referred to as a computing device.

또한, 컴퓨팅 장치는 각종 기기 또는 유무선 통신망(network)과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하거나 복호화하거나 부호화 및 복호화를 위해 화면 간(inter) 또는 화면 내(intra) 예측하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리(18), 프로그램을 실행하여 연산 및 제어하기 위한 프로세서(14) 등을 구비하는 다양한 장치를 포함할 수 있다.In addition, the computing device is a communication device such as a communication modem for performing communication with various devices or a wired/wireless network, encoding or decoding an image, or inter or intra prediction for encoding and decoding. It may include various devices including a memory 18 for storing various programs and data, a processor 14 for executing and controlling the program, and the like.

또한, 컴퓨팅 장치는 영상 부호화 장치에 의해 비트스트림(bitstream)으로 부호화된 영상을 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등의 유무선 통신망 등을 통하거나 케이블, 범용 직렬 버스(USB: Universal Serial Bus) 등과 같은 다양한 통신 인터페이스를 통해 영상 복호화 장치로 전송되어 영상 복호화 장치에서 복호화되어 복원된 영상으로 재생될 수 있다. 또한, 영상 부호화 장치에 의해 비트스트림으로 부호화된 영상은 컴퓨터 판독 가능한 기록 매체를 통하여 부호화 장치에서 복호화 장치로 전달될 수도 있다.In addition, the computing device transmits an image encoded as a bitstream by an image encoding device in real time or in non-real time through a wired or wireless communication network such as the Internet, a local area wireless network, a wireless LAN network, a WiBro network, or a mobile communication network, or through a cable, general purpose It may be transmitted to an image decoding apparatus through various communication interfaces such as a serial bus (USB: Universal Serial Bus), and decoded in the image decoding apparatus and reproduced as a restored image. Also, an image encoded as a bitstream by the image encoding apparatus may be transmitted from the encoding apparatus to the decoding apparatus through a computer-readable recording medium.

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

본 실시예에 따른 영상 부호화 장치(20)는, 도 2에 나타낸 바와 같이, 예측부(200), 감산부(205), 변환부(210), 양자화부(215), 역양자화부(220), 역변환부(225), 가산부(230), 필터부(235), 복호화 픽쳐 버퍼(decorded picture buffer, DPB, 240) 및 엔트로피 부호화부(245)를 포함할 수 있다. 또한, 영상 부호화 장치(20)는 분할부(190)를 더 포함할 수 있다.As shown in FIG. 2 , the image encoding apparatus 20 according to the present embodiment includes a prediction unit 200 , a subtraction unit 205 , a transform unit 210 , a quantization unit 215 , and an inverse quantization unit 220 . , an inverse transform unit 225 , an adder 230 , a filter unit 235 , a decoded picture buffer (DPB) 240 , and an entropy encoder 245 . Also, the image encoding apparatus 20 may further include a division unit 190 .

또한, 본 실시예에 따른 영상 복호화 장치(30)는, 도 3에 나타낸 바와 같이, 엔트로피 복호화부(305), 예측부(310), 역양자화부(315), 역변환부(320), 가산부(325), 필터부(330) 및 복호화 픽쳐 버퍼(335)를 포함할 수 있다.In addition, as shown in FIG. 3 , the image decoding apparatus 30 according to the present embodiment includes an entropy decoding unit 305 , a prediction unit 310 , an inverse quantization unit 315 , an inverse transform unit 320 , and an addition unit. 325 , a filter unit 330 , and a decoded picture buffer 335 may be included.

전술한 영상 부호화 장치(20)와 영상 복호화 장치(30)는 각각 별도의 장치들일 수 있으나, 구현에 따라서 하나의 영상 부호화 및 복호화 장치로 만들어질 수 있다. 그 경우, 영상 부호화 장치(20)의 예측부(200), 역양자화부(220), 역변환부(225), 가산부(230), 필터부(235) 및 복호화 픽쳐 버퍼(240)는 기재된 순서대로 영상 복호화 장치(30)의 예측부(310), 역양자화부(315), 역변환부(320), 가산부(325), 필터부(330) 및 메모리(335)와 실질적으로 동일한 기술요소로서 적어도 동일한 구조를 포함하거나 적어도 동일한 기능을 수행하도록 구현될 수 있다. 또한, 엔트로부 부호화부(245)는 그 기능을 역으로 수행할 때, 엔트로피 복호화부(305)에 대응될 수 있다. 따라서 이하의 기술요소들과 이들의 작동 원리 등에 대한 상세 설명에서는 대응 기술요소들의 중복되는 설명을 생략하기로 한다.The above-described image encoding apparatus 20 and image decoding apparatus 30 may be separate apparatuses, respectively, but may be made into one image encoding and decoding apparatus according to implementation. In this case, the prediction unit 200 , the inverse quantization unit 220 , the inverse transform unit 225 , the adder 230 , the filter unit 235 , and the decoded picture buffer 240 of the video encoding apparatus 20 are in the order described. As a technical element substantially the same as the prediction unit 310, the inverse quantization unit 315, the inverse transform unit 320, the adder 325, the filter unit 330, and the memory 335 of the image decoding apparatus 30, It may be implemented to include at least the same structure or to perform at least the same function. Also, when the entropy encoder 245 performs its function in reverse, it may correspond to the entropy decoder 305 . Therefore, in the detailed description of the following technical elements and their operating principles, overlapping descriptions of corresponding technical elements will be omitted.

그리고 영상 복호화 장치는 영상 부호화 장치에서 수행되는 영상 부호화 방법을 복호화에 적용하는 컴퓨팅 장치에 대응하므로, 이하의 설명에서는 영상 부호화 장치를 중심으로 설명하기로 한다.In addition, since the image decoding apparatus corresponds to a computing device that applies the image encoding method performed by the image encoding apparatus to decoding, the image encoding apparatus will be mainly described in the following description.

컴퓨팅 장치는 영상 부호화 방법 및/또는 영상 복호화 방법을 구현하는 프로그램이나 소프트웨어 모듈을 저장하는 메모리와 메모리에 연결되어 프로그램을 수행하는 프로세서를 포함할 수 있다. 그리고 영상 부호화 장치는 부호화기로, 영상 복호화 장치는 복호화기로 각각 지칭될 수 있다.The computing device may include a memory that stores a program or software module implementing the image encoding method and/or the image decoding method, and a processor connected to the memory to execute the program. In addition, the image encoding apparatus may be referred to as an encoder, and the image decoding apparatus may be referred to as a decoder, respectively.

본 실시예의 영상 부호화 장치의 각 구성요소를 좀 더 구체적으로 설명하면 다음과 같다.Each component of the video encoding apparatus of the present embodiment will be described in more detail as follows.

분할부(190)는, 입력 영상을 정해진 크기의 블록(M×N)으로 분할한다. 여기서, M 또는 N은 1 이상의 임의의 자연수이다.The division unit 190 divides the input image into blocks (M×N) of a predetermined size. Here, M or N is any natural number greater than or equal to 1.

상세하게는, 분할부(190)은 픽쳐 분할부와 블록 분할부로 구성될 수 있다. 블록은 영상의 특성 및 해상도 등에 따라 크기 또는 형태가 결정될 수 있고, 픽쳐 분할부를 통해 지원되는 블록의 크기 또는 형태는 가로 및 세로의 길이가 2의 지수승으로 표현되는 M×N 정사각 형태(256×256, 128×128, 64×64, 32×32, 16×16, 8×8, 4×4 등)이거나, M×N 직사각 형태일 수 있다. 예를 들어, 해상도가 높은 8k UHD급 영상의 경우 256×256, 1080p HD급 영상의 경우 128×128, WVGA급 영상의 경우 16×16 등 크기로 입력 영상을 분할할 수 있다.In detail, the dividing unit 190 may include a picture dividing unit and a block dividing unit. The size or shape of the block may be determined according to the characteristics and resolution of the image, and the size or shape of the block supported through the picture divider is an M×N square shape (256) in which the horizontal and vertical lengths are expressed as powers of two. ×256, 128×128, 64×64, 32×32, 16×16, 8×8, 4×4, etc.) or M×N rectangular shape. For example, the input image may be divided into sizes such as 256×256 for a high-resolution 8k UHD video, 128×128 for a 1080p HD video, and 16×16 for a WVGA video.

이러한 블록의 크기 또는 형태에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위에서 설정이 가능하며, 관련 정보를 복호화기에 전송할 수 있다. 즉, 시퀀스 파라미터 셋, 픽쳐 파라미터 셋, 슬라이스 헤더 또는 이들의 조합 단위에서 설정될 수 있다.Information on the size or shape of such a block can be set in units such as sequence, picture, and slice, and related information can be transmitted to the decoder. That is, it may be set in a sequence parameter set, a picture parameter set, a slice header, or a combination unit thereof.

여기서, 시퀀스(sequence)는 몇 개의 관련 장면을 모아서 구성되는 구성단위를 가리킨다. 그리고 픽쳐(picture)는 하나의 장면 또는 픽쳐에서 일련의 휘도(Y) 성분 혹은 휘도와 색차(Y, Cb, Cr) 성분 전체를 일컫는 용어로서, 한 픽쳐의 범위는 경우에 따라서 한 프레임 혹은 한 필드가 될 수 있다.Here, a sequence refers to a structural unit configured by collecting several related scenes. In addition, a picture is a term that refers to a series of luminance (Y) components or all luminance and chrominance (Y, Cb, Cr) components in one scene or picture, and the range of one picture is one frame or one field in some cases. can be

슬라이스(slice)는 동일 액세스 유닛(access unit) 안에 존재하는 하나의 독립 슬라이스 세그먼트와 다수의 종속 슬라이스 세그먼트를 말할 수 있다. 액세스 유닛은 한 장의 코딩된 픽쳐와 관련된 NAL(network abstraction layer) 유닛의 집합(set)을 의미한다. NAL 유닛은 H.264/AVC와 HEVC 표준에서 비디오 압축 비트스트림을 네트워크 친화적인 형식으로 구성한 구문 구조(syntax structure)이다. 한 슬라이스 단위를 하나의 NAL 유닛으로 구성하는 것이 일반적이며, 시스템 표준에서는 일반적으로 한 프레임을 구성하는 NAL 혹은 NAL 집합을 하나의 액세스 유닛으로 간주한다.A slice may refer to one independent slice segment and a plurality of dependent slice segments existing in the same access unit. The access unit refers to a set of network abstraction layer (NAL) units related to one coded picture. The NAL unit is a syntax structure that composes a video compression bitstream in a network-friendly format in the H.264/AVC and HEVC standards. It is common to configure one slice unit as one NAL unit, and the system standard generally regards the NAL or NAL set constituting one frame as one access unit.

다시 픽쳐 분할부의 설명으로 되돌아가서, 블록 크기 또는 형태(M×N)에 대한 정보는 명시적 플래그로 이루어질 수 있는데, 구체적으로 블록 형태 정보, 블록이 정사각인 경우에 하나의 길이 정보, 직사각일 경우에는 각각의 길이 정보, 또는 가로와 세로 길이의 차이값 정보 등을 포함할 수 있다. 예를 들어, M과 N이 k의 지수승(k를 2라 가정)으로 구성되어 있을 경우(M=2m, N=2n), m과 n에 대한 정보를 단항 이진화, 절삭형 단항 이진화 등의 다양한 방법으로 부호화하여 관련 정보를 복호화장치에 전달할 수 있다.Returning to the description of the picture division unit, information on the block size or shape (M×N) may consist of an explicit flag, specifically block shape information, one length information in case the block is a square, and a rectangular one. In this case, each length information or information on a difference value between horizontal and vertical lengths may be included. For example, when M and N are composed of k to the power of k (assuming k is 2) (M=2 m , N=2 n ), information about m and n is converted into unary binarization and truncation unary binarization. The related information may be transmitted to the decoding apparatus by encoding in various methods such as.

또한, 픽쳐 분할부에서 지원하는 분할 허용 최소 크기(Minblksize)가 I×J(설명의 편의상 I=J라고 가정. I=2i,J=2j 일 경우), m-i 또는 n-j에 대한 정보를 전달할 수 있다. 다른 예로, M과 N이 다를 경우, m과 n의 차이값(|m-n|)을 전달할 수 있다. 또는, 픽쳐 분할부에서 지원하는 분할 허용 최대 크기(Maxblksize)가 I×J(설명의 편의상 I=J라고 가정. I=2i,J=2j 일 경우), i-m 또는 n-j에 대한 정보를 전달할 수 있다.In addition, the minimum allowable division size (Minblksize) supported by the picture division unit is I×J (for convenience of explanation, it is assumed that I=J. In the case of I=2 i ,J=2 j ), information on mi or nj is transmitted. can As another example, when M and N are different, the difference value (|mn|) between m and n may be transmitted. Alternatively, the maximum allowable division size (Maxblksize) supported by the picture division unit is I×J (for convenience of explanation, it is assumed that I=J. If I=2 i ,J=2 j ), information about im or nj is transmitted. can

묵시적인 상황일 경우 예컨대, 관련 정보에 대한 신택스는 존재하나 부호화기/복호화기에서 확인할 수 없는 경우에는, 부호화기나 복호화기는 미리 준비된 기본 설정을 따를 수 있다. 예를 들어, 블록 형태 정보를 확인하는 단계에서 관련 신택스를 확인할 수 없는 경우 블록 형태는 기본 설정인 정사각 형태로 둘 수 있다. 또한, 블록 크기 정보를 확인하는 단계는, 좀더 상세하게는, 상기 예와 같이 분할 허용 최소 크기(Minblksize)로부터의 차이값을 통해 블록 크기 정보를 확인하는 단계에서 차이값 관련 신택스는 확인할 수 있으나 분할 허용 최소 크기(Minblksize) 관련 신택스는 확인할 수 없는 경우 미리 준비된 분할 허용 최소 크기(Minblksize) 관련 기본 설정값으로부터 얻을 수 있다. In an implicit situation, for example, when syntax for related information exists but cannot be confirmed by the encoder/decoder, the encoder or decoder may follow a pre-prepared default setting. For example, when the related syntax cannot be checked in the step of checking the block shape information, the block shape may be set to a basic square shape. In addition, in the step of checking the block size information, more specifically, in the step of checking the block size information through the difference value from the minimum allowable partition size (Minblksize) as in the above example, syntax related to the difference value can be checked, but the division If the syntax related to the minimum allowable size (Minblksize) cannot be confirmed, it can be obtained from a preset value related to the minimum allowable partition size (Minblksize).

이와 같이, 픽쳐 분할부에서 블록의 크기 또는 형태는 부호화기 및/또는 복호화기에서 관련 정보를 명시적으로 전송하거나 또는 영상의 특성 및 해상도 등에 따라 묵시적으로 결정될 수 있다.In this way, the size or shape of a block in the picture divider may be implicitly determined according to characteristics and resolution of an image or the like by explicitly transmitting related information from an encoder and/or a decoder.

상기와 같이 픽쳐 분할부를 통해 분할 및 결정된 블록은 기본 부호화 단위로 사용될 수 있다. 또한, 픽쳐 분할부를 통해 분할 및 결정된 블록은 픽쳐, 슬라이스, 타일(tile) 등의 상위 레벨 단위를 구성하는 최소 단위일 수 있고, 부호화 블록(coding block), 예측 블록(prediction block), 변환 블록(transform block), 양자화 블록(quantization block), 엔트로피 블록(entropy block), 인루프 필터링 블록(inloopfiltering block) 등의 최대 단위일 수 있으나, 일부 블록은 이에 한정되지 않고 예외도 가능하다. 예컨대, 인루프 필터링 블록과 같이 일부는 위에서 설명한 블록 크기보다 더 큰 단위로 적용될 수 있다.As described above, the block divided and determined through the picture divider may be used as a basic coding unit. In addition, the block divided and determined through the picture divider may be a minimum unit constituting a higher-level unit such as a picture, a slice, and a tile, and may include a coding block, a prediction block, and a transform block. (transform block), quantization block (quantization block), entropy block (entropy block), may be a maximum unit such as an inloop filtering block (inloopfiltering block), some blocks are not limited thereto, and exceptions are possible. For example, some such as in-loop filtering blocks may be applied in units larger than the block size described above.

블록 분할부는 부호화, 예측, 변환, 양자화, 엔트로피, 인루프 필터 등의 블록에 대한 분할을 수행한다. 분할부(190)는 각 구성에 포함되어 기능을 수행하기도 한다. 예컨대, 변환부(210)에 변환블록 분할부, 양자화부(215)에 양자화블록 분할부를 포함할 수 있다. 블록 분할부의 초기 블록의 크기 또는 형태는 이전 단계 또는 상위 레벨 블록의 분할 결과에 의해 결정될 수 있다.The block divider divides blocks such as encoding, prediction, transformation, quantization, entropy, and in-loop filter. The division unit 190 is included in each component to perform a function. For example, the transform unit 210 may include a transform block division unit, and the quantization unit 215 may include a quantization block division unit. The size or shape of the initial block of the block division unit may be determined by the division result of a previous stage or higher-level block.

예를 들어, 부호화 블록의 경우 이전 단계인 픽쳐 분할부를 통해 획득된 블록을 초기 블록으로 설정할 수 있다. 혹은, 예측 블록의 경우 예측 블록의 상위 레벨인 부호화 블록의 분할 과정을 통해 획득된 블록을 초기 블록으로 설정할 수 있다. 혹은, 변환 블록의 경우 변환 블록의 상위 레벨인 부호화 블록의 분할 과정을 통해 획득된 블록을 초기 블록으로 설정할 수 있다.For example, in the case of a coding block, a block obtained through a picture dividing unit, which is a previous step, may be set as an initial block. Alternatively, in the case of a prediction block, a block obtained through a process of dividing a coding block that is a higher level of the prediction block may be set as an initial block. Alternatively, in the case of a transform block, a block obtained through a process of dividing a coding block that is a higher level of the transform block may be set as an initial block.

초기 블록의 크기 또는 형태를 결정하는 조건은 항상 고정적이지 않으며 일부가 변경되거나 예외인 경우가 존재할 수 있다. 또한, 이전 단계 또는 상위 레벨 블록의 분할 상태(예를 들어, 부호화 블록의 크기, 부호화 블록의 형태 등)와 현재 레벨의 설정 조건(예를 들어, 지원되는 변환 블록의 크기, 변환 블록의 형태 등) 각각 최소 하나 이상의 요인의 조합에 따라 현재 레벨의 분할 동작(분할 가능 여부, 분할 가능한 블록 형태 등)에 영향을 줄 수도 있다. The conditions for determining the size or shape of the initial block are not always fixed, and some may be changed or there may be exceptions. In addition, the partition state of the previous stage or higher level block (eg, the size of the coding block, the type of the coding block, etc.) and the setting condition of the current level (eg, the size of the supported transform block, the type of the transform block, etc.) ) may affect the current level division operation (whether division is possible, the type of a block that can be divided, etc.) according to a combination of at least one or more factors, respectively.

블록 분할부는 쿼드트리(quad tree) 기반의 분할 방식을 지원할 수 있다. 즉, 분할 전 블록에서 가로 및 세로가 1/2씩의 길이를 갖는 4개의 블록으로 분할할 수 있다. 이는 최초 블록 기준(dep_0)으로 분할 허용 깊이 한계(dep_k, k는 분할 허용 횟수를 의미하고, 분할 허용 깊이 한계(dep_k)일 때의 블록 크기는 (M >> k, N >> k)임)까지 분할을 반복적으로 할 수 있다.The block divider may support a quad tree-based division method. That is, it can be divided into four blocks each having a length of 1/2 each in width and length from the block before division. This is based on the initial block (dep_0), and the limit of the allowed depth of division (dep_k, k means the number of allowed divisions, and the block size when the limit of the allowed depth of division (dep_k) is (M >> k, N >> k)) The division can be repeated until

또한, 바이너리 트리 기반의 분할 방식을 지원할 수 있다. 이는 가로 또는 세로 중 하나의 길이가 분할 전 블록과 비교하여 1/2의 길이를 갖는 2개의 블록으로 분할할 수 있음을 나타낸다. 상기 쿼드 트리 분할과 바이너리 트리의 분할의 경우 대칭 분할(symmetric partition)이나 비대칭 분할(asymmetric partition)일 수 있으며, 이는 부호화기/복호화기의 설정에 따라 어느 분할 방식을 따를지 정할 수 있다. 본 발명의 영상 부호화 방법에서 대칭 분할 방식 위주로 설명을 할 것이다.In addition, a binary tree-based partitioning method may be supported. This indicates that it can be divided into two blocks having a length of one-half compared to the block before division, either horizontally or vertically. In the case of the quad-tree partitioning and binary tree partitioning, symmetric partitioning or asymmetric partitioning may be used, and it is possible to determine which partitioning method to follow according to the setting of the encoder/decoder. In the image encoding method of the present invention, the description will be focused on the symmetric division method.

분할 플래그(div_flag)를 통해 각 블록의 분할 여부를 나타낼 수 있으며, 해당 값이 1이면 분할을 수행하고, 값이 0이면 분할을 수행하지 않는다. 또는, 해당 값이 1이면 분할을 수행하고 추가 분할이 가능하며, 값이 0이면 분할을 수행하지 않고 더 이상의 분할을 허용하지 않을 수 있다. 분할 허용 최소 크기, 분할 허용 깊이 한계 등의 조건에 의해 상기 플래그는 분할 여부에 대해서만 고려하고 추가 분할 여부에 대해서는 고려하지 않을 수 있다.Whether or not each block is divided can be indicated through the division flag (div_flag). If the corresponding value is 1, division is performed, and if the value is 0, division is not performed. Alternatively, if the corresponding value is 1, partitioning is performed and further partitioning is possible. If the value is 0, partitioning is not performed and further partitioning may not be allowed. According to conditions such as the minimum allowable division size and the limit of the allowable division depth, the flag may only consider whether to divide and not consider whether to further divide.

분할 플래그는 쿼드트리 분할에서 사용 가능하고, 바이너리 트리 분할에서도 사용 가능하다. 바이너리 트리 분할에서는 분할 방향이 블록의 분할 깊이, 부호화 모드, 예측 모드, 크기, 형태, 종류(부호화, 예측, 변환, 양자화, 엔트로피, 인루프 필터 등 중 하나일 수 있음. 또는, 휘도, 색차 중 하나일 수 있음) 그리고 슬라이스 타입, 분할 허용 깊이 한계, 분할 허용 최소/최대 크기 등의 요인 중 최소 하나 이상의 요인 또는 이들의 조합에 따라 결정될 수 있다. 또한, 분할 플래그에 따라 및/또는 해당 분할 방향에 따라 즉, 블록의 가로만 1/2로 분할되거나 또는 세로만 1/2로 분할될 수 있다.The split flag can be used for quad-tree splitting and can also be used for binary tree splitting. In binary tree partitioning, the partitioning direction may be one of the partition depth, encoding mode, prediction mode, size, shape, type (coding, prediction, transformation, quantization, entropy, in-loop filter, etc.) may be one) and may be determined according to at least one or a combination of factors such as a slice type, a partition allowable depth limit, and a partition allowable minimum/maximum size. In addition, according to the division flag and/or according to the division direction, that is, only the width of the block may be divided into 1/2 or only the length of the block may be divided into 1/2.

예를 들어, 블록이 M×N(M>N)으로 M이 N보다 클 때 가로 분할을 지원하며, 현재 분할 깊이(dep_curr)는 분할 허용 깊이 한계보다 작아서 추가 분할이 가능하다고 가정하면, 위의 분할 플래그는 1비트로 할당되어 해당 값이 1이면 가로 분할을 수행하고, 0이면 더 이상 분할하지 않을 수 있다. 분할 깊이는 쿼드 트리와 바이너리 트리 분할에 하나의 분할 깊이를 둘 수도 있고, 쿼드 트리와 바이너리 트리 분할에 각각의 분할 깊이를 둘 수도 있다. 또한, 분할 허용 깊이 한계는 쿼드 트리와 바이너리 트리 분할에 하나의 분할 허용 깊이 한계를 둘 수도 있고, 쿼드 트리와 바이너리 트리 분할에 각각의 분할 허용 깊이 한계를 둘 수도 있다.For example, if a block is M×N(M>N), and horizontal division is supported when M is greater than N, and the current division depth (dep_curr) is smaller than the division allowable depth limit, further division is possible. The division flag is allocated as 1 bit, and if the corresponding value is 1, horizontal division is performed, and if it is 0, no further division may be performed. As for the division depth, one division depth may be provided for quad tree and binary tree division, and each division depth may be provided for quad tree and binary tree division. In addition, as for the allowable partitioning depth limit, one partitioning allowable depth limit may be placed on quad tree and binary tree partitioning, and each partitioning allowable depth limit may be placed on quad tree and binary tree partitioning.

다른 예로, 블록이 M×N(M>N)이고 N이 미리 설정된 분할 허용 최소 크기와 같아서 가로 분할을 지원하지 않는다면, 위의 분할 플래그는 1비트로 할당되어 해당 값이 1이면 세로 분할을 수행하고, 0이면 분할을 수행하지 않는다. As another example, if the block is M×N (M>N) and N is equal to the preset minimum allowable size for division, so horizontal division is not supported, the above division flag is assigned as 1 bit and if the value is 1, vertical division is performed, , if it is 0, no partitioning is performed.

또한, 가로 분할 또는 세로 분할을 위한 플래그(div_h_flag, div_h_flag)를 각각 지원할 수 있으며, 상기 플래그에 따라 바이너리 분할을 지원할 수 있다. 가로 분할 플래그(div_h_flag) 또는 세로 분할 플래그(div_v_flag)를 통해 각 블록의 가로 또는 세로 분할 여부를 나타낼 수 있으며, 가로 분할 플래그(div_h_flag) 또는 세로 분할 플래그(div_v_flag)가 1이면 가로 또는 세로 분할을 수행하며, 0이면 가로 또는 세로 분할을 수행하지 않는다.In addition, flags div_h_flag and div_h_flag for horizontal division or vertical division may be supported, respectively, and binary division may be supported according to the flags. Horizontal or vertical division of each block can be indicated through the horizontal division flag (div_h_flag) or vertical division flag (div_v_flag). If the horizontal division flag (div_h_flag) or vertical division flag (div_v_flag) is 1, horizontal or vertical division is performed. If it is 0, horizontal or vertical division is not performed.

또한, 각 플래그가 1이면 가로 또는 세로 분할을 수행하며 가로 또는 세로의 추가 분할이 가능하고, 값이 0이면 가로 또는 세로 분할을 수행하지 않으며 더 이상의 가로 또는 세로의 추가 분할은 허용하지 않을 수 있다. 분할 허용 최소 크기, 분할 허용 깊이 한계 등의 조건에 의해 상기 플래그는 분할 여부에 대해서 고려하고 추가 분할 여부에 대해서는 고려하지 않을 수 있다.In addition, if each flag is 1, horizontal or vertical division is performed and additional horizontal or vertical division is possible. If the value is 0, horizontal or vertical division is not performed and further horizontal or vertical division is not allowed. . Depending on conditions such as the minimum allowable partition size and the limit of the allowable partitioning depth, the flag may consider whether to split and not consider whether to further split.

또한, 가로 분할 또는 세로 분할을 위한 플래그(div_flag/h_v_flag)를 지원할 수 있으며, 상기 플래그에 따라 바이너리 분할을 지원할 수 있다. 분할 플래그(div_flag)는 가로 또는 세로 분할 여부를 나타낼 수 있으며 분할 방향 플래그(h_v_flag)는 가로 또는 세로의 분할 방향을 나타낼 수 있다.In addition, flags (div_flag/h_v_flag) for horizontal division or vertical division may be supported, and binary division may be supported according to the flag. The division flag div_flag may indicate horizontal or vertical division, and the division direction flag h_v_flag may indicate a horizontal or vertical division direction.

분할 플래그(div_flag)가 1이면 분할을 수행하며 분할 방향 플래그(h_v_flag)에 따라 가로 또는 세로 분할을 수행하며, 0이면 가로 또는 세로 분할을 수행하지 않는다. 또한, 해당 값이 1이면 분할 방향 플래그(h_v_flag)에 따라 가로 또는 세로 분할을 수행하며 가로 또는 세로의 추가 분할이 가능하고, 값이 0이면 가로 또는 세로 분할을 수행하지 않으며 더 이상의 가로 또는 세로 분할을 허용하지 않는 것으로 간주할 수 있다.When the division flag div_flag is 1, division is performed, horizontal or vertical division is performed according to the division direction flag h_v_flag, and when 0, horizontal or vertical division is not performed. In addition, if the value is 1, horizontal or vertical division is performed according to the division direction flag (h_v_flag) and additional horizontal or vertical division is possible. If the value is 0, horizontal or vertical division is not performed and further horizontal or vertical division is possible. may be considered as not permitted.

분할 허용 최소 크기, 분할 허용 깊이 한계 등의 조건에 의해 상기 플래그는 분할 여부에 대해서 고려하고 추가 분할 여부에 대해서는 고려하지 않을 수 있다.Depending on conditions such as the minimum allowable partition size and the limit of the allowable partitioning depth, the flag may consider whether to split and not consider whether to further split.

이러한 분할 플래그 또한 가로, 세로 분할을 위해 각각 지원할 수 있으며, 상기 플래그에 따라 바이너리 트리 분할을 지원할 수 있다. 또한, 분할 방향이 미리 결정되어 있는 경우, 상기 예와 같이 둘 중의 하나의 분할 플래그만 사용되거나, 두 분할 플래그 모두가 사용될 수 있다.These division flags may also be supported for horizontal and vertical division, respectively, and binary tree division may be supported according to the flag. In addition, when the division direction is predetermined, as in the above example, only one of the division flags or both division flags may be used.

예를 들어, 상기의 플래그가 다 허용되면 가능한 블록의 형태는 M×N, M/2×N, M×N/2, M/2×N/2 중 어느 하나로 분할이 될 수 있다. 이 경우, 플래그는 수평 분할 플래그 또는 수직 분할 플래그(div_h_flag/div_v_flag) 순으로 00, 10, 01, 11로 부호화될 수 있다.For example, if all of the above flags are allowed, the possible block shape may be divided into any one of M×N, M/2×N, M×N/2, and M/2×N/2. In this case, the flags may be encoded as 00, 10, 01, and 11 in the order of the horizontal division flag or the vertical division flag (div_h_flag/div_v_flag).

위의 경우, 분할 플래그가 중첩되어 사용될 수 있는 설정에서의 예시이고, 분할 플래그가 중첩되어 사용될 수 없는 설정 또한 가능하다. 예를 들어, 분할 블록 형태가 M×N, M/2×N, M×N/2로 분할될 수 있으며, 이 경우 위의 플래그는 수평 또는 수직 분할 플래그들 순으로 00, 01, 10로 부호화되거나, 분할 플래그(div_flag)와 수평-수직 플래그(h_v_flag, 이 플래그는 분할 방향이 가로 또는 세로를 나타내는 플래그) 순으로 0, 10, 11로 부호화될 수 있다. 여기에서 중첩의 의미는 가로 분할과 세로 분할을 동시에 수행하는 것을 의미할 수 있다.In the above case, it is an example in a setting in which the division flags can be overlapped and used, and a setting in which the division flags cannot be overlapped and used is also possible. For example, the divided block shape may be divided into M×N, M/2×N, and M×N/2. In this case, the flags above are encoded as 00, 01, and 10 in the order of horizontal or vertical division flags. Alternatively, a division flag (div_flag) and a horizontal-vertical flag (h_v_flag, this flag indicating a horizontal or vertical division direction) may be encoded as 0, 10, and 11 in the order. Here, the meaning of overlap may mean performing horizontal division and vertical division at the same time.

전술한 쿼드트리 분할 및 바이너리 트리 분할은 부호화기 및/또는 복호화기의 설정에 따라 어느 하나가 단독으로 사용되거나 혼용되어 사용될 수 있다. 예컨대, 블록의 크기 또는 형태에 따라서 쿼드트리 또는 바이너리 트리 분할이 결정될 수 있다. 즉, 블록 형태가 M×N이고, M이 N보다 큰 경우에는 가로 분할, 블록 형태가 M×N이고, N이 M보다 큰 경우에는 세로 분할에 따라 바이너리 트리 분할이 지원될 수 있고, 블록 형태가 M×N이고, N과 M인 동일한 경우에는 쿼드트리 분할이 지원될 수 있다.Any one of the above-described quad-tree splitting and binary tree splitting may be used alone or in combination according to settings of an encoder and/or a decoder. For example, the quadtree or binary tree division may be determined according to the size or shape of the block. That is, when the block shape is M×N and M is greater than N, horizontal division, the block shape is M×N, and when N is greater than M, binary tree division may be supported according to vertical division, and block type In the case where is M×N and N and M are the same, quadtree splitting may be supported.

다른 예로, 블록(M×M)의 크기가 블록 분할 경계값(thrblksize)보다 크거나 같은 경우는 바이너리 트리 분할이 지원될 수 있고, 그보다 작은 경우에는 쿼드트리 분할이 지원될 수 있다.As another example, binary tree splitting may be supported when the size of a block (M×M) is greater than or equal to a block splitting boundary value thrblksize, and quadtree splitting may be supported if it is smaller than that.

다른 예로, 블록(M×N)의 M 또는 N이 제1 분할 허용 최대 크기 (Maxblksize1)보다 작거나 같고 제1 분할 허용 최소 크기(Minblksize1)보다 크거나 같을 경우에는 쿼드 트리 분할을 지원하고, 블록(M×N)의 M 또는 N이 제2 분할 허용 최대 크기(Maxblksize2)보다 작거나 같고 제2 분할 허용 최소 크기(Minblksize2)보다 크거나 같을 경우에는 바이너리 트리 분할이 지원될 수도 있다.As another example, when M or N of a block (M×N) is less than or equal to the first allowable maximum size for partitioning (Maxblksize1) and greater than or equal to the first minimum allowable size for partitioning (Minblksize1), quad tree partitioning is supported, and the block Binary tree splitting may be supported when M or N of (M×N) is less than or equal to the second allowable maximum size for splitting (Maxblksize2) and greater than or equal to the second minimum allowable size for splitting (Minblksize2).

만일 상기 분할 허용 최대 크기와 분할 허용 최소 크기로 정의할 수 있는 제1 분할 지원 범위와 제2 분할 지원 범위가 중복되는 경우에는, 부/복호화기의 설정에 따라 제1 또는 제2 분할 방법 중의 우선순위가 주어질 수 있다. 본 실시예에서는 제1의 분할 방법은 쿼드트리 분할, 제2 분할 방법은 바이너리 트리 분할로 예를 들 수 있다. 예를 들어, 제1 분할 허용 최소 크기(Minblksize1)이 16이고 제2 분할 허용 최대 크기(Maxblksize2)가 64이며 분할 전 블록이 64×64 일 경우, 제1 분할 지원 범위와 제2 분할 지원 범위에 모두 속하므로 쿼드 트리 분할과 바이너리 트리 분할이 가능하다.If the first division support range and the second division support range that can be defined by the maximum division size and the minimum division size overlap, the first or the second division method takes precedence according to the setting of the encoder/decoder. A ranking may be given. In this embodiment, the first partitioning method may be quad-tree partitioning, and the second partitioning method may be binary tree partitioning, for example. For example, if the first partition allowable minimum size (Minblksize1) is 16, the second partition allowable maximum size (Maxblksize2) is 64, and the block before division is 64×64, the first partition support range and the second partition support range are Since they belong to all, quad tree splitting and binary tree splitting are possible.

기설정에 따라 제1 분할 방법(본 실시예에서는 쿼드 트리 분할)으로 우선순위가 주어진다면, 분할 플래그(div_flag)가 1일 경우에는 쿼드 트리 분할을 수행하며 추가 쿼드 트리 분할이 가능하고, 0일 경우에는 쿼드 트리 분할을 수행하지 않으며 더 이상 쿼드 트리 분할을 수행하지 않는 것으로 간주할 수 있다. 분할 허용 최소 크기, 분할 허용 깊이 한계 등의 조건에 의해 상기 플래그는 분할 여부에 대해서만 고려하고 추가 분할 여부에 대해서는 고려하지 않을 수 있다.If priority is given to the first division method (quad tree division in this embodiment) according to a preset, when the division flag (div_flag) is 1, quad tree division is performed and additional quad tree division is possible, and 0 In this case, quad-tree splitting is not performed and it can be considered that quad-tree splitting is no longer performed. According to conditions such as the minimum allowable division size and the limit of the allowable division depth, the flag may only consider whether to divide and not consider whether to further divide.

분할 플래그(div_flag)가 1일 경우에는 32×32의 크기를 갖는 4개의 블록으로 분할이 되어 제1 분할 허용 최소 크기(Minblksize1) 보다 크기 때문에 쿼드 트리 분할을 계속 수행할 수 있다. 분할 플래그가 0일 경우에는 추가적인 쿼드 트리 분할을 수행하지 않으며, 현재 블록 크기(64×64)가 상기 제2 분할 지원 범위에 속하게 되므로 바이너리 트리 분할을 수행할 수 있다. 분할 플래그(div_flag/h_v_flag순으로)가 0일 경우에는 더 이상 분할을 수행하지 않으며, 10 또는 11인 경우에는 가로 분할 또는 세로 분할을 수행할 수 있다.When the division flag div_flag is 1, it is divided into four blocks having a size of 32×32 and is larger than the first allowable minimum size for division (Minblksize1), so that quad tree division can be continued. When the split flag is 0, additional quad tree splitting is not performed, and since the current block size (64×64) falls within the second split support range, binary tree splitting can be performed. When the division flag (in the order of div_flag/h_v_flag) is 0, no further division is performed, and when it is 10 or 11, horizontal division or vertical division can be performed.

만일 분할 전 블록이 32×32이며 분할 플래그(div_flag)가 0이라 더 이상 쿼드 트리 분할을 하지 않고 제2 분할 허용 최대 크기(Maxblksize2)가 16일 경우, 현재 블록의 크기(32×32)가 제2 분할 지원 범위에 속하지 않으므로 더 이상의 분할을 지원하지 않을 수 있다. 위 설명에서 분할 방법의 우선순위는 슬라이스 타입, 부호화 모드, 휘도/색차 성분 등 중에서 최소 하나 이상의 요인 또는 이들의 조합에 따라 결정될 수 있다. If the block before division is 32x32 and the division flag (div_flag) is 0 so that no quad tree division is performed and the second division maximum size (Maxblksize2) is 16, the size of the current block (32x32) is Since it does not belong to the 2 partition support range, it may not support further partitioning. In the above description, the priority of the partitioning method may be determined according to at least one factor among a slice type, an encoding mode, a luminance/chrominance component, or the like, or a combination thereof.

다른 예로, 휘도 및 색차 성분에 따라 다양한 설정을 지원할 수 있다. 예를 들어, 휘도 성분에서 결정된 쿼드 트리 또는 바이너리 트리 분할 구조를 색차 성분에서는 추가적인 정보 부/복호화없이 그대로 사용할 수 있다. 또는, 휘도 성분과 색차 성분의 독립적인 분할을 지원할 경우, 휘도 성분에는 쿼드 트리와 바이너리 트리를 함께 지원하고, 색차 성분에는 쿼드 트리 분할을 지원할 수도 있다.As another example, various settings may be supported according to luminance and chrominance components. For example, a quad-tree or binary-tree split structure determined in the luminance component may be used as it is in the chrominance component without additional information encoding/decoding. Alternatively, if independent division of the luminance component and the chrominance component is supported, a quad tree and a binary tree may be supported together for the luminance component, and quad tree division may be supported for the chrominance component.

또한, 휘도와 색차 성분에서 쿼드 트리 분할과 바이너리 트리 분할을 지원하되, 상기 분할 지원 범위가 휘도와 색차 성분에도 동일 또는 비례할 수도 있고, 그렇지 않을 수도 있다. 예를 들어, 컬러 포맷이 4:2:0인 경우일 경우, 색차 성분의 분할 지원 범위가 휘도 성분의 분할 지원 범위의 N/2일 수 있다.In addition, quad tree division and binary tree division are supported in the luminance and chrominance components, but the division support range may or may not be the same or proportional to the luminance and chrominance components. For example, when the color format is 4:2:0, the division support range of the chrominance component may be N/2 of the division support range of the luminance component.

다른 예로, 슬라이스 타입에 따라 다른 설정을 둘 수 있다. 예를 들어, I 슬라이스에서는 쿼드 트리 분할을 지원할 수 있고, P 슬라이스에서는 바이너리 트리 분할을 지원할 수 있고, B 슬라이스에서는 쿼드 트리 분할과 바이너리 트리 분할을 함께 지원할 수 있다.As another example, different settings may be set according to the slice type. For example, I slice may support quad tree splitting, P slice may support binary tree splitting, and B slice may support quad tree splitting and binary tree splitting together.

상기 예와 같이 쿼드 트리 분할 및 바이너리 트리 분할이 다양한 조건에 따라 설정 및 지원될 수 있다. 상기의 예들은 전술한 경우에만 특정하는 것은 아니며 서로의 조건이 뒤바뀌는 경우도 포함할 수 있고, 상기 예에서 언급된 하나 이상의 요인 또는 이들의 조합되는 경우도 포함할 수 있고, 다른 경우의 예로 변형 또한 가능하다. 위의 분할 허용 깊이 한계는 분할 방식(쿼드트리, 바이너리 트리), 슬라이스 타입, 휘도/색차 성분, 부호화 모드 등에서 최소 하나 이상의 요인 또는 이들의 조합에 따라 결정될 수 있다.As in the above example, quad tree splitting and binary tree splitting may be set and supported according to various conditions. The above examples are not specific only to the above cases, and may include cases in which each other's conditions are reversed, and may include one or more factors mentioned in the above examples or a combination thereof. possible. The above partition allowable depth limit may be determined according to at least one factor or a combination thereof, such as a partitioning method (quad tree, binary tree), a slice type, a luminance/chrominance component, an encoding mode, and the like.

또한, 상기 분할 지원 범위는 분할 방식(쿼드트리, 바이너리 트리), 슬라이스 타입, 휘도/색차 성분, 부호화 모드 등에서 최소 하나 이상의 요인에 또는 이들의 조합에 따라 결정될 수 있으며, 관련 정보는 분할 지원 범위의 최대값, 최소값으로 표현할 수 있다. 이에 대한 정보를 명시적 플래그로 구성할 경우, 최대값/최소값 각각의 길이 정보, 또는 최소값과 최대값의 차이값 정보 등을 표현할 수 있다.In addition, the division support range may be determined according to at least one factor or a combination thereof in the division method (quad tree, binary tree), slice type, luminance/chrominance component, encoding mode, etc. It can be expressed as a maximum value and a minimum value. When this information is configured as an explicit flag, information on the length of each of the maximum/minimum values or information on the difference between the minimum and maximum values may be expressed.

예를 들어, 최대값과 최소값이 k의 지수승(k를 2라 가정)으로 구성되어 있을 경우, 최대값과 최소값의 지수 정보를 다양한 이진화를 통해 부호화하여 복호화 장치에 전달할 수 있다. 또는, 최대값과 최소값의 지수의 차이값을 전달할 수 있다. 이 때 전송되는 정보는 최소값의 지수 정보와 지수의 차이값 정보일 수 있다For example, when the maximum value and the minimum value are configured to the power of k (assuming k is 2), exponent information of the maximum value and the minimum value may be encoded through various binarizations and transmitted to the decoding apparatus. Alternatively, a difference value between the exponents of the maximum value and the minimum value may be transmitted. In this case, the transmitted information may be index information of the minimum value and information on the difference value of the index.

전술한 설명에 따라 플래그와 관련한 정보들은 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위에서 생성되고 전송될 수 있다.According to the above description, flag-related information may be generated and transmitted in units of a sequence, a picture, a slice, a tile, a block, and the like.

상기 예시로 제시된 분할 플래그들로 쿼드 트리 또는 바이너리 트리 또는 두 트리 방식의 혼합을 통해 블록 분할 정보를 나타낼 수 있으며, 분할 플래그는 단항 이진화, 절삭형 단항 이진화 등의 다양한 방법으로 부호화하여 관련 정보를 복호화 장치에 전달할 수 있다. 상기 블록의 분할 정보를 표현하기 위한 분할 플래그의 비트스트림 구조는 1개 이상의 스캔 방법 중 선택할 수 있다.The split flags presented as examples above can indicate block split information through a quad tree or binary tree or a mixture of both tree methods, and the split flag is encoded using various methods such as unary binarization and truncation unary binarization to decode related information. can be passed to the device. A bitstream structure of a partition flag for expressing partition information of the block may be selected from one or more scan methods.

예를 들어, 분할 깊이 순서(dep0에서 dep_k순서로) 기준으로 분할 플래그들의 비트스트림을 구성할 수 있고, 분할 여부 기준으로 분할 플래그들의 비트스트림을 구성할 수도 있다. 분할 깊이 순서 기준 방법에서는 최초 블록 기준으로 현 수준의 깊이에서의 분할 정보를 획득한 후 다음 수준의 깊이에서의 분할 정보를 획득하는 방법이며, 분할 여부 기준 방법에서는 최초 블록 기준으로 분할된 블록에서의 추가 분할 정보를 우선적으로 획득하는 방법을 의미하며, 이 외에도 위의 예에서 제시되지 않은 다른 스캔 방법이 포함되어 선택될 수 있다.For example, a bitstream of the division flags may be configured based on the division depth order (in dep0 to dep_k order), and a bitstream of division flags may be configured based on whether division is performed. In the division depth order reference method, division information at the current level is obtained based on the first block, and division information at the next level is obtained. It refers to a method of preferentially acquiring additional segmentation information, and in addition to this, other scan methods not presented in the above example may be included and selected.

또한, 구현에 따라서, 블록 분할부는 전술한 분할 플래그가 아닌 미리 정의된 소정 형태의 블록 후보군에 대한 인덱스 정보를 생성하여 이를 표현할 수 있다. 블록 후보군의 형태는, 예를 들어, 분할 전 블록에서 가질 수 있는 분할 블록의 형태로서 M×N, M/2×N, M×N/2, M/4×N, 3M/4×N, M×N/4, M×3N/4, M/2×N/2 등을 포함할 수 있다.In addition, depending on implementation, the block partitioning unit may generate and express index information on a predefined type of block candidate group instead of the aforementioned partitioning flag. The shape of the block candidate group is, for example, the shape of a divided block that can be in the block before division, such as M×N, M/2×N, M×N/2, M/4×N, 3M/4×N, It may include M×N/4, M×3N/4, M/2×N/2, and the like.

위와 같이 분할 블록의 후보군이 결정되면 상기 분할 블록 형태에 대한 인덱스 정보를 고정 길이 이진화, 단삭 절단형 이진화, 절단형 이진화 등과 같은 다양한 방법을 통해 부호화할 수 있다. 위에서 설명한 분할 플래그와 같이 블록의 분할 깊이, 부호화 모드, 예측 모드, 크기, 형태, 종류 그리고 슬라이스 타입, 분할 허용 깊이 한계, 분할 허용 최소/최대 크기 등의 요인 중 최소 하나 이상의 요인 또는 이들의 조합에 따라 분할 블록 후보군이 결정될 수 있다.When the candidate group of the divided block is determined as described above, the index information of the divided block type can be encoded through various methods such as fixed-length binarization, short-cut binarization, and truncated binarization. Like the partition flag described above, at least one or a combination of factors such as the partition depth, encoding mode, prediction mode, size, shape, type, and slice type, partition allowable depth limit, and partition allowable minimum/maximum size of the block Accordingly, a partition block candidate group may be determined.

다음 설명을 위해서 (M×N, M×N/2)를 후보 리스트1(list1), (M×N, M/2×N, M×N/2, M/2×N/2)를 후보 리스트2(list2), (M×N, M/2×N, M×N/2)를 후보 리스트3(list3), (M×N, M/2×N, M×N/2, M/4×N, 3M/4×N, M×N/4, M×3N/4, M/2×N/2)를 후보 리스트4(list4)로 가정한다. 예를 들어, M×N을 기준으로 설명할 때, (M=N)일 경우에는 후보 list2의 분할 블록 후보를, (M≠N)일 경우에는 후보 list3의 분할 블록 후보를 지원할 수 있다.For the following description, (M×N, M×N/2) is a candidate list 1 (list1), (M×N, M/2×N, M×N/2, M/2×N/2) is a candidate List 2 (list2), (M×N, M/2×N, M×N/2) to candidate list 3 (list3), (M×N, M/2×N, M×N/2, M/ 4xN, 3M/4xN, MxN/4, Mx3N/4, M/2xN/2) are assumed as candidate list 4 (list4). For example, when describing based on M×N, when (M=N), the partition block candidate of candidate list2 can be supported, and when (M≠N), the partition block candidate of candidate list3 can be supported.

다른 예로, M×N의 M 또는 N이 경계값(blk_th)보다 크거나 같을 경우에는 후보 list2의 분할 블록 후보를, 그보다 작을 경우에는 후보 list4의 분할 블록 후보를 지원할 수 있다. 또한, M 또는 N이 제1 경계값(blk_th_1)보다 크거나 같을 경우에는 후보 list1의 분할 블록 후보를, 제1 경계값(blk_th_1)보다는 작지만 제2 경계값(blk_th_2)보다는 크거나 같을 경우에는 후보 list2의 분할 블록 후보를, 제2 경계값(blk_th_2)보다 작을 경우에는 후보 list4의 분할 블록 후보를 지원할 수 있다.As another example, when M or N of M×N is greater than or equal to the boundary value blk_th, the divided block candidate of candidate list2 may be supported, and when smaller than that, the divided block candidate of candidate list4 may be supported. Also, when M or N is greater than or equal to the first boundary value blk_th_1, the partition block candidate of the candidate list1 is selected as a candidate when smaller than the first boundary value blk_th_1 but greater than or equal to the second boundary value blk_th_2. When the divided block candidate of list2 is smaller than the second boundary value blk_th_2, the divided block candidate of candidate list4 may be supported.

다른 예로, 부호화 모드가 화면 내 예측인 경우 후보 list2의 분할 블록 후보를, 화면 간 예측인 경우 후보 list4의 분할 블록 후보를 지원할 수 있다.As another example, if the encoding mode is intra prediction, the split block candidate of candidate list2 may be supported, and if the encoding mode is inter prediction, the split block candidate of candidate list4 may be supported.

상기와 같은 분할 블록 후보가 지원된다 하더라도 각각의 블록에서 이진화에 따른 비트 구성은 같을 수도, 다를 수도 있다. 예를 들어, 위의 분할 플래그에서의 적용과 같이 블록 크기 또는 형태에 따라 지원되는 분할 블록 후보가 제한된다면 해당 블록 후보의 이진화에 따른 비트 구성이 달라질 수 있다. 예컨대, (M>N)일 경우에는 가로 분할에 따른 블록 형태 즉, M×N, M×N/2, M/2×N/2를 지원할 수 있고, 분할 블록 후보군(M×N, M/2×N, M×N/2, M/2×N/2)에서의 M×N/2과 현재 조건의 M×N/2에 따른 인덱스의 이진 비트가 서로 다를 수 있다.Even if the split block candidates as described above are supported, the bit configuration according to binarization in each block may be the same or different. For example, if the supported partition block candidates are limited according to the block size or shape as in the application of the partition flag above, the bit configuration according to the binarization of the corresponding block candidate may vary. For example, in the case of (M>N), block types according to horizontal division, that is, M×N, M×N/2, M/2×N/2 can be supported, and a group of divided block candidates (M×N, M/ The binary bits of the index according to M×N/2 in 2×N, M×N/2, M/2×N/2) and M×N/2 of the current condition may be different from each other.

블록의 종류 예컨대 부호화, 예측, 변환, 양자화, 엔트로피, 인루프 필터링 등에 사용되는 블록의 종류에 따라 분할 플래그 또는 분할 인덱스 방식 중 하나를 사용하여 블록의 분할 및 형태에 대한 정보를 표현할 수 있다. 또한, 각 블록 종류에 따라 분할 및 블록의 형태 지원에 대한 블록 크기 제한 및 분할 허용 깊이 한계 등이 다를 수 있다.According to the type of block, for example, the type of block used for encoding, prediction, transformation, quantization, entropy, in-loop filtering, etc., information on the division and shape of the block may be expressed using either a division flag or a division index method. In addition, depending on the type of each block, a block size limit for partitioning and block shape support, a partition allowable depth limit, etc. may be different.

블록 단위의 부호화 및 복호화 과정은 우선 부호화 블록이 결정된 후, 예측 블록 결정, 변환 블록 결정, 양자화 블록 결정, 엔트로피 블록 결정, 인루프 필터 결정 등의 과정에 따라 부호화 및 복호화를 진행할 수 있다. 상기의 부호화 및 복호화 과정에 대한 순서는 항상 고정적이지 않으며, 일부 순서가 변경되거나 제외될 수 있다. 상기 블록의 크기 및 형태의 후보별 부호화 비용에 따라 각 블록의 크기 및 형태가 결정되고, 결정된 각 블록의 영상 데이터 및 결정된 각 블록의 크기 및 형태 등의 분할 관련 정보들을 부호화할 수 있다.In the block-by-block encoding and decoding process, after a coding block is first determined, encoding and decoding may be performed according to processes such as prediction block determination, transform block determination, quantization block determination, entropy block determination, and in-loop filter determination. The order of the above encoding and decoding processes is not always fixed, and some orders may be changed or excluded. The size and shape of each block may be determined according to the encoding cost of each candidate for the size and shape of the block, and partition-related information such as image data of each determined block and the determined size and shape of each block may be encoded.

예측부(200)는 소프트웨어 모듈인 예측 모듈(prediction module)을 이용하여 구현될 수 있고, 부호화할 블록에 대하여 화면 내 예측 방식이나 화면 간 예측 방식으로 예측 블록을 생성할 수 있다. 여기서, 예측 블록은 화소 차이의 관점에서, 부호화할 블록과 가깝게 일치하는 것으로 이해되는 블록이며, SAD(sum of absolute difference), SSD(sum of square difference)를 포함하는 다양한 방법으로 결정될 수 있다. 또한, 이때 영상 블록들을 복호화시에 사용될 수 있는 각종 구문(syntax)들을 생성할 수도 있다. 예측 블록은 부호화 모드에 따라 화면 내 블록과 화면 간 블록으로 분류될 수 있다.The prediction unit 200 may be implemented using a prediction module, which is a software module, and may generate a prediction block with respect to a block to be encoded using an intra prediction method or an inter prediction method. Here, the prediction block is a block that is understood to closely match the block to be encoded in terms of pixel difference, and may be determined by various methods including sum of absolute difference (SAD) and sum of square difference (SSD). Also, in this case, various syntaxes that can be used when decoding image blocks may be generated. The prediction block may be classified into an intra-picture block and an inter-picture block according to an encoding mode.

화면 내 예측(intra prediction)은 공간적인 상관성을 이용하는 예측 기술로, 현재 픽쳐 내에서 이전에 부호화되고 복호화되어 복원된 블록들의 참조 화소들을 이용하여 현재 블록을 예측하는 방법을 말한다. 즉, 화면 내 예측과 복원으로 재구성된 밝기 값을 부호화기 및 복호화기에서 참조 화소로 사용할 수 있다. 화면 내 예측은 연속성을 갖는 평탄한 영역 및 일정한 방향성을 가진 영역에 대해 효과적일 수 있으며, 공간적인 상관성을 이용하기 때문에 임의 접근(random access)을 보장하고, 오류 확산을 방지하는 목적으로 사용될 수 있다.Intra prediction is a prediction technique using spatial correlation, and refers to a method of predicting a current block using reference pixels of previously encoded, decoded, and reconstructed blocks within the current picture. That is, the brightness value reconstructed through intra prediction and restoration may be used as a reference pixel in the encoder and the decoder. The intra prediction may be effective for a flat area having continuity and a region having a constant direction, and may be used for the purpose of ensuring random access and preventing error diffusion because spatial correlation is used.

화면 간 예측(inter prediction)은 하나 이상의 과거 또는 미래 픽쳐에서 부호화된 영상을 참조하여 시간적인 상관성을 이용하여 데이터의 중복을 제거하는 압축 기법을 이용한다. 즉, 화면 간 예측은 하나 이상의 과거 또는 미래 픽쳐를 참조함으로써 높은 유사성을 갖는 예측 신호를 생성할 수 있다. 화면 간 예측을 이용하는 부호화기에서는 참조 픽쳐에서 현재 부호화하려는 블록과 상관도가 높은 블록을 탐색하고, 선택된 블록의 위치 정보와 잔차(residue) 신호를 복호화기로 전송할 수 있고, 복호화기는 전송된 영상의 선택 정보를 이용하여 부호화기와 동일한 예측 블록을 생성하고 전송된 잔차 신호를 보상하여 복원 영상을 구성할 수 있다.Inter prediction uses a compression technique that removes data duplication by using temporal correlation with reference to an image encoded in one or more past or future pictures. That is, the inter prediction may generate a prediction signal with high similarity by referring to one or more past or future pictures. An encoder using inter prediction may search a reference picture for a block having a high correlation with a block to be currently encoded, and transmit location information and a residual signal of the selected block to a decoder, and the decoder may select information on the transmitted image can be used to generate the same prediction block as the encoder and compensate for the transmitted residual signal to compose a reconstructed image.

도 4는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 P 슬라이스의 화면 간 예측을 나타낸 예시도이다. 도 5는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 B 슬라이스의 화면 간 예측을 나타낸 예시도이다.4 is an exemplary diagram illustrating inter prediction of a P slice in an image encoding and decoding method according to an embodiment of the present invention. 5 is an exemplary diagram illustrating inter prediction of a B slice in a video encoding and decoding method according to an embodiment of the present invention.

본 실시예의 영상 부호화 방법에서, 화면 간 예측은 시간적으로 높은 상관성이 있는 이전에 부호화된 픽쳐로부터 예측 블록을 생성하기 때문에 부호화 효율을 높일 수 있다. Current(t)는 부호화할 현재 픽쳐를 의미할 수 있고, 영상 픽쳐의 시간적인 흐름 혹은 POC(picture order count)를 기준으로 할 때 현재 픽쳐의 POC보다 이전의 제1 시간적인 거리(t-1)를 가지는 제1 참조픽쳐와 제1 시간적인 거리 이전의 제2 시간적인 거리(t-2)를 가지는 제2 참조픽쳐를 포함할 수 있다.In the video encoding method of the present embodiment, since inter prediction generates a prediction block from a previously encoded picture having high temporal correlation, encoding efficiency may be increased. Current(t) may mean a current picture to be encoded, and based on a temporal flow of video pictures or a picture order count (POC), a first temporal distance (t-1) before the POC of the current picture It may include a first reference picture having a and a second reference picture having a second temporal distance t-2 before the first temporal distance.

즉, 도 4에 도시한 바와 같이, 본 실시예의 영상 부호화 방법에 채용할 수 있는 화면 간 예측은 현재 픽쳐(current(t))의 현재 블록과 참조 픽쳐들(t-1, t-2)의 참조 블록들의 블록 매칭을 통해 상관성이 높은 블록을 이전에 부호화가 완료된 참조 픽쳐들(t-1, t-2)로부터 최적의 예측 블록을 찾는 움직임 추정을 수행할 수 있다. 정밀한 추정을 위해 필요에 따라 인접한 두 화소들 사이에 적어도 하나 이상의 부화소가 배열된 구조에 기반하는 보간(interpolation) 과정을 수행한 후, 최적의 예측 블록을 찾은 후 움직임 보상을 하여 최종적인 예측 블록을 찾을 수 있다.That is, as shown in FIG. 4 , inter prediction that can be employed in the video encoding method of the present embodiment is performed between the current block of the current picture current(t) and the reference pictures t-1 and t-2. Through block matching of reference blocks, motion estimation may be performed to find an optimal prediction block from reference pictures (t-1, t-2) in which blocks with high correlation have been previously encoded. After performing an interpolation process based on a structure in which at least one or more sub-pixels are arranged between two adjacent pixels as needed for precise estimation, an optimal prediction block is found and motion compensation is performed to obtain a final prediction block can be found

또한, 도 5에 도시한 바와 같이, 본 실시예의 영상 부호화 방법에 채용할 수 있는 화면 간 예측은 현재 픽쳐(current(t))를 기준으로 시간적으로 양방향에 존재하는 이미 부호화가 완료된 참조 픽쳐들(t-1, t+1)로부터 예측 블록을 생성할 수 있다. 또한, 1개 이상의 참조 픽쳐에서 2개의 예측 블록을 생성할 수 있다.In addition, as shown in FIG. 5 , the inter prediction that can be employed in the video encoding method of the present embodiment includes reference pictures ( A prediction block may be generated from t-1, t+1). Also, two prediction blocks may be generated from one or more reference pictures.

화면 간 예측을 통해 영상의 부호화를 수행할 경우, 최적의 예측 블록에 대한 움직임 벡터 정보와 참조 픽쳐에 대한 정보를 부호화한다. 본 실시예에서는 단방향 또는 양방향으로 예측 블록을 생성할 경우 참조 픽쳐 리스트를 달리 구성하여 해당 참조 픽쳐 리스트로부터 예측 블록을 생성할 수 있다. 기본적으로 시간적으로 현재 픽쳐 이전에 존재하는 참조 픽쳐는 리스트 0(L0)에 할당하여 관리되고 현재 픽쳐 이후에 존재하는 참조 픽쳐는 리스트 1(L1)에 할당하여 관리될 수 있다.When an image is encoded through inter prediction, motion vector information on an optimal prediction block and information on a reference picture are encoded. In the present embodiment, when a prediction block is generated unidirectionally or bidirectionally, a reference picture list may be configured differently to generate a prediction block from the reference picture list. Basically, a reference picture existing temporally before the current picture may be managed by allocating it to a list 0 (L0), and a reference picture existing after the current picture may be allocated and managed by allocating it to a list 1 (L1).

참조 픽쳐 리스트 0를 구성할 때, 참조 픽쳐 리스트 0의 참조 픽쳐 허용 개수까지 채우지 못할 경우 현재 픽쳐 이후에 존재하는 참조 픽쳐를 할당할 수 있다. 이와 비슷하게 참조 픽쳐 리스트 1을 구성할 때, 참조 픽쳐 리스트 1의 참조 픽쳐 허용 개수까지 채우지 못할 경우 현재 픽쳐 이전에 존재하는 참조 픽쳐를 할당할 수 있다.When composing the reference picture list 0, if the reference picture list 0 does not fill up to the allowable number of reference pictures, reference pictures existing after the current picture may be allocated. Similarly, when composing the reference picture list 1, if the reference picture list 1 does not fill up to the allowable number of reference pictures, a reference picture existing before the current picture may be allocated.

도 6은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 단방향으로 예측 블록을 생성하는 경우를 설명하기 위한 예시도이다.6 is an exemplary diagram for explaining a case of generating a prediction block unidirectionally in an image encoding and decoding method according to an embodiment of the present invention.

도 6을 참조하면, 본 실시예에 따른 영상 부호화 및 복호화 방법에서는 기존과 같이 이전에 부호화된 참조 픽쳐(t-1, t-2)로부터 예측 블록을 찾을 수 있고, 이에 더하여 현재 픽쳐(current(t))에 이미 부호화가 완료된 영역으로부터 예측 블록을 찾을 수 있다.Referring to FIG. 6 , in the image encoding and decoding method according to the present embodiment, a prediction block can be found from previously encoded reference pictures t-1 and t-2, and in addition to the current picture (current( t)), the prediction block can be found from the region that has already been coded.

즉, 본 실시예에 따른 영상 부호화 및 복호화 방법에서는, 시간적으로 높은 상관성이 있는 이전에 부호화된 픽쳐(t-1, t-2)로부터 예측 블록을 생성한 것뿐만 아니라 공간적으로 상관성이 높은 예측 블록을 함께 찾도록 구현될 수 있다. 그러한 공간적으로 상관성이 높은 예측 블록을 찾는 것은 화면 내 예측의 방식으로 예측 블록을 찾는 것에 대응할 수 있다. 현재 픽쳐에서 부호화가 완료된 영역으로부터 블록 매칭을 수행하기 위해, 본 실시예의 영상 부호화 방법은 화면 내 예측 모드와 혼합하여 예측 후보와 관련된 정보에 대한 신택스(syntax)를 구성할 수 있다.That is, in the video encoding and decoding method according to the present embodiment, not only the prediction block is generated from the previously coded pictures t-1 and t-2 having high temporal correlation, but also the prediction block with high spatial correlation can be implemented to find together. Finding such a spatially highly correlated prediction block may correspond to finding the prediction block in the manner of intra prediction. In order to perform block matching from an encoded region in the current picture, the image encoding method of the present embodiment may be mixed with an intra prediction mode to construct a syntax for information related to a prediction candidate.

예를 들어, n(n은 임의의 자연수) 가지의 화면 내 예측 모드를 지원하는 경우, 한 가지 모드를 화면 내 예측 후보군에 추가하여 n+1가지 모드를 지원하며 2M-1≤n+1<2M 를 만족시키는 M개의 고정 비트를 사용하여 예측 모드를 부호화할 수 있다. 또한, HEVC의 MPM(most probable mode)와 같이 가능성 높은 예측 모드의 후보군 중에서 선택하도록 구현될 수 있다. 또한, 예측 모드 부호화의 상위 단계에서 우선적으로 부호화할 수도 있다.For example, when n (n is an arbitrary natural number) intra-prediction modes are supported, one mode is added to the intra-prediction candidate group to support n+1 modes, and 2 M-1 ≤ n+1 A prediction mode may be coded using M fixed bits satisfying <2 M. In addition, it may be implemented to select from a candidate group of a highly probable prediction mode, such as the most probable mode (MPM) of HEVC. In addition, encoding may be preferentially performed in a higher stage of prediction mode encoding.

현재 픽쳐에서 블록 매칭을 통해 예측 블록을 생성할 경우, 본 실시예의 영상 부호화 방법은 화면 간 예측 모드와 혼합하여 관련된 정보에 대한 신택스를 구성할 수도 있다. 추가적인 관련 예측 모드 정보로는 움직임 또는 이동(motion or displacement) 관련 정보가 이용될 수 있다. 움직임 또는 이동 관련 정보는 여러 벡터 후보 중 최적의 후보 정보, 최적의 후보 벡터와 실제 벡터와의 차분치, 참조 방향, 참조 픽쳐 정보 등을 포함할 수 있다.When a prediction block is generated through block matching in the current picture, the image encoding method of the present embodiment may configure a syntax for related information by mixing with the inter prediction mode. As additional related prediction mode information, motion or displacement related information may be used. The motion or movement-related information may include optimal candidate information among multiple vector candidates, a difference value between an optimal candidate vector and an actual vector, a reference direction, reference picture information, and the like.

도 7은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 참조 픽쳐 리스트를 구성하는 예시도이다. 도 8은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 참조 픽쳐 리스트로부터 화면 간 예측을 수행하는 경우의 다른 예를 나타낸 예시도이다.7 is an exemplary diagram of configuring a reference picture list in an image encoding and decoding method according to an embodiment of the present invention. 8 is an exemplary diagram illustrating another example of performing inter prediction from a reference picture list in an image encoding and decoding method according to an embodiment of the present invention.

도 7을 참조하면, 본 실시예에 따른 영상 부호화 방법은, 현재 픽쳐(current(t))의 현재 블록에 대하여 제1 참조픽쳐 리스트(reference list 0, L0)와 제2 참조픽쳐 리스트(reference list 1, L1)로부터 화면 간 예측을 수행할 수 있다.Referring to FIG. 7 , in the image encoding method according to the present embodiment, a first reference picture list (reference list 0, L0) and a second reference picture list (reference list) with respect to a current block of a current picture (current(t)) 1, L1), inter prediction can be performed.

도 7 및 도 8을 참조하면, 참조 픽쳐 리스트 0은 현재 픽쳐(t) 이전의 참조 픽쳐로 구성할 수 있는데, t-1, t-2는 각각 현재 픽쳐(t)의 POC보다 이전의 제1 시간적인 거리(t-1), 제2 시간적인 거리(t-2)를 가지는 참조 픽쳐들을 지시한다. 또한, 참조 픽쳐 리스트 1은 현재 픽쳐(t) 이후의 참조 픽쳐로 구성할 수 있는데, t+1, t+2는 각각 현재 픽쳐(t)의 POC보다 이후의 제1 시간적인 거리(t+1), 제2 시간적인 거리(t+2)를 가지는 참조 픽쳐들을 지시한다. Referring to FIGS. 7 and 8 , the reference picture list 0 may consist of reference pictures before the current picture (t), where t-1 and t-2 are the first first before the POC of the current picture (t), respectively. Reference pictures having a temporal distance t-1 and a second temporal distance t-2 are indicated. In addition, the reference picture list 1 may consist of reference pictures after the current picture (t), where t+1 and t+2 are respectively a first temporal distance (t+1) after the POC of the current picture (t). ), indicating reference pictures having a second temporal distance (t+2).

참조 픽쳐 리스트 구성에 관한 전술한 예들은 시간적인 거리(본 예에서는 POC 기준)의 차이가 1인 참조 픽쳐들로 참조 픽쳐 리스트를 구성하는 예를 나타내고 있으나, 참조 픽쳐간의 시간적인 거리 차이를 다르게 구성할 수도 있다. 즉, 참조 픽쳐들의 인덱스 차이와 참조 픽쳐들의 시간적인 거리 차이가 비례하지 않을 수 있다는 것을 의미한다. 또한, 리스트 구성 순서를 시간적인 거리 기준으로 구성되지 않을 수도 있다. 이에 대한 내용은 후술할 참조 픽쳐 리스트 구성 예에서 확인할 수 있다.The above-described examples of the reference picture list configuration show an example of configuring the reference picture list with reference pictures having a difference in temporal distance (based on POC in this example) of 1, but the difference in temporal distance between reference pictures is configured differently You may. That is, it means that the index difference of the reference pictures and the temporal distance difference of the reference pictures may not be proportional. In addition, the list construction order may not be configured based on a temporal distance. This can be confirmed in the reference picture list configuration example to be described later.

슬라이스 타입(I, P 또는 B)에 따라 리스트에 있는 참조 픽쳐로부터 예측을 수행할 수 있다. 그리고 현재 픽쳐(current(t))에서 블록 매칭을 통해 예측 블록을 생성할 경우, 참조 픽쳐 리스트(reference list 0 및/또는 reference list 1)에 현재 픽쳐를 추가하여 화면 간 예측 방식으로 부호화를 수행할 수 있다.Prediction may be performed from reference pictures in the list according to the slice type (I, P, or B). And when a prediction block is generated through block matching in the current picture (current(t)), encoding is performed in an inter prediction method by adding the current picture to a reference picture list (reference list 0 and/or reference list 1). can

도 8에 도시한 바와 같이 참조 픽쳐 리스트 0(reference list 0)에 현재 픽쳐(t)를 추가하거나 또는 참조 픽쳐 리스트 1(reference list 1)에 현재 픽쳐(current(t))를 추가할 수 있다. 즉, 참조 픽쳐 리스트 0은 현재 픽쳐(t) 이전의 참조 픽쳐에 시간적인 거리(t)인 참조 픽쳐를 추가하여 구성할 수 있고, 참조 픽쳐 리스트 1은 현재 픽쳐(t) 이후의 참조 픽쳐에 시간적인 거리(t)인 참조 픽쳐를 추가하여 구성할 수도 있다. As shown in FIG. 8 , a current picture t may be added to a reference picture list 0 or a current picture current(t) may be added to a reference picture list 1 . That is, the reference picture list 0 can be configured by adding a reference picture having a temporal distance (t) to the reference picture before the current picture (t), and the reference picture list 1 is the reference picture after the current picture (t) in time It can also be configured by adding a reference picture that is a specific distance t.

예를 들어, 참조 픽쳐 리스트 0를 구성할 때 현재 픽쳐 이전의 참조 픽쳐를 참조 픽쳐 리스트 0에 할당하고 이어 현재 픽쳐(t)를 할당할 수 있고, 참조 픽쳐 리스트 1을 구성할 때 현재 픽쳐 이후의 참조 픽쳐를 참조 픽쳐 리스트 1에 할당하고 이어 현재 픽쳐(t)를 할당할 수 있다. 또는, 참조 픽쳐 리스트 0를 구성할 때 현재 픽쳐(t)를 할당하고 이어 현재 픽쳐 이전의 참조 픽쳐를 할당할 수 있고, 참조 픽쳐 리스트 1을 구성할 때 현재 픽쳐(t)를 할당하고 이어 현재 픽쳐 이후의 참조 픽쳐를 할당할 수 있다.For example, when constructing reference picture list 0, a reference picture before the current picture may be assigned to reference picture list 0, and then the current picture (t) may be assigned, and when constructing reference picture list 1, a reference picture after the current picture The reference picture may be allocated to the reference picture list 1, and then the current picture (t) may be allocated. Alternatively, the current picture (t) may be allocated when configuring the reference picture list 0, and then the reference picture before the current picture may be allocated, and when configuring the reference picture list 1, the current picture (t) is allocated and then the current picture Subsequent reference pictures may be allocated.

또한, 참조 픽쳐 리스트 0을 구성할 때 현재 픽쳐 이전의 참조 픽쳐를 할당하고 이어 현재 픽쳐 이후의 참조 픽쳐를 할당하고 현재 픽쳐(t)를 할당할 수 있다. 이와 비슷하게 참조 픽쳐 리스트 1을 구성할 때 현재 픽쳐 이후의 참조 픽쳐를 할당하고 이어 현재 픽쳐 이전의 참조 픽쳐를 할당하고 현재 픽쳐(t)를 할당할 수 있다. 위의 예들은 전술한 경우에만 특정하는 것은 아니며 서로의 조건이 뒤바뀌는 경우도 포함할 수 있고, 다른 경우의 예로 변형 또한 가능하다. Also, when constructing the reference picture list 0, a reference picture before the current picture may be allocated, then a reference picture after the current picture may be allocated, and the current picture t may be allocated. Similarly, when constructing the reference picture list 1, a reference picture after the current picture may be allocated, then a reference picture before the current picture may be allocated, and the current picture t may be allocated. The above examples are not specific only to the above-described case, and may include a case in which each other's conditions are reversed, and variations in other cases are also possible.

각 참조 픽쳐 리스트에 현재 픽쳐를 포함할 지 여부(예를 들어, 어떤 리스트에도 추가하지 않음 또는 리스트 0에만 추가 또는 리스트 1에만 추가 또는 리스트 0와 1에 같이 추가)는 부호화기/복호화기에 동일한 설정이 가능하고, 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송이 가능하다. 이에 대한 정보는 고정 길이 이진화, 단삭 절단형 이진화, 절단형 이진화 등의 방법을 통해 부호화될 수 있다.Whether or not to include the current picture in each reference picture list (e.g., do not add to any list or add to list 0 only or add to list 1 only or add to list 0 and 1 together) has the same setting in the encoder/decoder possible, and information on this can be transmitted in units of sequences, pictures, slices, and the like. This information may be encoded through a method such as fixed-length binarization, short cut-type binarization, or cut-type binarization.

본 실시예의 영상 부호화 및 복호화 방법은, 도 7의 방법과 달리, 현재 픽쳐(t)에서 블록 매칭을 수행하여 예측 블록을 선택하고, 이러한 예측 블록에 대한 관련 정보를 포함하는 참조 픽쳐 리스트를 구성하며, 이러한 참조 픽쳐 리스트를 영상 부호화 및 복호화에 이용하는데 차이가 있다.Unlike the method of FIG. 7, the image encoding and decoding method of this embodiment selects a prediction block by performing block matching on the current picture t, and constructs a reference picture list including information related to the prediction block, , there is a difference in using this reference picture list for video encoding and decoding.

참조 픽쳐 리스트 구성에 있어서 각 리스트 구성 순서 및 규칙, 각 리스트의 참조 픽쳐 허용 개수에 대한 설정을 달리할 수 있는데, 이는 현재 픽쳐의 리스트 포함여부(현재 픽쳐를 화면 간 예측에서의 참조 픽쳐로 포함할지 여부), 슬라이스 타입, 리스트 재구성 파라미터(리스트 0, 1에 각각 적용될 수도 있고, 리스트 0, 1에 같이 적용될 수도 있음), GOP(Group of Picture) 내의 위치, 시간적 계층 정보(temporal id) 등의 여러 요인 중 최소 하나 이상의 요인 또는 이들의 조합에 따라 결정될 수도 있고, 명시적으로 관련 정보를 시퀀스, 픽쳐 등의 단위로 전송할 수 있다.In the reference picture list configuration, the settings for each list configuration order and rule, and the allowable number of reference pictures in each list can be changed, which is whether the current picture is included in the list (whether the current picture is included as a reference picture in inter prediction) or not), slice type, list reconstruction parameters (which may be applied to lists 0 and 1, respectively, or may be applied to lists 0 and 1 together), location in a GOP (Group of Picture), temporal hierarchical information (temporal id), etc. It may be determined according to at least one of the factors or a combination thereof, and related information may be explicitly transmitted in units of sequences, pictures, or the like.

예를 들어, P 슬라이스인 경우 현재 픽쳐를 리스트에 포함하는 것과 관계없이 참조 픽쳐 리스트 0은 리스트 구성 규칙 A에 따를 수 있고, B 슬라이스인 경우 현재 픽쳐를 리스트에 포함하는 참조 픽쳐 리스트 0에는 리스트 구성 규칙 B, 참조 픽쳐 리스트 1에는 리스트 구성 규칙 C를 따를 수 있고, 현재 픽쳐를 포함하지 않는 참조 픽쳐 리스트 0에는 리스트 구성 규칙 D, 참조 픽쳐 리스트 1에는 리스트 구성 규칙 E에 따를 수 있으며, 리스트 구성 규칙 중 B와 D, C와 E는 같을 수도 있다.For example, in the case of a P slice, the reference picture list 0 may follow the list construction rule A regardless of including the current picture in the list, and in the case of a B slice, the reference picture list 0 including the current picture in the list consists of a list Rule B, the list construction rule C may be followed for the reference picture list 1, the list construction rule D for the reference picture list 0 that does not contain the current picture, and the list construction rule E for the reference picture list 1 may be followed, and the list construction rule Among them, B and D and C and E may be the same.

리스트 구성 규칙은 상기 참조 픽쳐 리스트 구성 예에서 설명된 것과 같거나 변형된 방식으로 구성될 수 있다. 다른 예로, 현재 픽쳐를 리스트에 포함하는 경우에는 제1 참조 픽쳐 허용 개수, 포함하지 않는 경우에는 제2 참조 픽쳐 허용 개수를 설정할 수 있다. 제1 참조 픽쳐 허용 개수와 제2 참조 픽쳐 허용 개수는 같을 수도 있고 다를 수도 있으며, 제1 참조 픽쳐 허용 개수와 제2 참조 픽쳐 허용 개수의 차이가 1인 것을 기본 설정으로 둘 수도 있다.The list construction rule may be configured in the same or modified manner as described in the reference picture list construction example. As another example, when the current picture is included in the list, the allowable number of first reference pictures may be set, and when the current picture is not included in the list, the allowed number of second reference pictures may be set. The allowable number of first reference pictures and the allowable number of second reference pictures may be the same or different, and a difference between the allowable number of first reference pictures and the allowable second reference pictures may be set as a default setting.

다른 예로, 현재 픽쳐를 리스트에 포함하며 리스트 재구성 파라미터가 적용될 경우, 슬라이스 A에서는 모든 참조 픽쳐가 리스트 재구성 후보군이 될 수 있고, 슬라이스 B에서는 리스트 재구성 후보군에 일부 참조 픽쳐만 포함될 수 있다. 이 때, 슬라이스 A 또는 B는 현재 픽쳐의 리스트 포함여부, 시간적 계층 정보, 슬라이스 타입, GOP 내의 위치 등에 구분될 수 있고, 후보군에 포함 여부를 나누는 요인으로 참조 픽쳐의 POC 또는 참조 픽쳐 인덱스, 참조 예측 방향(현재 픽쳐 전/후), 현재 픽쳐 여부 등에 의해 결정될 수 있다. As another example, when the current picture is included in the list and the list reconstruction parameter is applied, all reference pictures may become a list reconstruction candidate group in slice A, and only some reference pictures may be included in the list reconstruction candidate group in slice B. At this time, slice A or B can be divided into whether or not the list of current pictures is included, temporal hierarchical information, slice type, position in the GOP, etc. It may be determined by the direction (before/after the current picture), whether the current picture is present, or the like.

전술한 구성에 의하면, 현재 픽쳐에서 화면 간 예측으로 부호화된 참조 블록을 이용할 수 있으므로, I 슬라이스의 움직인 예측에서도 화면 간 예측을 허용 또는 이용할 수 있게 된다.According to the above configuration, since the reference block encoded by inter prediction in the current picture can be used, inter prediction can be allowed or used even in I-slice motion prediction.

또한, 참조 픽쳐 리스트를 구성할 때, 슬라이스 타입에 따라 인덱스 할당 또는 리스트 구성 순서를 달리할 수 있다. I 슬라이스의 경우, 현재 픽쳐(current(t))에서 상기 참조 픽쳐 리스트 구성 예와 같이 우선순위를 높게 하여 더 적은 인덱스(예를 들어, idx=0, 1, 2와 같이)를 사용하고, 해당 참조 픽쳐 리스트의 참조 픽쳐 허용 개수(C)를 최대값으로 하는 이진화(고정 길이 이진화, 단삭 절단형 이진화, 절단형 이진화 등) 통해 영상 부호화에서의 비트량을 줄일 수 있다.In addition, when constructing the reference picture list, index allocation or list construction order may be changed according to slice types. In the case of I slice, the current picture (current(t)) uses fewer indexes (eg, idx=0, 1, 2) by increasing the priority as in the reference picture list configuration example above, and the corresponding The amount of bits in image encoding can be reduced through binarization (fixed-length binarization, short-cut binarization, truncated binarization, etc.) in which the allowable number of reference pictures (C) of the reference picture list is the maximum value.

또한, P 또는 B 슬라이스의 경우, 현재 픽쳐에서 블록 매칭을 수행하여 현재 블록의 참조 픽쳐를 예측 후보로 선택할 확률이 다른 참조 픽쳐를 통해 예측 후보를 선택하는 확률보다 낮다고 판단되는 상황이라 하면, 현재 픽쳐의 블록 매칭에 대한 우선순위를 뒤로 설정하여 더 높은 인덱스(예를 들어, idx= C, C-1와 같이)를 사용하여 해당 참조 픽쳐 리스트의 참조 픽쳐 허용 개수를 최대값으로 하는 다양한 방법의 이진화를 통해 영상 부호화에서의 비트량을 줄일 수 있다.In addition, in the case of a P or B slice, if it is determined that the probability of selecting the reference picture of the current block as a prediction candidate by performing block matching on the current picture is lower than the probability of selecting a prediction candidate through other reference pictures, the current picture Binarization of various methods to set the priority for block matching of It is possible to reduce the amount of bits in video encoding.

위의 예에서 현재 픽쳐의 우선순위 설정은 상기 참조 픽쳐 리스트 구성 예에서 설명된 것과 같거나 변형된 방식으로 구성될 수 있다. 또한, 슬라이스 타입에 따라(예를 들어, I 슬라이스) 참조 픽쳐 리스트를 구성하지 않음으로써 참조 픽쳐에 대한 정보를 생략하는 것이 가능하다. 예컨대, 기존의 화면 간 예측을 통해 예측 블록을 생성하되 화면 간 예측 모드에서의 움직임 정보에서 참조 픽쳐 정보를 제외한 나머지로 화면간 예측 정보를 표현할 수 있다.In the above example, the priority setting of the current picture may be configured in the same or modified manner as described in the reference picture list configuration example. In addition, it is possible to omit information about the reference picture by not configuring the reference picture list according to the slice type (eg, I slice). For example, a prediction block may be generated through the existing inter prediction, but the inter prediction information may be expressed by excluding the reference picture information from the motion information in the inter prediction mode.

현재 픽쳐에서 블록 매칭을 수행하는 방식은 슬라이스 타입에 따라 지원 여부를 결정할 수 있다. 예를 들어, 현재 블록에서의 블록 매칭을 I 슬라이스에서는 지원하지만 P 슬라이스나 B 슬라이스에서는 지원하지 않도록 설정할 수도 있고, 다른 예로의 변형 또한 가능하다. 또한, 현재 픽쳐에서 블록 매칭을 지원하는 방식은 픽쳐, 슬라이스, 타일 등 단위로 지원 여부를 결정할 수도 있고, GOP 내의 위치, 시간적 계층 정보(temporal ID) 등에 따라 결정할 수도 있다. 이러한 설정 정보는 영상 부호화 과정이나 부호화기에서 복호화기로 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송될 수 있다.A method of performing block matching in the current picture may determine whether to support it according to a slice type. For example, it may be set that block matching in the current block is supported in the I slice but not in the P slice or the B slice, and a modification to another example is also possible. In addition, the method of supporting block matching in the current picture may be determined in units of pictures, slices, tiles, etc., or may be determined according to a location in a GOP, temporal hierarchical information (temporal ID), and the like. Such setting information may be transmitted in units of sequences, pictures, slices, etc., during an image encoding process or from an encoder to a decoder.

또한, 상위 레벨 단위에서 위와 관련된 설정 정보 또는 신택스가 존재하며 설정 관련 동작이 온(on)되는 상황이라도 하위 레벨 단위에서 위와 동일한 설정 정보 또는 신택스가 존재할 때, 하위 레벨 단위에서의 설정 정보가 상위 레벨 단위에서의 설정 정보를 우선할 수 있다. 예를 들어, 동일 또는 유사한 설정 정보를 시퀀스, 픽쳐, 슬라이스에서 처리한다면, 시퀀스 단위보다는 픽쳐 단위가, 픽쳐 단위보다는 슬라이스 단위가 우선순위를 가질 수 있다.In addition, even when the above-related setting information or syntax exists in the upper level unit and the setting-related operation is on, when the same setting information or syntax as above exists in the lower level unit, the setting information in the lower level unit is displayed at the upper level The setting information in the unit may be given priority. For example, if the same or similar configuration information is processed in a sequence, picture, or slice, a picture unit may have priority over a sequence unit, and a slice unit may have priority over a picture unit.

도 9는 본 발명의 일실시예에 따른 영상 부호화 방법에서 화면 내 예측을 설명하기 위한 예시도이다.9 is an exemplary diagram for explaining intra prediction in an image encoding method according to an embodiment of the present invention.

도 9를 참조하면, 본 실시예에 따른 화면 내 예측 방법은, 참조 화소 채움(reference sample padding), 참조 화소 필터링(reference sample filtering), 화면 내 예측(intra prediciton) 및 경계 필터링(boundary filtering)의 일련의 단계들을 포함할 수 있다.Referring to FIG. 9 , the intra prediction method according to the present embodiment includes reference sample padding, reference sample filtering, intra prediction, and boundary filtering. It may include a series of steps.

참조 화소 채움 단계는 참조 화소 구성 단계의 예시일 수 있고, 참조 화소 필터링 단계는 참조 화소 필터부에 의해 실행될 수 있고, 화면 내 예측은 예측 블록 생성 단계와 예측 모드 부호화 단계를 포함할 수 있으며, 경계 필터링은 후처리 필터 단계의 일실시예에 대한 예시일 수 있다.The reference pixel filling step may be an example of the reference pixel construction step, the reference pixel filtering step may be executed by the reference pixel filter unit, and the intra prediction may include a prediction block generation step and a prediction mode encoding step, Filtering may be an example of one embodiment of a post-processing filter step.

즉, 본 실시예의 영상 부호화 방법에서 실행되는 화면 내 예측은 참조 화소 구성 단계, 참조 화소 필터링 단계, 예측 블록 생성 단계, 예측 모드 부호화 단계 및 후처리 필터링 단계를 포함할 수 있다. 여러 가지 환경 요인 예컨대, 블록 크기, 블록 형태, 블록 위치, 예측 모드, 예측 방법, 양자화 파라미터 등에 따라서 전술한 과정들 중 하나 또는 일부는 생략될 수 있고, 다른 과정이 추가될 수도 있으며, 위에 기재된 순서가 아닌 다른 순서로 변경될 수 있다.That is, the intra prediction performed in the image encoding method of the present embodiment may include a reference pixel construction step, a reference pixel filtering step, a prediction block generation step, a prediction mode encoding step, and a post-processing filtering step. Depending on various environmental factors, such as block size, block shape, block position, prediction mode, prediction method, quantization parameter, etc., one or some of the above-described processes may be omitted, and other processes may be added, and the order described above may be changed in an order other than .

전술한 참조 화소 구성 단계, 참조 화소 필터링 단계, 예측 블록 생성 단계, 예측 모드 부호화 단계 및 후처리 필터링 단계는 메모리에 저장되는 소프트웨어 모듈들을 메모리에 연결되는 프로세서가 실행하는 형태로 구현될 수 있다. 따라서 이하의 설명에서는 설명의 편의상 각 단계를 구현하는 소프트웨어 모듈과 이를 실행하는 프로세서의 조합에 의해 생성되는 기능부 및/혹은 이러한 기능부의 기능을 수행하는 구성부로서 각각 참조 화소 구성부, 참조 화소 필터부, 예측 블록 생성부, 예측 모드 부호화부 및 후처리 필터부를 각 단계의 실행 주체로서 지칭하기로 한다.The above-described reference pixel construction step, reference pixel filtering step, prediction block generation step, prediction mode encoding step, and post-processing filtering step may be implemented in a form in which a processor connected to the memory executes software modules stored in the memory. Therefore, in the following description, for convenience of explanation, a function unit generated by a combination of a software module implementing each step and a processor executing the same and/or a component performing the function of such a function unit, respectively, a reference pixel component and a reference pixel filter The unit, the prediction block generator, the prediction mode encoder, and the post-processing filter will be referred to as execution subjects of each step.

각 구성요소를 좀더 구체적으로 설명하면, 참조 화소 구성부는 참조 화소 채움을 통해 현재 블록의 예측에 사용될 참조 화소를 구성한다. 참조 화소가 존재하지 않거나 이용 불가한 경우, 참조 화소 채움은 이용가능한 가까운 화소로부터 값을 복사하는 등의 방법을 통해 참조 화소에 사용될 수 있다. 값의 복사 등에는 복원된 픽쳐 버퍼 또는 복호화 픽쳐 버퍼(decoded picture buffer, DPB)가 이용될 수 있다.When each component is described in more detail, the reference pixel component configures a reference pixel to be used for prediction of the current block by filling the reference pixel. If the reference pixel does not exist or is unavailable, the reference pixel fill can be used for the reference pixel, such as by copying a value from an available nearby pixel. A reconstructed picture buffer or a decoded picture buffer (DPB) may be used for copying a value.

즉, 화면 내 예측은 현재 픽쳐의 이전에 부호화가 완료된 블록들의 참조 화소를 사용하여 예측을 수행한다. 이를 위해, 참조 화소 구성 단계에서는 현재 블록의 이웃 블록 즉, 왼쪽, 왼쪽 위, 왼쪽 아래, 위쪽, 오른쪽 위 블록들 등과 같은 인접한 화소들을 주로 참조 화소로 사용한다.That is, the intra prediction is performed using reference pixels of previously encoded blocks of the current picture. To this end, in the reference pixel construction step, neighboring blocks of the current block, that is, adjacent pixels such as left, upper left, lower left, upper, and upper right blocks, are mainly used as reference pixels.

다만상기 참조 화소를 위한 이웃 블록의 후보군은 블록의 부호화 순서를 래스터 스캔(raster scan) 또는 제트 스캔(z-scan)를 따를 경우의 예시일 뿐, 역 제트 스캔(inverse z-scan) 등과 같은 스캔이 부호화 순서 스캔 방식으로 사용될 경우에는 위의 블록들에 추가로 오른쪽, 오른쪽 아래, 아래 블록 등과 같은 인접 화소들도 참조 화소로 사용할 수 있다.However, the candidate group of the neighboring blocks for the reference pixel is only an example of a case in which the encoding order of the blocks follows a raster scan or a z-scan, and a scan such as an inverse z-scan When used in this coding order scan method, adjacent pixels such as the right, lower right, and lower blocks in addition to the above blocks may be used as reference pixels.

또한, 구현에 따라서 화면 내 예측의 단계별 구성에 따라 바로 인접한 화소 외의 추가적인 화소들이 대체 또는 기존 참조 화소와 혼합되어 사용될 수 있다.In addition, depending on implementation, additional pixels other than immediately adjacent pixels may be used in combination with replacement or existing reference pixels according to the stepwise configuration of intra prediction.

또한, 화면 내 예측의 모드 중 방향성을 갖는 모드로 예측이 되는 경우, 정수 단위의 참조 화소를 선형 보간을 통해 소수 단위의 참조 화소를 생성할 수 있다. 정수 단위 위치에 존재하는 참조 화소를 통해 예측을 수행하는 모드는 수직, 수평, 45도, 135도를 갖는 일부 모드를 포함하며, 위의 예측 모드들에 대해서는 소수 단위의 참조 화소를 생성하는 과정은 필요하지 않을 수 있다.In addition, when prediction is performed in a directional mode among intra prediction modes, a decimal unit reference pixel may be generated through linear interpolation of an integer unit reference pixel. Modes for performing prediction through reference pixels existing at integer unit positions include some modes having vertical, horizontal, 45 degrees, and 135 degrees, and for the above prediction modes, the process of generating a decimal unit reference pixel is may not be necessary.

상기 예측 모드를 제외한 다른 방향성을 가진 예측 모드들에서 보간되는 참조 화소는 1/2, 1/4, 1/8, 1/16, 1/32, 1/64 와 같이 1/2의 지수승의 보간 정밀도를 가질 수도 있고, 1/2의 배수의 정밀도를 가질 수도 있다.A reference pixel interpolated in prediction modes having a direction other than the prediction mode is 1/2, 1/4, 1/8, 1/16, 1/32, 1/64 of an exponential power of 1/2. It may have interpolation precision, or it may have a precision of multiples of 1/2.

그것은 지원되는 예측 모드의 개수 또는 예측 모드의 예측 방향 등에 따라 보간 정밀도가 결정될 수 있기 때문이다. 픽쳐, 슬라이스, 타일, 블록 등에서 항상 고정적인 보간 정밀도를 지원할 수도 있고, 블록의 크기, 블록의 형태, 지원되는 모드의 예측 방향 등에 따라 적응적인 보간 정밀도가 지원될 수도 있다. 이 때, 모드의 예측 방향은 특정 선 기준(예를 들어, 좌표평면 상의 양<+>의 x축)으로 상기 모드가 가리키는 방향의 기울기 정보 또는 각도 정보로 표현될 수 있다.This is because interpolation precision may be determined according to the number of supported prediction modes or prediction directions of prediction modes. A picture, a slice, a tile, a block, etc. may always support a fixed interpolation precision, or an adaptive interpolation precision may be supported according to a size of a block, a shape of a block, a prediction direction of a supported mode, and the like. In this case, the prediction direction of the mode may be expressed as inclination information or angle information of the direction indicated by the mode with respect to a specific line reference (eg, positive <+> x-axis on the coordinate plane).

보간 방법으로는 바로 인접한 정수 화소를 통해 선형 보간을 수행하기도 하지만 그 외의 보간 방법을 지원할 수 있다. 보간을 위해 1개 이상의 필터 종류 및 탭의 개수 예를 들어, 6-tap 위너 필터, 8-tap 칼만 필터 등을 지원할 수 있으며, 블록의 크기, 예측 방향 등에 따라 어떤 보간을 수행할 것인지를 결정할 수 있다. 또한, 관련 정보는 시퀀스, 픽쳐, 슬라이스, 블록 등의 단위로 전송될 수 있다.As the interpolation method, linear interpolation is sometimes performed through immediately adjacent integer pixels, but other interpolation methods may be supported. One or more types of filters and the number of taps for interpolation For example, a 6-tap Wiener filter, an 8-tap Kalman filter, etc. can be supported, and it is possible to determine which interpolation to perform according to the size of the block, the prediction direction, etc. there is. In addition, related information may be transmitted in units of sequences, pictures, slices, blocks, and the like.

참조 화소 필터부는 참조 화소를 구성한 후 부호화 과정에서 남아있는 열화를 줄여줌으로써 예측 효율을 높여줄 목적으로 참조 화소에 필터링을 수행할 수 있다. 참조 화소 필터부는, 블록의 크기, 형태 및 예측 모드에 따라 필터의 종류 및 필터링의 적용 유무를 묵시적 또는 명시적으로 결정할 수 있다. 즉, 같은 탭(tap)의 필터라도 필터 종류에 따라 필터 계수를 다르게 결정할 수 있다. 예를 들어, [1,2,1]/4, [1,6,1]/8과 같은 3 탭 필터를 사용할 수 있다.The reference pixel filter unit may perform filtering on the reference pixel in order to increase prediction efficiency by reducing deterioration remaining in the encoding process after configuring the reference pixel. The reference pixel filter unit may implicitly or explicitly determine the type of filter and whether to apply the filtering according to the size, shape, and prediction mode of the block. That is, filter coefficients may be determined differently depending on the filter type even for filters of the same tap. For example, a 3-tap filter such as [1,2,1]/4 or [1,6,1]/8 can be used.

또한, 참조 화소 필터부는, 추가적으로 비트를 보낼지 안 보낼지를 결정하여 필터링 적용 여부를 결정할 수 있다. 예를 들어, 묵시적인 경우, 참조 화소 필터부는 주변 참조 블록에서의 화소들의 특성(분산, 표준편차 등)에 따라 필터링 적용 여부를 판단할 수 있다.In addition, the reference pixel filter unit may determine whether to apply filtering by determining whether to additionally transmit a bit or not. For example, in the implicit case, the reference pixel filter unit may determine whether to apply filtering according to characteristics (variance, standard deviation, etc.) of pixels in the neighboring reference block.

또한, 참조 화소 필터부는, 관련 플래그가 잔차 계수, 화면 내 예측 모드 등에 기설정된 숨김(hiding) 조건을 만족하는 경우, 필터링 적용 여부를 판단할 수 있다. 필터의 탭수는, 예를 들어, 작은 블록(blk)에서는 [1,2,1]/4와 같은 3-tap, 큰 블록(blk)에서는 [2,3,6,3,2]/16과 같은 5-tap으로 설정될 수 있고, 적용 횟수는 필터링을 수행하지 않을 것인지, 1번 필터링할 것인지, 2번 필터링할 것인지 등으로 결정될 수 있다.Also, the reference pixel filter unit may determine whether to apply filtering when the related flag satisfies a hiding condition preset for a residual coefficient, an intra prediction mode, or the like. The number of taps of the filter is, for example, 3-tap such as [1,2,1]/4 for a small block (blk), and [2,3,6,3,2]/16 and [2,3,6,3,2]/16 for a large block (blk). It may be set to the same 5-tap, and the number of times of application may be determined by not performing filtering, filtering once, filtering twice, and the like.

또한, 참조 화소 필터부는 현재 블록의 가장 인접한 참조 화소에 대해 기본적으로 필터링을 적용할 수 있다. 가장 인접한 참조 화소 외에 추가적인 참조 화소들 또한 필터링 과정에 고려될 수 있다. 예를 들어, 가장 인접한 참조 화소를 대체하여 추가적인 참조 화소들에 필터링을 적용할 수도 있고, 가장 인접한 참조 화소에 추가적인 참조 화소들을 혼용하여 필터링을 적용할 수도 있다.Also, the reference pixel filter unit may basically apply filtering to the nearest reference pixel of the current block. In addition to the nearest reference pixel, additional reference pixels may also be considered in the filtering process. For example, filtering may be applied to additional reference pixels by replacing the closest reference pixel, or filtering may be applied by mixing additional reference pixels to the closest reference pixel.

상기의 필터링은 고정적 도는 적응적으로 적용될 수 있는데, 이는 현재 블록의 크기 또는 이웃 블록의 크기, 현재 블록 또는 이웃 블록의 부호화 모드, 현재 블록과 이웃 블록의 블록 경계 특성(예를 들어, 부호화 단위의 경계인지 변환 단위의 경계인지 등), 현재 블록 또는 이웃 블록의 예측 모드 또는 방향, 현재 블록 또는 이웃 블록의 예측 방식, 양자화 파라미터 등의 요인 중에서 최소 하나 이상의 요인 또는 이들의 조합에 따라 결정이 될 수 있다. 이에 대한 결정은 부호화기/복호화기에 동일한 설정을 가질 수 있고(묵시적), 부호화 비용 등을 고려하여 결정될 수도 있다(명시적). 기본적으로 적용되는 필터는 저역통과 필터(low pass filter)이며, 위에 명시된 여러 요인에 따라 필터 탭수, 필터 계수, 필터 플래그 부호화 여부, 필터 적용 횟수 등이 결정될 수 있으며, 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스, 블록 등의 단위에서 설정이 가능하며, 관련 정보를 복호화기에 전송할 수 있다.The above filtering can be applied statically or adaptively, which includes the size of the current block or the size of the neighboring block, the coding mode of the current block or the neighboring block, and the block boundary characteristics of the current block and the neighboring block (eg, the size of the coding unit). It may be determined according to at least one or a combination of factors such as the boundary or the boundary of the transform unit), the prediction mode or direction of the current block or neighboring block, the prediction method of the current block or neighboring block, and a quantization parameter. there is. A decision on this may have the same setting in the encoder/decoder (implicit), or may be determined in consideration of encoding cost and the like (explicit). The basically applied filter is a low pass filter, and the number of filter taps, filter coefficients, filter flag encoding or not, the number of times to apply the filter, etc. can be determined according to several factors specified above. It can be set in units such as slices and blocks, and related information can be transmitted to the decoder.

예측 블록 생성부는 화면 내 예측에 있어서 참조 화소를 통해 외삽 또는 보외(extrapolation) 방식이나, 참조 화소의 평균값(DC) 또는 평면(planar) 모드와 같은 내삽(interpolation) 방식이나, 참조 화소의 복사(copy) 방식으로 예측 블록을 생성할 수 있다. In intra prediction, the prediction block generator uses an extrapolation or extrapolation method through a reference pixel, an interpolation method such as an average value (DC) of reference pixels or a planar mode, or a copy of the reference pixel. ) to generate a prediction block.

참조 화소의 복사의 경우 하나의 참조 화소를 복사하여 하나의 이상의 예측 화소를 생성할 수도 있고, 하나 이상의 참조 화소를 복사하여 하나 이상의 예측 화소를 생성할 수 있으며, 복사한 참조 화소의 개수는 복사된 예측 화소의 개수와 동일하거나 적을 수 있다. In the case of copying of reference pixels, one reference pixel may be copied to generate one or more prediction pixels, and one or more reference pixels may be copied to generate one or more prediction pixels, and the number of copied reference pixels is equal to the number of copied reference pixels. It may be equal to or less than the number of prediction pixels.

또한, 상기 예측 방식에 따라 방향성 예측 방식과 비방향성 예측 방식으로 분류가 가능하며, 상세하게는 방향성 예측 방식은 직선 방향성 방식과 곡선 방향성 방식으로 분류가 가능하다. 직선 방향성 방식은 외삽 또는 보외 방식을 차용하나 예측 블록의 화소는 예측 방향 선상에 놓인 참조 화소를 통해 생성하며, 곡선 방향성 방식은 외삽 또는 보외 방식을 차용하나 예측 블록의 화소는 예측 방향 선상에 놓인 참조 화소를 통해 생성하되 블록의 세부 방향성(예를 들어, 에지<Edge>)를 고려하여 화소 단위의 부분적인 예측 방향의 변경이 허용되는 방식을 의미한다.Also, it is possible to classify the directional prediction method and the non-directional prediction method according to the prediction method, and in detail, the directional prediction method can be classified into a linear direction method and a curved direction method. The linear directional method borrows extrapolation or extrapolation method, but the pixels of the prediction block are generated through reference pixels lying on the prediction direction line. This refers to a method in which a partial prediction direction change in pixel units is allowed in consideration of the detailed directionality (eg, edge<Edge>) of a block although generated through pixels.

본 실시예의 영상 부호화 및 복호화 방법에서 방향성 예측 모드의 경우 직선 방향성 방식 위주로 설명을 할 것이다.In the case of the directional prediction mode in the image encoding and decoding method of the present embodiment, the description will be focused on the linear directional method.

또한, 상기 방향성 예측 방식의 경우 인접한 예측 모드 간의 간격은 균등하거나 비균등일 수 있으며, 이는 블록의 크기 또는 형태에 따라 결정될 수 있다. 예를 들어, 블록 분할부를 통해 현재 블록이 M×N의 크기와 형태를 갖는 블록을 획득했을 때, M과 N이 같을 경우에는 예측 모드 간의 간격은 균등일 수 있으며, M과 N이 다를 경우에는 예측 모드 간의 간격은 비균등일 수 있다.In addition, in the case of the directional prediction method, the spacing between adjacent prediction modes may be uniform or non-uniform, which may be determined according to the size or shape of a block. For example, when a block having a size and shape of M×N is obtained through the block divider, when M and N are the same, the interval between prediction modes may be uniform, and when M and N are different Intervals between prediction modes may be non-uniform.

다른 예로서, M이 N보다 큰 경우에는 수직 방향성을 갖는 모드들은 수직 모드(90도)에 가까운 예측 모드 사이에는 더 세밀한 간격을 할당하고, 수직 모드에 먼 예측 모드에는 넓은 간격을 할당할 수 있다. N이 M보다 큰 경우에는 수평 방향성을 갖는 모드들은 수평 모드(180도)에 가까운 예측 모드 사이에는 더 세밀한 간격을 할당하고, 수평 모드에 먼 예측 모드에는 넓은 간격을 할당할 수 있다.As another example, when M is greater than N, modes having vertical direction may allocate a finer interval between prediction modes close to the vertical mode (90 degrees), and allocate a wide interval to prediction modes farther from the vertical mode. . When N is greater than M, a finer interval may be allocated between prediction modes close to the horizontal mode (180 degrees) for modes having horizontal directivity, and a wide interval may be allocated to a prediction mode far from the horizontal mode.

위의 예들은 전술한 경우에만 특정하는 것은 아니며 서로의 조건이 뒤바뀌는 경우도 포함할 수 있고, 다른 경우의 예로 변형 또한 가능하다. 이때, 예측 모드 간의 간격은 각 모드의 방향성을 나타내는 수치 기반으로 계산될 수 있으며, 예측 모드의 방향성은 방향의 기울기 정보 또는 각도 정보로 수치화될 수 있다.The above examples are not specific only to the above-described case, and may include a case in which each other's conditions are reversed, and variations in other cases are also possible. In this case, the interval between the prediction modes may be calculated based on a numerical value indicating the directionality of each mode, and the directionality of the prediction mode may be quantified as inclination information or angle information of the direction.

또한, 위의 방법 외에 공간적인 상관성을 이용하는 다른 방법 등을 포함하여 예측 블록을 생성할 수 있다. 예를 들어, 현재 픽쳐를 참조 픽쳐로 삼아 움직임 탐색 및 보상과 같은 화면 간 예측(inter prediction) 방식을 이용한 참조 블록을 예측 블록으로 생성할 수 있다.Also, in addition to the above method, the prediction block may be generated by using other methods using spatial correlation. For example, by using the current picture as a reference picture, a reference block using an inter prediction method such as motion search and compensation may be generated as a prediction block.

예측 블록 생성 단계는 상기 예측 방식에 따라 참조 화소를 사용하여 예측 블록을 생성할 수 있다. 즉, 상기 예측 방식에 따라 기존의 화면 내 예측 방식의 외삽, 내삽, 복사, 평균 등의 방향성 예측 또는 비방향성 예측 방식을 통해 예측 블록을 생성할 수 있고, 화면 간 예측 방식을 사용하여 예측 블록을 생성할 수 있으며, 그 외의 추가적인 방법도 사용될 수 있다.The generating of the prediction block may generate the prediction block by using the reference pixel according to the prediction method. That is, according to the prediction method, a prediction block can be generated through a directional prediction method such as extrapolation, interpolation, copying, and averaging of the existing intra prediction method or a non-directional prediction method, and a prediction block can be generated using an inter prediction method can be created, and other additional methods may also be used.

상기 화면 내 예측 방식은 부호화기/복호화기의 동일한 설정 하에 지원될 수 있으며, 슬라이스 타입, 블록의 크기, 블록의 형태 등에 따라 결정될 수 있다. 화면 내 예측 방식은 상기 언급된 예측 방식 중 최소 하나 이상의 방식 또는 이들의 조합에 따라 지원될 수 있다. 화면 내 예측 모드는 상기 지원되는 예측 방식에 따라 구성될 수 있다. 지원되는 화면 내 예측 모드의 개수는 상기 예측 방식, 슬라이스 타입, 블록의 크기, 블록의 형태 등에 따라 결정될 수 있다. 상기 관련 정보들은 시퀀스, 픽쳐, 슬라이스, 블록 등의 단위에서 설정 및 전송이 가능하다.The intra prediction method may be supported under the same setting of an encoder/decoder, and may be determined according to a slice type, a size of a block, a shape of a block, and the like. The intra prediction method may be supported according to at least one of the above-mentioned prediction methods or a combination thereof. The intra prediction mode may be configured according to the supported prediction method. The number of supported intra prediction modes may be determined according to the prediction method, slice type, block size, block type, and the like. The related information can be set and transmitted in units such as sequence, picture, slice, and block.

예측 모드 부호화를 실행하는 예측 모드 부호화 단계는 부호화 비용 측면에서 각 예측 모드에 따른 부호화 비용이 최적인 모드를 현재 블록의 예측 모드로 결정할 수 있다.In the prediction mode encoding step of performing prediction mode encoding, a mode having an optimal encoding cost according to each prediction mode in terms of encoding cost may be determined as the prediction mode of the current block.

일례로, 예측 모드 부호화부는 예측 모드 비트를 줄이기 위한 목적으로 하나 이상의 이웃 블록의 모드를 현재 블록 모드 예측에 이용할 수 있다. 현재 블록의 모드와 동일할 확률이 높은 모드(most_probable_mode, MPM) 후보군으로 포함할 수 있는데, 이웃 블록의 모드들은 위의 후보군에 포함될 수 있다. 예를 들어 현재 블록의 왼쪽 위, 왼쪽 아래, 위쪽, 오른쪽 위 등의 블록의 예측 모드를 위의 후보군에 포함할 수 있다.For example, the prediction mode encoder may use the modes of one or more neighboring blocks for the current block mode prediction for the purpose of reducing the prediction mode bits. A mode (most_probable_mode, MPM) having a high probability of being identical to the mode of the current block may be included as a candidate group, and modes of a neighboring block may be included in the above candidate group. For example, prediction modes of blocks such as upper-left, lower-left, upper, and upper-right of the current block may be included in the upper candidate group.

예측 모드의 후보군은 이웃 블록의 위치, 이웃 블록의 우선순위, 분할 블록에서의 우선순위, 이웃 블록의 크기 또는 형태, 기설정된 특정 모드, (색차 블록인 경우) 휘도 블록의 예측 모드 등의 요인 중 최소 하나 이상의 요인 또는 그들의 조합에 따라 구성될 수 있으며, 관련 정보는 시퀀스, 픽쳐, 슬라이스, 블록 등의 단위로 전송할 수 있다.The candidate group of the prediction mode is selected from among factors such as the position of the neighboring block, the priority of the neighboring block, the priority in the divided block, the size or shape of the neighboring block, a predetermined specific mode, and the prediction mode of the luminance block (in case of a color difference block). It may be configured according to at least one factor or a combination thereof, and related information may be transmitted in units of sequences, pictures, slices, blocks, and the like.

예를 들어, 현재 블록과 이웃한 블록이 2개 이상의 블록으로 분할되어 있을 경우, 분할된 블록 중 어느 블록의 모드를 현재 블록의 모드 예측 후보로 포함할 지는 부호화기/복호화기의 동일한 설정하에 결정할 수 있다. 또한, 예를 들어, 현재 블록(M×M)의 이웃 블록 중 왼쪽 블록은 블록 분할부에서 쿼드 트리 분할을 수행하여 분할 블록이 3개로 구성되어 있으며 위에서 아래 방향으로 M/2×M/2, M/4×M/4, M/4×M/4의 블록을 포함할 경우, 블록 크기 기준으로 M/2×M/2 블록의 예측 모드를 현재 블록의 모드 예측 후보로 포함할 수 있다.For example, when the current block and the neighboring block are divided into two or more blocks, which block mode among the divided blocks to be included as a mode prediction candidate of the current block can be determined under the same setting of the encoder/decoder. there is. Also, for example, the left block among the neighboring blocks of the current block (M×M) consists of three divided blocks by performing quad tree division in the block division unit, and M/2×M/2, M/2×M/2, When the blocks of M/4×M/4 and M/4×M/4 are included, the prediction mode of the M/2×M/2 block may be included as a mode prediction candidate of the current block based on the block size.

다른 예로써, 현재 블록(N×N)의 이웃 블록 중 위쪽 블록은 블록 분할부에서 바이너리 트리 분할을 수행하여 분할 블록이 3개로 구성되어 있으며 왼쪽에서 오른쪽 방향으로 N/4×N, N/4×N, N/2×N의 블록을 포함할 경우, 기설정된 순서(왼쪽에서 오른쪽으로 우선순위가 할당됨)에 따라 왼쪽에서 첫번째 N/4×N 블록의 예측 모드를 현재 블록의 모드 예측 후보로 포함할 수 있다. As another example, the upper block among neighboring blocks of the current block (N×N) consists of three divided blocks by performing binary tree division in the block division unit, and N/4×N, N/4 from left to right When blocks of ×N and N/2×N are included, the prediction mode of the first N/4×N block from the left is the mode prediction candidate of the current block according to a preset order (priorities are allocated from left to right) can be included as

다른 예로써, 현재 블록과 이웃한 블록의 예측 모드가 방향성 예측 모드일 경우, 해당 모드의 예측 방향과 인접한 예측 모드(상기 모드의 방향의 기울기 정보 또는 각도 정보 측면)를 현재 블록의 모드 예측 후보군에 포함할 수 있다. 또한, 기설정된 모드(planar, DC, 수직, 수평 등)는 이웃 블록의 예측 모드 구성 또는 조합에 따라 우선적으로 포함될 수 있다.As another example, when the prediction mode of the block adjacent to the current block is the directional prediction mode, the prediction mode adjacent to the prediction direction of the corresponding mode (the slope information or angle information side of the direction of the mode) is added to the mode prediction candidate group of the current block. may include In addition, preset modes (planar, DC, vertical, horizontal, etc.) may be preferentially included according to the configuration or combination of prediction modes of neighboring blocks.

또한, 이웃 블록의 예측 모드 중 발생 빈도가 높은 예측 모드를 우선적으로 포함할 수 있다. 상기 우선순위는 현재 블록의 모드 예측 후보군에 포함될 가능성 뿐만 아니라 상기 후보군 구성에서도 더 높은 우선순위 또는 인덱스(즉, 이진화 과정에서 적은 비트를 할당받을 확률이 높음을 의미)를 할당받을 가능성을 의미할 수 있다.Also, a prediction mode having a high frequency of occurrence among prediction modes of a neighboring block may be preferentially included. The priority means not only the possibility of being included in the mode prediction candidate group of the current block, but also the possibility of being assigned a higher priority or index (that is, a high probability of receiving fewer bits in the binarization process) in the candidate group configuration. there is.

다른 예로써, 현재 블록의 모드 예측 후보군의 최대치가 k개이고, 왼쪽 블록은 현재 블록의 세로 길이보다 길이가 작은 m개의 블록으로 구성되고, 위쪽 블록은 현재 블록의 가로 길이보다 길이가 작은 n개의 블록으로 구성되면, 이웃 블록들의 분할 블록 합(m+n)이 k보다 클 때 기설정된 순서(왼쪽에서 오른쪽, 위쪽에서 아래쪽)에 따라 후보군을 채울 수 있고, 이웃 블록 분할들의 분할 블록 합(m+n)이 후보군의 최대치(k)보다 클 경우, 상기 이웃 블록(왼쪽 블록, 위쪽 블록)의 예측 모드에 상기 이웃 블록 위치 외 다른 이웃 블록(예를 들어, 왼쪽 아래, 왼쪽 위, 오른쪽 위 등)과 같은 블록의 예측 모드도 현재 블록의 모드 예측 후보군에 포함될 수 있다. 위의 예들은 전술한 경우에만 특정하는 것은 아니며 서로의 조건이 뒤바뀌는 경우도 포함할 수 있고, 다른 경우의 예로 변형 또한 가능하다.As another example, the maximum number of mode prediction candidates of the current block is k, the left block is composed of m blocks having a length smaller than the vertical length of the current block, and the upper block is n blocks having a length smaller than the horizontal length of the current block. , when the divided block sum (m+n) of the neighboring blocks is greater than k, the candidate group can be filled according to a preset order (left to right, top to bottom), and the divided block sum of the neighboring block divisions (m+ If n) is greater than the maximum value (k) of the candidate group, a neighboring block (eg, lower left, upper left, upper right, etc.) other than the position of the neighboring block in the prediction mode of the neighboring block (left block, upper block) A prediction mode of a block such as may also be included in the mode prediction candidate group of the current block. The above examples are not specific only to the above-described case, and may include a case in which each other's conditions are reversed, and variations in other cases are also possible.

이와 같이, 현재 블록의 모드의 예측을 위한 후보 블록은 특정 블록 위치에만 한정하지 않으며 왼쪽, 왼쪽 위, 왼쪽 아래, 위쪽, 오른쪽 위에 위치하는 블록 중 최소 하나 이상의 블록으로부터 예측 모드 정보를 활용할 수 있으며, 상기 예에서와 같이 여러 요인들을 고려하여 현재 블록의 예측 모드를 후보군으로 구성할 수 있다.As such, the candidate block for mode prediction of the current block is not limited to a specific block position, and prediction mode information can be utilized from at least one block among blocks located on the left, upper left, lower left, upper, and upper right, As in the above example, the prediction mode of the current block may be configured as a candidate group in consideration of various factors.

예측 모드 부호화부에서는 현재 블록의 모드와 동일할 확률이 높은 모드(MPM) 후보군(본 예에서 후보군 1로 지칭함)과 그렇지 않은 모드 후보군(본 예에서 후보군 2로 지칭함)으로 분류할 수 있으며, 현재 블록의 예측 모드가 상기 후보군들 중 어느 후보군에 속하는지에 따라 예측 모드 부호화 과정이 달라질 수 있다.The prediction mode encoder can classify a mode (MPM) candidate group (referred to as candidate group 1 in this example) and a mode candidate group (referred to as candidate group 2 in this example) that are highly probable to be the same as the mode of the current block. A prediction mode encoding process may vary according to which candidate group among the candidate groups the prediction mode of the block belongs to.

전체 예측 모드는 후보군 1의 예측 모드와 후보군 2의 예측 모드의 합으로 구성될 수 있으며, 후보군 1의 예측 모드 개수와 후보군 2의 예측 모드 개수는 전체 예측 모드의 개수, 슬라이스 타입, 블록의 크기, 블록의 형태 등의 요인 중 하나 이상의 요인 또는 이들의 조합에 따라 결정될 수 있다. 상기 후보군에 따라 동일한 이진화를 적용하거나 다른 이진화를 적용할 수 있다.The total prediction mode may consist of the sum of the prediction modes of the candidate group 1 and the prediction modes of the candidate group 2. It may be determined according to one or more factors, such as the shape of the block, or a combination thereof. Depending on the candidate group, the same binarization may be applied or a different binarization may be applied.

예를 들어, 후보군 1에는 고정 길이 이진화를, 후보군 2에는 단삭 절단형 이진화를 적용할 수도 있다. 위의 설명에서 후보군의 개수를 2개로 예를 들었지만, 현재 블록의 모드와 동일할 확률이 높은 모드 제1 후보군, 현재 블록의 모드와 동일할 확률이 높은 모드 제2 후보군, 그렇지 않은 모드 후보군 등과 같이 확장이 가능하며, 이의 변형 또한 가능하다.For example, fixed-length binarization may be applied to candidate group 1 and short cut-type binarization may be applied to candidate group 2. In the above description, the number of candidate groups is two as an example, but the mode first candidate group with a high probability of being identical to the mode of the current block, the mode second candidate group with high probability of being identical to the mode of the current block, and mode candidates not having the same probability as the mode of the current block, etc. It can be extended, and its modifications are also possible.

후처리 필터부에 의해 실행되는 후처리 필터링 단계는, 현재 블록과 이웃 블록의 경계에 인접한 참조 화소와 인접한 현재 블록 내의 화소 간의 상관성이 높은 특성을 고려하여 이전 과정에서 생성한 예측 블록 중 일부 예측 화소는 경계에 인접한 하나 이상의 참조 화소와 하나 이상의 예측 화소를 필터링하여 생성된 값으로 대체할 수 있고, 상기 블록의 경계에 인접한 참조 화소들간의 특성을 수치화한 값(예를 들어, 화소값의 차이, 기울기 정보 등)을 필터링 과정에 적용하여 생성된 값으로 상기 예측 화소를 대체할 수 있고, 위의 방법 외에 비슷한 목적(참조 화소를 통해 예측 블록의 일부 예측 화소를 보정)을 갖는 다른 방법 등이 추가될 수 있다.In the post-processing filtering step performed by the post-processing filter unit, some prediction pixels among the prediction blocks generated in the previous process in consideration of the characteristic of high correlation between the reference pixel adjacent to the boundary between the current block and the neighboring block and the pixel in the adjacent current block. may be replaced with a value generated by filtering one or more reference pixels and one or more prediction pixels adjacent to the boundary, and a value obtained by quantifying the characteristics between reference pixels adjacent to the boundary of the block (eg, the difference in pixel values, gradient information, etc.) can be applied to the filtering process to replace the predicted pixel with a value generated can be

후처리 필터부에 있어서, 필터의 종류 및 필터링 적용 유무는 묵시적 또는 명시적으로 결정될 수 있으며, 후처리 필터부에 사용되는 참조 화소와 현재 화소의 위치 및 개수, 그리고 적용되는 예측 모드의 종류 등은 부호화기/복호화기에서 설정 가능하고, 관련 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송 가능하다.In the post-processing filter unit, the type of filter and whether or not to apply the filtering may be determined implicitly or explicitly, and the positions and number of reference pixels and current pixels used in the post-processing filter unit, and the type of prediction mode to be applied, etc. It can be set in the encoder/decoder, and related information can be transmitted in units of sequences, pictures, slices, and the like.

또한, 후처리 필터링 단계에서는, 블록 경계 필터링(boundary filtering)과 같이 예측 블록 생성 후 추가적인 후처리 과정을 진행할 수 있다. 또한, 잔차 신호 획득 후 변환/양자화 과정 및 그 역과정을 거쳐서 얻게된 잔차 신호와 예측 신호를 합하여 복원된 현재 블록을 위의 경계 필터링과 비슷하게 인접한 참조 블록의 화소의 특성을 고려하여 후처리 필터링을 수행할 수도 있다.Also, in the post-processing filtering step, an additional post-processing process may be performed after the prediction block is generated, such as block boundary filtering. In addition, post-processing filtering is performed in consideration of the characteristics of pixels of adjacent reference blocks, similar to the boundary filtering above, for the current block restored by adding the residual signal and the prediction signal obtained through the transform/quantization process and the inverse process after obtaining the residual signal. can also be done

최종적으로 전술한 과정을 통해 예측 블록을 선택 또는 획득하게 되며, 이 과정에서 나오는 정보는 예측 모드 관련 정보를 포함할 수 있고, 예측 블록의 획득 후 잔차 신호의 부호화를 위해 변환부(210)에 전달할 수 있다.Finally, a prediction block is selected or acquired through the above-described process, and information from this process may include prediction mode-related information, and is transmitted to the transform unit 210 for encoding the residual signal after the prediction block is obtained. can

도 10은 본 발명의 일실시예에 따른 영상 부호화 방법에서 P 슬라이스나 B 슬라이스에서의 예측 원리를 설명하기 위한 예시도이다. 도 11은 도 10의 영상 부호화 방법에서 내삽(interpolation)을 수행하는 경우를 설명하기 위한 예시도이다.10 is an exemplary diagram for explaining a prediction principle in a P slice or a B slice in an image encoding method according to an embodiment of the present invention. 11 is an exemplary diagram for explaining a case in which interpolation is performed in the image encoding method of FIG. 10 .

도 10을 참조하면, 본 실시예에 따른 영상 부호화 방법은, 모션 예측(motion estimation module) 및 보간(interpolation) 단계들을 포함할 수 있다. 모션 예측 단계에서 생성되는 모션 벡터, 참조 픽쳐 인덱스, 참조 방향에 대한 정보는 보간 단계로 전달될 수 있다. 모션 예측 단계와 보간 단계에서는 복원된 픽쳐 버퍼(decoded picture buffer, DPB)에 저장되는 값을 이용할 수 있다.Referring to FIG. 10 , the image encoding method according to the present embodiment may include motion estimation module and interpolation steps. Information on the motion vector, reference picture index, and reference direction generated in the motion prediction step may be transferred to the interpolation step. In the motion prediction step and the interpolation step, a value stored in a decoded picture buffer (DPB) may be used.

즉, 영상 부호화 장치는, 이전의 부호화된 픽쳐들에서 현재 블록과 유사한 블록을 찾기 위해 모션 예측(motion estimation)을 실행할 수 있다. 또한, 영상 부호화 장치는 소수 단위의 정밀도보다 정밀한 예측을 위해 참조 픽쳐의 내삽(interpolation)을 실행할 수 있다. 최종적으로 영상 부호화 장치는 예측 변수(predictor)를 통해 예측 블록을 획득하게 되며, 이 과정에서 나오는 정보는 움직임 벡터(motion vector), 참조 픽쳐 인덱스(reference picture index 또는 reference index), 참조 방향(reference direction) 등이 있으며, 이후 잔차 신호 부호화를 진행할 수 있다.That is, the image encoding apparatus may perform motion estimation to find a block similar to the current block in previously encoded pictures. Also, the image encoding apparatus may perform interpolation of the reference picture for more precise prediction than the precision of a fractional unit. Finally, the image encoding apparatus obtains a prediction block through a predictor, and information from this process includes a motion vector, a reference picture index or reference index, and a reference direction. ) and the like, and thereafter, residual signal encoding may be performed.

본 실시예에서는 P 슬라이스나 B 슬라이스에서도 화면 내 예측을 수행하기 때문에 화면 간 예측과 화면 내 예측을 지원하는 도 11과 같은 조합 방식의 구현이 가능하다.In the present embodiment, since intra prediction is also performed in P slice or B slice, a combination method as shown in FIG. 11 supporting inter prediction and intra prediction is possible.

도 11에 나타낸 바와 같이, 본 실시예에 따른 영상 부호화 방법은, 참조 화소 채움(reference sample padding), 참조 화소 필터링(reference sample filtering), 화면 내 예측(intra prediction), 경계 필터링(boundary filtering), 모션 예측(motion estimation), 및 보간(interpolation)의 단계들을 포함할 수 있다.11 , the image encoding method according to the present embodiment includes reference sample padding, reference sample filtering, intra prediction, boundary filtering, It may include steps of motion estimation, and interpolation.

영상 부호화 장치는, 현재 픽쳐에서 블록 매칭을 지원하는 경우, I 슬라이스에서의 예측 방식은 도 9에 도시한 구성이 아닌 도 11에 도시한 구성으로 구현 가능하다. 즉, 영상 부호화 장치는 I 슬라이스에서 예측 모드뿐 아니라 P 슬라이스나 B 슬라이스에서만 발생하는 움직임 벡터, 참조 픽쳐 인덱스, 참조 방향 등의 정보를 예측 블록 생성에 이용할 수 있다. 다만, 참조 픽쳐가 현재라는 특성으로 인해 부분 생략 가능한 정보가 존재할 수 있다. 일례로, 참조 픽쳐가 현재 픽쳐인 경우 참조 픽쳐 인덱스, 참조 방향은 생략 가능하다.When the video encoding apparatus supports block matching in the current picture, the prediction method in the I slice may be implemented with the configuration shown in FIG. 11 instead of the configuration shown in FIG. 9 . That is, the video encoding apparatus may use information such as a motion vector, a reference picture index, and a reference direction that occur only in a P slice or a B slice as well as a prediction mode in the I slice to generate the prediction block. However, information that can be partially omitted may exist due to the characteristic that the reference picture is current. For example, when the reference picture is the current picture, the reference picture index and the reference direction may be omitted.

또한, 영상 부호화 장치는, 내삽(interpolation)을 적용하는 경우, 영상의 특성상 예컨대 컴퓨터 그래픽 등의 인공적인 영상의 특성상 소수 단위까지의 블록 매칭이 필요하지 않을 수 있기 때문에 이에 대한 수행 여부도 부호화기에서 설정할 수 있고, 이에 대해서 시퀀스, 픽쳐, 슬라이스 등의 단위 설정도 가능하다.In addition, when the image encoding apparatus applies interpolation, since block matching up to decimal units may not be required due to the characteristics of the image, for example, due to the characteristics of an artificial image such as computer graphics, whether to perform this is also set in the encoder. In this regard, it is also possible to set units such as sequences, pictures, and slices.

예를 들어, 영상 부호화 장치는, 부호화기의 설정에 따라 화면 간 예측에 사용되는 참조 픽쳐들의 내삽을 수행하지 않을 수 있고, 현재 픽쳐에서 블록 매칭을 하는 경우에만 내삽을 수행하지 않는 등 다양한 설정을 할 수 있다. 즉, 본 실시예의 영상 부호화 장치는 참조 픽쳐들의 내삽 수행 여부에 대해 설정할 수 있다. 이때, 참조 픽쳐 리스트를 구성하는 모든 참조 픽쳐 또는 일부 참조 픽쳐들에 내삽 수행 여부를 결정할 수 있다.For example, the image encoding apparatus may not perform interpolation of reference pictures used for inter prediction according to the setting of the encoder, and may perform various settings such as not performing interpolation only when block matching is performed in the current picture. can That is, the image encoding apparatus of the present embodiment may set whether to perform interpolation of reference pictures. In this case, it may be determined whether interpolation is performed on all reference pictures or some reference pictures constituting the reference picture list.

일례로, 영상 부호화 장치는, 어떤 현재 블록에서는 참조 블록이 존재하는 영상의 특성이 인공적인 영상이라 소수 단위로 블록 매칭을 할 필요가 없을 때에는 내삽을 수행하지 않고, 자연 영상이라 소수 단위로 블록 매칭을 할 필요가 있을 때는 내삽을 수행하도록 동작할 수 있다.For example, the image encoding apparatus does not perform interpolation when it is not necessary to perform block matching in decimal units because the characteristic of an image in which a reference block exists in a certain current block is an artificial image, and blocks matching in decimal units because it is a natural image. It can operate to perform interpolation when it is necessary to do

또한, 영상 부호화 장치는, 블록 단위로 내삽을 수행한 참조 픽쳐에서 블록 매칭 적용 여부에 대한 설정이 가능하다. 예를 들어, 자연 영상과 인공 영상이 혼합되어 있을 경우 참조 픽쳐에 내삽을 수행하되 인공적인 영상의 부분을 탐색하여 최적의 움직임 벡터를 얻을 수 있는 경우에는 일정 단위(여기에서 정수 단위라고 가정)로 움직임 벡터를 표현할 수 있으며, 또한 선택적으로 자연 영상의 부분을 탐색하여 최적의 움직임 벡터를 얻을 수 있는 경우에는 다른 일정 단위(여기에서는 1/4 단위라고 가정)로 움직임 벡터를 표현할 수 있다.Also, the image encoding apparatus may set whether block matching is applied to a reference picture that has been interpolated in units of blocks. For example, if a natural image and an artificial image are mixed, interpolation is performed on the reference picture, but if the optimal motion vector can be obtained by searching for a part of the artificial image, the A motion vector can be expressed, and when an optimal motion vector can be obtained by selectively searching a part of a natural image, the motion vector can be expressed in another predetermined unit (assuming that it is a quarter unit).

도 12는 본 발명의 일실시예에 따른 영상 부호화 방법의 주요 과정을 코딩 단위(coding unit)에서의 신택스로 설명하기 위한 도면이다.12 is a diagram for explaining a main process of an image encoding method according to an embodiment of the present invention with syntax in a coding unit.

도 12를 참조하면, curr_pic_BM_enabled_flag는 현재 픽쳐에서 블록 매칭을 허용하는 플래그를 의미하고, 시퀀스, 픽쳐 단위에서 정의 및 전송될 수 있으며, 이 때 현재 픽쳐에서 블록 매칭을 수행하여 예측 블록 생성하는 과정은 화면 간 예측을 통해 동작하는 경우를 의미할 수 있다. 그리고 잔차 신호를 부호화하지 않는 화면 간 기술인 cu_skip_flag는, I 슬라이스를 제외한 P 슬라이스나 B 슬라이스에서만 지원되는 플래그라고 가정할 수 있다. 그 경우, curr_pic_BM_enabled_flag가 온(on)이 되는 경우에 I 슬라이스에서도 블록 매칭(block maching, BM)을 화면 간 예측 모드에서 지원할 수가 있다.Referring to FIG. 12 , curr_pic_BM_enabled_flag means a flag that allows block matching in the current picture, and can be defined and transmitted in sequence and picture units. It may mean a case of operating through inter-prediction. In addition, it may be assumed that cu_skip_flag, which is an inter-picture technique that does not encode a residual signal, is a flag supported only in P slices or B slices except for I slices. In that case, when curr_pic_BM_enabled_flag is turned on, block matching (BM) can be supported in the inter prediction mode even in I slices.

본 실시예에 따른 영상 부호화 방법은 현재 픽쳐에 블록 매칭을 통해 예측 블록을 생성하는 경우에 스킵(skip)을 지원할 수 있으며, 블록 매칭 외의 화면 내 기술의 경우에도 스킵을 지원할 수 있다. 그리고 조건에 따라 I 슬라이스에서 스킵을 지원하지 않을 수도 있다. 이러한 스킵 여부는 부호화기 설정에 따라 결정될 수 있다.The image encoding method according to the present embodiment may support skip when a prediction block is generated through block matching in the current picture, and may support skip in the case of an intra-picture technique other than block matching. Also, skip may not be supported in the I slice depending on conditions. Whether to skip this may be determined according to an encoder setting.

일례로, I 슬라이스에서 스킵을 지원할 경우, 특정 플래그인 if(cu_skip_flag)를 통해 예측 단위인 prediction_unit()으로 연결하여 잔차신호를 부호화하지 않고 블록 매칭을 통해 예측 블록을 복원 블록으로 바로 복원할 수 있다. 또한, 영상 부호화 장치는 현재 픽쳐에서 블록 매칭을 통해 예측 블록을 사용하는 방법을 화면 간 예측 기술로 분류하고, 그러한 구분을 특정 플래그인 pred_mode_flag를 통해 처리할 수 있다.For example, when skip is supported in I slice, the prediction block can be directly restored to the reconstructed block through block matching without encoding the residual signal by connecting to prediction_unit(), which is the prediction unit through a specific flag if(cu_skip_flag). . In addition, the image encoding apparatus may classify a method of using a prediction block through block matching in the current picture as an inter prediction technique, and may process such classification through a specific flag, pred_mode_flag.

또한, 본 실시예에 따른 영상 부호화 장치는, pred_mode_flag가 0이면 예측 모드를 화면 간 예측 모드(MODE_INTER)로 설정하고, 1이면 화면 내 예측 모드(MODE_INTRA)로 설정할 수 있다. 이것은 기존과 유사한 화면 내 기술이지만 기존의 구조와의 구분을 위해 I 슬라이스에서 화면 간 기술 또는 화면 내 기술로 분류될 수 있다. 즉, 본 실시예의 영상 부호화 장치는, I 슬라이스에서 시간적인 상관성을 이용하지 않지만 시간적인 상관성의 구조를 사용할 수 있다. part_mode는 부호화 단위에서 분할되는 블록의 크기 및 형태에 대한 정보를 의미한다.Also, the video encoding apparatus according to the present embodiment may set the prediction mode to the inter prediction mode (MODE_INTER) if pred_mode_flag is 0, and may set the prediction mode to the intra prediction mode (MODE_INTRA) if 1 is 1. This is an intra-picture technique similar to the existing one, but it can be classified as an inter-picture technique or an intra-picture technique in I slice to distinguish it from the existing structure. That is, the video encoding apparatus of the present embodiment does not use temporal correlation in the I slice, but may use a temporal correlation structure. part_mode means information on the size and shape of a block divided in a coding unit.

본 실시예와 관련하여 사용되는 일부 신택스를 예시하면 다음과 같다.Some syntaxes used in connection with the present embodiment are exemplified as follows.

시퀀스 파라미터에서 sps_curr_pic_ref_enabled_flag라는 신택스는 IBC 사용 여부에 대한 플래그일 수 있다.In the sequence parameter, the syntax sps_curr_pic_ref_enabled_flag may be a flag indicating whether IBC is used.

픽쳐 파라미터에서 pps_curr_pic_ref_enabled_flag라는 신택스는 픽쳐 단위로 IBC 사용 여부에 대한 플래그일 수 있다.The syntax pps_curr_pic_ref_enabled_flag in the picture parameter may be a flag indicating whether IBC is used in units of pictures.

또한, pps_curr_pic_ref_enabled_flag라는 신택스의 온/오프(on/off)에 따라서 현재 픽쳐를 위한 NumPicTotalCurr를 늘릴지 말지를 결정할 수 있다.In addition, it may be determined whether to increase NumPicTotalCurr for the current picture according to on/off of the syntax pps_curr_pic_ref_enabled_flag.

참조 픽쳐 리스트 0를 만드는 과정에서, pps_curr_pic_ref_enabled_flag에 따라 현재 픽쳐를 참조 픽쳐에 넣을지를 결정하라 수 있다.In the process of creating the reference picture list 0, it may be determined whether to put the current picture in the reference picture according to pps_curr_pic_ref_enabled_flag.

참조 픽쳐 리스트 1을 만드는 과정에서, pps_curr_pic_ref_enabled_flag에 따라 현재 픽쳐의 참조 픽쳐 리스트 추가 여부를 결정할 수 있다.In the process of creating the reference picture list 1, it may be determined whether to add the reference picture list of the current picture according to pps_curr_pic_ref_enabled_flag.

위의 구성에 의하면, 현재 픽쳐는 상기의 플래그들에 따라 화면 간(inter) 예측에서의 참조 픽쳐 리스트에 포함될지가 결정될 수 있다.According to the above configuration, it may be determined whether the current picture is included in the reference picture list in inter prediction according to the flags.

도 13은 도 12에서 사용하는 현재 픽쳐에서 블록매칭을 통해 예측 블록을 생성할 경우, 화면 간 예측에서와 같이 대칭형(symmetric type) 분할 또는 비대칭형(asymmetric type) 분할을 지원하는 예를 설명하기 위한 예시도이다.13 is a diagram illustrating an example of supporting symmetric type partitioning or asymmetric type partitioning as in inter prediction when a prediction block is generated through block matching in the current picture used in FIG. 12 . It is an example diagram.

도 13을 참조하면, 본 실시예에 따른 영상 부호화 방법은, 현재 픽쳐에서 블록 매칭을 통해 예측 블록을 생성하는 경우, 화면 간 예측에서와 같이 2N×2N, 2N×N, N×2N, N×N과 같은 대칭형(symmetric) 분할을 지원하거나, nL×2N, nR×2N, 2N×nU, 2N×nD와 같은 비대칭형(asymmetric) 분할을 지원할 수 있다.Referring to FIG. 13 , in the video encoding method according to the present embodiment, when a prediction block is generated through block matching in the current picture, 2N×2N, 2N×N, N×2N, N× as in inter prediction. A symmetric partition such as N may be supported, or an asymmetric partition such as nL×2N, nR×2N, 2N×nU, or 2N×nD may be supported.

도 14는 도 9의 화면 내 예측(Intra)과 같이 화면 간 예측(Inter)에서 2N×2N, N×N을 지원할 수 있음을 설명하기 위한 예시도이다. 이는 블록 분할부의 분할 방식에 따라 다양한 블록 크기 및 형태가 결정될 수 있다.14 is an exemplary diagram for explaining that 2N×2N and N×N can be supported in the inter prediction (Inter) like the intra prediction (Intra) of FIG. 9 . Various block sizes and shapes may be determined according to the division method of the block division unit.

도 14를 참조하면, 본 실시예에 따른 영상 부호화 방법은, 기존의 화면 내 예측에 사용하는 예측 블록 형태와 같이 2N×2N 및 N×N을 지원할 수 있다. 이는 블록 분할부에서 쿼드트리 분할 방식 또는 미리 정의된 소정의 블록 후보군에 따른 분할 방식 등을 통해 정사각 형태를 지원한 예이며, 화면 내 예측에서도 바이너리 트리 분할 방식 또는 미리 정의돈 소정의 블록 후보군에 직사각 형태를 추가하여 다른 블록 형태 또한 지원할 수 있으며, 이에 대한 설정은 부호화기에서 설정이 가능하다.Referring to FIG. 14 , the video encoding method according to the present embodiment may support 2N×2N and N×N like the form of a prediction block used for conventional intra prediction. This is an example in which the block division unit supports a square shape through a quadtree division method or a division method according to a predefined block candidate group, and even in intra prediction, a binary tree division method or a rectangular shape in a predefined block candidate group Other block types can also be supported by adding a shape, and the setting for this can be set in the encoder.

또한, 화면 내 예측 중 현재 픽쳐에 블록 매칭을 할 경우(ref_idx = curr)에만 스킵(skip)을 적용할 것인지, 기존의 화면 내 예측에도 적용할 것인지, 그 외(else)의 파티션 형태(도 13 참조)를 가진 예측 블록에 대해서도 새로운 화면 내 예측에 적용할 것인지를 부호화기에 설정 가능하다. 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송될 수 있다.In addition, among intra prediction, whether skip is applied only when block matching to the current picture is performed (ref_idx = curr), whether it is applied to existing intra prediction, or other partition types (FIG. 13) Reference), it is possible to set in the encoder whether or not to apply the prediction block to the new intra prediction. Information on this may be transmitted in units of sequences, pictures, slices, and the like.

감산부(205, 도 2 참조)는 부호화할 현재 블록의 화소값으로부터 예측부(200)로부터 생성되는 예측 블록의 화소값들을 감산하여 화소 차이값을 도출함으로써, 잔차 블록을 생성할 수 있다.The subtraction unit 205 (refer to FIG. 2 ) may generate a residual block by subtracting pixel values of the prediction block generated by the prediction unit 200 from the pixel values of the current block to be encoded to derive a pixel difference value.

변환부(210, 도 2 참조)는 감산부(205)에서 현재 블록과 화면 내 예측 또는 화면 간 예측을 통해 생성된 예측 블록과의 차분치인 잔차 블록을 전달받아 주파수 영역으로 변환한다. 변환 과정을 통해 잔차 블록의 각 화소는 변환 블록의 변환 계수에 대응된다. 변환 블록의 크기 및 형태는 부호화 단위와 같거나 작은 크기를 가질 수 있다. 또한, 변환 블록의 크기 및 형태는 예측 단위와 같을 수도 있고 작을 수도 있다. 영상 부호화 장치는 여러 예측 단위를 묶어서 변환 처리를 수행할 수 있다.The transform unit 210 (refer to FIG. 2 ) receives the residual block that is the difference between the current block and the prediction block generated through intra prediction or inter prediction from the subtraction unit 205 and transforms it into the frequency domain. Through the transform process, each pixel of the residual block corresponds to a transform coefficient of the transform block. The size and shape of the transform block may be the same as or smaller than the coding unit. Also, the size and shape of the transform block may be the same as or smaller than the prediction unit. The image encoding apparatus may perform transformation processing by bundling several prediction units.

변환 블록의 크기 또는 형태는 블록 분할부를 통해 결정될 수 있으며, 블록 분할에 따라 정사각 형태 또는 직사각 형태의 변환을 지원할 수 있다. 부호화기/복호화기에서 지원되는 변환 관련 설정 (지원되는 변환 블록의 크기, 형태 등)에 따라 상기 블록 분할 동작에 영향을 줄 수 있다. The size or shape of the transform block may be determined through the block dividing unit, and a square shape or rectangular shape transform may be supported according to the block division. The block division operation may be affected according to the transform related settings supported by the encoder/decoder (size, shape, etc. of a supported transform block).

상기 변환 블록의 크기 및 형태의 후보별 부호화 비용에 따라 각 변환 블록의 크기 및 형태가 결정되고, 결정된 각 변환 블록의 영상 데이터 및 결정된 각 변환 블록의 크기 및 형태 등의 분할 정보들을 부호화할 수 있다.The size and shape of each transform block is determined according to the encoding cost for each candidate of the size and shape of the transform block, and segmentation information such as image data of each determined transform block and the determined size and shape of each transform block can be encoded. .

변환은 1차원 변환 매트릭스에 의해 변환될 수 있다. 예컨대, 이산 코사인 변환(discrete cosine transform, DCT), 이산 사인 변환(discrete cosine transform, DST), 수평, 수직 단위로 각 변환 매트릭스가 적응적으로 사용될 수 있다. 적응적 사용은 일례로 블록의 크기, 블록의 형태, 블록의 종류(휘도/색차), 부호화 모드, 예측 모드 정보, 양자화 파라미터, 이웃 블록의 부호화 정보 등의 여러 요인을 토대로 결정하는 것을 포함할 수 있다.The transform may be transformed by a one-dimensional transform matrix. For example, each transform matrix may be adaptively used in discrete cosine transform (DCT), discrete cosine transform (DST), horizontal and vertical units. The adaptive use may include, for example, determining the size of a block, the shape of the block, the type of block (luminance/color difference), encoding mode, prediction mode information, quantization parameters, and determining based on various factors such as encoding information of neighboring blocks. there is.

예를 들어, 화면 내 예측의 경우, 예측 모드가 수평일 경우에는, 수직 방향으로는 DCT 기반의 변환 매트릭스가, 수평 방향으로는 DST 기반의 변환 매트릭스가 사용될 수 있다. 또한, 예측 모드가 수직일 경우에는, 수평 방향으로는 DCT 기반의 변환 매트릭스가, 수직 방향으로는 DST 기반의 변환 매트릭스가 사용될 수 있다.For example, in the case of intra prediction, when the prediction mode is horizontal, a DCT-based transform matrix may be used in a vertical direction and a DST-based transform matrix may be used in a horizontal direction. Also, when the prediction mode is vertical, a DCT-based transform matrix may be used in a horizontal direction and a DST-based transform matrix may be used in a vertical direction.

변환 매트릭스는 위의 설명에서 나온 것에 한정되지는 않는다. 이에 대한 정보는 묵시적 또는 명시적인 방법을 사용하여 결정될 수 있으며, 블록의 크기, 블록의 형태, 부호화 모드, 예측 모드, 양자화 파라미터, 이웃 블록의 부호화 정보 등의 요인들 중 하나 이상의 요인 또는 이들의 조합에 따라 결정될 수 있으며, 상기 관련 정보는 시퀀스, 픽쳐, 슬라이스, 블록 등의 단위로 전송할 수 있다.The transformation matrix is not limited to that from the description above. Information on this may be determined using an implicit or explicit method, and one or more factors among factors such as block size, block shape, encoding mode, prediction mode, quantization parameter, and encoding information of a neighboring block, or a combination thereof , and the related information may be transmitted in units of sequences, pictures, slices, blocks, and the like.

여기서, 명시적인 방법을 사용할 경우를 고려하면, 수평 및 수직 방향에 대한 2개 이상의 변환 매트릭스를 후보군으로 두고 있을 경우, 각 방향마다 어떤 변환 매트릭스를 사용했는지에 대한 정보를 보낼 수도 있고, 또는 수평, 수직 방향에 대해 각각 어떤 변환 매트릭스를 사용했는지에 대하여 각각 하나의 쌍으로 묶어 2개 이상의 쌍을 후보군으로 두어 어떤 변환 매트릭스를 수평, 수직 방향에서 사용했는지에 대한 정보를 전송할 수도 있다.Here, considering the case of using an explicit method, if two or more transformation matrices for horizontal and vertical directions are placed as candidates, information on which transformation matrix is used in each direction may be sent, or horizontal, Information on which transformation matrix is used in the horizontal and vertical directions may be transmitted by grouping two or more pairs as a candidate group with respect to which transformation matrix is used in the vertical direction, respectively.

또한, 영상의 특성을 고려하여 부분적인 변환 또는 전체적인 변환을 생략할 수 있다. 예를 들면, 수평과 수직 성분들 중 어느 하나 또는 둘 모두를 생략할 수 있다. 화면 내 예측 또는 화면 간 예측이 잘 이뤄지지 않아 현재 블록과 예측 블록의 차이가 크게 발생할 경우 즉, 잔차 성분이 클 때, 이를 변환할 시 그에 따른 부호화 손실이 커질 수 있기 때문이다. 이는 부호화 모드, 예측 모드, 블록의 크기, 블록의 형태, 블록의 종류(휘도/색차), 양자화 파라미터, 이웃 블록의 부호화 정보 등의 요인들 중 최소 하나의 요인 도는 이들의 조합에 따라 결정될 수 있다. 위의 조건에 따라 묵시적 또는 명시적인 방법을 사용하여 이를 표현할 수 있고, 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송이 가능하다.In addition, partial transformation or total transformation may be omitted in consideration of the characteristics of the image. For example, either or both of the horizontal and vertical components may be omitted. This is because, when the difference between the current block and the prediction block is large because intra prediction or inter prediction is not performed well, that is, when a residual component is large, a corresponding encoding loss may increase when transforming it. This may be determined according to at least one factor or a combination of factors such as encoding mode, prediction mode, block size, block shape, block type (luminance/color difference), quantization parameter, and encoding information of a neighboring block. . According to the above conditions, it can be expressed using an implicit or explicit method, and information about this can be transmitted in units of sequences, pictures, slices, and the like.

양자화부(215, 도 2 참조)는 변환부(210)에서 변환된 잔차 성분의 양자화를 수행한다. 양자화 파라미터는 블록 단위로 결정이 되며, 양자화 파라미터는 시퀀스, 픽쳐, 슬라이스, 블록 등의 단위로 설정될 수 있다.The quantization unit 215 (refer to FIG. 2 ) quantizes the residual component transformed by the transform unit 210 . The quantization parameter is determined in units of blocks, and the quantization parameters may be set in units of sequences, pictures, slices, blocks, and the like.

일례로, 양자화부(215)는 현재 블록의 왼쪽, 왼쪽 위, 위쪽, 오른쪽 위, 왼쪽 아래 등의 이웃 블록으로부터 유도된 1개 또는 2개 이상의 양자화 파라미터를 사용하여 현재 양자화 파라미터를 예측할 수 있다.For example, the quantization unit 215 may predict the current quantization parameter by using one or more quantization parameters derived from neighboring blocks such as left, upper left, upper, right upper, lower left, etc. of the current block.

또한, 양자화부(215)는 이웃 블록으로부터 예측한 양자화 파라미터가 존재하지 않는 경우 즉, 블록이 픽쳐, 슬라이스 등의 경계에 있는 경우, 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송된 기본 파라미터와의 차분치를 출력 혹은 전송할 수 있다. 이웃 블록으로부터 예측한 양자화 파라미터가 존재하는 경우, 해당 블록의 양자화 파라미터를 사용하여 차분치를 전송할 수도 있다.In addition, the quantization unit 215 determines the difference from the basic parameters transmitted in units of sequences, pictures, slices, etc. when the quantization parameter predicted from the neighboring block does not exist, that is, when the block is at the boundary between pictures, slices, etc. values can be printed or transmitted. When a quantization parameter predicted from a neighboring block exists, a difference value may be transmitted using the quantization parameter of the corresponding block.

양자화 파라미터를 유도할 블록의 우선순위는 미리 설정할 수도 있고, 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송할 수 있다. 잔차 블록을 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization), 양자화 가중치 매트릭스(Quantization weighted matrix) 또는 이를 개량한 기법을 통해 양자화할 수 있다. 이는 1개 이상의 양자화 기법을 후보로 둘 수 있으며 부호화 모드, 예측 모드 정보 등에 의해 결정될 수 있다.The priority of the block from which the quantization parameter is to be derived may be set in advance, or may be transmitted in units of sequences, pictures, slices, and the like. The residual block may be quantized through Dead Zone Uniform Threshold Quantization (DZUTQ), a quantization weighted matrix, or an improved technique thereof. This may include one or more quantization techniques as candidates, and may be determined by encoding mode, prediction mode information, and the like.

예를 들어, 양자화부(215)는 양자화 가중치 매트릭스를 화면 간 부호화, 화면 내 부호화 단위 등에 적용하기 위해 설정해 둘 수 있고, 또한 화면 내 예측 모드에 따라 다른 가중치 매트릭스를 둘 수도 있다. 양자화 가중치 매트릭스는 M×N의 크기로 블록의 크기가 양자화 블록 크기와 같다고 가정할 때, 각 주파수 성분의 위치마다 양자화 계수를 달리하여 구성할 수 있다. 그리고 양자화부(215)는 기존의 여러 양자화 방법 중 택일할 수도 있고, 부호화기/복호화기의 동일한 설정하에 사용될 수도 있다. 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송 가능하다.For example, the quantization unit 215 may set a quantization weight matrix to be applied to inter-picture coding, an intra-coding unit, etc., and may provide a different weight matrix according to an intra prediction mode. The quantization weight matrix has a size of M×N, and assuming that the size of the block is the same as the size of the quantization block, the quantization coefficient can be configured differently for each position of each frequency component. In addition, the quantization unit 215 may select one of several existing quantization methods, or may be used under the same setting of an encoder/decoder. Information on this can be transmitted in units of sequences, pictures, slices, and the like.

한편, 도 2 및 3에 도시한 역양자화부(220,315) 및 역변환부(225,320)는 위의 변환부(210) 및 양자화부(215)에서의 과정을 역으로 수행하여 구현될 수 있다. 즉, 역양자화부(220)는 양자화부(215)에서 생성된 양자화된 변환 계수를 역양자화할 수 있고, 역변환부(225)는 역양자화된 변환 계수를 역변환하여 복원된 잔차 블록을 생성할 수 있다. Meanwhile, the inverse quantization units 220 and 315 and the inverse transform units 225 and 320 illustrated in FIGS. 2 and 3 may be implemented by performing the above processes in the transform unit 210 and the quantization unit 215 inversely. That is, the inverse quantization unit 220 may inverse quantize the quantized transform coefficient generated by the quantizer 215, and the inverse transform unit 225 may inversely transform the inverse quantized transform coefficient to generate a reconstructed residual block. there is.

도 2 및 3에 도시한 가산부(230, 324)는 상기 복원된 잔차 블록의 화소값에 예측부로부터 생성되는 예측 블록의 화소값을 가산하여 복원 블록이 생성될 수 있다. 복원 블록은 부호화 및 복호화 픽쳐 버퍼(240, 335)에 저장되어 예측부 및 필터부에 제공될 수 있다.The adders 230 and 324 shown in FIGS. 2 and 3 may generate a reconstructed block by adding the pixel value of the prediction block generated from the prediction unit to the pixel value of the reconstructed residual block. The reconstructed block may be stored in the encoding and decoding picture buffers 240 and 335 and provided to the prediction unit and the filter unit.

필터부(235, 도 2 참조)는 복원 블록에 디블록킹 필터(Deblocking Filter), SAO(Sample Adaptive Offset), ALP(Adaptive Loop Filter) 등과 같은 인루프 필터를 적용할 수 있다. 디블록킹 필터는 부호화 및 복호화 과정에서 발생하는 블록 경계 사이의 왜곡을 제거하기 위해, 복원 블록을 필터링할 수 있다. SAO는 잔차 블록에 대하여, 화소 단위로 원본 영상과 복원 영상과의 차이를 오프셋으로 복원해주는 필터 과정이다. ALF는 예측 블록과 복원 블록 사이의 차이를 최소화하기 위해 필터링을 수행할 수 있다. ALF는 디블록킹 필터를 통해 복원된 블록과 현재 블록의 비교값을 기초로 필터링을 수행할 수 있다.The filter unit 235 (refer to FIG. 2 ) may apply an in-loop filter such as a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filter (ALP) to the reconstructed block. The deblocking filter may filter the reconstructed block to remove distortion between block boundaries generated during encoding and decoding. SAO is a filter process that restores the difference between the original image and the reconstructed image as an offset for the residual block in units of pixels. The ALF may perform filtering to minimize the difference between the prediction block and the reconstruction block. The ALF may perform filtering based on a comparison value between the block restored through the deblocking filter and the current block.

엔트로피 부호화부(245, 도 2 참조)는 양자화부(215)를 통해 양자화된 변환 계수들을 엔트로피 부호화할 수 있다. 예를 들어, 컨텍스트 적응 가변 길이 코딩(CAVLC), 컨텍스트 적응 2진 산술 코딩(CABAC), 구문 기반 컨텍스트 적응 2진 산술 코딩(SBAC), 확률 간격 파티셔닝 엔트로피 부호화 외의 다른 부호화 방식을 사용하여 구현될(PIPE) 코딩 등의 기법을 수행할 수 있다.The entropy encoder 245 (refer to FIG. 2 ) may entropy-encode the transform coefficients quantized through the quantizer 215 . For example, to be implemented using a coding scheme other than context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy coding ( PIPE) coding may be performed.

엔트로피 부호화부(245)는 양자화 계수를 부호화한 비트열과 부호화된 비트열을 복호화하는데 필요한 다양한 정보들을 부호화 데이터에 포함할 수 있다. 부호화 데이터는 부호화된 블록 형태, 양자화 계수 및 양자화 블록이 부호화된 비트열 및 예측에 필요한 정보 등을 포함할 수 있다. 양자화 계수의 경우 2차원의 양자화 계수를 1차원으로 스캐닝할 수 있다. 양자화 계수는 영상의 특성에 따라 분포도가 달라질 수 있다. 특히, 화면 내 예측의 경우 계수의 분포가 예측 모드에 따라 특정한 분포를 가질 수 있기 때문에 스캔 방법을 달리 설정할 수 있다.The entropy encoder 245 may include, in the encoded data, a bit string obtained by encoding a quantization coefficient and various pieces of information necessary for decoding the encoded bit string. The encoded data may include an encoded block type, a quantization coefficient, and a bit stream in which the quantized block is encoded, and information required for prediction. In the case of a quantization coefficient, a two-dimensional quantization coefficient may be scanned in one dimension. The distribution of the quantization coefficients may vary depending on the characteristics of the image. In particular, in the case of intra prediction, since the distribution of coefficients may have a specific distribution depending on the prediction mode, a scanning method may be set differently.

또한, 엔트로피 부호화부(245)는 부호화하는 블록의 크기에 따라 달리 설정될 수 있다. 스캔 패턴은 지그재그, 대각선, 래스터(raster) 등 다양한 패턴들 중 적어도 어느 하나 이상으로 미리 설정하거나 후보로 설정할 수 있으며, 부호화 모드, 예측 모드 정보 등에 의해 결정될 수 있고, 부호화기와 복호화기의 동일한 설정하에 사용될 수 있다. 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송 가능하다.Also, the entropy encoder 245 may be set differently according to the size of a block to be encoded. The scan pattern may be preset or set as a candidate to at least one of various patterns such as zigzag, diagonal, raster, etc., and may be determined by encoding mode and prediction mode information, etc. can be used Information on this can be transmitted in units of sequences, pictures, slices, and the like.

엔트로피 부호화부(245)에 입력되는 양자화된 블록(이하, 양자화 블록)의 크기는 변환 블록의 크기와 같거나 작을 수 있다. 또한, 양자화 블록은 2개 이상의 서브 블록으로 분할될 수 있으며, 분할된 경우에 분할 블록에서 스캔 패턴은 기존의 양자화 블록과 동일하게 설정할 수도 있고, 다르게 설정할 수도 있다.The size of the quantized block (hereinafter, quantized block) input to the entropy encoder 245 may be equal to or smaller than the size of the transform block. In addition, the quantization block may be divided into two or more sub-blocks, and when divided, the scan pattern in the divided block may be set to be the same as that of the existing quantization block or may be set differently.

예를 들어, 기존의 양자화 블록의 스캔 패턴을 지그재그라고 할 경우, 서브 블록 모두에 지그재그를 적용할 수도 있고, 또는 평균값(DC) 성분을 포함하는 블록의 좌측 상단에 위치하는 서브블록에 지그재그 패턴을 적용하고, 그 이외의 블록에는 대각선 패턴을 적용할 수 있다. 이 역시 부호화 모드, 예측 모드 정보 등에 따라 결정될 수 있다.For example, if the scan pattern of the existing quantization block is called zigzag, zigzag may be applied to all subblocks, or a zigzag pattern may be applied to a subblock located at the upper left of a block including an average value (DC) component. You can apply a diagonal pattern to other blocks. This may also be determined according to encoding mode, prediction mode information, and the like.

또한, 엔트로피 부호화부(245)에서 스캔 패턴의 시작 위치는 기본적으로 좌측 상단으로부터 시작을 하나, 영상의 특성에 따라 우측 상단, 우측 하단 또는 좌측 하단에서 시작할 수 있으며, 2개 이상의 후보군 중 어느 것을 선택했는지에 대한 정보를 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송할 수 있다. 부호화 기술로서는 엔트로피 부호화 기술이 사용될 수 있으나 이에 한정되지 않는다.In addition, the start position of the scan pattern in the entropy encoder 245 basically starts from the upper left, but may start from the upper right, lower right, or lower left depending on the characteristics of the image, and any one of two or more candidate groups is selected Information on whether or not it has been performed may be transmitted in units of sequences, pictures, slices, and the like. As the encoding technology, an entropy encoding technology may be used, but is not limited thereto.

한편, 도 2 및 도 3에 도시한 역양자화부(220)의 역양자화 및 역변환부(225)의 역변환은 위의 양자화부(215)의 양장화 및 변환부(210)의 변환 구조를 반대로 구성하고 기본적인 필터부(235, 330)를 조합하는 것으로 구현 가능하다.On the other hand, the inverse quantization of the inverse quantization unit 220 and the inverse transformation of the inverse transform unit 225 shown in FIGS. 2 and 3 reverse the quantization of the quantization unit 215 and the transformation structure of the transform unit 210. And it can be implemented by combining the basic filter units (235, 330).

다음으로, 본 발명의 영상 부호화 장치에 채용할 수 있는 보간(interpolation)에 대하여 간략히 설명하면 다음과 같다.Next, interpolation that can be employed in the video encoding apparatus of the present invention will be briefly described as follows.

블록 매칭을 통한 예측의 정확성을 높이기 위해 정수 단위보다 정밀한 소수단위의 해상도로 보간을 수행하는데, 이러한 보간법으로는 DCT-IF(discrete cosine transform based interpolation filter) 등의 기술이 있다. HEVC(high efficiency video coding)에서의 보간법으로는 DCT-IF 기술을 사용하고 있는데, 예를 들어 정수 사이의 1/2, 1/4 단위로 화소를 생성하여 참조 픽쳐를 보간하고, 이를 참조하여 블록 매칭을 수행하여 예측 블록을 생성할 수 있다.In order to increase the accuracy of prediction through block matching, interpolation is performed with a resolution of a fractional unit that is more precise than an integer unit. A DCT-IF technique is used as an interpolation method in high efficiency video coding (HEVC). For example, a pixel is generated in units of 1/2 and 1/4 between integers, a reference picture is interpolated, and a block is referred to. A prediction block may be generated by performing matching.

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

표 1과 표 2는 각각 휘도 성분과 색차 성분에서 사용되는 필터 계수를 보여주고 있는데, 휘도 성분에 대해서는 8-tap, 색차 성분에 대해서는 4-tap의 DCT-IF 필터가 사용된다. 색차 성분에 대해서도 색상 포맷(color format)에 따라 필터를 달리 적용할 수 있다. YCbCr의 4:2:0의 경우에는 표 2에서와 같은 필터를 적용할 수 있고, 4:4:4에서는 표 2가 아닌 표 1과 같은 필터나 그 외의 필터를 적용할 수 있고, 4:2:2일 경우 표 2와 같은 수평 1D 4-탭 필터(horizontal 1D 4-tap filter)와 표 1과 같은 수직 1D 8-탭 필터(vertical 1D 8-tap filter)를 적용할 수 있다.Table 1 and Table 2 show the filter coefficients used for the luminance component and the chrominance component, respectively. For the luminance component, an 8-tap DCT-IF filter is used and for the chrominance component, a 4-tap DCT-IF filter is used. A filter may be applied differently to a color difference component according to a color format. In the case of 4:2:0 of YCbCr, the filter shown in Table 2 can be applied, and in 4:4:4, the filter shown in Table 1 or other filters can be applied instead of Table 2, and 4:2 In the case of :2, the horizontal 1D 4-tap filter shown in Table 2 and the vertical 1D 8-tap filter shown in Table 1 can be applied.

도 15는 본 발명의 일실시예에 따른 영상 부호화 방법에서 영상의 a, b, c의 위치(x라고 가정)에 있는 화소에 대해서는 수평 1D 필터를 수행하는 과정을 설명하기 위한 도면이다.15 is a diagram for explaining a process of performing a horizontal 1D filter on pixels at positions a, b, and c (assumed to be x) of an image in the image encoding method according to an embodiment of the present invention.

도 15에 도시한 바와 같이, 제1 화소(G)와 이에 인접한 제2 화소(H) 사이의 a, b, c의 위치(x라고 가정)에 있는 부화소에 대해서는 horizontal 1D filter를 적용할 수 있다. 이를 수식으로 나타내면 다음과 같다.15, a horizontal 1D filter can be applied to sub-pixels located at positions a, b, and c (assuming x) between the first pixel (G) and the second pixel (H) adjacent thereto. there is. This can be expressed as a formula as follows.

x = ( f1*E + f2*F + f3*G + f4*H + f5*I + f6*J + 32 ) / 64x = ( f1*E + f2*F + f3*G + f4*H + f5*I + f6*J + 32 ) / 64

다음, d, h, n의 위치(y라고 가정)에 있는 부화소에 대해서는 vertical 1D filter를 적용할 수 있다. 이를 수식으로 나타내면 다음과 같다.Next, a vertical 1D filter can be applied to sub-pixels at positions d, h, and n (assuming y). This can be expressed as a formula as follows.

y = ( f1*A + f2*C + f3*G + f4*M + f5*R + f6*T + 32 ) / 64y = ( f1*A + f2*C + f3*G + f4*M + f5*R + f6*T + 32 ) / 64

그리고 중앙에 있는 부화소들 e,f,g,i,j,k,p,q,r에 대해서는 2D 분할가능 필터(2D separable filter)를 적용할 수 있다. 부화소 e를 예로 들면, a와 수직 방향에 있는 화소들을 먼저 보간한 후 그 화소들을 이용해 보간한다. 그리고 G 및 H 사이의 a를 보간하듯 horizontal 1D filter를 수행하고, 그로 인해 나온 부화소들을 대상으로 vertical 1D filter를 수행하여 e값을 얻을 수 있다. 그리고 색차 신호에 대해서도 이와 비슷한 동작을 수행할 수 있다.In addition, a 2D separable filter may be applied to sub-pixels e, f, g, i, j, k, p, q, r in the center. Taking the sub-pixel e as an example, pixels in a direction perpendicular to a are first interpolated and then interpolated using the pixels. Then, horizontal 1D filter is performed as if interpolating a between G and H, and vertical 1D filter is performed on the resulting sub-pixels to obtain e value. In addition, a similar operation may be performed with respect to a color difference signal.

위의 설명은 보간의 일부 설명일 뿐이다. DCT-IF 이외의 다른 필터 또한 사용이 가능하며 소수단위마다 적용되는 필터 종류 및 탭의 개수를 달리할 수 있다. 예를 들어, 1/2에는 8-tap 칼만 필터, 1/4에는 6-tap 위너 필터, 1/8에는 2-tap 선형 필터를 DCT-IF처럼 고정된 계수 또는 필터 계수를 계산하여 필터 계수를 부호화할 수도 있다. 위와 같이, 픽쳐에 대해 하나의 보간 필터를 사용할 수도 있고, 영상에 특성에 따라 영역마다 다른 보간 필터를 사용할 수도 있으며, 다수의 보간 필터를 적용한 2개 이상의 참조 픽쳐들을 생성하고 그 중에 하나를 선택할 수도 있다.The above explanation is only a partial explanation of interpolation. Filters other than DCT-IF can also be used, and the type of filter applied to each decimal unit and the number of taps can be varied. For example, an 8-tap Kalman filter for 1/2, a 6-tap Wiener filter for 1/4, a 2-tap linear filter for 1/8, a fixed coefficient, or filter coefficients by calculating the filter coefficients as DCT-IF. It can also be encoded. As described above, one interpolation filter may be used for a picture, a different interpolation filter may be used for each region according to the characteristics of the image, and two or more reference pictures to which a plurality of interpolation filters are applied may be created and one of them may be selected. there is.

참조 픽쳐의 타입, 시간적 계층, 참조 픽쳐의 상태(예컨대, 현재 픽쳐인지 아닌지) 등의 부호화 정보에 따라 다른 필터가 적용될 수 있다. 위에서 언급한 정보들은 시퀀스, 픽쳐, 슬라이스 등의 단위로 설정이 가능하며, 그 단위로 전송 가능하다.Different filters may be applied according to encoding information such as the type of the reference picture, the temporal layer, and the state of the reference picture (eg, whether it is a current picture or not). The above-mentioned information can be set in units of sequences, pictures, slices, etc., and can be transmitted in units of those units.

다음으로 본 실시예에 따른 영상 부호화 방법에 채용할 수 있는 움직임 추정(motion estimation), 움직임 보상(motion compensation) 및 움직임 예측(motion prediction)에 대한 개선된 기술을 상세히 설명하기 전에 이들 용어의 기본적인 의미를 정의하면 다음과 같다.Next, before describing in detail improved techniques for motion estimation, motion compensation, and motion prediction that can be employed in the image encoding method according to the present embodiment, basic meanings of these terms is defined as follows.

움직임 추정은 부호화하고자 하는 현재 블록의 움직임을 예측하는데 있어서 영상 프레임을 작은 블록으로 분할하여 시간적으로 이전 또는 이후의 기부호화된 프레임(참조 프레임) 상의 어떤 블록으로부터 이동되었는지를 추정하는 과정을 말한다. 즉, 움직임 추정은 압축하려는 현재 블록의 부호화시에 목표 블록과 가장 유사한 블록을 찾아내는 과정이라고 할 수 있다. 블록 기반의 움직임 추정은 비디오 객체 또는 화면처리단위 블록(macro block 등)이 시간상으로 어느 위치로 움직였는지를 추정하는 과정을 말할 수 있다.Motion estimation refers to a process of dividing an image frame into small blocks in predicting the motion of a current block to be encoded and estimating from which block in a temporally previous or subsequent code-coded frame (reference frame) it is moved. That is, motion estimation can be said to be a process of finding a block most similar to a target block when encoding a current block to be compressed. Block-based motion estimation may refer to a process of estimating to which position a video object or a screen processing unit block (such as a macro block) moved in time.

움직임 보상은 현재 영상을 부호화하기 위하여 이전에 부호화된 참조 영상의 적어도 일부 영역을 가져와서 현재 영상을 예측하기 위하여 움직임 추정 과정에서 찾은 최적의 예측 블록에 대한 움직임 정보(모션 벡터, 참조 픽쳐 인덱스)를 바탕으로 현재 블록의 예측 블록을 생성하는 것을 의미한다. 즉, 움직임 보상은 부호화하려는 현재 블록과 가장 유사한 블록이라고 찾아낸 참조 블록과의 차이로써 오차 블록을 만드는 과정을 말할 수 있다.In order to encode the current image, motion compensation obtains at least a partial region of a previously encoded reference image to obtain motion information (motion vector, reference picture index) for the optimal prediction block found in the motion estimation process to predict the current image. It means to generate a prediction block of the current block based on the That is, motion compensation may refer to a process of creating an error block with a difference between a current block to be encoded and a reference block found to be the most similar block.

움직임 예측은 움직임 보상을 위하여 부호화 시에 움직임 벡터를 찾는 것을 의미한다. 움직임 예측의 주요 기술로는 스킵(skip), 시간적 예측, 공간적 예측 등이 있으며, 스킵은 화면의 움직임이 일정하여 영상 부호화 장치에서 예측한 움직임 벡터의 크기가 제로(0)이거나, 잔차가 충분히 작아 무시할 수 있는 경우 해당 영상 블록의 부호화를 생략하고 넘어가는 것을 의미한다. 시간적 예측은 주로 화면 간 예측에 이용될 수 있고, 공간적 예측 또는 시점간 예측은 주로 화면 내 예측에 이용될 수 있다.Motion prediction means finding a motion vector during encoding for motion compensation. Major techniques of motion prediction include skip, temporal prediction, and spatial prediction. In skip, the size of a motion vector predicted by the video encoding apparatus is zero because the motion of the screen is constant, or the residual is small enough. If it can be ignored, it means skipping the encoding of the corresponding video block. Temporal prediction may be mainly used for inter prediction, and spatial prediction or inter-view prediction may be mainly used for intra prediction.

화면 간 예측를 통해 나오는 정보는, 참조 픽쳐 리스트 방향을 구분하는 정보(단방향(L0, L1), 양방향), 참조 픽쳐 리스트 내의 참조 픽쳐를 구분하는 인덱스, 움직임 벡터 등을 포함할 수 있다. 시간적인 상관성을 이용하기 때문에 현재 블록과 이웃하는 블록의 움직임 벡터가 같거나 비슷하게 나타나는 특성을 활용할 경우 효율적으로 움직임 정보를 부호화할 수 있다.The information output through inter prediction may include information for discriminating a reference picture list direction (unidirectional (L0, L1), bidirectional), an index for discriminating reference pictures in the reference picture list, a motion vector, and the like. Since the temporal correlation is used, motion information can be efficiently encoded by using the characteristic in which the motion vectors of the current block and the neighboring blocks are the same or similar.

도 16은 본 발명의 일실시예에 따른 영상 부호화 방법에 채용할 수 있는 현재 블록과 주변 블록에 대한 예시도이다.16 is an exemplary diagram of a current block and neighboring blocks that can be employed in an image encoding method according to an embodiment of the present invention.

도 16에 나타내 바와 같이, 현재 블록의 주변 블록에 대한 후보군의 참조 여부에 대한 설정은 현재 픽쳐의 타입, 시간적인 식별자(temporal id) 등의 정보에 따라 결정될 수도 있으며 이에 대한 정보는 고정되어 사용되거나 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송될 수 있다.As shown in FIG. 16 , the setting of whether to refer to the candidate group for the neighboring block of the current block may be determined according to information such as the type of the current picture and the temporal identifier (temporal id), and this information is fixed and used or It may be transmitted in units of sequences, pictures, slices, and the like.

여기서, 후보군에 대한 참조 여부에 대한 설정은 예컨대 공간적으로 인접한 블록(A, B, C, D, E)만 사용하거나, 공간적으로 인접한 블록(A, B, C, D, E)과 시간적으로 인접한 블록(H, I, J)을 사용하거나, 또는 공간적으로 인접한 블록(A, B, C, D, E)과 공간적으로 떨어져 있는 블록(F, G)를 사용하는 설정을 포함할 수 있다.Here, the setting of whether to refer to the candidate group is, for example, using only spatially adjacent blocks (A, B, C, D, E) or temporally adjacent to spatially adjacent blocks (A, B, C, D, E). It can include a setting using blocks (H, I, J) or using blocks (F, G) that are spatially separated from blocks (A, B, C, D, E) that are spatially adjacent to each other.

다음은 "현재 픽쳐에 블록 매칭의 적용이 가능하다"는 설정에 대해 설명하면 다음과 같다.The following describes the setting of “block matching can be applied to the current picture”.

먼저, I 픽쳐의 경우를 설명하면, 예를 들어, 공간적으로 근접한 블록을 먼저 우선순위에 놓고 그 외의 블록들을 후보군으로 설정할 수 있다. 일례로, 참조 블록들을 E → D → C → B → A → H → I → J의 기재된 순서대로 가용성(availability)을 확인할 수 있다. 가용성은 사용 가능하지 여부를 판단하기 위한 것으로서 미리 설정된 기준값과 대비되거나 가용성 체크된 다른 값들과 상대적으로 대비될 수 있다. 가용성은 후보 블록의 부호화 모드, 움직임 정보, 후보 블록의 위치 등으로 판단될 수 있다. 움직임 정보는 움직임 벡터, 참조 방향, 참조 픽쳐 인덱스 등을 포함할 수 있다.First, if the case of the I picture is described, for example, a block that is spatially adjacent may be prioritized first, and other blocks may be set as a candidate group. As an example, availability of reference blocks may be checked in the order of E → D → C → B → A → H → I → J. Availability is for determining whether availability is available, and may be compared with a preset reference value or may be compared with other values checked for availability. Availability may be determined by the coding mode of the candidate block, motion information, the position of the candidate block, and the like. The motion information may include a motion vector, a reference direction, a reference picture index, and the like.

현재 픽쳐가 I 픽쳐이므로, 부호화 모드가 본 실시예의 화면 내 예측(이하, INTER)으로 되어있을 때만 움직임 정보가 존재한다. 그렇기 때문에 우선순위대로 볼 때 먼저 INTER인지 확인한다. 예를 들어, n이 3이고 E가 INTER로 부호화가 되었다면 E는 후보군에서 제외하고 그 다음의 D를 확인한다. D가 INTER로 부호화가 되었다면 현재 픽쳐에서 블록 매칭을 수행하기 때문에 움직임 정보를 갖고 있으며, 이러한 움직임 정보를 토대로 D를 후보군에 추가한다. 그러면 n은 2개가 남는다. 그런 다음, 영상 부호화 장치는 다시 우선순위를 확인해 볼 수 있다. 그렇게 해서 최종 3개의 후보가 채워지면 후보군 찾는 작업을 중단한다.Since the current picture is an I picture, motion information exists only when the encoding mode is set to intra prediction (hereinafter, INTER) of the present embodiment. Therefore, in order of priority, first check if it is INTER. For example, if n is 3 and E is encoded as INTER, E is excluded from the candidate group and the next D is checked. If D is encoded as INTER, it has motion information because block matching is performed on the current picture, and D is added to the candidate group based on this motion information. Then there are two n left. Then, the image encoding apparatus may check the priority again. In this way, when the final three candidates are filled, the search for candidate groups is stopped.

가용성은 부호화 모드로만 이용하는 것이 아니고 픽쳐, 슬라이스, 타일 등의 경계(boudnary)인 경우에도 이용할 수 있다. 경계인 경우, 가용성은 이용하지 않음(not available)으로 체크된다. 그리고 이미 채워진 후보와 같거나 비슷하다는 판단 결과가 나올 경우, 해당 블록은 후보에서 제외되고, 참조 화소 구성부는 그 다음 후보의 가용성을 체크하게 된다.Availability is not only used in the encoding mode, but can also be used in the case of a boundary between a picture, a slice, and a tile. In case of boundary, availability is checked as not available. In addition, when the result of determining that the candidate is the same as or similar to the already filled candidate is obtained, the corresponding block is excluded from the candidate, and the reference pixel constituent unit checks the availability of the next candidate.

여기서 INTER는 기존의 화면간 예측(inter)과 다르다. 즉, 본 실시예의 INTER 모드는 화면간 예측(inter) 구조를 활용할 뿐 현재 픽쳐에서 예측 블록을 생성하기 때문에 참조 픽터에서 예측 블록을 생성하는 화면간 예측과는 차이가 있다. 즉, 본 실시예의 부호화 모드에서는 현재 픽쳐에서 블록 매칭하는 방법을 INTER 모드와 intra(기존 intra와 동일함)로 분류하여 적용할 수 있다.Here, INTER is different from the existing inter prediction (inter). That is, the INTER mode of the present embodiment is different from inter prediction in which a prediction block is generated from a reference picture because a prediction block is generated from a current picture only by using an inter structure. That is, in the encoding mode of the present embodiment, the block matching method in the current picture can be applied by classifying the INTER mode and intra (same as the existing intra).

이하에서는 모션 벡터 카피(MVC)와 모션 벡터 예측(MVP)에 대해서 구분하여 설명하기로 한다. 그 이유는, 스케일링 과정의 포함 여부가 다르기 때문이다.Hereinafter, motion vector copy (MVC) and motion vector prediction (MVP) will be separately described. The reason is that whether or not the scaling process is included is different.

모션 벡터 예측(MVP)에 대해 먼저 설명하면 다음과 같다.The motion vector prediction (MVP) will be described first.

P 픽쳐나 B 픽쳐의 경우In the case of a P picture or B picture

위에서 언급한 후보들(A, B, C, D, E, F, G, H, I, J)에 더하여 시간적인 후보(F, G)도 포함하여 설명하기로 한다. 본 실시예에서는 후보를 공간적으로 탐색하고, 시간적으로 탐색하고, 혼합 리스트를 구성하여 탐색하고, 고정(constant) 후보를 탐색하는 기재된 순서대로 진행한다고 가정한다.In addition to the above-mentioned candidates (A, B, C, D, E, F, G, H, I, J), temporal candidates (F, G) are also included in the description. In this embodiment, it is assumed that candidates are spatially searched, temporally searched, searched by constructing a mixed list, and performed in the described order to search for constant candidates.

먼저, 후보들의 우선순위를 정하고 그에 따라 가용성(availability)을 체크한다. 움직임 벡터의 후보 개수(n)는 2로 설정하고, 우선순위는 괄호 안에 기재한 바와 같다고 가정한다.First, we prioritize candidates and check availability accordingly. It is assumed that the number of motion vector candidates (n) is set to 2, and the priority is as described in parentheses.

예를 들면, 공간적으로 탐색할 때 다음과 같은 그룹들로 분류할 수 있다.For example, when searching spatially, it can be classified into the following groups.

그룹 1_1 = {A, B, C, I, J}, ( C → B → A → I → J)Group 1_1 = {A, B, C, I, J}, ( C → B → A → I → J)

그룹 1_2 = {D, E, H}, (D → E → H)Group 1_2 = {D, E, H}, (D → E → H)

본 실시예에서 두 개의 그룹들 중 그룹 1_1은 현재 블록을 기준으로 바로 위쪽, 왼쪽 위쪽, 그리고 오른쪽 위쪽에 있는 블록들을 포함하고, 그룹 1_2는 현재 블록을 기준으로 바로 인접한 왼쪽, 바로 인접하지 않은 왼쪽, 그리고 왼쪽 아래에 있는 블록들을 포함한다.In this embodiment, among the two groups, group 1_1 includes blocks immediately above, above, left, and above the current block, and group 1_2 is immediately adjacent to the left and not immediately adjacent to the current block. , and the blocks in the lower left.

다른 실시예로서, 세 개의 그룹들로 구분하여 움직임 벡터의 후보 블록을 공간적으로 탐색할 수 있다. 세 개의 그룹은 다음과 같이 분류 가능하다.As another embodiment, it is possible to spatially search for a candidate block of a motion vector by dividing it into three groups. The three groups can be classified as follows.

그룹 1_1 = {A, B, C}, (C → B → A)group 1_1 = {A, B, C}, (C → B → A)

그룹 1_2 = {D, E}, (D → E)group 1_2 = {D, E}, (D → E)

그룹 1_3 = {H, I, J}, (J → I →H)Group 1_3 = {H, I, J}, (J → I → H)

본 실시예에서 세 개의 그룹들 중 그룹 1_1은 현재 블록을 기준으로 바로 인접한 위쪽, 인접한 왼쪽 위쪽, 그리고 인접한 오른쪽 위쪽에 있는 블록들을 포함하고, 그룹 1_2는 현재 블록을 기준으로 바로 인접한 왼쪽과 바로 인접한 왼쪽 아래에 있는 블록들을 포함하며, 그룹 1_3은 현재 블록과 하나 이상의 블록 간격을 둔 인접하지 않은 블록들을 포함한다.In the present embodiment, among the three groups, group 1_1 includes blocks immediately adjacent to the upper left, adjacent upper left, and adjacent upper right with respect to the current block, and group 1_2 is immediately adjacent to the left and immediately adjacent to the current block with respect to the current block. It includes the blocks in the lower left, and group 1_3 includes non-adjacent blocks with one or more block intervals from the current block.

또 다른 실시예로서, 또 다른 방식으로 세 개의 그룹들로 구분하여 움직임 벡터의 후보 블록을 공간적으로 탐색할 수 있다. 세 개의 그룹은 다음과 같이 분류 가능하다.As another embodiment, a candidate block of a motion vector may be spatially searched for by dividing it into three groups in another method. The three groups can be classified as follows.

그룹 1_1 = {B}group 1_1 = {B}

그룹 1_2 = {D}group 1_2 = {D}

그룹 1_3 = {A, C, E}, (E → C → A)Group 1_3 = {A, C, E}, (E → C → A)

본 실시예에서 세 개의 그룹들 중 그룹 1_1은 현재 블록을 기준으로 수직 방향에 위치하는 블록을 포함하고, 그룹 1_2는 현재 블록을 기준으로 수평 방향에 위치하는 인접한 블록을 포함하고, 그룹 1_3은 현재 블록을 기준으로 나머지 인접한 블록들을 포함한다.In the present embodiment, among the three groups, group 1_1 includes blocks positioned in the vertical direction with respect to the current block, group 1_2 includes adjacent blocks positioned in the horizontal direction with respect to the current block, and group 1_3 includes the current block Based on the block, the remaining adjacent blocks are included.

위에서 살핀 바와 같이, P 픽쳐나 B 픽쳐에서는 참조 방향이나 참조 픽쳐 등의 참고 가능한 정보가 많기 때문에 그에 따라 후보군을 설정할 수 있다. 현재 블록을 기준으로 현재 블록과 참조 픽쳐가 다른 후보 블록에 대해서는 후보군에 포함할 수도 있고, 그 반대로 현재 블록의 참조 픽쳐와 후보 블록의 참조 픽쳐와의 시간적 거리(picture of count, POC)를 고려하여 해당 블록의 벡터를 스케일링한 후후보군에 추가할 수도 있다. 또한, 현재 블록의 참조 픽쳐가 어떤 픽쳐인지에 따라 스케일링한 후보군을 추가할 수도 있다. 또한, 현재 블록의 참조 픽쳐와 후보 블록의 참조 픽쳐와의 시간적인 거리가 일정 거리를 넘을 때는 후보군에서 제외하고 그 이하일 때는 스케일링한 블록을 후보군에 포함할 수도 있다.As discussed above, in the P picture or the B picture, since there is a lot of referenceable information such as a reference direction or a reference picture, a candidate group can be set accordingly. A candidate block having a different reference picture from the current block may be included in the candidate group based on the current block. It is also possible to add the vector of the corresponding block to the scaled candidate group. Also, a scaled candidate group may be added according to which picture the reference picture of the current block is. In addition, when the temporal distance between the reference picture of the current block and the reference picture of the candidate block exceeds a certain distance, it may be excluded from the candidate group, and when the temporal distance is less than or equal to the reference picture of the current block, the scaled block may be included in the candidate group.

전술한 유사성 체크(similarity check)란, 이미 예측 후보군에 포함된 움직임 벡터와 새롭게 추가하고자 하는 움직임 벡터가 얼마나 유사한지를 비교하고 결정하는 과정이다. 정의에 따라서, x, y 성분이 완벽하게 일치할 때, 참(true)이 되도록 설정되거나, 일정 문턱치(theshold value) 범위 이하의 차이를 가질 때 참(true)이 되도록 설정될 수 있다.The aforementioned similarity check is a process of comparing and determining how similar a motion vector already included in the prediction candidate group is to a motion vector to be newly added. According to definition, it may be set to be true when the x and y components perfectly match, or set to be true when the difference is less than or equal to a certain threshold value.

본 실시예에서는 참조 픽쳐가 현재 픽쳐를 가리킨다는 조건을 예로 들고 있지만 참조 픽쳐가 현재 픽쳐 아닌 경우에로 확장될 수 있다. 예를 들어, '현재 블록이 가리키고 있는 픽쳐보다 더 먼 픽쳐를 사용하는 블록은 제외한다'와 같은 설정을 사용할 수 있다. 본 실시예에서는 현재 블록과 참조픽쳐가 다르더라도 스케일링을 통해 후보군에 넣을 수 있다.In this embodiment, the condition that the reference picture points to the current picture is taken as an example, but it may be extended to a case in which the reference picture is not the current picture. For example, a setting such as 'a block using a picture farther than the picture pointed to by the current block is excluded' may be used. In this embodiment, even if the current block and the reference picture are different, they can be included in the candidate group through scaling.

혼합 리스트mixed list

현재 블록의 양방향 예측을 수행하여 참조 픽쳐 리스트(L0, L1)에 존재하는 참조 픽쳐에 각각의 움직임 정보가 있다고 할 경우. 미리 설정된 후보군의 우선순위에 따라 가용성(availability)을 확인한다. 이 경우 우선순위는 양방향 예측으로 부호화된 것을 먼저 확인한다.When it is assumed that each reference picture in the reference picture list (L0, L1) has motion information by performing bidirectional prediction of the current block. Availability (availability) is checked according to the priority of the preset candidate group. In this case, the priority is checked first that is encoded by bi-prediction.

만약 각각의 참조 픽쳐가 다를 경우, 스케일링을 수행한다. 앞서 공간적, 시간적으로 탐색하였을 때, 양방향 예측된 블록들만 후보군에 넣었을 때, 그리고 최대 후보수를 넘지 않았을 때에는 앞서 수행한 후보 블록 중 단방향 예측으로 부호화된 블록들을 예비 후보군에 넣은 후에 이들 후보들의 조합으로 양방향 예측을 위한 후보를 만들 수 있다.If each reference picture is different, scaling is performed. When searching spatially and temporally, when only bi-predicted blocks were put in the candidate group, and when the maximum number of candidates was not exceeded, blocks coded by uni-prediction among the previously performed candidate blocks were put into the preliminary candidate group and then a combination of these candidates was used. Candidates for bidirectional prediction can be created.

Figure pat00003
Figure pat00003

우선 현재 블록의 양방향 예측의 움직임 정보는, L0에서 1번, L1에서 0번의 참조 픽쳐에서 참조된다고 가정하자. 표 5(a)의 경우 첫 번째로 후보에 들어간 블록의 움직임 정보는 (mvA1, ref1)와 (mvA2, ref0), 그리고 두 번째로 후보에 들어간 블록의 움직임 정보는 (mvB1’, ref1)와 (mvB2’, ref0)라고 하자. 여기에서 아포스트로피(’)의 의미는 스케일링된 벡터이다. 공간적, 시간적 탐색까지 마친 후의 후보수가 2개라고 할 경우, 다만 n은 5라고 가정하면, 앞선 단계에서 단방향 예측된 블록들을 미리 설정된 우선순위에 따라 예비 후보로 넣을 수 있다.First, it is assumed that motion information of bi-prediction of the current block is referenced in reference pictures 1 in L0 and 0 in L1. In Table 5(a), the motion information of the first candidate block is (mvA 1 , ref1) and (mvA 2 , ref0), and the motion information of the second candidate block is (mvB 1 ', ref1). ) and (mvB 2 ', ref0). Here, the meaning of the apostrophe (') is a scaled vector. If it is assumed that the number of candidates after spatial and temporal search is two, however, assuming that n is 5, blocks predicted unidirectionally in the previous step may be put as preliminary candidates according to preset priorities.

표 3(a)에서는 아직까지 최대 후보수만큼 채우지 못했기 때문에 나머지 움직임 벡터들 mvC, mvD, mvE를 이용한 스케일링된 단방향의 후보들을 조합하여 새로운 후보를 추가할 수 있다.In Table 3(a), since the maximum number of candidates has not yet been filled, a new candidate can be added by combining the scaled unidirectional candidates using the remaining motion vectors mvC, mvD, and mvE.

표 3(b)에서 각각 단방향 예측된 블록의 움직임 정보가 현재 블록의 참조 픽쳐에 따라 스케일링 된다. 여기에서 단방향의 후보들로 새로운 조합을 만드는 예를 선보였으나, 이미 추가된 양방향의 참조 픽쳐들(L0, L1) 각각의 움직임 정보들로 새로운 후보의 조합이 가능할 수 있다. 이 부분은 단방향의 예측 등의 상황에서는 수행하지 않는다. 또한, 현재 블록의 참조 픽쳐가 현재 픽쳐일 경우에도 수행하지 않는다.In Table 3(b), motion information of each unidirectionally predicted block is scaled according to the reference picture of the current block. Here, an example of creating a new combination with unidirectional candidates is presented, but a new candidate combination may be possible with motion information of each of the already added bidirectional reference pictures L0 and L1. This part is not performed in situations such as unidirectional prediction. Also, it is not performed even when the reference picture of the current block is the current picture.

고정(constant) 후보 constant candidate

만약 위의 과정을 통해 최대 후보수 n개(본 실시예에서는 2로 가정함)의 후보 블록을 구성하지 못하는 경우, 미리 설정된 고정 좌표를 갖는 고정(constant) 후보를 추가할 수 있다. (0,0), (-a,0), (-2*a,0), (0,-b)와 같은 고정 좌표를 갖는 고정 후보를 사용할 수 있으며, 최대 후보수에 맞춰 고정 후보의 개수를 설정할 수 있다.If, through the above process, the candidate blocks with the maximum number of candidates of n (in this embodiment, it is assumed as 2) cannot be formed, a constant candidate having preset fixed coordinates may be added. Fixed candidates having fixed coordinates such as (0,0), (-a,0), (-2*a,0), (0,-b) can be used, and the number of fixed candidates according to the maximum number of candidates can be set.

위와 같은 고정 좌표를 설정할 수도 있고, 위의 과정을 통해 현재까지 후보군에 포함된 최소 2개 이상의 움직임 벡터의 평균, 가중치 평균, 중간값 등의 과정을 통해 고정 후보로 추가할 수 있다. 만약 n이 5이고 현재까지 3개가 후보{(mvA_x,mvA_y), (mvB_x, mvB_y), (mvC_x, mvC_y)}로 등록되어 있다면, 남은 2개의 후보를 채우기 위해 미리 정해진 우선순위를 가진 고정 후보들을 포함하는 후보군을 두고 그에 따른 우선순위에 따라 고정 후보를 추가할 수 있다. 고정 후보군은 예를 들면 {(mvA_x + mvB_x)/2, (mvA_y + mvB_y)/2), ((mvA_x + mvB_x + mvC_x)/3, (mvA_y + mvB_y + mvC_y)/3), (median(mvA_x, mvB_x, mvC_x), median(mvA_y, mvB_y, mvC_y)) 등과 같은 고정 후보들을 포함할 수 있다.The above fixed coordinates may be set, or through the above process, at least two motion vectors included in the candidate group may be added as fixed candidates through the process of average, weighted average, and median. If n is 5 and so far 3 candidates have been registered as {(mvA_x, mvA_y), (mvB_x, mvB_y), (mvC_x, mvC_y)}, fixed candidates with predetermined priorities are selected to fill the remaining two candidates. It is possible to add a fixed candidate according to the priority according to the included candidate group. The fixed candidate group is, for example, {(mvA_x + mvB_x)/2, (mvA_y + mvB_y)/2), ((mvA_x + mvB_x + mvC_x)/3, (mvA_y + mvB_y + mvC_y)/3), (median(mvA_x) , mvB_x, mvC_x), median(mvA_y, mvB_y, mvC_y)) may include fixed candidates.

또한, 현재 블록의 참조 픽쳐에 따라 고정 후보를 다르게 설정할 수 있다. 예를 들어, 현재 픽쳐가 참조 픽쳐일 때는 (-a,0), (0,-b), (-2*a,0)과 같이 고정 후보를 설정할 수도 있고, 현재 픽쳐가 참조 픽쳐가 아닐 때는 (0,0), (-a,0), (average(mvA_x, …), average(mvA_y, …))과 같이 설정할 수도 있다. 이에 따른 정보는 부호화기나 복호화기에 미리 설정할 수 있고, 또는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송 가능하다.In addition, a fixation candidate may be set differently according to the reference picture of the current block. For example, when the current picture is a reference picture, fixed candidates such as (-a,0), (0,-b), (-2*a,0) may be set, and when the current picture is not a reference picture, (0,0), (-a,0), (average(mvA_x, …), average(mvA_y, …)) can also be set. The corresponding information may be preset in an encoder or a decoder, or may be transmitted in units of sequences, pictures, slices, and the like.

이하에서는 모션 벡터 카피(MVC)에 대해서 좀더 상세히 설명하기로 한다.Hereinafter, motion vector copy (MVC) will be described in more detail.

P 픽쳐나 B 픽쳐에 대한 설명Description of P picture or B picture

본 실시예에서는 시간적인 후보(F, G)도 포함한다고 가정한다. 후보군은 A, B, C, D, E, F, G, H, I, J를 포함한다. 탐색 순서가 정해져 있는 건 아니지만 여기에서는 MVC 후보를 공간적으로 탐색하고, 시간적으로 탐색하고, 혼합 리스트를 구성하여 탐색하고, 고정(constant) 후보를 추가하는 순으로 진행한다고 가정한다.In this embodiment, it is assumed that temporal candidates (F, G) are also included. Candidate groups include A, B, C, D, E, F, G, H, I, and J. Although the search order is not fixed, it is assumed here that MVC candidates are searched spatially, temporally searched, searched by constructing a mixed list, and added in the order of constant candidates.

즉, 앞에 설명한 부분도 이와 같이 탐색 순서를 임의로 정해놓은 것이지 미리 정해진 순서를 사용한다는 것이 아니다. 우선순위를 정해두고 그에 따른 가용성을 체크한다. n을 5, 우선순위는 괄호안과 같다고 가정한다.In other words, the above-described part is that the search order is arbitrarily determined as described above, and does not use a predetermined order. Set priorities and check availability accordingly. Assume that n is 5 and the priority is the same as in parentheses.

이하의 설명에서는 전술한 모션 벡터 예측(MVP)에서의 차이 부분에 대해서만 설명하기로 한다. MVP 부분은 앞 부분에서 스케일링에 대한 부분만 빼고 아래의 내용을 첨부하여 작성할 수 있다. 공간적인 후보에 대해서는 스케일링 과정은 생략한 채 가용성을 확인할 수 있다. 다만, MVC와 비슷하게 참조 픽쳐의 타입, 현재 픽쳐 또는 현재 블록의 참조 픽쳐와의 거리 등을 후보군에서 제외할 수도 있다.In the following description, only the difference part in the aforementioned motion vector prediction (MVP) will be described. The MVP part can be written by attaching the following contents except for the scaling part in the previous part. For spatial candidates, availability can be checked while omitting the scaling process. However, similar to MVC, the type of the reference picture, the distance from the current picture or the current block to the reference picture, etc. may be excluded from the candidate group.

혼합 리스트가 존재하는 경우, 아래의 표 4와 같이 현재까지 추가된 후보들의 조합으로 양방향 예측을 위한 후보를 만들 수 있다.When a mixed list exists, as shown in Table 4 below, a candidate for bidirectional prediction can be created by a combination of candidates added so far.

Figure pat00004
Figure pat00004

표 4(a)에 나타낸 바와 같이, 참조 리스트 LO를 사용하는 후보와 참조 리스트 L1 사용하는 후보를 조합하여 새로운 후보를 움직임 벡터 후보군에 추가할 수 있다. 미리 정해진 움직임 벡터 개수인 5개를 채우지 못하는 경우, 표 4(b)에 나타낸 바와 같이, L0의 다음 후보와 L1을 사용하는 후보를 조합하여 새롭게 후보에 추가할 수 있다.As shown in Table 4(a), a new candidate may be added to the motion vector candidate group by combining a candidate using the reference list LO and a candidate using the reference list L1. If the predetermined number of motion vectors of 5 is not satisfied, as shown in Table 4(b), a candidate using L1 and a candidate next to L0 may be combined to be newly added to the candidate.

위와 같이 최적의 움직임 정보의 후보를 찾는 MVP, MVC 등의 모드에 따라 부호화할 수 있다.As described above, encoding may be performed according to a mode such as MVP or MVC for finding an optimal motion information candidate.

스킵 모드일 경우에는 MVC를 이용하여 부호화할 수 있다. 즉, 스킵 플래그 처리 후에 최적의 움직임 벡터 후보에 대한 정보를 부호화할 수 있다. 후보가 1개일 경우에는 이 부분을 생략할 수 있다. 움직임 벡터 차분치 등을 따로 부호화하지 않고 현재 블록과 예측 블록과의 차분치인 잔차 성분에 대해 변환 및 양자화 등의 과정을 통해 부호화할 수 있다.In the skip mode, encoding may be performed using MVC. That is, information on an optimal motion vector candidate can be encoded after skip flag processing. If there is only one candidate, this part may be omitted. A residual component that is a difference between a current block and a prediction block may be encoded through processes such as transformation and quantization without separately encoding the motion vector difference.

스킵이 아니면 우선순위로 MVC를 통해 움직임 정보를 처리할지에 대해 먼저 확인과정을 거친 후 맞으면 최적의 움직임 벡터의 후보군에 대한 정보를 부호화할 수 있다. 만약 MVC를 통해 움직임 정보를 처리할 것이 아니면 MVP를 통해 움직임 정보를 처리할 수 있다. MVP의 경우 최적의 움직임 벡터 후보에 대한 정보를 부호화할 수 있다. 여기에서 후보가 1개인 경우 움직임 정보 처리를 생략할 수 있다. 그리고 현재 블록의 움직임 벡터와의 차분치, 참조 방향, 참조 픽쳐 인덱스 등의 정보를 부호화하고 잔차 성분을 얻은 다음 이에 대해 변환 및 양자화 등의 과정을 통해 부호화할 수 있다.If it is not skip, it is first checked whether or not motion information is processed through MVC in priority, and if it is correct, information on a candidate group of an optimal motion vector can be encoded. If motion information is not to be processed through MVC, motion information may be processed through MVP. In the case of MVP, information on an optimal motion vector candidate may be encoded. Here, when there is only one candidate, motion information processing may be omitted. In addition, information such as a difference value from the motion vector of the current block, a reference direction, and a reference picture index may be encoded, a residual component may be obtained, and then encoded through processes such as transformation and quantization.

이후의 엔트로피 및 후처리 필터링 등 코덱에 대한 것은 상술한 설명과의 중복을 피하기 위해 생략한다.Codecs such as entropy and post-processing filtering will be omitted to avoid overlap with the above description.

도 17은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 임의 접근 모드에 대한 참조 구조의 예이다.17 is an example of a reference structure for a random access mode in an image encoding and decoding method according to an embodiment of the present invention.

도 17을 참조하면, 우선 낮은 시간적 식별자(temporalID)를 갖는 픽쳐부터 순차적으로 부호화를 진행하는 경우, 낮은 ID를 갖는 I 픽쳐와 P 픽쳐가 각각 부호화한 후 다음, 높은 ID를 갖는 B(2)를 부호화하는 순서로 부호화가 진행된다. 자기보다 높거나 같은 ID는 참조하지 않고 낮은 ID를 갖는 픽쳐를 참조 픽쳐로 삼는다고 가정한다.Referring to FIG. 17, when encoding is sequentially performed from a picture having a low temporal identifier (temporalID), I picture and P picture having a low ID are encoded respectively, and then B(2) having a high ID is encoded. Encoding proceeds in the order of encoding. It is assumed that a picture having a lower ID is used as a reference picture without referring to an ID higher than or equal to itself.

우선, 도 17을 중심으로 설명하면, 참조 픽쳐로 사용되는 픽쳐들의 보간 정밀도(일례로 정수, 1/2, 1/4, 1/8 등 중 어느 하나)를 고정하여 사용할 수 있고, 구현에 따라서 참조 픽쳐로 사용되는 픽쳐들의 보간 정밀도를 다르게 설정할 수 있다. 예를 들어, ID가 0인 I 픽쳐의 경우, 어떤 픽쳐의 참조 픽쳐로 사용될 때 픽쳐들 간의 거리를 계산하여 1, 4, 8(B4, B2, P1 픽쳐의 경우)의 거리를 갖는다. P 픽쳐의 경우 4, 2, 1(B2, B6, B8)이 된다. 그리고 ID가 1인 B2의 경우, 2, 1, 1, 2(B3, B5, B7, B6)의 거리를 갖고, ID가 B3인 경우, 1, 1(B4, B5)의 거리를 갖는다.First, referring to FIG. 17, interpolation precision of pictures used as reference pictures (for example, any one of integer, 1/2, 1/4, 1/8, etc.) can be fixed and used, and depending on the implementation Interpolation precision of pictures used as reference pictures may be set differently. For example, in the case of an I picture having an ID of 0, when used as a reference picture of a picture, the distance between pictures is calculated and has a distance of 1, 4, or 8 (in the case of B4, B2, and P1 pictures). In the case of a P picture, it becomes 4, 2, 1 (B2, B6, B8). And in the case of B2 having an ID of 1, it has a distance of 2, 1, 1, 2 (B3, B5, B7, B6), and when the ID is B3, it has a distance of 1, 1 (B4, B5).

만약 참조되는 픽쳐와의 평균 거리를 기반으로 각 참조 픽쳐의 보간 정밀도를 정할 수 있다. 즉, 가까운 참조 픽쳐일수록 움직임의 차이가 적어서 세밀한 보간이 필요하다고 판단되므로, 참조되는 거리가 평균적으로 짧은 B3나 B6에는 보간 정밀도를 높여서 보간을 수행하고(일례로 1/8), 참조되는 거리가 그 이상인 경우에는 보간 정밀도를 낮춰서 사용할 수 있다. 일례로 1/4로 낮출 수 있다(아래의 표 5의 Case 1 참조). 반대로, 멀리 떨어진 참조 픽쳐일수록 더 세밀한 보간 정밀도가 필요하다고 판단되므로 그 경우, 위의 예시와 반대로 적용할 수 있다.If the interpolation precision of each reference picture can be determined based on the average distance to the referenced picture. That is, it is judged that the closer the reference picture is, the smaller the difference in motion is, so fine interpolation is required. In the case of more than that, the interpolation precision can be lowered and used. For example, it can be reduced to 1/4 (see Case 1 in Table 5 below). Conversely, since it is determined that finer interpolation precision is required as the reference picture is farther away, in that case, the opposite to the above example can be applied.

또한, 참조되는 경우가 많은 픽쳐에 더 세밀한 보간을 수행할 수도 있다. 예를 들어, B2에 보간 정밀도를 높여서 보간을 수행할 수도 있고, 참조되는 경우가 적은 픽쳐에 다른 보간 정밀도를 적용할 수도 있다(아래 표 5의 Case 2 참조).In addition, finer interpolation may be performed on pictures that are often referenced. For example, interpolation may be performed by increasing the interpolation precision to B2, or a different interpolation precision may be applied to a picture that is rarely referenced (refer to Case 2 of Table 5 below).

또한, 시간적 계층에 따라 보간 정밀도를 다르게 적용할 수 있다. 예를 들어, ID가 0인 픽쳐에 대해서는 더 세밀하게 보간을 수행하고, 다른 ID의 픽쳐에 대해서는 정밀도를 낮출 수도 있고 그 반대로 수행할 수도 있다(아래 표 5의 Case 3 참조).In addition, the interpolation precision may be applied differently according to the temporal layer. For example, finer interpolation may be performed for a picture having an ID of 0, and precision may be lowered for a picture having a different ID or vice versa (see Case 3 in Table 5 below).

Figure pat00005
Figure pat00005

이와 같이 픽쳐 단위로 보간 정밀도를 설정하여 화면간 예측을 수행할 수 있다. 이와 관련된 정보는 부호화기나 복호화기에 약속하에 설정되거나 시퀀스, 픽쳐 등의 단위로 전송될 수 있다.As described above, inter prediction can be performed by setting the interpolation precision in units of pictures. Information related thereto may be set under an agreement with the encoder or decoder, or may be transmitted in units of sequences, pictures, or the like.

도 18은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 하나의 픽쳐이지만 2개 이상의 보간 정밀도를 가질 수 있음을 설명하기 위한 도면이다.FIG. 18 is a diagram for explaining that one picture may have two or more interpolation precisions in an image encoding and decoding method according to an embodiment of the present invention.

도 18을 참조하면, 현재 픽쳐에서 블록 매칭을 수행하는 경우를 예시한다. 즉, 도 18에서는 I0, P1 및 B2에서 자기 참조가 가능한 것을 보여준다.Referring to FIG. 18 , a case in which block matching is performed in the current picture is exemplified. That is, FIG. 18 shows that self-referencing is possible at I0, P1, and B2.

본 실시예에서는, 자기보다 높은 ID는 참조하지 않고, 같거나 낮은 ID를 갖는 픽쳐를 참조 픽쳐로 사용할 수 있다. 실제로, 도 18에 도시하지는 않았지만, temporalID 2나 3까지 현재 픽쳐를 참조 픽쳐로 삼는 경우에 포함될 수 있다. 이것은 temporalID에 따라 현재 픽쳐를 삼을 수 있음을 의미하기도 한다. 시간적 식별자(temporalID) 이외에 픽쳐의 종류에 따라 참조 픽쳐로의 사용을 결정할 수 있다.In the present embodiment, a picture having the same or lower ID may be used as a reference picture without referring to an ID higher than the self. In fact, although not shown in FIG. 18 , up to temporalID 2 or 3 may be included when the current picture is used as a reference picture. This also means that the current picture can be used according to the temporalID. In addition to the temporal identifier (temporalID), the use of the reference picture may be determined according to the type of the picture.

도 18의 경우는 도 17의 경우와 전체적으로 비슷하지만 현재 픽쳐를 부호화할 때 현재 픽쳐를 참조 픽쳐로 삼는 경우의 보간 정밀도를 일반적인 경우의 보간 정밀도와 같이 둘 수 있음을 나타낸다. 또한, 도 18의 경우는, 현재 픽쳐가 참조 픽쳐일 경우에만 보간 정밀도를 다르게 둘 수 있음을 나타낸다. 즉, 하나의 픽쳐이지만 2개 이상의 보간 정밀도를 가질 수 있다는 것을 나타낸다.The case of FIG. 18 is generally similar to the case of FIG. 17, but indicates that the interpolation precision in the case of using the current picture as a reference picture when encoding the current picture can be set to the same as the interpolation precision in the general case. In addition, the case of FIG. 18 indicates that the interpolation precision can be set differently only when the current picture is a reference picture. That is, it indicates that one picture may have two or more interpolation precisions.

여기까지는 참조 픽쳐의 보간 정밀도가 정해지는 대로 움직임 벡터의 정밀도도 따라서 결정되는 기법을 설명한 것이다. 아래에서는 보간 정밀도와 상관없이 움직임 벡터의 정밀도가 결정되는 기법을 설명하기로 한다.Up to this point, as the interpolation precision of the reference picture is determined, the technique in which the precision of the motion vector is also determined accordingly has been described. Hereinafter, a technique in which motion vector precision is determined regardless of interpolation precision will be described.

픽쳐의 보간 정밀도(일례로 1/4)는 고정되지만, 부호화하는 픽쳐의 블록 단위로 블록의 움직임 벡터 정밀도를 설정할 수 있다. 기본 설정은 정해져 있는 움직임 벡터 정밀도를 사용하는 것일 수 있으나, 본 실시예에서는 2개 이상의 후보를 지원하겠다는 것을 의미한다. 예를 들어, 참조 픽쳐의 보간 정밀도가 1/4이면 이 픽쳐를 참조하는 블록의 움직임 벡터는 통상 1/4의 단위로 표현되어야 한다. 하지만, 본 실시예에서는 움직임 벡터를 블록에 따라 기본적으로 1/4 단위로 표현할 수 있고, 추가로 1/2 단위로도 표현할 수 있거나 정수단위로도 표현할 수 있다.Although the interpolation precision (for example, 1/4) of a picture is fixed, the motion vector precision of a block may be set in units of blocks of a picture to be encoded. The default setting may be to use a predetermined motion vector precision, but in this embodiment, it means that two or more candidates are supported. For example, if the interpolation precision of the reference picture is 1/4, the motion vector of the block referring to this picture should be expressed in units of 1/4. However, in the present embodiment, the motion vector may be basically expressed in units of 1/4, additionally in units of 1/2, or may be expressed in units of integers according to blocks.

Figure pat00006
Figure pat00006

표 6은 일정 상수의 움직임 벡터의 정밀도에 따른 매칭에 대한 내용이다. 예를 들어, 1을 표현하기 위해서는 정수 단위에서는 1에 해당하지만, 1/2에서는 2, 1/4에서는 4에 대응된다. 2를 표현하는 경우, 정수 단위에서 2, 1/2 단위에서는 4, 1/4 단위에서는 8에 대응된다.Table 6 describes the matching according to the precision of a motion vector of a constant constant. For example, to express 1, it corresponds to 1 in integer unit, but corresponds to 2 in 1/2 and 4 in 1/4. In the case of expressing 2, it corresponds to 2 in integer units, 4 in 1/2 units, and 8 in 1/4 units.

특정 픽쳐를 참조하는 블록의 현재 정밀도 기준으로 정밀도가 2배 높아지면, 정수 1은 1/2이 되고, 1/2은 1/4이 되므로, 이를 표현하기 위한 숫자는 2배가 커진다. 이를 단항 이진화(unary binarization), Rice 이진화 (truncated rice), k-th order exp-golomb 등의 다양한 이진화로 표현한다고 할 때, 정밀도가 높아질수록 그것을 표현하고자 하는 비트는 늘어난다.When the precision is doubled based on the current precision of the block referring to a specific picture, the integer 1 becomes 1/2 and 1/2 becomes 1/4, so the number for expressing this is doubled. When expressing this as various binarizations such as unary binarization, rice truncated rice, k-th order exp-golomb, etc., the higher the precision, the more bits to be expressed.

만약, 보간 정밀도를 높여도 예를 들어 1/2에서 1/4로 높여도, 움직임 벡터는 낮은 정밀도 단위에서 찾게 되면(예컨대, 정수 또는 1/2), 그에 따른 비트량의 증가로 부호화 효율이 떨어질 수 있다. 이를 방지하기 위해 본 실시예에서는 블록 단위에서 어떤 정밀도 단위로 움직임 벡터를 찾았는지에 대해 정보를 표현해주고 이러한 정보를 부호화 및/또는 복호화에 이용한다. 그 경우, 부호화와 복호화를 더욱 효율적으로 수행할 수 있다.Even if the interpolation precision is increased, for example, from 1/2 to 1/4, if the motion vector is found in a low precision unit (eg, an integer or 1/2), the encoding efficiency is reduced due to an increase in the amount of bits accordingly. can fall To prevent this, in the present embodiment, information is expressed on which precision unit the motion vector is found in block units, and this information is used for encoding and/or decoding. In that case, encoding and decoding can be performed more efficiently.

예를 들면, 움직임 벡터를 단항 이진화(unary binarization)를 사용하여 부호화하는 경우, 여기서 벡터의 x 성분이 8/4이고 y 성분이 4/4라면, 이를 표현하기 위해서는 111111110 + 11110의 이진화 비트가 필요하다. 하지만, 본 실시예에 따르면, 위의 이진화 비트를 1/2 단위(4/2, 2/2)로 표현할 수 있고, 그 경우 11110 + 110으로 표현할 수 있다. 또한, 정수 단위(2,1)로 표현할 수 있으며, 그 경우 110 + 10으로 표현 가능하다. 그리고 움직임 벡터의 부호화에 어떤 정밀도 단위를 사용하였는지에 대한 정보(예를 들어, 1/4일 땐 0, 1/2일 땐 10, 정수일 땐 11)를 보낸다면, 전술한 경우에서 11(정밀도 단위) + 110 + 10으로 표현할 수 있어 1/4 단위의 111111110 + 11110 보다 더 적은 비트량을 사용할 수 있다. 이와 같이, 해당 블록의 움직임 벡터 정밀도를 정수 단위로 표현한다는 정보를 본 실시예의 움직임 벡터의 부호화 결과와 함께 전송/수신함으로써 전송/수신되는 부호화 비트를 감소시키는 효과를 얻을 수 있다.For example, when encoding a motion vector using unary binarization, if the x component of the vector is 8/4 and the y component is 4/4, 111111110 + 11110 binarization bits are required to represent this. Do. However, according to the present embodiment, the above binarization bit can be expressed in 1/2 units (4/2, 2/2), and in that case, it can be expressed as 11110 + 110. In addition, it can be expressed as an integer unit (2,1), and in that case, it can be expressed as 110 + 10. And if information on which precision unit is used for encoding the motion vector (for example, 0 for 1/4, 10 for 1/2, 11 for integer) is sent, 11 (precision unit) in the above case Since it can be expressed as + 110 + 10, it is possible to use a smaller amount of bits than 111111110 + 11110 in 1/4 unit. As described above, by transmitting/receiving information indicating that the motion vector precision of the corresponding block is expressed in integer units together with the motion vector encoding result of the present embodiment, an effect of reducing transmitted/received encoding bits can be obtained.

또한, 일례로서, 움직임 벡터 x, y 성분이 3/4, 1/4이라면, 이를 정수 또는 1/2 단위로 표현할 수 없으므로 1/4 단위의 1110 + 10 으로 표현할 수 있다. 그 경우, 해당 블록의 움직임 벡터 정밀도를 1/4로 표현한다는 정보를 전송함으로써 본 실시예에 따른 부호화 및 복호화를 수행할 수 있다. 이와 같이, 픽쳐 단위의 보간 정밀도는 고정된 채 블록 단위로 움직임 벡터의 정밀도를 적응적으로 정할 수 있다. 블록 단위의 움직임 벡터의 최대 정밀도는 참조 픽쳐의 보간 정밀도와 동일하다. Also, as an example, if the motion vector x and y components are 3/4 or 1/4, they cannot be expressed in integers or 1/2 units, so they can be expressed as 1110 + 10 in 1/4 units. In this case, encoding and decoding according to the present embodiment can be performed by transmitting information indicating that the motion vector precision of the corresponding block is expressed by 1/4. As described above, the precision of the motion vector may be adaptively determined in units of blocks while the interpolation precision in units of pictures is fixed. The maximum precision of the motion vector in units of blocks is the same as the interpolation precision of the reference picture.

또한, 본 실시예에서 지원되는 정밀도의 그룹은 다양하게 구성될 수 있다. 예를 들면, 참조 픽쳐의 보간 정밀도를 1/8로 가정하면, 위와 같은 정밀도 정수, 1/2, 1/4, 1/8을 사용할 수도 있고, (1/2, 1/4, 1/8), (1/4, 1/8), (정수, 1/2, 1/8), (1/4, 1/8) 등과 같이 2개 이상의 정밀도를 구성하여 사용할 수도 있다. 이들은 픽쳐, 슬라이스 등의 단위로 설정될 수 있으며 부호화 비용을 고려하여 결정될 수 있다. 이에 대한 정보는 시퀀스, 픽쳐, 슬라이스 등의 단위로 전송 가능하다. 또한, 복호화에서는 전송받은 그룹들 중 하나의 세트를 선택하여 블록 단위로 적응적으로 움직임 벡터 정밀도를 결정할 때 사용할 수도 있다.In addition, the group of precision supported in the present embodiment may be configured in various ways. For example, assuming that the interpolation precision of the reference picture is 1/8, the precision integers 1/2, 1/4, 1/8 as above may be used, and (1/2, 1/4, 1/8) ), (1/4, 1/8), (integer, 1/2, 1/8), (1/4, 1/8), etc., can be used by configuring two or more precisions. These may be set in units of pictures, slices, etc., and may be determined in consideration of encoding cost. Information on this can be transmitted in units of sequences, pictures, slices, and the like. Also, in decoding, one set from among the received groups may be selected and used to adaptively determine motion vector precision in units of blocks.

또한, 본 실시예에서 정밀도 선택에 대한 인덱스는 구성되는 후보군의 개수에 따라 고정 길이 이진화(Fixed length), 단항 이진화 등으로 표현 가능하다. 참조 픽쳐의 정밀도를 기준으로 가장 많이 발생할 것 같거나 발생한 단위에 짧은 비트를 할당하고, 그 반대의 경우 긴 비트를 할당할 수 있다.In addition, in the present embodiment, the index for precision selection can be expressed as fixed length binarization, unary binarization, etc. according to the number of constituting candidate groups. A short bit may be allocated to a unit that is most likely to occur or occur based on the precision of a reference picture, and vice versa, a long bit may be allocated.

예를 들어, 1/8 단위가 가장 많이 발생할 것을 예상되는 경우, 1/8에는 0, 1/4에는 10, 1/2에는 110, 정수에는 111과 같이 할당할 수 있다. 즉, 1/8에 가장 짧은 비트를 할당하고, 정수에 가장 긴 비트를 할당할 수 있다. 또한, 1/4 단위가 가장 많이 발생하는 경우에는 1/4에 가장 짧은 비트를 할당하는 것이 가능하다. 또한, 구현에 따라서 발생 확률에 상관없이 고정 길이를 할당할 수도 있다. 예를 들어, 정수는 00, 1/2은 01, 1/4은 10, 1/8은 11과 같이 통계적인 발생 빈도수 등에 따라 고정 길이를 할당할 수 있다.For example, if 1/8 units are expected to occur the most, 0 can be assigned to 1/8, 10 to 1/4, 110 to 1/2, and 111 to integers. That is, the shortest bit may be allocated to 1/8 and the longest bit may be allocated to an integer. In addition, when 1/4 units occur most frequently, it is possible to allocate the shortest bits to 1/4. In addition, a fixed length may be allocated regardless of the probability of occurrence according to implementation. For example, a fixed length may be assigned according to a statistical frequency of occurrence, such as 00 for integers, 01 for 1/2, 10 for 1/4, and 11 for 1/8.

또한, 본 실시예에서는, 참조 픽쳐가 특정한 픽쳐인 경우 즉 참조 픽쳐가 현재 픽쳐인 경우, 특정 정밀도에 우선순위를 높게 줄 수 있다. 참조 픽쳐가 현재 픽쳐인 경우, 정수(integer)에 높은 우선순위를 줄 수 있다. 기본 정밀도인 1/8에 가장 짧은 비트를, 그 다음으로 정수에 짧은 비트를 할당할 수도 있다. 즉, 1/8에는 0, 정수에는 10, 1/4에는 110, 1/2에는 111을 할당할 수 있다. 또한, 구현에 따라서 정수에 가장 짧은 비트를 할당할 수도 있다. 예를 들어, 정수에는 0, 1/8에는 10, 1/4에는 110, 1/2에는 111을 할당할 수 있다.Also, in the present embodiment, when the reference picture is a specific picture, that is, when the reference picture is a current picture, a high priority can be given to a specific precision. When the reference picture is the current picture, a high priority may be given to an integer. You can also assign the shortest bit to the default precision of 1/8, and the next shortest bit to the integer. That is, 0 can be assigned to 1/8, 10 to an integer, 110 to 1/4, and 111 to 1/2. Also, depending on the implementation, the shortest bit may be assigned to an integer. For example, 0 can be assigned to an integer, 10 can be assigned to 1/8, 110 can be assigned to 1/4, and 111 can be assigned to 1/2.

위와 같이 할당할 수 있는 이유는, 스크린 컨텐츠가 포함된 영상의 경우, 해당 부분은 소수 단위까지 움직임 탐색을 수행하는 경우가 거의 없지만, 자연 영상 부분은 소수 단위까지 움직임 탐색을 수행하는 경우가 많기 때문이다. 즉, 본 실시예의 영상 부호화 및 복호화 방법은 영상의 일부분이 컴퓨터 캡쳐 화면과 같은 스크린 컨텐츠 영역이고 영상의 다른 적어도 일부분이 일반 자연 영상 영역으로서 두 영역들이 혼합되어 있는 영상의 경우에 더욱 효과적으로 적용될 수 있다.The reason for the above allocation is that, in the case of an image including screen content, motion search is rarely performed for the corresponding part to a fractional unit, but motion search is often performed for a natural image part to a fractional unit. am. That is, the image encoding and decoding method of this embodiment can be more effectively applied to the case of an image in which a part of the image is a screen content region such as a computer captured screen and at least another part of the image is a general natural image region, in which the two regions are mixed. .

또한, 본 실시예에서는 현재 블록의 움직임 정보 예측에 사용되는 참조 블록의 정보를 활용할 수 있다. 이 경우에 사용되는 참조 블록은 공간적으로 인접한 제1 블록의 정보를 활용할 수도 있다. 제1 블록은 현재 블록을 기준으로 왼쪽 위, 위, 오른쪽 위, 왼쪽 아래 중 최소 1개 이상의 블록을 포함할 수 있다.In addition, in the present embodiment, information on a reference block used for motion information prediction of the current block may be utilized. The reference block used in this case may utilize information of a spatially adjacent first block. The first block may include at least one or more blocks among upper-left, upper-right, upper-right, and lower-left based on the current block.

또한, 선택된 참조 픽쳐에서 현재 블록에 상응하는 위치에 존재하는 참조 블록(co-located block)의 정보를 활용할 수도 있다. 참조 블록은 co-located block 뿐만 아니라 현재 블록과 동일한 위치의 참조 블록(가운데 블록)을 기준으로 왼쪽 위, 위, 오른쪽 위, 왼쪽, 왼쪽 아래, 아래, 오른쪽 아래, 오른쪽 중 최소 1개 이상의 블록을 후보로 삼을 수 있다. 이때 후보군에 포함되는 위치는 픽쳐 타입에 현재 블록의 크기, 모드, 움직임 벡터, 참조 방향 등의 부호화 관련 파라미터, 공간적으로 인접한 후보 블록들과의 상관관계 등에 따라 결정될 수 있다. 그리고 선택된 참조 픽쳐는 현재 픽쳐의 이전 또는 이후에 존재하는 픽쳐 간의 거리가 1 이상인 픽쳐를 의미할 수 있다.In addition, information on a reference block (co-located block) present at a position corresponding to the current block in the selected reference picture may be used. A reference block includes at least one block among the top-left, top, top-right, left, bottom-left, bottom, bottom-right, and right of the reference block (center block) in the same position as the current block as well as the co-located block. can be considered as candidates. In this case, the position included in the candidate group may be determined according to the picture type, encoding-related parameters such as the size, mode, motion vector, and reference direction of the current block, and correlation with spatially adjacent candidate blocks. In addition, the selected reference picture may mean a picture in which a distance between pictures existing before or after the current picture is 1 or more.

또한, 본 실시예에서는 현재 블록과 인접하진 않지만 같은 공간에 위치하는 블록들의 정보를 활용할 수 있다. 상기 블록들은 부호화 모드 또는 참조 픽쳐 인덱스 또는 미리 설정된 좌표 등의 정보를 기반으로 결정되는 현재 블록과 해당 블록의 사이에 최소 1개 이상의 블록을 포함하는 블록을 후보로 포함할 수 있다. 미리 설정된 좌표는 현재 블록의 좌측 상단 좌표로부터 가로, 세로로 일정 거리의 간격을 갖도록 설정될 수 있다.Also, in the present embodiment, information on blocks that are not adjacent to the current block but located in the same space may be used. The blocks may include, as candidates, a block including at least one block between a current block determined based on information such as an encoding mode, a reference picture index, or preset coordinates and the corresponding block. The preset coordinates may be set to have a predetermined distance horizontally and vertically from the upper left coordinates of the current block.

예를 들어, 왼쪽 블록과 위쪽 블록이 현재 블록의 움직임 벡터의 정밀도를 표현할 때 참조된다고 가정한다. 그리고 움직임 벡터의 정밀도를 절삭형 단항 이진화(truncated unary binarization) 방식으로 표현하기로 한다. 비트 구성은 0 - 10 - 110 - 111과 같을 수 있다. 왼쪽 블록의 움직임 벡터는 1/2 단위로, 위쪽 블록의 움직임 벡터는 1/2 단위로 정밀도가 결정되는 경우에 현재 블록은 1/2 단위로 움직임 벡터가 나타날 가능성이 높다고 판단하여 여러 단위 중 가장 짧은 비트를 할당하여 정밀도 관련 정보를 이진화할 수 있다. 여러 단위는 장치에서 지원하는 정수, 1/2, 1/4, 1/8 단위를 포함할 수 있고, 기준 단위로 1/8가 설정될 수 있다.For example, it is assumed that the left block and the upper block are referenced when expressing the precision of the motion vector of the current block. And the precision of the motion vector is expressed in a truncated unary binarization method. The bit configuration may be something like 0 - 10 - 110 - 111. If the precision is determined in 1/2 units for the motion vector of the left block and 1/2 units for the upper block, it is determined that the motion vector is most likely to appear in the current block in 1/2 units. By allocating short bits, precision-related information can be binarized. The various units may include integers, 1/2, 1/4, and 1/8 units supported by the device, and 1/8 may be set as the reference unit.

다른 예로서, 왼쪽 블록이 1/4, 위쪽 블록이 1/8인 경우, 1/4과 1/8에 비교적 짧은 비트를 할당하고, 나머지 다른 단위는 상대적으로 긴 비트를 할당할 수 있다. 이 경우에, 추가로 현재 기준 단위인 1/8이 포함되어 있을 때는 1/8에 가장 짧은 비트를 할당할 수도 있다. 또한, 왼쪽이 1/4, 위쪽이 1/2과 같이 기준단위가 포함되지 않는 경우에는 고정적인 위치를 먼저 활용하도록 고정적인 위치에 가장 짧은 비트를 할당할 수도 있다. 가령, 왼쪽이 우선순위가 있다고 가정하여 1/4에 가장 짧은 비트를 할당할 수 있다.As another example, when the left block is 1/4 and the upper block is 1/8, relatively short bits may be allocated to 1/4 and 1/8, and relatively long bits may be allocated to other units. In this case, when 1/8, which is the current reference unit, is additionally included, the shortest bit may be allocated to 1/8. In addition, when a reference unit is not included, such as 1/4 on the left and 1/2 on the top, the shortest bit may be allocated to a fixed position so that the fixed position is used first. For example, assuming that the left has priority, the shortest bit can be allocated to 1/4.

또한, 본 실시예에서는 후보 블록의 움직임 정보를 활용할 수 있다. 움직임 정보는 움직임 벡터 외에 참조 픽쳐 인덱스, 참조 방향 등을 포함할 수 있다. 일례로, 왼쪽이 1/4, 위쪽이 정수인 경우, 참조 픽쳐를 확인하였을 때 왼쪽은 t-1, 위쪽은 t-2를 참조 픽쳐로 가진 경우, 그리고 현재 블록이 t-2인 경우, 같은 참조 픽쳐를 가지는 블록에 우선순위를 주고, 해당 블록의 움직임 벡터의 정밀도인 정수에 가장 짧은 비트를 할당할 수도 있다.Also, in this embodiment, motion information of a candidate block may be used. The motion information may include a reference picture index, a reference direction, etc. in addition to the motion vector. For example, when the left side is 1/4 and the top is an integer, when the reference picture is checked, the left side has t-1 and the top side has t-2 as a reference picture, and when the current block is t-2, the same reference A block having a picture may be given priority, and the shortest bit may be allocated to an integer that is the precision of a motion vector of the corresponding block.

위의 실시예를 간략히 나타내면 아래의 1) 내지 4)와 같다.A brief description of the above embodiment is as follows 1) to 4).

1) (1/2, 1/2) 1/2 - 1/8 - 1/4 - 정수1) (1/2, 1/2) 1/2 - 1/8 - 1/4 - integer

2) (1/4, 1/8) 1/8 - 1/4 - 1/2 - 정수2) (1/4, 1/8) 1/8 - 1/4 - 1/2 - integer

3) (1/4, 1/2) 1/4 - 1/2 - 1/8 - 정수3) (1/4, 1/2) 1/4 - 1/2 - 1/8 - integer

4) (1/4, 정수) 정수 - 1/4 - 1/8 - 정수4) (1/4, integer) integer - 1/4 - 1/8 - integer

또한, 본 실시예에서는 픽쳐 단위로 보간 정밀도는 고정한 채로 현재 픽쳐의 타입, 종류 등의 정보에 따라 블록 단위로 움직임 벡터 정밀도를 적응적 또는 고정적으로 지원할 수 있다. 도 18에서와 같이 현재 픽쳐를 참조 픽쳐로 가지는 경우, 움직임 벡터 정밀도를 적응적으로 사용할 수도 있고, B4나 B5, B7, B9와 같이 참조 픽쳐 간의 거리가 짧은 경우 더 세밀한 움직임을 찾기 위한 목적으로 해당 픽쳐에 블록 단위의 움직임 벡터 정밀도를 적응적으로 지원하고 그 외의 픽쳐에서는 고정적으로 움직임 벡터 정밀도를 지원할 수 있다.In addition, in the present embodiment, motion vector precision can be adaptively or fixedly supported on a block-by-block basis according to information such as the type and type of the current picture while the interpolation precision is fixed on a picture-by-picture basis. 18, when the current picture is a reference picture, motion vector precision may be adaptively used, and when the distance between reference pictures is short, such as B4, B5, B7, or B9, for the purpose of finding a more detailed motion Block-wise motion vector precision may be adaptively supported for a picture, and motion vector precision may be fixedly supported for other pictures.

즉, 시간적 계층 정보(Temporal ID)가 3인 경우에는 정수, 1/2, 1/4 중 택일하여 지원하고, 나머지 ID에 대해서는 1/4만 고정되게 사용하는 방식을 이용하거나, 또는 참조 픽쳐와의 거리가 먼 P 픽쳐의 경우 세밀한 움직임을 갖는 영역도 있고 그렇지 않은 영역이 있을 수 있다고 가정하고 블록 단위로 적응적인 움직임 벡터 정밀도를 결정할 수 있고, 그렇지 않은 픽쳐의 경우 고정된 움직임 벡터 정밀도를 지원할 수도 있다.That is, when the temporal hierarchical information (Temporal ID) is 3, an integer, 1/2, or 1/4 is selected and supported, and for the remaining IDs, only 1/4 is used fixedly, or a reference picture and a reference picture are used. In the case of a P picture with a long distance from , it is assumed that there may be regions with fine motion and regions without fine motion, and adaptive motion vector precision can be determined on a block-by-block basis. there is.

또한, 구현에 따라서 정밀도의 구성을 달리한 세트를 2개 이상 두어 지원할 수도 있다. 예를 들어, (1/2, 1/4), (정수, 1/2, 1/4), (1/2, 1/4, 1/8), (정수, 1/4) 등 최소 2개 이상의 정밀도가 후보가 될 수 있다(표 7 참조).In addition, depending on the implementation, two or more sets with different configurations of precision may be provided and supported. For example, (1/2, 1/4), (integer, 1/2, 1/4), (1/2, 1/4, 1/8), (integer, 1/4), etc. at least 2 More than one precision can be candidates (see Table 7).

Figure pat00007
Figure pat00007

픽쳐 단위로 보간 정밀도를 설정할 수 있는 경우When the interpolation precision can be set on a picture-by-picture basis

도 19는 도 18에서 현재 픽쳐가 I 픽쳐일 때의 참조 픽쳐 리스트를 나타낸 도면이다.19 is a diagram illustrating a reference picture list when the current picture is an I picture in FIG. 18 .

도 19를 참조하면, 현재 픽쳐에서 블록 매칭을 통해 예측 블록을 생성할 수 있다. 참조 픽쳐(N)에 I 픽쳐가 추가가 된다. I*(0)라고 표현한 것은 현재 픽쳐를 부호화할 때 현재 픽쳐를 참조 픽쳐로 삼는다는 것을 의미한다.Referring to FIG. 19 , a prediction block may be generated through block matching in the current picture. An I picture is added to the reference picture (N). Expression of I*(0) means that the current picture is used as a reference picture when the current picture is encoded.

픽쳐 단위로 보간 정밀도를 설정할 때, I 픽쳐에는 정수 단위까지만 정밀도를 허용하는 경우로서 보간을 하지 않는 경우에 해당된다. 영상 부호화 및 복호화 장치는 참조 픽쳐 리스트 0(reference list 0, L0)만을 참조할 수 있다.When the interpolation precision is set on a picture-by-picture basis, precision is allowed only up to an integer unit for I pictures, which corresponds to a case where interpolation is not performed. The image encoding and decoding apparatus may refer to only reference picture list 0 (reference list 0, L0).

또한, 픽쳐 타입이나 시간적인 식별자(temporalID) 등에 따라 현재 픽쳐를 참조 픽쳐로 삼는 것을 제한한다면, 예를 들어 I 픽쳐일 때만 현재 픽쳐에 블록 매칭이 허용될 수 있고 그 외 픽쳐에는 허용하지 않는 경우에는, 별표(*)의 참조 픽쳐는 생략될 수 있다.In addition, if the use of the current picture as a reference picture is restricted according to the picture type or temporal identifier (temporalID), for example, block matching may be allowed for the current picture only in the case of an I picture, and block matching for other pictures is not allowed. , reference pictures of an asterisk (*) may be omitted.

도 20은 도 18에서 현재 픽쳐가 P 픽쳐일 때의 참조 픽쳐 리스트를 나타낸 도면이다.20 is a diagram illustrating a reference picture list when the current picture is a P picture in FIG. 18 .

도 20을 참조하면, P 픽쳐도 참조 픽쳐에 추가된다. P*(1)라고 표현한 것은 현재 픽쳐를 부호화할 때 P 픽쳐를 현재 픽쳐로 삼는다는 것을 의미한다. 여기에서 I(0)는 위의 I*(0)와 다른 의미를 가진다. 즉, I*(0)는 부호화 도중에 움직임 탐색을 수행하므로 디블록킹 필터(deblocking filter) 등의 후처리 필터링이 적용되지 않거나 부분 적용된 픽쳐에서 움직임 탐색을 할 수 있고, I(0)는 부호화가 끝난 후 후처리 필터링이 적용된 픽쳐이므로 같은 POC를 갖는 픽쳐이지만 필터링 적용의 차이로 인해 다른 픽쳐일 수 있다.Referring to FIG. 20 , a P picture is also added to the reference picture. The expression P*(1) means that the P picture is used as the current picture when the current picture is encoded. Here, I(0) has a different meaning from I*(0) above. That is, since I*(0) performs motion search during encoding, motion search can be performed on a picture to which post-processing filtering such as a deblocking filter is not applied or partially applied, and I(0) indicates that the encoding is finished. Since it is a picture to which post-processing filtering is applied, it may be a picture having the same POC, but different pictures due to a difference in filtering application.

이전 I 픽쳐를 참조 픽쳐로 삼을 때 해당 픽쳐의 보간 정밀도가 1/8이기 때문에 움직임 탐색도 1/8 단위까지 수행하여 최적의 움직임 벡터를 찾을 수 있다. 현재 픽쳐(P*(1))를 참조 픽쳐로 삼을 때는 해당 픽쳐의 보간 정밀도가 정수이기 때문에 정수 단위로 움직임 탐색을 수행할 수 있다.When the previous I picture is used as a reference picture, since the interpolation precision of the corresponding picture is 1/8, motion search is also performed up to 1/8 unit to find the optimal motion vector. When the current picture (P*(1)) is used as a reference picture, since the interpolation precision of the corresponding picture is an integer, motion search may be performed in units of integers.

도 21은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 현재 픽쳐가 B(2)일 때 참조픽쳐 리스트를 나타낸 도면이다. 도 22는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 현재 픽쳐가 B(5)일 때 참조픽쳐 리스트를 나타낸 도면이다.21 is a diagram illustrating a reference picture list when a current picture is B(2) in an image encoding and decoding method according to an embodiment of the present invention. 22 is a diagram illustrating a reference picture list when the current picture is B(5) in the video encoding and decoding method according to an embodiment of the present invention.

도 21을 참조하면, 현재 픽쳐가 B(2)일 때, I 픽쳐(I(0))와 P 픽쳐(P(1))를 참조 픽쳐로 추가하여 각 픽쳐의 보간 정밀도에 따라 움직임 탐색도 해당 픽쳐의 정밀도 단위까지 수행할 수 있음을 보여준다. 본 실시예에서, P 픽쳐에서는 1/4 단위의 정밀도로 움직임 벡터를 탐색하고, I 픽쳐에서는 1/8 단위의 정밀도로 움직임 벡터를 탐색할 수 있다.Referring to FIG. 21 , when the current picture is B(2), an I picture (I(0)) and a P picture (P(1)) are added as reference pictures, and motion search is also performed according to the interpolation precision of each picture. It shows that it can perform up to the precision unit of the picture. In the present embodiment, a motion vector may be searched for with an accuracy of 1/4 unit in a P picture, and a motion vector may be searched with an accuracy of 1/8 unit in an I picture.

또한, 도 22를 참조하면, 현재 픽쳐가 B(5)일 때, I 픽쳐와 P 픽쳐 중 어느 하나도 참조 픽쳐로 포함하지 않지만, 복수의 참조 픽쳐들 {B(2), B(4), B(3)}의 보간 정밀도에 따라 다른 정밀도로 움직임 벡터를 탐색할 수 있다.Also, referring to FIG. 22 , when the current picture is B(5), neither of the I picture and the P picture is included as a reference picture, but a plurality of reference pictures {B(2), B(4), B (3)}, it is possible to search for a motion vector with different precision according to the interpolation precision.

도 23은 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 참조 픽쳐의 보간 정밀도에 따라 각 블록의 움직임 벡터 정밀도가 정해지는 과정을 설명하기 위한 도면이다. 도 24는 본 발명의 일실시예에 따른 영상 부호화 및 복호화 방법에서 각 참조 픽쳐의 보간 정밀도가 고정된 경우에 각 블록의 움직임 벡터 정밀도가 적응적으로 정해지는 과정을 설명하기 위한 도면이다.FIG. 23 is a diagram for explaining a process in which motion vector precision of each block is determined according to interpolation precision of a reference picture in an image encoding and decoding method according to an embodiment of the present invention. 24 is a diagram for describing a process in which motion vector precision of each block is adaptively determined when the interpolation precision of each reference picture is fixed in the video encoding and decoding method according to an embodiment of the present invention.

도 23을 참조하면, 현재 픽쳐의 보간 정밀도가 정수(Int)이고, 세 개의 참조 픽쳐들(t-1, t-2, t-3)의 보간 정밀도가 각각 1/4, 1/2 및 1/8일 때, 참조 픽쳐를 참조하는 현재 블록의 주변 블록들에 대한 움직임 벡터를 탐색할 때, 해당 참조 픽쳐의 보간 정밀도에 대응하는 정밀도로 각 주변 블록의 움직임 벡터를 탐색할 수 있다.Referring to FIG. 23 , the interpolation precision of the current picture is an integer (Int), and the interpolation precision of three reference pictures (t-1, t-2, t-3) is 1/4, 1/2, and 1, respectively. When /8, when motion vectors for neighboring blocks of the current block referring to the reference picture are searched, the motion vectors of each neighboring block may be searched with a precision corresponding to the interpolation precision of the corresponding reference picture.

도 24를 참조하면, 현재 픽쳐와 참조 픽쳐들의 보간 정밀도가 1/4로 모두 동일할 때, 참조 픽쳐를 참조하는 현재 블록의 주변 블록들에 대한 움직임 벡터를 탐색할 때, 일정한 보간 정밀도에 대응하는 정밀도로 주변 블록들의 움직임 벡터를 탐색할 수 있다. 물론, 구현에 따라서 블록 단위의 움직임 벡터의 정밀도가 정해지더라도 참조 픽쳐들의 보간 정밀도는 각각 설정되는 것도 가능하다.Referring to FIG. 24 , when the interpolation precision of the current picture and the reference pictures is equal to 1/4, when the motion vectors for neighboring blocks of the current block referencing the reference picture are searched, Motion vectors of neighboring blocks can be searched with precision. Of course, even if the precision of the block unit motion vector is determined according to implementation, the interpolation precision of the reference pictures may be set respectively.

전술한 실시예에서 참조 픽쳐의 보간 정밀도에 따라 움직임 벡터의 정밀도가 정해지거나, 또는 보간 정밀도는 고정된 채 블록 단위로 움직임 벡터의 정밀도가 정해지는 것으로 설명하였다. 하지만, 본 발명을 그러한 구성을 한정되지 않는다. 참조 픽쳐의 보간 정밀도도 각각 설정이 되고, 블록 단위로 움직임 벡터의 정밀도가 정해지는 경우를 혼합하는 것도 가능하다. 이때, 움직임 벡터의 최대 정밀도는 참조되는 픽쳐의 정밀도에 따라 결정된다.In the above-described embodiment, it has been described that the precision of the motion vector is determined according to the interpolation precision of the reference picture, or the precision of the motion vector is determined in units of blocks while the interpolation precision is fixed. However, the present invention is not limited to such configurations. It is also possible to mix cases in which the interpolation precision of the reference picture is also set, and the precision of the motion vector is determined in units of blocks. In this case, the maximum precision of the motion vector is determined according to the precision of the referenced picture.

전술한 실시예에 의하면, 화면간 예측에서 픽쳐 또는 블록 단위로 보간 정밀도를 적응적으로 적용할 수 있다. 또한, GOP 구조에서의 시간적인 레이어(temporal layer), 참조되는 픽쳐의 평균 거리 등에 따라 적응적인 보간 정밀도를 지원할 수 있다. 아울러, 정밀도에 따른 인덱스 정보의 부호화에서 부호화 정보량을 감소시키고, 인덱스 정보의 다양한 방식의 부호화를 가능케 할 수 있다.According to the above-described embodiment, interpolation precision may be adaptively applied in units of pictures or blocks in inter prediction. In addition, adaptive interpolation precision may be supported according to a temporal layer in the GOP structure, an average distance of referenced pictures, and the like. In addition, it is possible to reduce the amount of encoded information in encoding index information according to precision, and to enable encoding of index information in various ways.

전술한 실시예에 있어서, 영상 부호화 방법은, 부호화된 영상을 복호화하기 위해 위에서 설명한 움직임 벡터 정밀성을 이용하는 경우, 영상 복호화 방법으로 대체되어 사용될 수 있다. 또한, 영상 부호화/복호화 방법은 부호화 및 복호화를 위한 적어도 하나의 수단이나 이러한 수단에 상응하는 기능을 수행하는 구성부를 구비하는 영상 처리 장치 혹은 영상 부호화 및 복호화 장치에 의해 실행될 수 있음은 물론이다.In the above-described embodiment, the image encoding method may be used instead of the image decoding method when the motion vector precision described above is used to decode the encoded image. Also, it goes without saying that the image encoding/decoding method may be executed by an image processing apparatus or an image encoding and decoding apparatus having at least one means for encoding and decoding or a component performing a function corresponding to the means.

전술한 실시예에 의하면, 화면 내 예측 기술이 사용되고 있는 MPEG-2, MPEG-4, H.264 등의 국제 코덱 또는 기타 다른 코덱과 이 코덱들을 사용하는 매체, 그리고 영상 산업에 전반적으로 이용가능한 고성능 고효율의 영상 부호화 복호화 기술을 제공할 수 있다. 또한, 향후에는 현재의 고효율 영상 부호화 기술(HEVC) 및 H.264/AVC와 같은 표준 코덱과 화면 내 예측을 사용하는 영상 처리 분야에 적용이 예상된다.According to the above-described embodiment, international codecs such as MPEG-2, MPEG-4, H.264, etc. or other codecs using in-picture prediction technology, media using these codecs, and high performance generally available to the video industry It is possible to provide a high-efficiency video encoding/decoding technology. In addition, in the future, it is expected to be applied to the image processing field using the current high-efficiency image encoding technology (HEVC) and standard codecs such as H.264/AVC and intra prediction.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to the preferred embodiment of the present invention, those skilled in the art can variously modify and change the present invention within the scope without departing from the spirit and scope of the present invention as described in the claims below. You will understand that it can be done.

Claims (3)

현재 블록을 포함하는 현재 픽쳐가 참조 픽쳐로 이용될 수 있는지 여부를 나타내는 참조 픽쳐 정보 및 움직임 벡터 정밀도를 나타내는 정밀도 정보를 복호화하는 단계, 상기 참조 픽쳐 정보는 픽쳐 파라미터 세트로부터 복호화됨;
참조 픽쳐 리스트 0을 생성하는 단계, 상기 참조 픽쳐 리스트 0는 상기 현재 픽쳐에 앞서 복호화된 픽쳐를 포함하고, 상기 참조 픽쳐 정보가 상기 현재 픽쳐가 참조 픽쳐로 이용될 수 있음을 나타내는 경우, 상기 현재 픽쳐를 더 포함함;
상기 참조 픽쳐 리스트 0으로부터 상기 현재 블록의 참조 픽쳐를 결정하는 단계;
상기 정밀도 정보 및 상기 결정된 참조 픽쳐에 기초하여, 상기 현재 블록의 움직임 벡터 정밀도를 결정하는 단계;
상기 움직임 벡터 정밀도에 기초하여, 상기 현재 블록의 움직임 벡터를 획득하는 단계; 및
상기 움직임 벡터에 기초하여 상기 현재 블록의 예측 샘플을 유도하는 단계를 포함하되,
상기 현재 블록의 움직임 벡터 정밀도는 상기 결정된 참조 픽쳐가 상기 현재 픽쳐인지 여부에 기초하여 결정되고,
상기 참조 픽쳐 리스트 0에 상기 현재 픽쳐 이전의 제1 참조 픽쳐가 할당된 후에 상기 현재 픽쳐가 할당되는 것을 특징으로 하는, 영상 복호화 방법.
decoding reference picture information indicating whether a current picture including a current block can be used as a reference picture and precision information indicating motion vector precision, wherein the reference picture information is decoded from a picture parameter set;
generating a reference picture list 0, wherein the reference picture list 0 includes a picture decoded prior to the current picture, and when the reference picture information indicates that the current picture can be used as a reference picture, the current picture further comprising;
determining a reference picture of the current block from the reference picture list 0;
determining motion vector precision of the current block based on the precision information and the determined reference picture;
obtaining a motion vector of the current block based on the motion vector precision; and
Including the step of deriving a prediction sample of the current block based on the motion vector,
The motion vector precision of the current block is determined based on whether the determined reference picture is the current picture,
The video decoding method of claim 1, wherein the current picture is allocated after the first reference picture before the current picture is allocated to the reference picture list 0.
현재 블록을 포함하는 현재 픽쳐가 참조 픽쳐로 이용될 수 있는지 여부 및 상기 현재 블록의 움직임 벡터 정밀도를 결정하는 단계;
참조 픽쳐 리스트 0을 생성하는 단계, 상기 참조 픽쳐 리스트 0는 상기 현재 픽쳐에 앞서 복호화된 픽쳐를 포함하고, 상기 현재 픽쳐가 참조 픽쳐로 이용될 수 있는 것으로 결정되는 경우, 상기 현재 픽쳐를 더 포함함;
상기 참조 픽쳐 리스트 0으로부터 상기 현재 블록의 참조 픽쳐를 결정하는 단계;
상기 움직임 벡터 정밀도에 기초하여, 상기 현재 블록의 움직임 벡터를 획득하는 단계; 및
상기 현재 픽쳐가 참조 픽쳐로 이용될 수 있는지 여부 및 상기 현재 블록의 움직임 벡터 정밀도에 기초하여, 상기 현재 블록의 참조 픽쳐 정보 및 정밀도 정보를 픽쳐 파라미터 세트를 이용하여 부호화하는 단계를 포함하되,
상기 현재 블록의 움직임 벡터 정밀도는 상기 결정된 참조 픽쳐가 상기 현재 픽쳐인지 여부에 기초하여 결정되고,
상기 참조 픽쳐 리스트 0에 상기 현재 픽쳐 이전의 제1 참조 픽쳐가 할당된 후에 상기 현재 픽쳐가 할당되는 것을 특징으로 하는, 영상 부호화 방법.
determining whether a current picture including the current block can be used as a reference picture and motion vector precision of the current block;
generating a reference picture list 0, wherein the reference picture list 0 includes a picture decoded prior to the current picture, and when it is determined that the current picture can be used as a reference picture, further includes the current picture ;
determining a reference picture of the current block from the reference picture list 0;
obtaining a motion vector of the current block based on the motion vector precision; and
Based on whether the current picture can be used as a reference picture and motion vector precision of the current block, encoding reference picture information and precision information of the current block using a picture parameter set,
The motion vector precision of the current block is determined based on whether the determined reference picture is the current picture,
The video encoding method, characterized in that the current picture is allocated after the first reference picture before the current picture is allocated to the reference picture list 0.
비트스트림을 포함하는 비일시적 저장매체에 있어서,
현재 블록을 포함하는 현재 픽쳐가 참조 픽쳐로 이용될 수 있는지 여부 및 상기 현재 블록의 움직임 벡터 정밀도를 결정하는 단계;
참조 픽쳐 리스트 0을 생성하는 단계, 상기 참조 픽쳐 리스트 0는 상기 현재 픽쳐에 앞서 복호화된 픽쳐를 포함하고, 상기 현재 픽쳐가 참조 픽쳐로 이용될 수 있는 것으로 결정되는 경우, 상기 현재 픽쳐를 더 포함함;
상기 참조 픽쳐 리스트 0으로부터 상기 현재 블록의 참조 픽쳐를 결정하는 단계;
상기 움직임 벡터 정밀도에 기초하여, 상기 현재 블록의 움직임 벡터를 획득하는 단계; 및
상기 현재 픽쳐가 참조 픽쳐로 이용될 수 있는지 여부 및 상기 현재 블록의 움직임 벡터 정밀도에 기초하여, 상기 현재 블록의 참조 픽쳐 정보 및 정밀도 정보를 픽쳐 파라미터 세트를 이용하여 부호화하는 단계를 포함하되,
상기 현재 블록의 움직임 벡터 정밀도는 상기 결정된 참조 픽쳐가 상기 현재 픽쳐인지 여부에 기초하여 결정되고,
상기 참조 픽쳐 리스트 0에 상기 현재 픽쳐 이전의 제1 참조 픽쳐가 할당된 후에 상기 현재 픽쳐가 할당되는 것을 특징으로 하는 영상 부호화 방법으로 생성된 비트스트림을 포함하는 비일시적인 저장매체.
In a non-transitory storage medium including a bitstream,
determining whether a current picture including the current block can be used as a reference picture and motion vector precision of the current block;
generating a reference picture list 0, wherein the reference picture list 0 includes a picture decoded prior to the current picture, and when it is determined that the current picture can be used as a reference picture, further includes the current picture ;
determining a reference picture of the current block from the reference picture list 0;
obtaining a motion vector of the current block based on the motion vector precision; and
Based on whether the current picture can be used as a reference picture and motion vector precision of the current block, encoding reference picture information and precision information of the current block using a picture parameter set,
The motion vector precision of the current block is determined based on whether the determined reference picture is the current picture,
A non-transitory storage medium including a bitstream generated by the video encoding method, wherein the current picture is allocated after the first reference picture before the current picture is allocated to the reference picture list 0.
KR1020220016276A 2015-06-05 2022-02-08 Image encoding/decoding method and image decoding apparatus using motion vector precision KR102476230B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20150079918 2015-06-05
KR1020150079918 2015-06-05
KR1020170121469A KR102362158B1 (en) 2015-06-05 2017-09-20 Image encoding/decoding method and image decoding apparatus using motion vector precision

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020170121469A Division KR102362158B1 (en) 2015-06-05 2017-09-20 Image encoding/decoding method and image decoding apparatus using motion vector precision

Publications (2)

Publication Number Publication Date
KR20220024304A true KR20220024304A (en) 2022-03-03
KR102476230B1 KR102476230B1 (en) 2022-12-12

Family

ID=57575557

Family Applications (3)

Application Number Title Priority Date Filing Date
KR1020160070406A KR101782155B1 (en) 2015-06-05 2016-06-07 Image encoding/decoding method and image decoding apparatus using motion vector precision
KR1020170121469A KR102362158B1 (en) 2015-06-05 2017-09-20 Image encoding/decoding method and image decoding apparatus using motion vector precision
KR1020220016276A KR102476230B1 (en) 2015-06-05 2022-02-08 Image encoding/decoding method and image decoding apparatus using motion vector precision

Family Applications Before (2)

Application Number Title Priority Date Filing Date
KR1020160070406A KR101782155B1 (en) 2015-06-05 2016-06-07 Image encoding/decoding method and image decoding apparatus using motion vector precision
KR1020170121469A KR102362158B1 (en) 2015-06-05 2017-09-20 Image encoding/decoding method and image decoding apparatus using motion vector precision

Country Status (1)

Country Link
KR (3) KR101782155B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019194501A1 (en) * 2018-04-01 2019-10-10 엘지전자 주식회사 Image coding method on basis of motion vector refinement and apparatus thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110020212A (en) * 2009-08-21 2011-03-02 에스케이 텔레콤주식회사 Reference picture interpolation method and apparatus and video coding method and apparatus using same
KR20140133803A (en) * 2012-03-02 2014-11-20 파나소닉 주식회사 Image coding method, image decoding method, image coding device, image decoding device, and image coding-decoding device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110020212A (en) * 2009-08-21 2011-03-02 에스케이 텔레콤주식회사 Reference picture interpolation method and apparatus and video coding method and apparatus using same
KR20140133803A (en) * 2012-03-02 2014-11-20 파나소닉 주식회사 Image coding method, image decoding method, image coding device, image decoding device, and image coding-decoding device

Also Published As

Publication number Publication date
KR101782155B1 (en) 2017-09-26
KR102362158B1 (en) 2022-02-11
KR102476230B1 (en) 2022-12-12
KR20170113513A (en) 2017-10-12
KR20160143585A (en) 2016-12-14

Similar Documents

Publication Publication Date Title
US11368675B2 (en) Method and device for encoding and decoding intra-frame prediction
KR101988888B1 (en) Method and apparartus for encoding/decoding for intra prediction mode
KR102462012B1 (en) Image encoding/decoding method and image decoding apparatus using motion vector precision
KR102447872B1 (en) Method and apparatus of image encoding/decoding using adaptive deblocking filtering
KR102558269B1 (en) Image encoding method and image decoding method and apparatus using adaptive deblocking filtering
KR102476541B1 (en) Method and apparatus of image encoding/decoding using reference pixel composition in intra prediction
KR102514392B1 (en) Image encoding/decoding method and image decoding apparatus using motion vector precision
KR102476230B1 (en) Image encoding/decoding method and image decoding apparatus using motion vector precision

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant