KR20130085376A - Method for determining coding mode and apparatus thereof - Google Patents

Method for determining coding mode and apparatus thereof Download PDF

Info

Publication number
KR20130085376A
KR20130085376A KR1020130002886A KR20130002886A KR20130085376A KR 20130085376 A KR20130085376 A KR 20130085376A KR 1020130002886 A KR1020130002886 A KR 1020130002886A KR 20130002886 A KR20130002886 A KR 20130002886A KR 20130085376 A KR20130085376 A KR 20130085376A
Authority
KR
South Korea
Prior art keywords
current block
block
value
encoding
intra prediction
Prior art date
Application number
KR1020130002886A
Other languages
Korean (ko)
Other versions
KR102183366B1 (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 KR20130085376A publication Critical patent/KR20130085376A/en
Application granted granted Critical
Publication of KR102183366B1 publication Critical patent/KR102183366B1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47JKITCHEN EQUIPMENT; COFFEE MILLS; SPICE MILLS; APPARATUS FOR MAKING BEVERAGES
    • A47J47/00Kitchen containers, stands or the like, not provided for in other groups of this subclass; Cutting-boards, e.g. for bread
    • A47J47/005Cutting boards
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47JKITCHEN EQUIPMENT; COFFEE MILLS; SPICE MILLS; APPARATUS FOR MAKING BEVERAGES
    • A47J36/00Parts, details or accessories of cooking-vessels
    • A47J36/02Selection of specific materials, e.g. heavy bottoms with copper inlay or with insulating inlay

Landscapes

  • Engineering & Computer Science (AREA)
  • Food Science & Technology (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE: A coding mode determining method and an apparatus thereof are provided to skip an intra prediction process or an intra coding process about a current block according to the satisfaction of a condition, thereby reducing the complexity of an encoding device. CONSTITUTION: An encoding device determines whether intra prediction about a current block is skipped or not. In case the intra prediction is determined to be skipped, the encoding device determines coding modes except an intra mode from all coding modes of the current block as multiple coding mode candidates. The encoding device determines a corresponding coding mode among the coding mode candidates and encodes the current block by performing a rate distortion optimization (RDO) process about the coding mode candidates (S310,S320). [Reference numerals] (S310) Determine a decoding module of a current block; (S320) Conduct a decoding of the current block

Description

부호화 모드 결정 방법 및 그 장치 {METHOD FOR DETERMINING CODING MODE AND APPARATUS THEREOF}Method and apparatus for determining encoding mode {METHOD FOR DETERMINING CODING MODE AND APPARATUS THEREOF}

본 발명은 영상 처리에 관한 것으로서, 보다 상세하게는 부호화 모드 결정 방법 및 그 장치에 관한 것이다.The present invention relates to image processing, and more particularly, to a method and apparatus for determining an encoding mode.

최근 HD(High Definition) 해상도를 가지는 방송 서비스가 국내뿐만 아니라 세계적으로 확대되면서, 많은 사용자들이 고해상도, 고화질의 영상에 익숙해지고 있으며 이에 따라 많은 기관들이 차세대 영상기기의 개발에 박차를 가하고 있다. 또한 HDTV와 더불어 HDTV의 4배 이상의 해상도를 갖는 UHD(Ultra High Definition)에 대한 관심이 증대되면서 보다 높은 해상도, 고화질의 영상에 대한 압축기술이 요구되고 있다.Recently, broadcasting service having high definition (HD) resolution has been expanded not only in domestic but also in the world, so that many users are accustomed to high-resolution and high-definition video, and thus many organizations are spurring development of next generation video equipment. In addition, with the increase of interest in UHD (Ultra High Definition) having resolution more than 4 times of HDTV in addition to HDTV, a compression technique for a higher resolution and a higher image quality is required.

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

본 발명의 기술적 과제는 영상 부호화 효율을 향상시키고 복잡도를 감소시킬 수 있는 영상 부호화 방법 및 장치를 제공함에 있다.An object of the present invention is to provide an image encoding method and apparatus capable of improving image encoding efficiency and reducing complexity.

본 발명의 기술적 과제는 영상 부호화 효율을 향상시키고 복잡도를 감소시킬 수 있는 부호화 모드 결정 방법 및 장치를 제공함에 있다.An object of the present invention is to provide an encoding mode determining method and apparatus capable of improving image encoding efficiency and reducing complexity.

본 발명의 일 실시 형태는 영상 부호화 방법이다. 상기 방법은, 현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정하는 단계, 상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정하는 단계, 및 상기 결정된 부호화 모드를 기반으로 상기 현재 블록에 대한 부호화를 수행하는 단계를 포함한다. 여기서, 상기 부호화 모드를 결정하는 단계에서는, 상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정할 수 있다.One embodiment of the present invention is a video encoding method. The method includes determining whether intra prediction for a current block is omitted, and rate-distortion optimization for a plurality of encoding mode candidates determined according to whether intra prediction is omitted. Performing an RDO) process, determining an encoding mode to be applied to the current block among the plurality of encoding mode candidates, and performing encoding on the current block based on the determined encoding mode. In the determining of the encoding mode, when it is determined that the intra prediction is omitted, the encoding modes other than the intra mode among the encoding modes that the current block may have may be determined as the plurality of encoding mode candidates.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록의 좌측에 인접하여 위치한 좌측 주변 블록, 상기 현재 블록의 상단에 인접하여 위치한 상단 주변 블록, 상기 현재 블록의 우측 상단 코너에 가장 가까이 위치한 우측 상단 주변 블록 및 상기 현재 블록의 좌측 상단 코너에 가장 가까이 위치한 좌측 상단 주변 블록의 부호화 모드가 모두 인터 모드인 경우에 수행될 수 있다.The determining of whether or not the intra prediction is omitted may include: a left peripheral block located adjacent to the left side of the current block, a top peripheral block located adjacent to the top of the current block, and the nearest right corner of the current block; The encoding mode of the upper right peripheral block and the upper left peripheral block nearest to the upper left corner of the current block may be performed when the inter mode is used.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계 및 상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출될 수 있다.Determining whether or not the intra prediction is omitted may include: deriving a Boundary Absolute Difference (BAD) value for the current block and determining that the intra prediction is omitted when the BAD value is larger than a predetermined threshold value. It may further comprise a step. Here, the BAD value may be derived based on pixel values of pixels located adjacent to an upper boundary and a left boundary of the current block among pixels in the current block and pixels located around the current block.

상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값일 수 있다.The predetermined threshold may be a value determined experimentally and stored in the encoder in advance.

상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 BAD 값들의 평균 값으로 결정될 수 있다.The predetermined threshold value may be determined as an average value of BAD values of a plurality of neighboring blocks located around the current block.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 SNMV(Sum of Norm Motion Vector) 값을 도출하는 단계 및 상기 SNMV 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 SNMV 값은, 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 움직임 벡터의 놈(norm) 값을 더함으로써 도출될 수 있다.Determining whether or not the intra prediction is omitted may include deriving a sum of norm motion vector (SNMV) value for the current block and if the SNMV value is smaller than a predetermined threshold, the intra prediction is omitted. The method may further include determining. Here, the SNMV value may be derived by adding a norm of motion vectors of a plurality of neighboring blocks located around the current block.

상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값일 수 있다.The predetermined threshold may be a value determined experimentally and stored in the encoder in advance.

상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 SNMV 값들의 평균 값으로 결정될 수 있다.The predetermined threshold value may be determined as an average value of SNMV values of a plurality of neighboring blocks located around the current block.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 교차 상관도(cross-correlation) 값을 도출하는 단계 및 상기 교차 상관도 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 교차 상관도 값은 상기 현재 블록 내의 픽셀들 및 동일 위치 블록(co-located block) 내의 픽셀들의 픽셀 값을 기반으로 도출될 수 있고, 상기 동일 위치 블록은 시간적으로 바로 이전에 부호화가 완료된 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록일 수 있다.Determining whether or not the intra prediction is omitted, deriving a cross-correlation value for the current block and if the cross correlation value is less than a predetermined threshold, the intra prediction is omitted. The method may further include determining to be. The cross-correlation value may be derived based on pixel values of pixels in the current block and pixels in a co-located block, and the co-located block may have been encoded just before. The block may be a block existing at the same position as the current block in the picture.

상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값일 수 있다.The predetermined threshold may be a value determined experimentally and stored in the encoder in advance.

상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 교차 상관도 값들의 평균 값으로 결정될 수 있다.The predetermined threshold value may be determined as an average value of cross correlation values of a plurality of neighboring blocks located around the current block.

본 발명의 다른 실시 형태는 부호화 모드 결정 방법이다. 상기 방법은, 현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정하는 단계, 및 상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정하는 단계를 포함한다. 여기서, 상기 부호화 모드를 결정하는 단계에서는, 상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정할 수 있다.Another embodiment of the present invention is a coding mode determination method. The method includes determining whether intra prediction for a current block is omitted, and rate-distortion optimization for a plurality of coding mode candidates determined according to whether intra prediction is omitted. And determining an encoding mode to be applied to the current block among the plurality of encoding mode candidates. In the determining of the encoding mode, when it is determined that the intra prediction is omitted, the encoding modes other than the intra mode among the encoding modes that the current block may have may be determined as the plurality of encoding mode candidates.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록의 좌측에 인접하여 위치한 좌측 주변 블록, 상기 현재 블록의 상단에 인접하여 위치한 상단 주변 블록, 상기 현재 블록의 우측 상단 코너에 가장 가까이 위치한 우측 상단 주변 블록 및 상기 현재 블록의 좌측 상단 코너에 가장 가까이 위치한 좌측 상단 주변 블록의 부호화 모드가 모두 인터 모드인 경우에 수행될 수 있다.The determining of whether or not the intra prediction is omitted may include: a left peripheral block located adjacent to the left side of the current block, a top peripheral block located adjacent to the top of the current block, and the nearest right corner of the current block; The encoding mode of the upper right peripheral block and the upper left peripheral block nearest to the upper left corner of the current block may be performed when the inter mode is used.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계 및 상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출될 수 있다.Determining whether or not the intra prediction is omitted may include: deriving a Boundary Absolute Difference (BAD) value for the current block and determining that the intra prediction is omitted when the BAD value is larger than a predetermined threshold value. It may further comprise a step. Here, the BAD value may be derived based on pixel values of pixels located adjacent to an upper boundary and a left boundary of the current block among pixels in the current block and pixels located around the current block.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 SNMV(Sum of Norm Motion Vector) 값을 도출하는 단계 및 상기 SNMV 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 SNMV 값은, 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 움직임 벡터의 놈(norm) 값을 더함으로써 도출될 수 있다.Determining whether or not the intra prediction is omitted may include deriving a sum of norm motion vector (SNMV) value for the current block and if the SNMV value is smaller than a predetermined threshold, the intra prediction is omitted. The method may further include determining. Here, the SNMV value may be derived by adding a norm of motion vectors of a plurality of neighboring blocks located around the current block.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 교차 상관도(cross-correlation) 값을 도출하는 단계 및 상기 교차 상관도 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 교차 상관도 값은 상기 현재 블록 내의 픽셀들 및 동일 위치 블록(co-located block) 내의 픽셀들의 픽셀 값을 기반으로 도출될 수 있고, 상기 동일 위치 블록은 시간적으로 바로 이전에 부호화가 완료된 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록일 수 있다.Determining whether or not the intra prediction is omitted, deriving a cross-correlation value for the current block and if the cross correlation value is less than a predetermined threshold, the intra prediction is omitted. The method may further include determining to be. The cross-correlation value may be derived based on pixel values of pixels in the current block and pixels in a co-located block, and the co-located block may have been encoded just before. The block may be a block existing at the same position as the current block in the picture.

본 발명의 또 다른 실시 형태는 영상 부호화 장치이다. 상기 장치는, 현재 블록에 적용될 부호화 모드를 결정하고, 상기 부호화 모드를 기반으로 상기 현재 블록에 대해 예측을 수행함으로써 상기 현재 블록에 대응하는 예측 블록을 생성하는 예측부 및 상기 현재 블록 및 상기 예측 블록을 기반으로 부호화된 비트스트림을 생성하는 비트스트림 생성부를 포함할 수 있다. 여기서, 상기 예측부는, 상기 현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정할 수 있고, 상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정할 수 있다.Yet another embodiment of the present invention is a video encoding apparatus. The apparatus may include a prediction unit configured to determine a coding mode to be applied to a current block and to generate a prediction block corresponding to the current block by performing prediction on the current block based on the coding mode, and the current block and the prediction block. It may include a bitstream generator for generating an encoded bitstream based on the. Here, the prediction unit may determine whether intra prediction for the current block is omitted, and rate-distortion optimization (Rate−) for a plurality of encoding mode candidates determined according to whether the intra prediction is omitted. By performing a Distortion Optimization (RDO) process, an encoding mode to be applied to the current block may be determined from among the plurality of encoding mode candidates.

상기 예측부는, 상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정할 수 있다.When it is determined that the intra prediction is omitted, the prediction unit may determine, as the plurality of encoding mode candidates, the remaining encoding modes except the intra mode among the encoding modes that the current block may have.

본 발명에 따른 영상 부호화 방법에 의하면, 영상 부호화 효율이 향상되고 복잡도가 감소될 수 있다.According to the image encoding method according to the present invention, image encoding efficiency may be improved and complexity may be reduced.

본 발명에 따른 부호화 모드 결정 방법에 의하면, 영상 부호화 효율이 향상되고 복잡도가 감소될 수 있다.According to the encoding mode determining method according to the present invention, image encoding efficiency may be improved and complexity may be reduced.

도 1은 본 발명이 적용되는 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 3은 본 발명이 적용되는 영상 부호화 방법의 일 실시예를 개략적으로 나타내는 흐름도이다.
도 4는 부호화기에서 인트라 모드 스킵 적용 여부를 결정하는 방법의 실시예를 설명하기 위한 도면이다.
도 5는 부호화기에서 인트라 모드 스킵 적용 여부를 결정하는 방법의 다른 실시예를 설명하기 위한 도면이다.
도 6은 부호화기에서 인트라 모드 스킵 적용 여부를 결정하는 방법의 또 다른 실시예를 설명하기 위한 도면이다.
도 7은 본 발명에 따른 부호화 모드 결정 방법의 실시예를 개략적으로 나타내는 흐름도이다.
1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.
3 is a flowchart schematically showing an embodiment of an image encoding method to which the present invention is applied.
4 is a diagram for describing an embodiment of a method of determining whether intra mode skip is applied in an encoder.
FIG. 5 illustrates another embodiment of a method of determining whether intra mode skip is applied in an encoder.
FIG. 6 is a diagram for describing another embodiment of a method of determining whether intra mode skip is applied by an encoder.
7 is a flowchart schematically illustrating an embodiment of a coding mode determination method according to the present invention.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the following description of the embodiments of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present disclosure rather unclear.

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

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

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

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

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

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

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

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

인터 모드인 경우, 움직임 예측부(motion estimator)(111)는, 움직임 예측 과정에서 참조 픽쳐 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 움직임 보상부(112)는 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the inter mode, the motion estimator 111 can obtain a motion vector by searching an area of the reference picture stored in the reference picture buffer 190 that is best matched with the input block in the motion prediction process have. The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector.

도 1의 실시예에서, 움직임 예측부(111), 움직임 보상부(112) 및 인트라 예측부(120)는 각각 별개의 구성으로 도시되어 있으나, 본 발명은 이에 한정되는 것은 아니다. 예컨대, 움직임 예측부(111) 및 움직임 보상부(112)는 하나의 인터 예측부를 구성할 수도 있으며, 움직임 예측부(111), 움직임 보상부(112) 및 인트라 예측부(120)는 하나의 예측부를 구성할 수도 있다.In the embodiment of FIG. 1, the motion predictor 111, the motion compensator 112, and the intra predictor 120 are illustrated in separate configurations, but the present invention is not limited thereto. For example, the motion prediction unit 111 and the motion compensation unit 112 may constitute one inter prediction unit, and the motion prediction unit 111, the motion compensation unit 112, and the intra prediction unit 120 may generate one prediction And the like.

감산기(125)는 입력 블록과 생성된 예측 블록의 차분에 의해 잔차 블록(residual block)을 생성할 수 있다. 변환부(130)는 잔차 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 출력할 수 있다. 그리고 양자화부(140)는 입력된 변환 계수를 양자화 파라미터에 따라 양자화하여 양자화된 계수(quantized coefficient)를 출력할 수 있다. The subtractor 125 may generate a residual block by a difference between the input block and the generated prediction block. The transforming unit 130 may perform a transform on the residual block to output a transform coefficient. The quantization unit 140 may quantize the input transform coefficient according to the quantization parameter to output a quantized coefficient.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값(예를 들어, 양자화된 계수)들 및/또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. The entropy encoding unit 150 performs entropy encoding on the basis of values (e.g., quantized coefficients) calculated in the quantization unit 140 and / or encoding parameter values calculated in the encoding process, bit stream.

엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. When entropy encoding is applied, a small number of bits are allocated to a symbol having a high probability of occurrence, and a large number of bits are allocated to a symbol having a low probability of occurrence, thereby expressing symbols, The size of the column can be reduced. Therefore, the compression performance of the image encoding can be enhanced through the entropy encoding. The entropy encoding unit 150 may use an encoding method such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) for entropy encoding.

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

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

