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

Method for determining coding mode and apparatus thereof Download PDF

Info

Publication number
KR102183366B1
KR102183366B1 KR1020130002886A KR20130002886A KR102183366B1 KR 102183366 B1 KR102183366 B1 KR 102183366B1 KR 1020130002886 A KR1020130002886 A KR 1020130002886A KR 20130002886 A KR20130002886 A KR 20130002886A KR 102183366 B1 KR102183366 B1 KR 102183366B1
Authority
KR
South Korea
Prior art keywords
current block
block
value
encoding
mode
Prior art date
Application number
KR1020130002886A
Other languages
Korean (ko)
Other versions
KR20130085376A (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

본 발명에 따른 영상 부호화 방법은, 현재 블록에 대한 인트라 예측이 생략되는지 여부를 결정하는 단계, 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화 과정을 수행함으로써, 복수의 부호화 모드 후보 중에서 현재 블록에 적용될 부호화 모드를 결정하는 단계, 및 결정된 부호화 모드를 기반으로 현재 블록에 대한 부호화를 수행하는 단계를 포함한다.The video encoding method according to the present invention includes determining whether intra prediction for a current block is omitted, and performing a rate-distortion optimization process on 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 from among encoding mode candidates of, and performing encoding on the current block based on the determined encoding mode.

Description

부호화 모드 결정 방법 및 그 장치 {METHOD FOR DETERMINING CODING MODE AND APPARATUS THEREOF}Coding mode determination method and apparatus thereof {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, as broadcasting services having high definition (HD) resolution are expanded not only domestically but also globally, many users are getting accustomed to high-resolution and high-definition images, and accordingly, many organizations are spurring the development of next-generation video devices. In addition, as interest in UHD (Ultra High Definition) having a resolution of 4 or more times higher than that of HDTV in addition to HDTV has increased, a compression technology for higher resolution and high-definition images is required.

영상 압축을 위해, 시간적으로 이전 및/또는 이후의 픽쳐로부터 현재 픽쳐에 포함된 픽셀값을 예측하는 인터(inter) 예측 기술, 현재 픽쳐 내의 픽셀 정보를 이용하여 현재 픽쳐에 포함된 픽셀값을 예측하는 인트라(intra) 예측 기술, 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술 등이 사용될 수 있다.For image compression, an inter prediction technology that temporally predicts a pixel value included in a current picture from a previous and/or subsequent picture, and predicts a pixel value 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 with a high frequency of appearance, and a long code is assigned to a symbol with a low frequency of occurrence, may be used.

본 발명의 기술적 과제는 영상 부호화 효율을 향상시키고 복잡도를 감소시킬 수 있는 영상 부호화 방법 및 장치를 제공함에 있다.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 a method and apparatus for determining an encoding mode 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 the steps of determining whether intra prediction for a current block is omitted, rate-distortion optimization for a plurality of coding mode candidates determined according to whether the intra prediction is omitted or not. RDO), determining an encoding mode to be applied to the current block from among the plurality of encoding mode candidates, and performing encoding on the current block based on the determined encoding mode. Here, in the determining of the encoding mode, when it is determined that the intra prediction is omitted, the remaining 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.

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

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계 및 상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출될 수 있다.Determining whether the intra prediction is omitted may include deriving a BAD (Boundary Absolute Difference) value for the current block, and determining that the intra prediction is omitted when the BAD value is greater than a predetermined threshold value. It may further include 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 value may be a value determined experimentally and previously stored in an encoder.

상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 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 the intra prediction is omitted may include deriving a SNMV (Sum of Norm Motion Vector) value for the current block, and when the SNMV value is less than a predetermined threshold, the intra prediction is omitted. It may further include the step of determining. Here, the SNMV value may be derived by adding norm values of motion vectors of a plurality of neighboring blocks located around the current block.

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

상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 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 the intra prediction is omitted may include deriving a cross-correlation value for the current block, and when the cross-correlation value is less than a predetermined threshold value, the intra prediction is omitted. It may further include the step of determining to be. Here, 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 is temporally encoded immediately before It may be a block that exists at the same spatially as the current block in the picture.

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

상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 교차 상관도 값들의 평균 값으로 결정될 수 있다.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 method of determining an encoding mode. The method includes the steps of 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 or not the intra prediction is omitted. : RDO), determining an encoding mode to be applied to the current block from among the plurality of encoding mode candidates. Here, in the determining of the encoding mode, when it is determined that the intra prediction is omitted, the remaining 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.

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

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계 및 상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출될 수 있다.Determining whether the intra prediction is omitted may include deriving a BAD (Boundary Absolute Difference) value for the current block, and determining that the intra prediction is omitted when the BAD value is greater than a predetermined threshold value. It may further include 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 the intra prediction is omitted may include deriving a SNMV (Sum of Norm Motion Vector) value for the current block, and when the SNMV value is less than a predetermined threshold, the intra prediction is omitted. It may further include the step of determining. Here, the SNMV value may be derived by adding norm values of motion vectors of a plurality of neighboring blocks located around the current block.

상기 인트라 예측이 생략되는지 여부를 결정하는 단계는, 상기 현재 블록에 대한 교차 상관도(cross-correlation) 값을 도출하는 단계 및 상기 교차 상관도 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함할 수 있다. 여기서, 상기 교차 상관도 값은 상기 현재 블록 내의 픽셀들 및 동일 위치 블록(co-located block) 내의 픽셀들의 픽셀 값을 기반으로 도출될 수 있고, 상기 동일 위치 블록은 시간적으로 바로 이전에 부호화가 완료된 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록일 수 있다.Determining whether the intra prediction is omitted may include deriving a cross-correlation value for the current block, and when the cross-correlation value is less than a predetermined threshold value, the intra prediction is omitted. It may further include the step of determining to be. Here, 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 is temporally encoded immediately before It may be a block that exists at the same spatially as the current block in the picture.

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

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

본 발명에 따른 영상 부호화 방법에 의하면, 영상 부호화 효율이 향상되고 복잡도가 감소될 수 있다.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 method of determining an encoding mode according to the present invention, image encoding efficiency can be improved and complexity can be reduced.

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

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

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

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

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

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

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

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

영상 부호화 장치(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 bitstream. Intra prediction means intra prediction, and inter prediction means inter prediction. In the intra mode, the switch 115 may be switched to intra, and in the inter mode, the switch 115 may be switched to inter. The image encoding apparatus 100 may generate a prediction block for an input block of an input image, and then encode a residual between the input block and the prediction block.

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

인터 모드인 경우, 움직임 예측부(motion estimator)(111)는, 움직임 예측 과정에서 참조 픽쳐 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 움직임 보상부(112)는 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the case of the inter mode, the motion estimator 111 may find a region that best matches the input block in the reference image stored in the reference picture buffer 190 in the motion prediction process to obtain a motion vector. 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 prediction unit 111, the motion compensation unit 112, and the intra prediction unit 120 are shown as 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 We can also constitute wealth.

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

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

엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. When entropy coding 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, and the symbol is expressed. The size of the column can be reduced. Therefore, compression performance of image encoding may be improved through 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 prediction encoding, the currently encoded image needs to be decoded and stored in order to be used as a reference image. Accordingly, the quantized coefficients are inverse quantized by the inverse quantization unit 160 and inversely transformed by the inverse transform unit 170. The inverse quantized and inverse transformed coefficients are added to the prediction block through an adder 175 and a reconstructed 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) to a restoration block or a reconstructed picture. can do. The filter unit 180 may also be referred to as an adaptive in-loop filter. The deblocking filter may remove block distortion and/or blocking artifacts generated at the boundary between blocks. SAO may add an appropriate offset value to a pixel value to compensate for a coding error. ALF may perform filtering based on a value obtained by comparing 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 shown as separate configurations, but this The invention is not limited thereto. Each component shown in the embodiment of FIG. 1 is arranged and included as a separate 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 transform unit 130, the quantization unit 140, and the entropy encoder 150 may be regarded as constituting one bitstream generation unit. 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 showing a configuration according to an embodiment of an image decoding apparatus to which the present invention is applied.

도 2를 참조하면, 상기 영상 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함한다.Referring to FIG. 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, and an adder ( 255), a filter unit 260, and a reference picture buffer 270.

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