한편, 도 1의 실시예에서, 감산기(125), 변환부(130), 양자화부(140) 및 엔트로피 부호화부(150) 등은 별개의 구성으로 도시되어 있으나, 이는 설명의 편의를 위한 것으로서 본 발명은 이에 한정되는 것은 아니다. 도 1의 실시예에 도시된 각각의 구성부는 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수도 있다. 예컨대, 도 1의 실시예에서 감산기(125), 변환부(130), 양자화부(140) 및 엔트로피 부호화부(150)는 하나의 비트스트림 생성부를 구성하는 것으로 볼 수도 있다. 이 때, 비트스트림 생성부는 현재 블록 및 예측 블록을 기반으로 부호화된 비트스트림을 생성할 수 있다.
Meanwhile, in the embodiment of FIG. 1, the subtractor 125, the transform unit 130, the quantization unit 140, and the entropy encoding unit 150 are illustrated in separate configurations, but this is for convenience of description. The invention is not limited to this. Each component shown in the embodiment of FIG. 1 is listed as a component for convenience, and at least two components of each component are combined to form one component, or one component is divided into a plurality of components to perform a function. You may. For example, in the embodiment of FIG. 1, the subtractor 125, the transformer 130, the quantizer 140, and the entropy encoder 150 may constitute one bitstream generator. In this case, the bitstream generator may generate an encoded bitstream based on the current block and the prediction block.

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

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

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

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

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

양자화된 계수는 역양자화부(220)에서 역양자화되고 역변환부(230)에서 역변환되며, 양자화된 계수가 역양자화/역변환 된 결과, 잔차 블록(residual block)이 생성될 수 있다. The quantized coefficient is inversely quantized by the inverse quantizer 220 and inversely transformed by the inverse transformer 230, and as a result of the inverse quantization / inverse transformation of the quantized coefficient, a residual block may be generated.

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

도 2의 실시예에서, 인트라 예측부(240) 및 움직임 보상부(250)는 각각 별개의 구성으로 도시되어 있으나, 본 발명은 이에 한정되는 것은 아니다. 예컨대, 인트라 예측부(240) 및 움직임 보상부(250)는 하나의 예측부를 구성할 수도 있다.In the embodiment of FIG. 2, the intra predictor 240 and the motion compensator 250 are illustrated in separate configurations, but the present invention is not limited thereto. For example, the intraprediction unit 240 and the motion compensation unit 250 may constitute one prediction unit.

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

이하, 블록은 영상 부호화 및 복호화의 단위를 의미한다. 영상 부호화 및 복호화 시 부호화 혹은 복호화 단위는, 영상을 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 의미하므로, 부호화 유닛 (CU: Coding Unit), 예측 유닛 (PU: Prediction Unit), 변환 유닛(TU: Transform Unit), 변환 블록(transform block) 등으로 불릴 수 있다. 하나의 블록은 크기가 더 작은 하위 블록으로 더 분할될 수 있다. 또한 본 명세서에서 현재 블록이라 함은 현재 부호화 대상이 되는 부호화 대상 블록 및/또는 현재 복호화 대상이 되는 복호화 대상 블록을 의미할 수 있다.
Hereinafter, a block refers to a unit of image encoding and decoding. The coding or decoding unit in the image coding and decoding means a divided unit when the image is divided and encoded or decoded. Therefore, a coding unit (CU), a prediction unit (PU), a conversion unit (TU) : Transform Unit), a transform block, and the like. One block may be further subdivided into sub-blocks of smaller size. In addition, in the present specification, the current block may mean an encoding target block that is currently encoding target and / or a decoding target block that is currently decoding target.

한편, 인터 예측이 수행되는 슬라이스에는 P 슬라이스 및 B 슬라이스가 있을 수 있다. P 슬라이스는 하나의 참조 픽쳐를 이용한 단방향 예측이 수행될 수 있는 슬라이스를 의미할 수 있다. 예를 들어, P 슬라이스에서는 인트라 예측이 수행되거나 하나의 참조 픽쳐를 이용한 인터 예측이 수행될 수 있다. B 슬라이스는 하나 이상의 참조 픽쳐를 이용한 순방향, 역방향 또는 양방향 예측이 수행될 수 있는 슬라이스를 의미할 수 있다. 예를 들어, B 슬라이스에서는 인트라 예측이 수행되거나 하나의 참조 픽쳐를 이용한 인터 예측이 수행되거나 두 개의 참조 픽쳐를 이용한 인터 예측이 수행될 수 있다.
Meanwhile, slices on which inter prediction is performed may include P slices and B slices. The P slice may mean a slice in which unidirectional prediction using one reference picture may be performed. For example, in the P slice, intra prediction may be performed or inter prediction using one reference picture may be performed. The B slice may refer to a slice in which forward, backward or bidirectional prediction using one or more reference pictures may be performed. For example, in the B slice, intra prediction may be performed, inter prediction using one reference picture may be performed, or inter prediction using two reference pictures may be performed.

도 3은 본 발명이 적용되는 영상 부호화 방법의 일 실시예를 개략적으로 나타내는 흐름도이다.3 is a flowchart schematically showing an embodiment of an image encoding method to which the present invention is applied.

도 3을 참조하면, 부호화기는 현재 블록에 대한 부호화 모드를 결정할 수 있다(S310). 여기서, 일례로 현재 블록은 부호화 유닛(CU)에 해당될 수 있다.Referring to FIG. 3, the encoder may determine an encoding mode for the current block (S310). Here, as an example, the current block may correspond to the coding unit CU.

현재 블록의 부호화 모드를 결정하기 위해 부호화기는 현재 블록이 가질 수 있는 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO, 이하 RDO라 함) 과정을 수행할 수 있다. 이 때, 부호화기는 상기 RDO 수행 결과에 따라 상기 복수의 부호화 모드 후보 중에서 현재 블록에 대한 최적의 부호화 모드를 결정할 수 있다. 현재 블록이 가질 수 있는 부호화 모드 후보에는 인터 모드 및 인트라 모드 등이 있을 수 있으며, 현재 블록에 대한 잔차 신호의 전송이 생략되는 스킵 모드(skip mode)도 있을 수 있다. In order to determine an encoding mode of the current block, the encoder may perform a rate-distortion optimization (RDO) process on a plurality of encoding mode candidates that the current block may have. In this case, the encoder may determine an optimal encoding mode for the current block among the plurality of encoding mode candidates according to the result of performing the RDO. The encoding mode candidates that the current block may have include an inter mode and an intra mode, and may also include a skip mode in which the transmission of the residual signal for the current block is omitted.

기존의 비디오 코덱에서는 16x16의 크기를 갖는 매크로 블록(macro block) 단위로 부호화가 수행되고 있으나, 고해상도 비디오에 대해 최적의 압축 효율을 제공하기 위해, CU(Coding Unit), PU(Prediction Unit), TU(Transform Unit) 등의 처리 단위가 사용될 수 있다. 따라서, 압축, 부호화, 예측 및 변환 등을 수행함에 있어 최적의 블록 크기가 이용될 수 있다. In the existing video codec, encoding is performed in units of macro blocks having a size of 16 × 16. However, in order to provide optimal compression efficiency for high resolution video, a coding unit (CU), a prediction unit (PU), and a TU are provided. Processing units such as (Transform Unit) may be used. Therefore, an optimal block size may be used in performing compression, encoding, prediction, and transformation.

이 때, 2Nx2N 크기를 갖는 하나의 CU에 대해, 2Nx2N 블록 단위의 스킵 모드(skip mode), 2Nx2N 블록 단위의 인터 모드(Inter_2Nx2N), 2NxN 블록 단위의 인터 모드(Inter_2NxN), Nx2N 블록 단위의 인터 모드(Inter_Nx2N), 인트라 PCM 모드(Intra_PCM mode) 등이 지원될 수 있다. 여기서, 인트라 PCM 모드는 현재 블록에 대한 예측, 변환 및 양자화 등의 과정이 생략되는 부호화 모드를 의미할 수 있다. 또한, 현재 블록(예컨대, CU)의 크기가 8x8인 경우에는 NxN 블록 단위의 인터 모드(Inter_NxN), NxN 블록 단위의 인트라 모드(Intra_2Nx2N) 등이 더 지원될 수 있다. 부호화기는 현재 블록이 가질 수 있는 복수의 부호화 모드 후보에 대해 RDO 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 현재 블록(예컨대, CU)에 적용될 최적의 부호화 모드를 결정할 수 있다.In this case, for one CU having a size of 2Nx2N, a skip mode of 2Nx2N blocks, an inter mode of 2Nx2N blocks (Inter_2Nx2N), an inter mode of 2NxN blocks, Inter_2NxN, and an inter mode of Nx2N blocks (Inter_Nx2N), intra PCM mode, and the like may be supported. In this case, the intra PCM mode may refer to an encoding mode in which processes such as prediction, transform, and quantization of a current block are omitted. In addition, when the size of the current block (eg, CU) is 8x8, inter mode Inter_NxN in units of NxN blocks, intra mode N_2N in units of NxN blocks, and the like may be further supported. The encoder may determine an optimal encoding mode to be applied to the current block (eg, CU) among the plurality of encoding mode candidates by performing an RDO process on a plurality of encoding mode candidates that the current block may have.

현재 블록의 부호화 모드가 결정되면, 부호화기는 결정된 부호화 모드를 기반으로 상기 현재 블록에 대한 부호화를 수행할 수 있다(S320).
When the encoding mode of the current block is determined, the encoder may perform encoding on the current block based on the determined encoding mode (S320).

한편, 현재 블록이 P 슬라이스 또는 B 슬라이스에 속한 블록인 경우, 현재 블록에 대한 부호화 모드가 인트라 모드로 결정될 확률은 인터 모드로 결정될 확률에 비해 상대적으로 낮을 수 있다. 그러나, 영상 부호화 과정에서 인트라 예측 및/또는 인트라 부호화 수행을 위해서는 많은 연산량이 요구된다. 이는 인트라 부호화 과정에서는 최대 35번의 방향성 예측(directional prediction)이 수행될 수 있기 때문이다. Meanwhile, when the current block is a block belonging to a P slice or a B slice, the probability that the encoding mode for the current block is determined to be an intra mode may be relatively lower than the probability that the current block is determined to be an inter mode. However, a large amount of computation is required for performing intra prediction and / or intra encoding in the image encoding process. This is because up to 35 directional predictions may be performed in the intra encoding process.

이와 같이 P 슬라이스 또는 B 슬라이스에서 인트라 모드가 선택될 확률은 낮지만 인트라 예측 및/또는 인트라 부호화가 갖는 복잡도는 상당히 크기 때문에, 효율적으로 부호화 모드를 결정할 수 있는 부호화 모드 결정 방법이 요구된다. 이를 위해, 부호화기는 인트라 모드에 대한 부호화 과정을 조기에 종결시킴으로써(terminate), 부호화기의 복잡도를 감소시킬 수 있다. 즉, 부호화기는 P 슬라이스 또는 B 슬라이스에서 현재 블록에 대해 인트라 예측 및/또는 인트라 부호화를 수행할 지 여부, 즉 현재 블록에 대한 인트라 예측 과정 및/또는 인트라 부호화 과정을 생략(skip)할 지 여부를 조기에(예컨대, 현재 블록이 가질 수 있는 복수의 부호화 모드에 대한 RDO 과정을 수행하기 전에) 결정할 수 있다. As described above, since the probability of selecting an intra mode in a P slice or a B slice is low, but the complexity of intra prediction and / or intra encoding is considerably large, an encoding mode determination method capable of efficiently determining an encoding mode is required. To this end, the encoder can reduce the complexity of the encoder by terminating the encoding process for the intra mode early. That is, the encoder determines whether to perform intra prediction and / or intra encoding on the current block in the P slice or the B slice, that is, whether to skip the intra prediction process and / or the intra encoding process on the current block. The decision may be made early (eg, before performing an RDO process for a plurality of encoding modes that the current block may have).

인트라 예측이 생략되는 것으로 결정되면, 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있다. 즉, 이 경우 부호화기는 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 현재 블록의 부호화 모드 후보로 결정할 수 있다. 이 때, 부호화기는 상기 결정된 부호화 모드 후보에 대해서 RDO 과정을 수행함으로써, 상기 부호화 모드 후보 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다. 인트라 예측이 생략되는 것으로 결정된 경우, 부호화기는 인터 예측 및/또는 인터 부호화 과정만을 수행할 수도 있다.If it is determined that intra prediction is omitted, the encoder may omit the intra prediction and / or intra encoding process for the current block. That is, in this case, the encoder may determine a remaining encoding mode except the intra mode among the encoding modes that the current block may have as the encoding mode candidate of the current block. In this case, the encoder may determine an encoding mode to be applied to the current block among the encoding mode candidates by performing an RDO process on the determined encoding mode candidate. If it is determined that intra prediction is omitted, the encoder may perform only inter prediction and / or inter encoding.

본 명세서에서는 설명의 편의상 비디오 부호화 과정에서 인트라 예측 및/또는 인트라 부호화가 생략되는 것을 ‘인트라 모드 스킵(intra mode skip)’이라 지칭하기로 한다. 이하, 현재 블록에 대해 인트라 예측 과정 및/또는 인트라 부호화 과정이 생략되는지 여부를 결정하는 방법(즉, 현재 블록에 인트라 모드 스킵이 적용되는지 여부를 결정하는 방법)의 실시예들이 서술된다.
In the present specification, for convenience of description, it is referred to as 'intra mode skip' that intra prediction and / or intra encoding are omitted in a video encoding process. Hereinafter, embodiments of a method of determining whether an intra prediction process and / or an intra encoding process are omitted for a current block (that is, a method of determining whether intra mode skip is applied to the current block) are described.

도 4는 부호화기에서 인트라 모드 스킵 적용 여부를 결정하는 방법의 실시예를 설명하기 위한 도면이다. 도 4의 실시예에 따른 인트라 모드 스킵 적용 여부 결정 과정은 일례로 상술한 도 1 및 도 2의 예측부에서 수행될 수 있다.4 is a diagram for describing an embodiment of a method of determining whether intra mode skip is applied in an encoder. The process of determining whether to apply intra mode skip according to the embodiment of FIG. 4 may be performed by the prediction unit of FIGS. 1 and 2 described above.

도 4의 410을 참조하면, 블록 x는 부호화 대상이 되는 현재 블록을 나타낸다. 여기서, 상기 현재 블록은 일례로 CU에 해당될 수 있다. 또한, 도 4의 410은 현재 블록의 좌측에 인접한 블록(a), 현재 블록의 상단에 인접한 블록(b), 현재 블록 외부의 우측 상단 코너에 위치한 블록(c) 및 현재 블록 외부의 좌측 상단 코너에 위치한 블록(d)을 도시한다. 도 4에서 블록 a, 블록 b, 블록 c, 블록 d는 주변 블록(neighboring block)으로 지칭될 수 있으며, 이미 부호화 및/또는 복호화가 완료된 블록일 수 있다. 도 4의 410에 도시된 주변 블록들 각각은 일례로 CU일 수 있다.Referring to 410 of FIG. 4, block x represents a current block to be encoded. Here, the current block may correspond to a CU, for example. In addition, 410 of FIG. 4 shows a block (a) adjacent to the left side of the current block, a block (b) adjacent to the top of the current block, a block (c) located at the upper right corner outside the current block, and an upper left corner outside the current block. A block (d) located at is shown. In FIG. 4, blocks a, b, c, and d may be referred to as neighboring blocks, and may be blocks that have already been encoded and / or decoded. Each of the neighboring blocks illustrated at 410 of FIG. 4 may be a CU, for example.

이하, 본 명세서에서 ‘주변 블록’이라 함은 도 4의 410에 도시된 블록 a, 블록 b, 블록 c 및 블록 d를 포함하는 개념으로 사용될 수 있다. 또한 이하, 본 명세서에서 블록 a, 블록 b, 블록 c 및 블록 d는 각각 도 4의 410에 도시된 블록 a, 블록 b, 블록 c 및 블록 d와 동일한 위치의 블록을 의미할 수 있다. Hereinafter, the term 'peripheral block' herein may be used as a concept including block a, block b, block c, and block d illustrated in 410 of FIG. 4. Also, hereinafter, blocks a, b, c and d may refer to blocks at the same positions as blocks a, b, c and d shown in 410 of FIG. 4.