엔트로피 복호화부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 복호화 방법은 상술한 엔트로피 부호화 방법과 유사하다.The entropy decoder 210 may entropy-decode the input bitstream according to a probability distribution to generate symbols including symbols in the form of quantized coefficients. 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 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 the symbol, so that the size of the bit string for each symbol is reduced. Can be reduced. Therefore, the compression performance of video decoding can be improved through the entropy decoding method.

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

인트라 모드인 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 복호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 인터 모드인 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽쳐 버퍼(270)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the case of the intra mode, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using pixel values of an 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 prediction unit 240 and the motion compensation unit 250 are shown as separate configurations, but the present invention is not limited thereto. For example, the intra prediction 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 an adder 255, and the added block may pass through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, SAO, and ALF to a reconstructed block or a reconstructed picture. The filter unit 260 may output a reconstructed image, that is, a reconstructed image. The reconstructed image may be stored in the reference picture buffer 270 and used for inter prediction.

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

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

도 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 a 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 the encoding mode of the current block, the encoder may perform a rate-distortion optimization (RDO, hereinafter referred to as RDO) process for 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 from among the plurality of encoding mode candidates according to a result of performing the RDO. Coding mode candidates that the current block may have may include an inter mode and an intra mode, and there may be a skip mode in which transmission of a 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 16x16, but in order to provide optimal compression efficiency for high-resolution video, CU (Coding Unit), PU (Prediction Unit), and TU A processing unit such as (Transform Unit) may be used. Accordingly, the optimal block size can 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)에 적용될 최적의 부호화 모드를 결정할 수 있다.At this time, for one CU having a size of 2Nx2N, a skip mode in units of 2Nx2N blocks, an inter mode in units of 2Nx2N blocks (Inter_2Nx2N), an inter mode in units of 2NxN blocks (Inter_2NxN), and an inter mode in units of Nx2N blocks (Inter_Nx2N), Intra_PCM mode, and the like may be supported. Here, the intra PCM mode may mean an encoding mode in which processes such as prediction, transformation, and quantization of the current block are omitted. In addition, when the size of the current block (eg, CU) is 8x8, an inter mode (Inter_NxN) in units of NxN blocks, an intra mode (Intra_2Nx2N) in units of NxN blocks may be further supported. The encoder may determine an optimal encoding mode to be applied to the current block (eg, CU) from 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, a probability that an encoding mode for the current block is determined as an intra mode may be relatively lower than a probability that the current block is determined as an inter mode. However, a large amount of computation is required to perform intra prediction and/or intra encoding in an image encoding process. This is because up to 35 directional predictions can be performed in the intra coding process.

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

인트라 예측이 생략되는 것으로 결정되면, 부호화기는 현재 블록에 대한 인트라 예측 및/또는 인트라 부호화 과정을 생략할 수 있다. 즉, 이 경우 부호화기는 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 현재 블록의 부호화 모드 후보로 결정할 수 있다. 이 때, 부호화기는 상기 결정된 부호화 모드 후보에 대해서 RDO 과정을 수행함으로써, 상기 부호화 모드 후보 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다. 인트라 예측이 생략되는 것으로 결정된 경우, 부호화기는 인터 예측 및/또는 인터 부호화 과정만을 수행할 수도 있다.If it is determined that intra prediction is omitted, the encoder may skip the intra prediction and/or intra coding process for the current block. That is, in this case, the encoder may determine other encoding modes other than the intra mode among the encoding modes that the current block may have as encoding mode candidates for the current block. In this case, the encoder may determine an encoding mode to be applied to the current block from among the encoding mode candidates by performing an RDO process on the determined encoding mode candidate. When 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, an omission of intra prediction and/or intra encoding during a video encoding process will be referred to as'intra mode skip'. Hereinafter, embodiments of a method of determining whether an intra prediction process and/or an intra coding process is omitted for the current block (ie, 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 explaining an embodiment of a method of determining whether to apply intra mode skipping in an encoder. The process of determining whether to apply the intra mode skip according to the embodiment of FIG. 4 may be performed by the predictor of FIGS. 1 and 2 described above as an example.

도 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 as an example. In addition, 410 of FIG. 4 denotes a block (a) adjacent to the left 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. 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 shown in 410 of FIG. 4 may be a CU as an example.

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

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

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

인트라 예측 및/또는 인트라 부호화 과정에서는 현재 블록의 주변에 위치한 이미 복원된 주변 픽셀들의 픽셀 값을 기반으로 예측이 수행될 수 있다. 따라서, 현재 블록 내의 픽셀들 및 현재 블록 주변에 위치한 픽셀들 간의 BAD(Boundary Absolute Difference)가 크면, 현재 블록의 부호화 모드가 인트라 모드로 결정될 확률이 작을 수 있다. 이 때, BAD는 현재 블록 내에 위치한 픽셀의 픽셀 값 및 현재 블록의 주변에 위치한 주변 픽셀의 픽셀 값 간의 차이의 절대 값을 의미할 수 있다. In the intra prediction and/or intra encoding process, prediction may be performed based on pixel values of previously reconstructed neighboring pixels located around the current block. Accordingly, if the BAD (Boundary Absolute Difference) between pixels in the current block and pixels located around the current block is large, the probability that the encoding mode of the current block is determined as the intra mode may be small. In this case, BAD may mean an absolute value of a difference between a pixel value of a pixel located in a current block and a pixel value of a 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 the top leftmost in the current block 425, an upper left peripheral pixel 436 located at the top left of the top left corner pixel, and the topmost in the current block. The upper pixels 443 located at, the upper surrounding pixels 446 located adjacent to the top of the upper pixels, the leftmost pixels 453 located at the left side of the current block, and the left side adjacent to the left side of the left pixels The surrounding pixels 456 may be used to determine whether to apply the intra mode skip. This can be expressed as in Equation 1 below.

[수학식 1][Equation 1]

Figure 112013002646938-pat00001

Figure 112013002646938-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. In addition, abs(X) may represent the absolute value of X. 'Orig' may represent a pixel value of a pixel in the current block, and may correspond to any one of the upper left corner pixel 433, the upper pixels 443, and the left pixels 453. 'Recon' may represent a pixel value of the reconstructed surrounding 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. In addition, [y][x] may indicate the location of the upper left corner pixel 433 located at the top leftmost 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 surrounding pixels 446. In addition, the encoder may obtain an absolute value of a pixel difference value between pixels adjacent to each other among the left pixels 453 and the left surrounding pixels 456. The BAD value for the current block can be derived by adding all of the obtained absolute values.

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

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

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

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

도 4의 410에서 상술한 바와 같이, 비디오 부호화 시에 현재 블록(x) 및 주변 블록(a, b, c, d)은 강한 공간적 상관도를 가질 수 있다. 따라서, 주변 블록의 부호화 모드가 모두 인터 모드(및/또는 인터 부호화 모드)로 결정된 경우, 현재 블록의 부호화 모드도 인터 모드(및/또는 인터 부호화 모드)로 결정될 확률이 높다. 따라서, 주변 블록(a, b, c, d)의 부호화 모드가 모두 인터 모드인 경우, 부호화기는 후술되는 실시예에 따라 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부를 미리 결정할 수 있다.As described above at 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. Accordingly, when all of the encoding modes of neighboring blocks are determined as inter mode (and/or inter encoding mode), there is a high probability that the encoding mode of the current block is also determined as inter mode (and/or inter encoding mode). Accordingly, when all of the encoding modes of the neighboring blocks a, b, c, and d are inter mode, 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 case of a homogeneous region, the magnitudes of residual signals derived from 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 a 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. Also, I16 may mean an intra mode in which intra prediction is performed in units of 16x16 blocks, and I4 may mean an intra mode in which intra prediction is performed in units of 4x4 blocks. However, the encoding mode shown 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 vector of the neighboring blocks 523, 526, and 529 located in the vicinity of the current block is large, even if the current block is a block located in a homogeneous region, the probability that the encoding mode for the current block is determined as the intra mode This can be high. When the motion vector of the neighboring blocks 523, 526, and 529 is large, the motion vector of the current block is also likely to be large, and thus the amount of bits required to encode the motion vector may be large from a rate-distortion perspective. Accordingly, the encoder may determine the encoding mode of the current block as the intra mode even when the sizes of residual signals derived from 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에 해당될 수 있다.Therefore, the encoder estimates the size 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 on which encoding and/or decoding is completed, and then the calculated SNMV value (current When the estimated value of the motion vector size of the block) is less than a predetermined threshold value, intra mode skipping may be applied to the current block. Here, the reconstructed 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, the neighboring blocks used for SNMV calculation are the left neighboring block 523 adjacent to the left of the current block 515, the upper neighboring block 526 adjacent to the top of the current block 515, and the current block. (515) It may be the upper right peripheral block 529 located in the upper right corner of the outside. Here, the current block 515, the left neighboring block 523, the upper neighboring block 526, and the upper right neighboring block 529 may correspond to a CU as an 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 displayed in the left neighboring block 523, 0 displayed in the upper neighboring block 526, and 2 displayed in the upper right neighboring block 529 may respectively represent a reference picture index. In addition, in 520 of FIG. 5, the motion vector of the left neighboring block 523 is (-2,-12), the motion vector of the upper neighboring block 526 is (12,-12), and the upper right neighboring 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, SNMV can be derived by adding all norm values of motion vectors of the neighboring blocks 523, 526, and 529. This can be represented by the following equation (2).

[수학식 2][Equation 2]

Figure 112013002646938-pat00002

Figure 112013002646938-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. Further, 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 may be derived by adding all the norm values of the motion vectors of the block a, the block b, and the block c. Here, block a represents the left peripheral block 523, block b represents the upper peripheral block 526, and block c represents the upper right peripheral block 529.

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

인트라 모드 스킵 적용 여부 결정에 사용되는 상기 임계 값은, 일례로 실험적으로 결정되어 미리 부호화기에 저장되어 있는 값일 수 있다. 예컨대, 영상 또는 픽쳐 전체에서 인터 모드로 결정된 블록들의 SNMV 평균 값이 실험적으로 결정될 수 있고, 상기 결정된 SNMV 평균 값이 상기 임계 값으로 사용될 수 있다.The threshold value used to determine whether to apply the intra mode skip may be, for example, a value that is experimentally determined and previously stored in an encoder. For example, an average SNMV value of blocks determined as inter mode in the entire image or picture may be experimentally determined, 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 during an encoding process. For example, the encoder may obtain the SNMV of each of the neighboring blocks located around the current block and use an average value of the obtained SNMV values as the threshold value. Here, as an example, the neighboring block is the left neighboring block (same as block a of 410 in FIG. 4, 523), the upper neighboring block (same as block b of 410 of FIG. 4, 526), and The same as block c of 410, 529) may be included. In addition, the neighboring block used for deriving the threshold value may further include an upper left neighboring 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 explaining another embodiment of a method for determining whether to apply an intra mode skip in an encoder. The process of determining whether to apply the intra mode skip according to the embodiment of FIG. 6 may be performed by the prediction unit of FIGS. 1 and 2 described above as an example.