한편, 비디오 부호화 시에 현재 블록(x) 및 주변 블록(a, b, c, d)은 강한 공간적 상관도(spatial correlation)를 가질 수 있다. 따라서, 주변 블록의 부호화 모드가 모두 인터 모드(및/또는 인터 부호화 모드)로 결정된 경우, 현재 블록의 부호화 모드도 인터 모드(및/또는 인터 부호화 모드)로 결정될 확률이 높다. 따라서, 주변 블록(a, b, c, d)의 부호화 모드가 모두 인터 모드인 경우, 부호화기는 도 4의 420에서 후술하는 바와 같이, 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부를 미리 결정할 수 있다.Meanwhile, in video encoding, the current block x and the neighboring blocks a, b, c, and d may have strong spatial correlation. Therefore, when all encoding modes of the neighboring blocks are determined to be inter mode (and / or inter encoding mode), there is a high probability that the encoding mode of the current block is also determined to be inter mode (and / or inter encoding mode). Accordingly, when the encoding modes of the neighboring blocks a, b, c, and d are all inter modes, the encoder may determine in advance whether intra mode skip is applied to the current block, as described later with reference to 420 of FIG. 4. have.

도 4의 420은 인트라 모드 스킵이 적용되는지 여부를 결정하기 위해 사용되는 픽셀들의 위치를 도시한다.420 of FIG. 4 shows the location of the pixels used to determine whether intra mode skip is applied.

인트라 예측 및/또는 인트라 부호화 과정에서는 현재 블록의 주변에 위치한 이미 복원된 주변 픽셀들의 픽셀 값을 기반으로 예측이 수행될 수 있다. 따라서, 현재 블록 내의 픽셀들 및 현재 블록 주변에 위치한 픽셀들 간의 BAD(Boundary Absolute Difference)가 크면, 현재 블록의 부호화 모드가 인트라 모드로 결정될 확률이 작을 수 있다. 이 때, BAD는 현재 블록 내에 위치한 픽셀의 픽셀 값 및 현재 블록의 주변에 위치한 주변 픽셀의 픽셀 값 간의 차이의 절대 값을 의미할 수 있다. In intra prediction and / or intra encoding, prediction may be performed based on pixel values of neighboring pixels that are already reconstructed around the current block. Therefore, if the boundary absorptive difference (BAD) between pixels in the current block and pixels located around the current block is large, a probability that the encoding mode of the current block is determined to be an intra mode may be small. In this case, the BAD may mean an absolute value of the difference between the pixel value of the pixel located in the current block and the pixel value of the neighboring pixel located around the current block.

도 4의 420을 참조하면, 현재 블록(425) 내의 가장 좌측 상단에 위치한 좌측 상단 코너 픽셀(433), 상기 좌측 상단 코너 픽셀의 좌측 상단에 위치한 좌측 상단 주변 픽셀(436), 현재 블록 내의 가장 상단에 위치한 상단 픽셀들(443), 상기 상단 픽셀들의 상단에 인접하여 위치한 상단 주변 픽셀들(446), 현재 블록 내의 가장 좌측에 위치한 좌측 픽셀들(453) 및 상기 좌측 픽셀들의 좌측에 인접하여 위치한 좌측 주변 픽셀들(456)이 인트라 모드 스킵 적용 여부를 결정하기 위해 사용될 수 있다. 이는 다음 수학식 1과 같이 나타내어질 수 있다.Referring to 420 of FIG. 4, an upper left corner pixel 433 located at an upper left corner in the current block 425, an upper left peripheral pixel 436 located at an upper left corner of the upper left corner pixel, and an uppermost corner in the current block. Top pixels 443 located at, top peripheral pixels 446 located adjacent to the top of the top pixels, leftmost pixels 453 located at the leftmost in the current block, and left located adjacent to the left of the left pixels Peripheral pixels 456 may be used to determine whether intra mode skip is applied. This may be represented as in Equation 1 below.

[수학식 1][Equation 1]

Figure pat00001

Figure pat00001

여기서, ‘CUsize’는 현재 블록의 크기를 나타낼 수 있다. 또한, abs(X)는 X의 절대값을 나타낼 수 있다. ‘orig’는 현재 블록 내의 픽셀의 픽셀 값을 나타낼 수 있고, 좌측 상단 코너 픽셀(433), 상단 픽셀들(443) 및 좌측 픽셀들(453) 중에서 어느 하나에 해당될 수 있다. ‘recon’은 복원된 주변 픽셀의 픽셀 값을 나타낼 수 있고, 좌측 상단 주변 픽셀(436), 상단 주변 픽셀들(446) 및 좌측 주변 픽셀들(456) 중에서 어느 하나에 해당될 수 있다. 또한, [y][x]는 현재 블록 내의 가장 좌측 상단에 위치한 좌측 상단 코너 픽셀(433)의 위치를 나타낼 수 있다.Here, 'CUsize' may indicate the size of the current block. Also, abs (X) may represent the absolute value of X. 'Orig' may indicate a pixel value of a pixel in the current block and may correspond to any one of an upper left corner pixel 433, an upper pixel 443, and a left pixel 453. 'Recon' may indicate a pixel value of the reconstructed peripheral pixel, and may correspond to any one of the upper left peripheral pixel 436, the upper peripheral pixels 446, and the left peripheral pixels 456. Further, [y] [x] may indicate the position of the top left corner pixel 433 located at the top left in the current block.

수학식 1을 참조하면, 부호화기는 좌측 상단 코너 픽셀(433)과 좌측 상단 주변 픽셀(436) 간의 픽셀 차이 값의 절대 값을 구할 수 있다. 또한, 부호화기는 상단 픽셀들(443) 및 상단 주변 픽셀들(446) 중에서 서로 인접한 픽셀들 간의 픽셀 차이 값의 절대 값을 구할 수 있다. 그리고, 부호화기는 좌측 픽셀들(453) 및 좌측 주변 픽셀들(456) 중에서 서로 인접한 픽셀들 간의 픽셀 차이 값의 절대 값을 구할 수 있다. 현재 블록에 대한 BAD 값은 상기 구해진 절대 값을 모두 더함으로써 도출될 수 있다. Referring to Equation 1, the encoder may obtain an absolute value of a pixel difference value between the upper left corner pixel 433 and the upper left peripheral pixel 436. In addition, the encoder may obtain an absolute value of a pixel difference value between pixels adjacent to each other among the upper pixels 443 and the upper peripheral pixels 446. The encoder may obtain an absolute value of pixel difference values between pixels adjacent to each other among the left pixels 453 and the left peripheral pixels 456. The BAD value for the current block can be derived by adding up all the absolute values obtained above.

상술한 바에 의하면, BAD 값 도출에 사용되는 픽셀들은 현재 블록(425) 내의 픽셀들 및 현재 블록(425) 주변에 위치한 픽셀들 중에서 현재 블록(425)의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들에 해당될 수 있다. 따라서, 상기 BAD는 현재 블록 및 주변 블록 간의 경계 값 차이에 해당될 수 있다.As described above, the pixels used to derive the BAD value are pixels located near the top boundary and the left boundary of the current block 425 among the pixels in the current block 425 and the pixels located around the current block 425. It may correspond to. Therefore, the BAD may correspond to a boundary value difference between the current block and the neighboring block.

상술한 과정에 의해 도출된 BAD 값이 소정의 임계 값보다 큰 경우, 부호화기는 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있다. 즉, BAD 값이 소정의 임계 값보다 큰 경우 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있고, 인터 예측 및/또는 인터 부호화 과정만을 수행할 수 있다. 이 경우, 부호화기는 인트라 모드를 제외한 나머지 모드에 대해서 RDO 과정을 수행할 수 있으며, 인트라 모드를 제외한 나머지 부호화 모드 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다.When the BAD value derived by the above process is larger than a predetermined threshold value, the encoder may apply intra mode skip for the current block. That is, when the BAD value is larger than a predetermined threshold value, the encoder may omit the intra prediction and / or intra encoding process for the current block and perform only the inter prediction and / or inter encoding process. In this case, the encoder may perform an RDO process on the remaining modes except the intra mode, and may determine an encoding mode to be applied to the current block among the remaining coding modes except the intra mode.

인트라 모드 스킵 적용 여부 결정에 사용되는 상기 임계 값은, 일례로 실험적으로 결정되어 미리 부호화기에 저장되어 있는 값일 수 있다. 예컨대, 영상 또는 픽쳐 전체에서 인터 모드로 결정된 블록들의 BAD 평균 값이 실험적으로 결정될 수 있고, 상기 결정된 BAD 평균 값이 상기 임계 값으로 사용될 수 있다.The threshold value used to determine whether to apply intra mode skip may be, for example, a value that is experimentally determined and stored in the encoder in advance. For example, the BAD average value of the blocks determined as the inter mode in the entire image or the picture may be determined experimentally, and the determined BAD average value may be used as the threshold value.

다른 예로, 상기 임계 값은 부호화 과정에서 유도되는 값일 수 있다. 예컨대, 부호화기는 주변 블록(a, b, c, d)들 각각의 BAD를 구하고 구해진 BAD 값들의 평균 값을 상기 임계 값으로 사용할 수 있다.
As another example, the threshold value may be a value derived in an encoding process. For example, the encoder may obtain a BAD of each of the neighboring blocks a, b, c, and d, and use the average value of the obtained BAD values as the threshold.

도 5는 부호화기에서 인트라 모드 스킵 적용 여부를 결정하는 방법의 다른 실시예를 설명하기 위한 도면이다. 도 5의 실시예에 따른 인트라 모드 스킵 적용 여부 결정 과정은 일례로 상술한 도 1 및 도 2의 예측부에서 수행될 수 있다.FIG. 5 illustrates another embodiment of a method of determining whether intra mode skip is applied in an encoder. An intra mode skip application determination process according to the embodiment of FIG. 5 may be performed by the prediction unit of FIGS. 1 and 2 described above.

도 4의 410에서 상술한 바와 같이, 비디오 부호화 시에 현재 블록(x) 및 주변 블록(a, b, c, d)은 강한 공간적 상관도를 가질 수 있다. 따라서, 주변 블록의 부호화 모드가 모두 인터 모드(및/또는 인터 부호화 모드)로 결정된 경우, 현재 블록의 부호화 모드도 인터 모드(및/또는 인터 부호화 모드)로 결정될 확률이 높다. 따라서, 주변 블록(a, b, c, d)의 부호화 모드가 모두 인터 모드인 경우, 부호화기는 후술되는 실시예에 따라 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부를 미리 결정할 수 있다.As described above with reference to 410 of FIG. 4, during video encoding, the current block x and the neighboring blocks a, b, c, and d may have a strong spatial correlation. Therefore, when all encoding modes of the neighboring blocks are determined to be inter mode (and / or inter encoding mode), there is a high probability that the encoding mode of the current block is also determined to be inter mode (and / or inter encoding mode). Accordingly, when the encoding modes of the neighboring blocks a, b, c, and d are all inter modes, the encoder may determine in advance whether intra mode skip is applied to the current block according to an embodiment to be described later.