도 4의 410에서 상술한 바와 같이, 비디오 부호화 시에 현재 블록(x) 및 주변 블록(a, b, c, d)은 강한 공간적 상관도를 가질 수 있다. 따라서, 주변 블록의 부호화 모드가 모두 인터 모드(및/또는 인터 부호화 모드)로 결정된 경우, 현재 블록의 부호화 모드도 인터 모드(및/또는 인터 부호화 모드)로 결정될 확률이 높다. 따라서, 주변 블록(a, b, c, d)의 부호화 모드가 모두 인터 모드인 경우, 부호화기는 후술되는 실시예에 따라 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부를 미리 결정할 수 있다.As described above at 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. Accordingly, when all of the encoding modes of neighboring blocks are determined as inter mode (and/or inter encoding mode), there is a high probability that the encoding mode of the current block is also determined as inter mode (and/or inter encoding mode). Accordingly, when all of the encoding modes of the neighboring blocks a, b, c, and d are inter mode, 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에 해당될 수 있다.6 shows a current picture 620 to which a current block (a block to be encoded 625) belongs, and a picture (hereinafter referred to as a previous picture, 610) that has been encoded and/or decoded immediately before the time axis. A block 615 belonging to the previous picture 610 represents a block that exists in the same spatially as the current block 625 in the previous picture 610. Hereinafter, in this specification, 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 co-located block 615 may correspond to a CU as an example.

도 6에서 각각의 블록에 대해 결정된 부호화 모드는 각각 P, S, I16, I4 등일 수 있다. 여기서, P는 인터 모드를 의미하고, S는 스킵 모드를 의미할 수 있다. 또한, I16은 16x16 블록 단위로 인트라 예측이 수행되는 인트라 모드를 의미할 수 있으며, I4는 4x4 블록 단위로 인트라 예측이 수행되는 인트라 모드를 의미할 수 있다. 다만, 도 6에 도시된 부호화 모드는 예시적인 것으로서, 본 발명은 이에 한정되는 것은 아니다. In FIG. 6, encoding modes determined for each block may be P, S, I16, I4, and the like, respectively. Here, P may mean an inter mode, and S may mean a skip mode. Also, I16 may mean an intra mode in which intra prediction is performed in units of 16x16 blocks, and I4 may mean an intra mode in which intra prediction is performed in units of 4x4 blocks. However, the encoding mode shown 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 co-located 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 to the current block when the cross correlation between the current block 625 and the co-located block 615 is less than a predetermined threshold value. Equation 3 below shows an embodiment of a method for deriving a cross-correlation degree between the current block 625 and the co-located block 615.

[수학식 3][Equation 3]

Figure 112013002646938-pat00003

Figure 112013002646938-pat00003

여기서, ‘a’는 동일 위치 블록(615) 내의 픽셀 그룹을 나타내고, ‘b’는 현재 블록(625) 내의 픽셀 그룹을 나타낼 수 있다. 또한, ‘a x b’는 동일 위치 블록(615) 내의 픽셀들 및 현재 블록(625) 내의 픽셀들 간에 서로 공간적으로 동일한 위치에 존재하는 픽셀들을 곱한 값들로 구성되는 그룹을 나타낼 수 있다.Here,'a' may denote a pixel group in the same location block 615, and'b' may denote a pixel group in the current block 625. In addition,'a x b'may represent a group consisting of values obtained by multiplying pixels in the same location block 615 and pixels in the current block 625 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]' denotes the average of the group corresponding to x, and'sd[x]' denotes the standard deviation of the group corresponding to x. 'Corr[a,b]' may represent a cross-correlation degree between a group corresponding to a and a group corresponding to b.

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

교차 상관도 값이 소정의 임계 값보다 크거나 같은 경우, 부호화기는 현재 블록에 대해 인트라 예측 및/또는 인트라 부호화를 수행할 수 있다. 따라서, 이 경우 부호화기는 인트라 모드를 포함한 모든 부호화 모드에 대해 RDO 과정을 수행할 수 있으며, 인트라 모드를 포함한 모든 부호화 모드 중에서 현재 블록에 적용될 부호화 모드를 결정할 수 있다.When 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. Accordingly, in this case, the encoder may perform an RDO process for all encoding modes including the intra mode, and may determine an encoding mode to be applied to the current block among all encoding modes including the intra mode.

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

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

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

도 7의 실시예에서 현재 블록은 현재 부호화 대상이 되는 부호화 대상 블록을 의미할 수 있다. 일례로, 상기 현재 블록은 CU에 해당될 수 있다.In the embodiment of FIG. 7, the current block may mean an encoding object block that is a current encoding object. 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 the BAD value of the current block (S710). Here, BAD may mean an absolute value of a difference between a pixel value of a pixel located in the current block and a pixel value of a neighboring pixel located around the current block. In this case, pixels used to derive the BAD value may be pixels located adjacent to the upper boundary and the left boundary of the current block. Accordingly, the BAD may correspond to a boundary value difference between a current block and a neighboring block. Since a specific embodiment of the process of deriving the BAD value has been described above in FIG. 4, a detailed description thereof will be omitted here.

다시 도 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 motion vectors of neighboring blocks located around the current block. Since a specific embodiment of the process of deriving the SNMV value has been described above in FIG. 5, a detailed description thereof will be omitted here.

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

BAD, SNMV 및/또는 교차 상관도가 도출되면, 부호화기는 이를 기반으로 현재 블록에 대해 인트라 모드 스킵이 적용되는지 여부(즉, 인트라 예측이 생략되는지 여부)를 결정할 수 있다(S740). If BAD, SNMV, and/or cross-correlation are 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 to the current block when the BAD value is greater than a predetermined first threshold value, and otherwise, 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 less than the second predetermined threshold value, and otherwise, may perform intra prediction on the current block. And, as a third condition, the encoder may apply intra mode skip to the current block when the cross-correlation value is less than a predetermined third threshold value, and otherwise, perform intra prediction for the current block. have.

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