도 5의 510은 픽쳐의 매우 호모지니어스(homogeneous)한 영역에서 인트라 부호화 모드가 결정된 예를 도시한다. 호모지니어스한 영역의 경우, 인터 모드 및 인트라 모드에서 도출되는 잔차 신호의 크기가 서로 유사할 수 있다. 그러나, 이 경우 움직임 벡터를 부호화하여 전송하기 위해 많은 비트량이 소모될 수 있으므로, 현재 블록의 부호화 모드는 인트라 모드로 결정될 수 있다. 510 of FIG. 5 shows an example in which an intra coding mode is determined in a very homogeneous region of a picture. In the homogeneous region, the magnitudes of the residual signals derived in the inter mode and the intra mode may be similar to each other. However, in this case, since a large amount of bits may be consumed to encode and transmit the motion vector, the encoding mode of the current block may be determined as an intra mode.

도 5의 510의 픽쳐에서 각각의 블록에 대해 결정된 부호화 모드는 각각 P, S, I16, I4 등일 수 있다. 여기서, P는 인터 모드를 의미하고, S는 스킵 모드를 의미할 수 있다. 또한, I16은 16x16 블록 단위로 인트라 예측이 수행되는 인트라 모드를 의미할 수 있으며, I4는 4x4 블록 단위로 인트라 예측이 수행되는 인트라 모드를 의미할 수 있다. 다만, 도 5의 510에 도시된 부호화 모드는 예시적인 것으로서, 본 발명은 이에 한정되는 것은 아니다. The encoding modes determined for each block in the picture 510 of FIG. 5 may be P, S, I16, I4, and the like, respectively. Here, P may mean an inter mode, and S may mean a skip mode. In addition, I16 may mean an intra mode in which intra prediction is performed in units of 16 × 16 blocks, and I4 may mean an intra mode in which intra prediction is performed in units of 4 × 4 blocks. However, the encoding mode illustrated in 510 of FIG. 5 is exemplary, and the present invention is not limited thereto.

도 5의 510을 참조하면, 현재 블록(515)에 대해 결정된 부호화 모드는 I16일 수 있다. 현재 블록의 주변에 위치한 주변 블록(523, 526, 529)의 움직임 벡터가 큰 경우에는, 비록 현재 블록이 호모지니어스한 영역 내에 위치한 블록이라 하여도 상기 현재 블록에 대한 부호화 모드는 인트라 모드로 결정될 확률이 높을 수 있다. 주변 블록(523, 526, 529)의 움직임 벡터가 큰 경우에는 현재 블록의 움직임 벡터도 클 확률이 높으므로, 율-왜곡 관점에서 움직임 벡터를 부호화하기 위해 요구되는 비트량이 클 수 있다. 따라서, 부호화기는 인터 모드 및 인트라 모드에서 도출되는 잔차 신호의 크기가 서로 유사한 경우에도 현재 블록의 부호화 모드를 인트라 모드로 결정할 수 있다.Referring to 510 of FIG. 5, the encoding mode determined for the current block 515 may be I16. If the motion vectors of the neighboring blocks 523, 526, and 529 located in the vicinity of the current block are large, the coding mode for the current block is determined to be intra mode even if the current block is a block located within the homogeneous region. This can be high. If the motion vectors of the neighboring blocks 523, 526, and 529 are large, the motion vector of the current block has a high probability, and therefore, the amount of bits required for encoding the motion vector from the rate-distortion point of view may be large. Accordingly, the encoder may determine the encoding mode of the current block as the intra mode even when the magnitudes of the residual signals derived in the inter mode and the intra mode are similar to each other.

따라서, 부호화기는 부호화 및/또는 복호화가 완료된 주변 블록(523, 526, 529)의 SNMV(Sum of Norm Motion Vector)를 계산함으로써 현재 블록의 움직임 벡터의 크기를 추정한 후, 계산된 SNMV 값(현재 블록의 움직임 벡터 크기의 추정 값)이 소정의 임계 값보다 작은 경우에 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있다. 여기서, 복원된 주변 블록 523, 526, 529는 각각 도 4의 410의 블록 a, b, c에 해당될 수 있다.Accordingly, the encoder estimates the magnitude of the motion vector of the current block by calculating the sum of norm motion vector (SNMV) of the neighboring blocks 523, 526, and 529 that have been encoded and / or decoded, and then calculates the calculated SNMV value (the current When the estimated value of the motion vector magnitude of the block is smaller than a predetermined threshold value, intra mode skip may be applied to the current block. Here, the restored neighboring blocks 523, 526, and 529 may correspond to blocks a, b, and c of 410 of FIG. 4, respectively.

도 5의 520을 참조하면, SNMV 계산에 사용되는 주변 블록은 현재 블록(515)의 좌측에 인접한 좌측 주변 블록(523), 현재 블록(515)의 상단에 인접한 상단 주변 블록(526) 및 현재 블록(515) 외부의 우측 상단 코너에 위치한 우측 상단 주변 블록(529)일 수 있다. 여기서, 현재 블록(515), 좌측 주변 블록(523), 상단 주변 블록(526) 및 우측 상단 주변 블록(529)은 각각 일례로 CU에 해당될 수 있다.Referring to 520 of FIG. 5, a neighboring block used for SNMV calculation includes a left neighboring block 523 adjacent to the left side of the current block 515, a top neighboring block 526 adjacent to the top of the current block 515, and a current block. 515 may be a top right peripheral block 529 located at the top right corner of the exterior. Here, the current block 515, the left peripheral block 523, the upper peripheral block 526, and the upper right peripheral block 529 may correspond to CUs, for example.

좌측 주변 블록(523) 내에 표시된 0, 상단 주변 블록(526) 내에 표시된 0 및 우측 상단 주변 블록(529)에 표시된 2는 각각 참조 픽쳐 인덱스(reference picture index)를 나타낼 수 있다. 또한, 도 5의 520에서 좌측 주변 블록(523)의 움직임 벡터는 (-2,-12)이고, 상단 주변 블록(526)의 움직임 벡터는 (12,-12)이고, 우측 상단 주변 블록(529)의 움직임 벡터는 (-32,-24)일 수 있다. 움직임 벡터를 나타내는 (x,y)에서, x는 움직임 벡터의 x축 성분, y는 움직임 벡터의 y축 성분을 나타낼 수 있다. 이 때, SNMV는 상기 주변 블록들(523, 526, 529)의 움직임 벡터의 놈(norm) 값들을 모두 더함으로써 도출될 수 있다. 이는 다음 수학식 2에 의해 나타내어질 수 있다.0 indicated in the left peripheral block 523, 0 indicated in the upper peripheral block 526 and 2 indicated in the upper right peripheral block 529 may indicate a reference picture index, respectively. In addition, in 520 of FIG. 5, the motion vector of the left peripheral block 523 is (-2, -12), the motion vector of the upper peripheral block 526 is (12, -12), and the right upper peripheral block 529. ) May be (-32, -24). In (x, y) representing a motion vector, x may represent an x-axis component of the motion vector, and y may represent a y-axis component of the motion vector. In this case, the SNMV may be derived by adding all norm values of the motion vectors of the neighboring blocks 523, 526, and 529. This can be represented by the following equation (2).

[수학식 2]&Quot; (2) "

Figure pat00002

Figure pat00002

여기서, MV는 움직임 벡터를 나타낼 수 있다. 또한, MVx는 움직임 벡터의 x축 성분을 나타내고, MVy는 움직임 벡터의 y축 성분을 나타낼 수 있다. 상기 수학식 2에서는 블록 a, 블록 b 및 블록 c의 움직임 벡터의 놈(norm) 값이 모두 더해짐으로써 SNMV 값이 도출될 수 있다. 여기서, 블록 a는 좌측 주변 블록(523)을 나타내고, 블록 b는 상단 주변 블록(526)을 나타내며, 블록 c는 우측 상단 주변 블록(529)을 나타낼 수 있다.Here, MV may represent a motion vector. In addition, MVx may represent the x-axis component of the motion vector, and MVy may represent the y-axis component of the motion vector. In Equation 2, the SNMV value can be derived by adding all norm values of the motion vectors of blocks a, b, and c. Here, block a may represent a left peripheral block 523, block b may represent an upper peripheral block 526, and block c may represent an upper right peripheral block 529.

상술한 과정에 의해 도출된 SNMV 값이 소정의 임계 값보다 작은 경우, 부호화기는 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있다. 즉, SNMV 값이 소정의 임계 값보다 작은 경우 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있고, 인터 예측 및/또는 인터 부호화 과정만을 수행할 수 있다. 이 경우, 부호화기는 인트라 모드를 제외한 나머지 모드에 대해서 RDO 과정을 수행할 수 있으며, 인트라 모드를 제외한 나머지 부호화 모드 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다.If the SNMV value derived by the above process is smaller than a predetermined threshold value, the encoder may apply intra mode skip for the current block. That is, when the SNMV value is smaller than the predetermined threshold value, the encoder may omit the intra prediction and / or intra encoding process for the current block and may perform only the inter prediction and / or inter encoding process. In this case, the encoder may perform an RDO process on the remaining modes except the intra mode, and may determine an encoding mode to be applied to the current block among the remaining coding modes except the intra mode.

인트라 모드 스킵 적용 여부 결정에 사용되는 상기 임계 값은, 일례로 실험적으로 결정되어 미리 부호화기에 저장되어 있는 값일 수 있다. 예컨대, 영상 또는 픽쳐 전체에서 인터 모드로 결정된 블록들의 SNMV 평균 값이 실험적으로 결정될 수 있고, 상기 결정된 SNMV 평균 값이 상기 임계 값으로 사용될 수 있다.The threshold value used to determine whether to apply intra mode skip may be, for example, a value that is experimentally determined and stored in the encoder in advance. For example, the SNMV average value of the blocks determined as the inter mode in the entire image or the picture may be determined experimentally, and the determined SNMV average value may be used as the threshold value.

다른 예로, 상기 임계 값은 부호화 과정에서 유도되는 값일 수 있다. 예컨대, 부호화기는 현재 블록의 주변에 위치한 주변 블록들 각각의 SNMV를 구하고 구해진 SNMV 값들의 평균 값을 상기 임계 값으로 사용할 수 있다. 여기서, 일례로 상기 주변 블록은 좌측 주변 블록(도 4의 410의 블록 a와 동일, 523), 상단 주변 블록(도 4의 410의 블록 b와 동일, 526) 및 우측 상단 주변 블록(도 4의 410의 블록 c와 동일, 529)을 포함할 수 있다. 또한, 임계 값 도출에 사용되는 주변 블록은 현재 블록 외부의 좌측 상단 코너에 위치한 좌측 상단 주변 블록(도 4의 410의 블록 d와 동일)을 더 포함할 수도 있다.
As another example, the threshold value may be a value derived in an encoding process. For example, the encoder can obtain the SNMV of each of the neighboring blocks located around the current block and use the average value of the obtained SNMV values as the threshold. Here, the peripheral block is, for example, the left peripheral block (equivalent to block a of 410 of FIG. 4, 523), the upper peripheral block (equivalent to block b of 410 of FIG. 4, 526), and the upper right peripheral block of FIG. 4. Same as block c of 410, which may include 529. In addition, the neighboring block used for deriving the threshold value may further include an upper left peripheral block (same as block d of 410 of FIG. 4) located in the upper left corner outside the current block.