현재 블록에 대한 인트라 모드 스킵 적용 여부는 상기 제1 조건, 제2 조건 및 제3 조건에 대한 ‘OR’ 연산에 의해 결정될 수도 있고, 상기 제1 조건, 제2 조건 및 제3 조건에 대한 ‘AND’ 연산에 의해 결정될 수도 있다. ‘OR’ 연산이 사용되는 경우에는 제1 조건, 제2 조건 및 제3 조건 중에서 하나 이상이 만족되면 현재 블록에 대한 인트라 예측이 생략될 수 있다. 또한, ‘AND’ 연산이 사용되는 경우에는 제1 조건, 제2 조건 및 제3 조건이 모두 만족되는 경우에 현재 블록에 대한 인트라 예측이 생략될 수 있다. Whether to apply the intra mode skip to the current block may be determined by an'OR' operation for the first condition, the second condition, and the third condition, or the'AND' for the first condition, the second condition, and the third condition. 'Can also be determined by operation. When the'OR' operation is used, if at least one of the first condition, the second condition, and the third condition is satisfied, intra prediction for the current block may be omitted. In addition, when the'AND' operation is used, 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, in the embodiment of FIG. 7, BAD, SNMV, and cross-correlation are all calculated for the current block, but 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 the BAD, SNMV, and cross-correlation are calculated, the encoder may determine whether to apply the intra mode skip by performing an OR operation or an AND operation on them.

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

다시 도 7을 참조하면, 부호화기는 현재 블록의 부호화 모드를 결정할 수 있다(S750).Referring back to FIG. 7, the encoder may determine the 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 coding process for the current block, and may only perform the inter prediction and/or inter coding process. In this case, the encoder may determine other encoding modes other than the intra mode among the encoding modes that the current block may have as encoding mode candidates for the current block. In this case, the encoder may determine a coding mode to be applied to the current block from among the coding mode candidates by performing an RDO process on the determined coding mode candidate (a coding mode other than an intra mode among coding modes that the current block may have). .

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

상술한 실시예들에 의하면, 인트라 모드에 대한 부호화 과정이 조기에 종결될 수 있다. 따라서, 불필요한 인트라 모드 관련 계산이 생략(skip)될 수 있으므로, 비디오 부호화기에서의 복잡도가 감소될 수 있다.
According to the above-described embodiments, the encoding process for the intra mode can be terminated early. Therefore, since unnecessary intra mode-related calculations can be skipped, 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 steps, and certain steps may occur in a different order or concurrently with other steps as described above. I can. In addition, those of ordinary skill in the art understand that the steps shown in the flowchart are not exclusive, other steps are included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention. You can understand.

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

Claims (18)

현재 블록에 대한 인트라 예측(intra prediction)이 생략되는지 여부를 결정하는 단계;
상기 인트라 예측이 생략되는지 여부에 따라 결정된 복수의 부호화 모드 후보에 대해 율-왜곡 최적화(Rate-Distortion Optimization: RDO) 과정을 수행함으로써, 상기 복수의 부호화 모드 후보 중에서 상기 현재 블록에 적용될 부호화 모드를 결정하는 단계; 및
상기 결정된 부호화 모드를 기반으로 상기 현재 블록에 대한 부호화를 수행하는 단계를 포함하되,
상기 부호화 모드를 결정하는 단계에서는,
상기 인트라 예측이 생략되는 것으로 결정된 경우, 상기 현재 블록이 가질 수 있는 부호화 모드 중에서 인트라 모드를 제외한 나머지 부호화 모드를 상기 복수의 부호화 모드 후보로 결정하고,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 교차 상관도(cross-correlation) 값을 도출하는 단계; 및
상기 교차 상관도 값이 소정의 임계 값보다 작은 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 교차 상관도 값은 상기 현재 블록 내의 픽셀들 및 동일 위치 블록(co-located block) 내의 픽셀들의 픽셀 값을 기반으로 도출되고, 상기 동일 위치 블록은 시간적으로 바로 이전에 부호화가 완료된 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록이고,
상기 교차 상관도 값은 상기 현재 블록 및 상기 동일 위치 블록의 평균 및 표준 편차를 이용하여 계산되는 것을 특징으로 하는 영상 부호화 방법.
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 the intra prediction is omitted, a coding mode to be applied to the current block is determined from among the plurality of coding mode candidates. The step of doing; And
Including the step of performing encoding on the current block based on the determined encoding mode,
In the step of determining the encoding mode,
When it is determined that the intra prediction is omitted, the remaining 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,
Determining whether the intra prediction is omitted,
Deriving a cross-correlation value for the current block; And
Further comprising determining that the intra prediction is omitted when the cross-correlation degree 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. It is a block that exists spatially at the same location as the current block,
The cross-correlation degree value is calculated using an average and a standard deviation of the current block and the co-located block.
제 1항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록의 좌측에 인접하여 위치한 좌측 주변 블록, 상기 현재 블록의 상단에 인접하여 위치한 상단 주변 블록, 상기 현재 블록의 우측 상단 코너에 가장 가까이 위치한 우측 상단 주변 블록 및 상기 현재 블록의 좌측 상단 코너에 가장 가까이 위치한 좌측 상단 주변 블록의 부호화 모드가 모두 인터 모드인 경우에 수행되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
Determining whether the intra prediction is omitted,
A left neighboring block located adjacent to the left side of the current block, an upper neighboring block located adjacent to the top of the current block, an upper right neighboring block located closest to the upper right corner of the current block, and an upper left corner of the current block. An image encoding method, characterized in that it is performed when all encoding modes of the nearest upper left neighboring block are inter mode.
제 1항에 있어서,
상기 인트라 예측이 생략되는지 여부를 결정하는 단계는,
상기 현재 블록에 대한 BAD(Boundary Absolute Difference) 값을 도출하는 단계; 및
상기 BAD 값이 소정의 임계 값보다 큰 경우 상기 인트라 예측이 생략되는 것으로 결정하는 단계를 더 포함하되,
상기 BAD 값은, 상기 현재 블록 내의 픽셀들 및 상기 현재 블록 주변에 위치한 픽셀들 중에서 상기 현재 블록의 상단 경계 및 좌측 경계에 인접하여 위치한 픽셀들의 픽셀 값을 기반으로 도출되는 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
Determining whether the intra prediction is omitted,
Deriving a Boundary Absolute Difference (BAD) value for the current block; And
Further comprising determining that the intra prediction is omitted when the BAD value is greater than a predetermined threshold value,
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,
The predetermined threshold value is a value determined experimentally and stored in an encoder in advance.
제 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 the intra prediction is omitted,
Deriving a Sum of Norm Motion Vector (SNMV) value for the current block; And
Further comprising the step of determining that the intra prediction is omitted when the SNMV value is less than a predetermined threshold value,
The SNMV value is derived by adding norm values of motion vectors of a plurality of neighboring blocks located around the current block.
제 6항에 있어서,
상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값인 것을 특징으로 하는 영상 부호화 방법.
The method of claim 6,
The predetermined threshold value is a value determined experimentally and stored in an encoder in advance.
제 6항에 있어서,
상기 소정의 임계 값은 상기 현재 블록의 주변에 위치한 복수의 주변 블록의 SNMV 값들의 평균 값으로 결정되는 것을 특징으로 하는 영상 부호화 방법.
The method of 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.
삭제delete 제 1항에 있어서,
상기 소정의 임계 값은 실험적으로 결정되어 미리 부호화기에 저장된 값인 것을 특징으로 하는 영상 부호화 방법.
The method of claim 1,
The predetermined threshold value is a value determined experimentally and stored in an encoder in advance.
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete
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
KR20120006167 2012-01-19
KR1020120006167 2012-01-19

Publications (2)

Publication Number Publication Date
KR20130085376A KR20130085376A (en) 2013-07-29
KR102183366B1 true 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
KR20130085376A (en) 2013-07-29

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
KR102358871B1 (en) Method for intra prediction and apparatus thereof
US11706449B2 (en) Method and device for intra-prediction
KR102183366B1 (en) Method for determining coding mode and apparatus thereof
KR102380722B1 (en) Method for inter prediction and apparatus thereof
KR102173576B1 (en) Method for inter prediction and apparatus thereof
KR20170126817A (en) Fast video encoding method and apparatus for the same

Legal Events

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