도 6은 부호화기에서 인트라 모드 스킵 적용 여부를 결정하는 방법의 또 다른 실시예를 설명하기 위한 도면이다. 도 6의 실시예에 따른 인트라 모드 스킵 적용 여부 결정 과정은 일례로 상술한 도 1 및 도 2의 예측부에서 수행될 수 있다.FIG. 6 is a diagram for describing another embodiment of a method of determining whether intra mode skip is applied by an encoder. An intra mode skip application determination process according to the embodiment of FIG. 6 may be performed by the prediction unit of FIGS. 1 and 2 described above.

도 4의 410에서 상술한 바와 같이, 비디오 부호화 시에 현재 블록(x) 및 주변 블록(a, b, c, d)은 강한 공간적 상관도를 가질 수 있다. 따라서, 주변 블록의 부호화 모드가 모두 인터 모드(및/또는 인터 부호화 모드)로 결정된 경우, 현재 블록의 부호화 모드도 인터 모드(및/또는 인터 부호화 모드)로 결정될 확률이 높다. 따라서, 주변 블록(a, b, c, d)의 부호화 모드가 모두 인터 모드인 경우, 부호화기는 후술되는 실시예에 따라 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부를 미리 결정할 수 있다.As described above with reference to 410 of FIG. 4, during video encoding, the current block x and the neighboring blocks a, b, c, and d may have a strong spatial correlation. Therefore, when all encoding modes of the neighboring blocks are determined to be inter mode (and / or inter encoding mode), there is a high probability that the encoding mode of the current block is also determined to be inter mode (and / or inter encoding mode). Accordingly, when the encoding modes of the neighboring blocks a, b, c, and d are all inter modes, the encoder may determine in advance whether intra mode skip is applied to the current block according to an embodiment to be described later.

도 6은 현재 블록(부호화 대상 블록, 625)이 속한 현재 픽쳐(620) 및 시간 축상 바로 이전에 부호화 및/또는 복호화가 완료된 픽쳐(이하, 이전 픽쳐라 함, 610)를 도시한다. 이전 픽쳐(610)에 속한 블록 615는 이전 픽쳐(610) 내에서 현재 블록(625)과 공간적으로 동일한 위치에 존재하는 블록을 나타낸다. 이하, 본 명세서에서는 설명의 편의상 이전 픽쳐(610) 내에서 현재 블록(625)과 동일한 위치에 존재하는 블록은 동일 위치 블록(co-located block, 615)이라 한다. 여기서, 현재 블록(625) 및 동일 위치 블록(615)은 각각 일례로 CU에 해당될 수 있다.FIG. 6 illustrates a current picture 620 to which a current block (coding target block 625) belongs and a picture (hereinafter, referred to as a previous picture) 610 that has been encoded and / or decoded just before the time axis. Block 615 belonging to the previous picture 610 represents a block existing at the same position as the current block 625 within the previous picture 610. Hereinafter, for convenience of description, a block existing at the same position as the current block 625 in the previous picture 610 is referred to as a co-located block 615. Here, the current block 625 and the same position block 615 may correspond to a CU, for example.

도 6에서 각각의 블록에 대해 결정된 부호화 모드는 각각 P, S, I16, I4 등일 수 있다. 여기서, P는 인터 모드를 의미하고, S는 스킵 모드를 의미할 수 있다. 또한, I16은 16x16 블록 단위로 인트라 예측이 수행되는 인트라 모드를 의미할 수 있으며, I4는 4x4 블록 단위로 인트라 예측이 수행되는 인트라 모드를 의미할 수 있다. 다만, 도 6에 도시된 부호화 모드는 예시적인 것으로서, 본 발명은 이에 한정되는 것은 아니다. In FIG. 6, the encoding modes determined for each block may be P, S, I16, I4, and the like. Here, P may mean an inter mode, and S may mean a skip mode. In addition, I16 may mean an intra mode in which intra prediction is performed in units of 16 × 16 blocks, and I4 may mean an intra mode in which intra prediction is performed in units of 4 × 4 blocks. However, the encoding mode illustrated in FIG. 6 is exemplary, and the present invention is not limited thereto.

도 6을 참조하면, 현재 블록(625)에 대해 결정된 부호화 모드는 I4일 수 있다. 현재 블록(625)과 동일 위치 블록(615) 간의 교차 상관도(cross-correlation)가 큰 경우, 현재 블록(625)의 부호화 모드는 인트라 모드로 결정될 확률이 높을 수 있다. 따라서, 부호화기는 현재 블록(625)과 동일 위치 블록(615) 간의 교차 상관도가 소정의 임계 값보다 작은 경우에 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있다. 다음 수학식 3은 현재 블록(625) 및 동일 위치 블록(615) 간의 교차 상관도를 도출하는 방법의 일 실시예를 나타낸다.Referring to FIG. 6, the encoding mode determined for the current block 625 may be I4. When the cross-correlation between the current block 625 and the same block 615 is large, the encoding mode of the current block 625 may have a high probability of being determined as an intra mode. Accordingly, the encoder may apply intra mode skip for the current block when the cross correlation between the current block 625 and the co-located block 615 is smaller than a predetermined threshold value. Equation 3 below shows an embodiment of a method for deriving a cross correlation between the current block 625 and the same position block 615.

[수학식 3]&Quot; (3) "

Figure pat00003

Figure pat00003

여기서, ‘a’는 동일 위치 블록(615) 내의 픽셀 그룹을 나타내고, ‘b’는 현재 블록(625) 내의 픽셀 그룹을 나타낼 수 있다. 또한, ‘a x b’는 동일 위치 블록(615) 내의 픽셀들 및 현재 블록(625) 내의 픽셀들 간에 서로 공간적으로 동일한 위치에 존재하는 픽셀들을 곱한 값들로 구성되는 그룹을 나타낼 수 있다.Here, 'a' may represent a group of pixels in the same position block 615 and 'b' may represent a group of pixels in the current block 625. In addition, the 'a x b' may represent a group consisting of values of pixels in the same location block 615 and pixels in the current block 625 multiplied by pixels existing at the same spatial location.

또한, ‘E[x]’는 x에 해당되는 그룹의 평균을 나타내고, ‘sd[x]’는 x에 해당되는 그룹의 표준 편차(standard deviation)를 나타낸다. ‘corr[a,b]’는 a에 해당되는 그룹 및 b에 해당되는 그룹 간의 교차 상관도를 나타낼 수 있다.In addition, "E [x]" represents the mean of the group corresponding to x, and "sd [x]" represents the standard deviation of the group corresponding to x. 'Corr [a, b]' may indicate a cross correlation between a group corresponding to a and a group corresponding to b.

상술한 과정에 의해 도출된 교차 상관도 값이 소정의 임계 값보다 작은 경우, 부호화기는 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있다. 즉, 교차 상관도 값이 소정의 임계 값보다 작은 경우 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있고, 인터 예측 및/또는 인터 부호화 과정만을 수행할 수 있다. 이 경우, 부호화기는 인트라 모드를 제외한 나머지 모드에 대해서 RDO 과정을 수행할 수 있으며, 인트라 모드를 제외한 나머지 부호화 모드 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다. When the cross correlation value derived by the above process is smaller than a predetermined threshold value, the encoder may apply intra mode skip for the current block. That is, when the cross correlation value is smaller than a predetermined threshold value, the encoder may omit the intra prediction and / or intra encoding process for the current block and perform only the inter prediction and / or inter encoding process. In this case, the encoder may perform an RDO process on the remaining modes except the intra mode, and may determine an encoding mode to be applied to the current block among the remaining coding modes except the intra mode.

교차 상관도 값이 소정의 임계 값보다 크거나 같은 경우, 부호화기는 현재 블록에 대해 인트라 예측 및/또는 인트라 부호화를 수행할 수 있다. 따라서, 이 경우 부호화기는 인트라 모드를 포함한 모든 부호화 모드에 대해 RDO 과정을 수행할 수 있으며, 인트라 모드를 포함한 모든 부호화 모드 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다.If the cross correlation value is greater than or equal to a predetermined threshold value, the encoder may perform intra prediction and / or intra encoding on the current block. Therefore, in this case, the encoder may perform an RDO process for all encoding modes including an intra mode, and may determine an encoding mode to be applied to the current block among all encoding modes including an intra mode.

인트라 모드 스킵 적용 여부 결정에 사용되는 상기 임계 값은, 일례로 실험적으로 결정되어 미리 부호화기에 저장되어 있는 값일 수 있다. 예컨대, 영상 또는 픽쳐 전체에서 인터 모드로 결정된 블록들의 교차 상관도 평균 값이 실험적으로 결정될 수 있고, 상기 결정된 교차 상관도 평균 값이 상기 임계 값으로 사용될 수 있다.The threshold value used to determine whether to apply intra mode skip may be, for example, a value that is experimentally determined and stored in the encoder in advance. For example, the cross-correlation average value of the blocks determined as the inter mode in the entire image or the picture may be determined experimentally, and the determined cross-correlation average value may be used as the threshold value.

다른 예로, 상기 임계 값은 부호화 과정에서 유도되는 값일 수 있다. 예컨대, 부호화기는 현재 블록의 주변에 위치한 주변 블록들 각각의 교차 상관도를 구하고 구해진 교차 상관도 값들의 평균 값을 상기 임계 값으로 사용할 수 있다. 여기서, 일례로 상기 주변 블록은 도 4의 410에 도시된 바와 같이 현재 블록의 좌측에 인접한 블록(a), 현재 블록의 상단에 인접한 블록(b), 현재 블록 외부의 우측 상단 코너에 위치한 블록(c) 및 현재 블록 외부의 좌측 상단 코너에 위치한 블록(d)을 포함할 수 있다.
As another example, the threshold value may be a value derived in an encoding process. For example, the encoder can obtain a cross correlation of each of the neighboring blocks located around the current block and use the average value of the obtained cross correlation values as the threshold. Here, as an example, as shown in 410 of FIG. 4, the neighboring block includes a block adjacent to the left side of the current block (a), a block adjacent to the top of the current block (b), and a block located at the upper right corner outside the current block ( c) and block (d) located at the upper left corner outside the current block.

도 7은 본 발명에 따른 부호화 모드 결정 방법의 실시예를 개략적으로 나타내는 흐름도이다. 도 7의 실시예에 따른 인트라 모드 스킵 적용 여부 결정 과정은 일례로 상술한 도 1 및 도 2의 예측부에서 수행될 수 있다.7 is a flowchart schematically illustrating an embodiment of a coding mode determination method according to the present invention. An intra mode skip application determination process according to the embodiment of FIG. 7 may be performed by the prediction unit of FIGS. 1 and 2 described above.

도 7의 실시예에서 현재 블록은 현재 부호화 대상이 되는 부호화 대상 블록을 의미할 수 있다. 일례로, 상기 현재 블록은 CU에 해당될 수 있다.In the embodiment of FIG. 7, the current block may mean an encoding target block that is a current encoding target. For example, the current block may correspond to a CU.

도 7을 참조하면, 부호화기는 현재 블록의 BAD 값을 도출할 수 있다(S710). 여기서, BAD는 현재 블록 내에 위치한 픽셀의 픽셀 값 및 현재 블록의 주변에 위치한 주변 픽셀의 픽셀 값 간의 차이의 절대 값을 의미할 수 있다. 이 때, BAD 값 도출에 사용되는 픽셀들은 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들일 수 있다. 따라서, 상기 BAD는 현재 블록 및 주변 블록 간의 경계 값 차이에 해당될 수 있다. BAD 값 도출 과정의 구체적인 실시예는 도 4에서 상술한 바 있으므로, 여기서는 이에 대한 구체적인 설명은 생략하기로 한다.Referring to FIG. 7, the encoder may derive a BAD value of the current block (S710). Here, the BAD may mean an absolute value of a difference between the pixel value of the pixel located in the current block and the pixel value of the neighboring pixel located around the current block. In this case, the pixels used to derive the BAD value may be pixels located adjacent to the upper boundary and the left boundary of the current block. Therefore, the BAD may correspond to a boundary value difference between the current block and the neighboring block. Since a specific embodiment of the BAD value derivation process has been described above with reference to FIG. 4, a detailed description thereof will be omitted herein.

다시 도 7을 참조하면, 부호화기는 현재 블록의 SNMV 값을 도출할 수 있다(S720). SNMV는 현재 블록의 주변에 위치한 주변 블록들의 움직임 벡터의 놈(norm) 값들을 모두 더함으로써 도출될 수 있다. SNMV 값 도출 과정의 구체적인 실시예는 도 5에서 상술한 바 있으므로, 여기서는 이에 대한 구체적인 설명은 생략하기로 한다.Referring back to FIG. 7, the encoder may derive the SNMV value of the current block (S720). SNMV can be derived by adding all norm values of the motion vectors of neighboring blocks located in the periphery of the current block. Since a specific embodiment of the SNMV value derivation process has been described above with reference to FIG. 5, a detailed description thereof will be omitted herein.

다시 도 7을 참조하면, 부호화기는 현재 블록 및 동일 위치 블록 간의 교차 상관도를 도출할 수 있다(S730). 여기서, 동일 위치 블록은 시간축상 바로 이전에 부호화 및/또는 복호화가 완료된 이전 픽쳐(또는 이전 프레임) 내의 블록일 수 있으며, 상기 이전 픽쳐(또는 이전 프레임) 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록일 수 있다. 교차 상관도 도출 과정의 구체적인 실시예는 도 6에서 상술한 있으므로, 여기서는 이에 대한 구체적인 설명은 생략하기로 한다.Referring back to FIG. 7, the encoder may derive a cross correlation between the current block and the same block (S730). Here, the co-located block may be a block in a previous picture (or previous frame) in which encoding and / or decoding is completed immediately before on the time axis, and is located at the same spatial position as the current block in the previous picture (or previous frame). It may be an existing block. Since a specific embodiment of the cross-correlation derivation process is described above with reference to FIG. 6, a detailed description thereof will be omitted herein.

BAD, SNMV 및/또는 교차 상관도가 도출되면, 부호화기는 이를 기반으로 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부(즉, 인트라 예측이 생략되는지 여부)를 결정할 수 있다(S740). Once the BAD, SNMV, and / or cross correlation is derived, the encoder may determine whether intra mode skip is applied to the current block (ie, whether intra prediction is omitted) based on this (S740).

예컨대, 제1 조건으로서 부호화기는 BAD 값이 소정의 제1 임계 값보다 큰 경우에 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있으며, 그렇지 않은 경우에 현재 블록에 대한 인트라 예측을 수행할 수 있다. 또한, 제2 조건으로서 부호화기는 SNMV 값이 소정의 제2 임계 값보다 작은 경우에 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있으며, 그렇지 않은 경우에 현재 블록에 대한 인트라 예측을 수행할 수 있다. 그리고, 제3 조건으로서 부호화기는 교차 상관도 값이 소정의 제3 임계 값보다 작은 경우에 현재 블록에 대해 인트라 모드 스킵을 적용할 수 있으며, 그렇지 않은 경우에 현재 블록에 대한 인트라 예측을 수행할 수 있다.For example, as a first condition, the encoder may apply intra mode skip for the current block when the BAD value is larger than a predetermined first threshold value, or may perform intra prediction on the current block. In addition, as a second condition, the encoder may apply intra mode skip to the current block when the SNMV value is smaller than a predetermined second threshold value, or may perform intra prediction on the current block. In addition, as a third condition, the encoder may apply intra mode skip to the current block when the cross correlation value is smaller than a predetermined third threshold value, and otherwise, perform an intra prediction on the current block. have.

상기 제1 조건, 제2 조건 및/또는 제3 조건이 만족되는 경우 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있다. 이 경우, 부호화기는 인트라 모드에 대한 부호화 과정을 조기에 종결시킴으로써, 부호화기의 복잡도를 감소시킬 수 있다. If the first condition, the second condition and / or the third condition are satisfied, the encoder may omit the intra prediction and / or intra encoding process for the current block. In this case, the encoder can reduce the complexity of the encoder by terminating the encoding process for the intra mode early.

현재 블록에 대한 인트라 모드 스킵 적용 여부는 상기 제1 조건, 제2 조건 및 제3 조건에 대한 ‘OR’ 연산에 의해 결정될 수도 있고, 상기 제1 조건, 제2 조건 및 제3 조건에 대한 ‘AND’ 연산에 의해 결정될 수도 있다. ‘OR’ 연산이 사용되는 경우에는 제1 조건, 제2 조건 및 제3 조건 중에서 하나 이상이 만족되면 현재 블록에 대한 인트라 예측이 생략될 수 있다. 또한, ‘AND’ 연산이 사용되는 경우에는 제1 조건, 제2 조건 및 제3 조건이 모두 만족되는 경우에 현재 블록에 대한 인트라 예측이 생략될 수 있다. Whether intra mode skip is applied to the current block may be determined by an 'OR' operation on the first condition, the second condition, and the third condition, and an 'AND' on the first condition, the second condition, and the third condition. May be determined by a 'operation. When the 'OR' operation is used, intra prediction for the current block may be omitted when one or more of the first condition, the second condition, and the third condition are satisfied. In addition, when the 'AND' operation is used, the intra prediction for the current block may be omitted when all of the first condition, the second condition, and the third condition are satisfied.

또한, 도 7의 실시예에서는 현재 블록에 대해 BAD, SNMV 및 교차 상관도가 모두 계산되지만, 본 발명은 이에 한정되는 것은 아니다. 예컨대, 부호화기는 BAD, SNMV 및 교차 상관도 중에서 하나 또는 두 개만을 계산할 수도 있다. BAD, SNMV 및 교차 상관도 중에서 두 개가 계산된 경우, 부호화기는 이에 대해 OR 연산 또는 AND 연산을 수행함으로써 인트라 모드 스킵 적용 여부를 결정할 수 있다. In addition, although the BAD, SNMV and cross correlation are all calculated for the current block in the embodiment of FIG. 7, the present invention is not limited thereto. For example, the encoder may calculate only one or two of BAD, SNMV, and cross correlation. When two of BAD, SNMV, and cross correlation are calculated, the encoder may determine whether to apply intra mode skip by performing an OR operation or an AND operation on this.

한편, 상술한 BAD 도출 과정(S710), SNMV 도출 과정(S720), 교차 상관도 도출 과정(S730) 및/또는 인트라 모드 스킵 적용 여부 결정 과정(S740)은, 현재 블록의 주변에 위치한 주변 블록들의 부호화 모드가 모두 인터 모드인 경우에만 수행될 수도 있다. 이는 주변 블록의 부호화 모드가 모두 인터 모드로 결정된 경우, 현재 블록의 부호화 모드도 인터 모드로 결정될 확률이 높기 때문이다.On the other hand, the above-described BAD derivation process (S710), SNMV derivation process (S720), cross-correlation derivation process (S730) and / or intra mode skip application determination process (S740), the neighboring blocks located around the current block It may be performed only when the encoding modes are all inter modes. This is because when the encoding modes of the neighboring blocks are all determined to be the inter mode, the probability that the encoding mode of the current block is also determined to be the inter mode is high.

다시 도 7을 참조하면, 부호화기는 현재 블록의 부호화 모드를 결정할 수 있다(S750).Referring to FIG. 7 again, the encoder may determine an encoding mode of the current block (S750).

현재 블록에 대해 인트라 예측이 생략되는 것으로 결정되면, 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있고, 인터 예측 및/또는 인터 부호화 과정만을 수행할 수 있다. 이 경우, 부호화기는 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 현재 블록의 부호화 모드 후보로 결정할 수 있다. 이 때, 부호화기는 상기 결정된 부호화 모드 후보(현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 부호화 모드)에 대해서 RDO 과정을 수행함으로써, 상기 부호화 모드 후보 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다. If it is determined that intra prediction is omitted for the current block, the encoder may omit the intra prediction and / or intra encoding process for the current block, and may perform only the inter prediction and / or inter encoding process. In this case, the encoder may determine a coding mode candidate of the current block as the coding mode candidate of the current block except the intra mode among the coding modes that the current block may have. In this case, the encoder may determine an encoding mode to be applied to the current block among the encoding mode candidates by performing an RDO process on the determined encoding mode candidate (the encoding mode except the intra mode among the encoding modes that the current block may have). .

현재 블록에 대해 인트라 모드 스킵이 적용되지 않는 것으로 결정된 경우, 부호화기는 현재 블록에 대해 인트라 예측 및/또는 인트라 부호화를 수행할 수 있다. 따라서, 이 경우 부호화기는 인트라 모드를 포함하여 현재 블록이 가질 수 있는 모든 부호화 모드를 현재 블록의 부호화 모드 후보로 결정할 수 있다. 이 때, 부호화기는 상기 결정된 부호화 모드 후보에 대해 RDO 과정을 수행함으로써, 인트라 모드를 포함한 부호화 모드 후보들 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다.
If it is determined that intra mode skip is not applied to the current block, the encoder may perform intra prediction and / or intra encoding on the current block. Accordingly, in this case, the encoder may determine all encoding modes that the current block may have as the encoding mode candidate of the current block, including the intra mode. In this case, the encoder may determine an encoding mode to be applied to the current block among encoding mode candidates including an intra mode by performing an RDO process on the determined encoding mode candidate.

상술한 실시예들에 의하면, 인트라 모드에 대한 부호화 과정이 조기에 종결될 수 있다. 따라서, 불필요한 인트라 모드 관련 계산이 생략(skip)될 수 있으므로, 비디오 부호화기에서의 복잡도가 감소될 수 있다.
According to the embodiments described above, the encoding process for the intra mode may be terminated early. Thus, since unnecessary intra mode related calculations can be skipped, the complexity in the video encoder can be reduced.

상술한 실시예들에서, 방법들은 일련의 단계 또는 블록으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described on the basis of a flowchart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in different orders or simultaneously . It will also be understood by those skilled in the art that the steps depicted in the flowchart illustrations are not exclusive, that other steps may be included, or that one or more steps in the flowchart may be deleted without affecting the scope of the present invention. You will understand.

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

Claims (18)

현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정하는 단계;
상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정하는 단계; 및
상기 결정된 부호화 모드를 기반으로 상기 현재 블록에 대한 부호화를 수행하는 단계를 포함하되,
상기 부호화 모드를 결정하는 단계에서는,
상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정하는 것을 특징으로 하는 영상 부호화 방법.
Determining whether intra prediction for the current block is omitted;
By performing a rate-distortion optimization (RDO) process on a plurality of coding mode candidates determined according to whether intra prediction is omitted, a coding mode to be applied to the current block is determined among the plurality of coding mode candidates. Making; And
Performing encoding on the current block based on the determined encoding mode,
In the determining of the encoding mode,
And when it is determined that the intra prediction is omitted, the encoding mode other than the intra mode among the encoding modes that the current block may have is determined as the plurality of encoding mode candidates.
제 1항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록의 좌측에 인접하여 위치한 좌측 주변 블록, 상기 현재 블록의 상단에 인접하여 위치한 상단 주변 블록, 상기 현재 블록의 우측 상단 코너에 가장 가까이 위치한 우측 상단 주변 블록 및 상기 현재 블록의 좌측 상단 코너에 가장 가까이 위치한 좌측 상단 주변 블록의 부호화 모드가 모두 인터 모드인 경우에 수행되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
Determining whether or not the intra prediction is omitted,
A left peripheral block located adjacent to the left side of the current block, an upper peripheral block located adjacent to the top of the current block, a right upper peripheral block closest to the upper right corner of the current block and an upper left corner of the current block The image encoding method of claim 1, wherein the encoding mode is performed when the encoding modes of the closest upper left neighboring blocks are all inter modes.
제 1항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계; 및
상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
Determining whether or not the intra prediction is omitted,
Deriving a Boundary Absolute Difference (BAD) value for the current block; And
Determining that the intra prediction is omitted if the BAD value is greater than a predetermined threshold,
The BAD value is derived based on pixel values of pixels located adjacent to an upper boundary and a left boundary of the current block among pixels in the current block and pixels located around the current block. .
제 3항에 있어서,
상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값인 것을 특징으로 하는 영상 부호화 방법.
The method of claim 3,
And the predetermined threshold value is an experimentally determined value which is previously stored in an encoder.
제 3항에 있어서,
상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 BAD 값들의 평균 값으로 결정되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 3,
The predetermined threshold value is determined as an average value of BAD values of a plurality of neighboring blocks located around the current block.
제 1항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 SNMV(Sum of Norm Motion Vector) 값을 도출하는 단계; 및
상기 SNMV 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 SNMV 값은, 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 움직임 벡터의 놈(norm) 값을 더함으로써 도출되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
Determining whether or not the intra prediction is omitted,
Deriving a sum of norm motion vector (SNMV) value for the current block; And
Determining that the intra prediction is omitted if the SNMV value is less than a predetermined threshold,
The SNMV value is derived by adding a norm of motion vectors of a plurality of neighboring blocks located around the current block.
제 6항에 있어서,
상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값인 것을 특징으로 하는 영상 부호화 방법.
The method according to claim 6,
And the predetermined threshold value is an experimentally determined value which is previously stored in an encoder.
제 6항에 있어서,
상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 SNMV 값들의 평균 값으로 결정되는 것을 특징으로 하는 영상 부호화 방법.
The method according to claim 6,
The predetermined threshold value is determined as an average value of SNMV values of a plurality of neighboring blocks located around the current block.
제 1항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 교차 상관도(cross-correlation) 값을 도출하는 단계; 및
상기 교차 상관도 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 교차 상관도 값은 상기 현재 블록 내의 픽셀들 및 동일 위치 블록(co-located block) 내의 픽셀들의 픽셀 값을 기반으로 도출되고, 상기 동일 위치 블록은 시간적으로 바로 이전에 부호화가 완료된 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록인 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
Determining whether or not the intra prediction is omitted,
Deriving a cross-correlation value for the current block; And
Determining that the intra prediction is omitted if the cross correlation value is less than a predetermined threshold value,
The cross-correlation value is derived based on pixel values of pixels in the current block and pixels in a co-located block, wherein the co-located block is located within a picture that has been coded just before in time. And a block existing at the same position as the current block.
제 9항에 있어서,
상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값인 것을 특징으로 하는 영상 부호화 방법.
The method of claim 9,
And the predetermined threshold value is an experimentally determined value which is previously stored in an encoder.
제 9항에 있어서,
상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 교차 상관도 값들의 평균 값으로 결정되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 9,
The predetermined threshold value is determined as an average value of cross correlation values of a plurality of neighboring blocks located around the current block.
현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정하는 단계; 및
상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정하는 단계를 포함하되,
상기 부호화 모드를 결정하는 단계에서는,
상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정하는 것을 특징으로 하는 부호화 모드 결정 방법.
Determining whether intra prediction for the current block is omitted; And
By performing a rate-distortion optimization (RDO) process on a plurality of coding mode candidates determined according to whether intra prediction is omitted, a coding mode to be applied to the current block is determined among the plurality of coding mode candidates. Including the steps of:
In the determining of the encoding mode,
And when it is determined that the intra prediction is omitted, encoding modes other than the intra mode among the encoding modes that the current block may have are determined as the plurality of encoding mode candidates.
제 12항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록의 좌측에 인접하여 위치한 좌측 주변 블록, 상기 현재 블록의 상단에 인접하여 위치한 상단 주변 블록, 상기 현재 블록의 우측 상단 코너에 가장 가까이 위치한 우측 상단 주변 블록 및 상기 현재 블록의 좌측 상단 코너에 가장 가까이 위치한 좌측 상단 주변 블록의 부호화 모드가 모두 인터 모드인 경우에 수행되는 것을 특징으로 하는 부호화 모드 결정 방법.
13. The method of claim 12,
Determining whether or not the intra prediction is omitted,
A left peripheral block located adjacent to the left side of the current block, an upper peripheral block located adjacent to the top of the current block, a right upper peripheral block closest to the upper right corner of the current block and an upper left corner of the current block The encoding mode determination method, wherein the encoding mode is performed when the encoding modes of the closest upper left neighboring blocks are all inter modes.
제 12항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계; 및
상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출되는 것을 특징으로 하는 부호화 모드 결정 방법.
13. The method of claim 12,
Determining whether or not the intra prediction is omitted,
Deriving a Boundary Absolute Difference (BAD) value for the current block; And
Determining that the intra prediction is omitted if the BAD value is greater than a predetermined threshold,
The BAD value is determined based on a pixel value of pixels located adjacent to an upper boundary and a left boundary of the current block among pixels in the current block and pixels located around the current block. Way.
제 12항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 SNMV(Sum of Norm Motion Vector) 값을 도출하는 단계; 및
상기 SNMV 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 SNMV 값은, 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 움직임 벡터의 놈(norm) 값을 더함으로써 도출되는 것을 특징으로 하는 부호화 모드 결정 방법.
13. The method of claim 12,
Determining whether or not the intra prediction is omitted,
Deriving a sum of norm motion vector (SNMV) value for the current block; And
Determining that the intra prediction is omitted if the SNMV value is less than a predetermined threshold,
The SNMV value is derived by adding a norm of motion vectors of a plurality of neighboring blocks located around the current block.
제 12항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 교차 상관도(cross-correlation) 값을 도출하는 단계; 및
상기 교차 상관도 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 교차 상관도 값은 상기 현재 블록 내의 픽셀들 및 동일 위치 블록(co-located block) 내의 픽셀들의 픽셀 값을 기반으로 도출되고, 상기 동일 위치 블록은 시간적으로 바로 이전에 부호화가 완료된 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록인 것을 특징으로 하는 부호화 모드 결정 방법.
13. The method of claim 12,
Determining whether or not the intra prediction is omitted,
Deriving a cross-correlation value for the current block; And
Determining that the intra prediction is omitted if the cross correlation value is less than a predetermined threshold value,
The cross-correlation value is derived based on pixel values of pixels in the current block and pixels in a co-located block, wherein the co-located block is located within a picture that has been coded just before in time. Encoding mode determination method characterized in that the block exists in the same position spatially with the current block.
현재 블록에 적용될 부호화 모드를 결정하고, 상기 부호화 모드를 기반으로 상기 현재 블록에 대해 예측을 수행함으로써 상기 현재 블록에 대응하는 예측 블록을 생성하는 예측부; 및
상기 현재 블록 및 상기 예측 블록을 기반으로 부호화된 비트스트림을 생성하는 비트스트림 생성부를 포함하되,
상기 예측부는,
상기 현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정하고, 상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정하는 것을 특징으로 하는 영상 부호화 장치.
A prediction unit to determine a coding mode to be applied to a current block and to generate a prediction block corresponding to the current block by performing prediction on the current block based on the coding mode; And
A bitstream generator configured to generate a coded bitstream based on the current block and the prediction block,
The predicting unit,
It is determined whether intra prediction for the current block is omitted, and a rate-distortion optimization (RDO) process is performed for a plurality of encoding mode candidates determined according to whether intra prediction is omitted. And determining an encoding mode to be applied to the current block among the plurality of encoding mode candidates.
제 17항에 있어서,
상기 예측부는,
상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정하는 것을 특징으로 하는 영상 부호화 장치.
18. The method of claim 17,
The predicting unit,
And if it is determined that the intra prediction is omitted, the plurality of encoding mode candidates are selected from the encoding modes other than the intra mode among the encoding modes that the current block may have.
KR1020130002886A 2012-01-19 2013-01-10 Method for determining coding mode and apparatus thereof KR102183366B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020120006167 2012-01-19
KR20120006167 2012-01-19

Publications (2)

Publication Number Publication Date
KR20130085376A true KR20130085376A (en) 2013-07-29
KR102183366B1 KR102183366B1 (en) 2020-11-27

Family

ID=48995606

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130002886A KR102183366B1 (en) 2012-01-19 2013-01-10 Method for determining coding mode and apparatus thereof

Country Status (1)

Country Link
KR (1) KR102183366B1 (en)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
이동식, and 김영모, "지역 통계를 이용한 H. 264/AVC 의 고속 인터 모드 예측" 멀티미디어학회논문지 10.8 (2007): 997-1003.(2007.08.31.)* *
이제윤, and 전병우, "H. 264 동영상 압축을 위한 고속 부호화 모드 결정 방법" 전자공학회논문지-SP 41.6 (2004): 165-173.(2004.11.30.)* *

Also Published As

Publication number Publication date
KR102183366B1 (en) 2020-11-27

Similar Documents

Publication Publication Date Title
KR102442270B1 (en) Method for intra prediction and apparatus thereof
KR102485745B1 (en) Method and apparatus for picture encoding/decoding
KR102420974B1 (en) Method and apparatus for video encoding/decoding using error compensation
KR102535747B1 (en) Method for intra prediction and apparatus thereof
KR102070719B1 (en) Method for inter prediction and apparatus thereof
KR101990423B1 (en) Method for inter prediction and apparatus thereof
KR20130112374A (en) Video coding method for fast intra prediction and apparatus thereof
US11706449B2 (en) Method and device for intra-prediction
KR20170124080A (en) Method and apparatus for encoding/decoding a video signal
KR102183366B1 (en) Method for determining coding mode and apparatus thereof

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right