KR102639255B1 - Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same - Google Patents

Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same Download PDF

Info

Publication number
KR102639255B1
KR102639255B1 KR1020230039829A KR20230039829A KR102639255B1 KR 102639255 B1 KR102639255 B1 KR 102639255B1 KR 1020230039829 A KR1020230039829 A KR 1020230039829A KR 20230039829 A KR20230039829 A KR 20230039829A KR 102639255 B1 KR102639255 B1 KR 102639255B1
Authority
KR
South Korea
Prior art keywords
prediction mode
intra
prediction
candidate
neighboring
Prior art date
Application number
KR1020230039829A
Other languages
Korean (ko)
Other versions
KR20230044388A (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
Priority claimed from KR1020200161561A external-priority patent/KR102297268B1/en
Application filed by 돌비 레버러토리즈 라이쎈싱 코오포레이션 filed Critical 돌비 레버러토리즈 라이쎈싱 코오포레이션
Priority to KR1020230039829A priority Critical patent/KR102639255B1/en
Publication of KR20230044388A publication Critical patent/KR20230044388A/en
Priority to KR1020240022815A priority patent/KR20240025580A/en
Application granted granted Critical
Publication of KR102639255B1 publication Critical patent/KR102639255B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Abstract

두개의 후보 화면 내 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치가 개시되어있다. 화면 내 예측 모드 복호화 방법은 비트 정보를 기초로 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지 여부를 판단하는 단계와 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드 중 적어도 하나와 동일한 경우, 추가의 비트 정보를 기초로 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드와 상기 제2 후보 화면 내 예측 모드 중 어떠한 후보 화면 내 예측 모드와 동일한지 여부를 판단하여 현재 예측 단위의 화면 내 예측 모드를 복호화하는 단계를 포함할 수 있다. 따라서, 부/복호화 효율을 높이고 복잡도를 감소시킬 수 있다.A method of encoding/decoding an intra-prediction mode using two candidate intra-prediction modes and a device using the method are disclosed. The intra-prediction mode decoding method includes determining whether the intra-prediction mode of the current prediction unit is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode based on bit information and the screen of the current prediction unit. If the intra-prediction mode is the same as at least one of the first candidate intra-prediction mode and the second candidate intra-prediction mode, the intra-prediction mode of the current prediction unit is the first candidate intra-prediction based on the additional bit information. It may include decoding the intra-prediction mode of the current prediction unit by determining whether it is the same as any candidate intra-prediction mode among the mode and the second candidate intra-prediction mode. Therefore, encoding/decoding efficiency can be increased and complexity can be reduced.

Description

두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치{METHODS OF CODING INTRA PREDICTION MODE USING TWO CANDIDATE INTRA PREDICTION MODES AND APPARATUSES USING THE SAME}Method for encoding/decoding an intra-prediction mode using two candidate intra-prediction modes and a device using the method {METHODS OF CODING INTRA PREDICTION MODE USING TWO CANDIDATE INTRA PREDICTION MODES AND APPARATUSES USING THE SAME}

본 발명은 두개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치에 관한 것으로 더욱 상세하게는 부/복호화 방법 및 장치에 관한 것이다. The present invention relates to a method of encoding/decoding an intra-prediction mode using two candidate intra-prediction modes and a device using the method, and more specifically, to a method and device of encoding/decoding.

최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing in various application fields. As video data becomes higher resolution and higher quality, the amount of data increases relative to existing video data. Therefore, when video data is transmitted using media such as existing wired or wireless broadband lines or stored using existing storage media, transmission costs and Storage costs increase. High-efficiency video compression technologies can be used to solve these problems that arise as video data becomes higher resolution and higher quality.

영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로 부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.Inter-screen prediction technology that predicts the pixel value included in the current picture from pictures before or after the current picture using video compression technology, and intra-screen prediction technology that predicts the pixel value included in the current picture using pixel information in the current picture. There are various technologies, such as entropy coding technology, which assigns short codes to values with a high frequency of occurrence and long codes to values with a low frequency of occurrence. Using these video compression technologies, video data can be effectively compressed and transmitted or stored.

본 발명의 제1 목적은 영상 부호화 효율을 증가시키기 위해 고정된 개수의 후보 화면 내 예측 모드를 기초로 화면 내 예측을 수행하는 영상 복호화 방법을 제공하는 것이다.The first object of the present invention is to provide an image decoding method that performs intra-prediction based on a fixed number of candidate intra-prediction modes to increase image coding efficiency.

또한, 본 발명의 제2 목적은 영상 부호화 효율을 증가시키기 위해 고정된 개수의 후보 화면 내 예측 모드를 기초로 화면 내 예측을 수행하는 영상 복호화 방법을 수행하는 장치를 제공하는 것이다.Additionally, a second object of the present invention is to provide an apparatus for performing an image decoding method that performs intra-prediction based on a fixed number of candidate intra-prediction modes to increase image coding efficiency.

상술한 본 발명의 제1 목적을 달성하기 위한 본 발명의 일 측면에 따른 화면 내 예측 모드 복호화 방법은 n 비트 정보를 기초로 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지 여부를 판단하는 단계와 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 적어도 하나와 동일한 경우, 추가의 m 비트 정보를 기초로 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드와 상기 제2 후보 화면 내 예측 모드 중 어떠한 후보 화면 내 예측 모드와 동일한지 여부를 판단하여 상기 현재 예측 단위의 화면 내 예측 모드를 복호화하는 단계를 포함할 수 있다. 상기 화면 내 예측 모드 복호화 방법은, 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 적어도 하나와 동일하지 않은 경우, 나머지 화면 내 예측 모드 정보를 표현하는 추가의 비트를 기초로 상기 현재 예측 단위의 화면 내 예측 모드를 복호화하는 단계를 더 포함할 수 있다. 화면 내 예측 모드 복호화 방법은, 상기 나머지 화면 내 예측 모드 정보는 상기 현재 예측 단위의 화면 내 예측 모드값이 상기 제1 후보 화면 내 예측 모드값 및 상기 제2 후보 화면 내 예측 모드값 중 적어도 하나의 후보 화면 내 예측 모드값 보다 크다면, 상기 현재 예측 단위의 화면 내 예측 모드값에 매핑되는 코드 워드를 변경하는 단계를 더 포함할 수 있다. In order to achieve the first object of the present invention described above, the intra prediction mode decoding method according to an aspect of the present invention is based on n-bit information, and the intra prediction mode of the current prediction unit is changed to the first candidate intra prediction mode or the second candidate intra prediction mode. 2 determining whether the intra-prediction mode is the same as the candidate intra-prediction mode; and if the intra-prediction mode of the current prediction unit is the same as at least one of the first candidate intra-prediction mode or the second candidate intra-prediction mode, additional Based on the m bit information of the current prediction unit, it is determined whether the intra-prediction mode of the current prediction unit is the same as any candidate intra-prediction mode among the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode. It may include decoding the intra-screen prediction mode of the prediction unit. The method for decoding the intra-prediction mode is, when the intra-prediction mode of the current prediction unit is not identical to at least one of the first candidate intra-prediction mode or the second candidate intra-prediction mode, the remaining intra-prediction mode The method may further include decoding the intra-prediction mode of the current prediction unit based on additional bits representing information. The intra-prediction mode decoding method includes the remaining intra-prediction mode information such that the intra-prediction mode value of the current prediction unit is at least one of the first candidate intra-prediction mode value and the second candidate intra-prediction mode value. If it is greater than the candidate intra-prediction mode value, the step of changing the code word mapped to the intra-prediction mode value of the current prediction unit may be further included.

상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면내 예측 모드는, 상기 현재 예측 단위의 주변 예측 단위로부터 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드 중 적어도 하나의 후보 화면 내 예측 모드가 산출되지 않는 경우, 상기 현재 예측 단위의 주변 예측 단위로부터 산출되지 않는 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드 중 적어도 하나의 후보 화면 내 예측 모드에 플레이너 모드(Planar Mode) 및 DC 모드가 순차적으로 설정되어 상기 제1 후보 화면 내 예측 모드와 상기 제2 후보 화면 내 예측 모드가 서로 다른 화면 내 예측 모드값을 가질 수 있다. 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드는 상기 현재 예측 단위의 제1 주변 예측 단위 및 제2 주변 예측 단위가 가용한 주변 예측 단위이지만 상기 가용한 주변 예측 단위의 화면 내 예측 모드값이 동일한 경우 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고, 상기 제1 주변 예측 단위 및 상기 제2 주변 예측 단위 중 하나의 주변 예측 단위만이 가용한 주변 예측 단위인 경우 상기 가용한 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고, 상기 제1 후보 화면 내 예측 모드가 플레이너 모드가 아니면 상기 제2 후보 화면 내 예측 모드가 플레이너 모드로 설정되고 상기 제1 후보 화면 내 예측 모드가 플레이너 모드이면 상기 제2 후보 화면 내 예측 모드가 DC 모드로 설정될 수 있다. 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면내 예측 모드는 상기 현재 예측 단위의 제1 주변 예측 단위 및 제2 주변 예측 단위가 모두 가용하지 않은 경우, 상기 제1 후보 화면 내 예측 모드가 플레이너 모드로 설정되고 상기 제2 후보 화면 내 예측 모드가 DC 모드로 설정될 수 있다. 상기 화면 내 예측 모드 복호화 방법은 상기 현재 예측 단위에서 사용되는 화면 내 예측 모드의 개수가 소정의 개수 이하인 경우, 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 판단하지 않고 상기 화면 내 예측 모드에 직접적으로 매핑된 코드워드를 기초로 상기 현재 예측 단위의 화면 내 예측 모드 정보를 산출하는 단계를 더 포함할 수 있다. 상기 n 비트 정보를 기초로 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지 여부를 판단하는 단계는, 상기 제1 후보 화면 내 예측 모드값 및 상기 제2 후보 화면 내 예측 모드값 중 적어도 하나의 후보 화면 내 예측 모드값이 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가질 경우, 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가지는 적어도 하나의 후보 화면 내 예측 모드값을 소정의 매핑 테이블을 이용하여 상기 현재 화면 내 예측 단위에서 가용한 화면 내 예측 모드값으로 매핑시키는 단계를 포함할 수 있다. 상기 소정의 매핑 테이블은 매핑시 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가지는 적어도 하나의 후보 화면 내 예측 모드값이 플레이너 모드에 매핑되는 비중이 가장 크도록 설정된 매핑 테이블일 수 있다. 상기 소정의 매핑 테이블은 매핑시 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가지는 적어도 하나의 후보 화면 내 예측 모드값이 DC 모드에 매핑되는 비중이 가장 크도록 설정된 매핑 테이블일 수 있다. 상기 n 및 상기 m은 1인 것을 특징으로 할 수 있다. The first candidate intra-prediction mode or the second candidate intra-prediction mode is, at least one candidate of the first candidate intra-prediction mode and the second candidate intra-prediction mode from neighboring prediction units of the current prediction unit. If the intra-prediction mode is not calculated, the planer is used in at least one of the first candidate intra-prediction mode and the second candidate intra-prediction mode that is not calculated from neighboring prediction units of the current prediction unit. Planar mode and DC mode are set sequentially, so that the first candidate intra-prediction mode and the second candidate intra-picture prediction mode may have different intra-prediction mode values. The first candidate intra-picture prediction mode or the second candidate intra-picture prediction mode means that the first neighboring prediction unit and the second neighboring prediction unit of the current prediction unit are available neighboring prediction units, but are within the picture of the available neighboring prediction unit. If the prediction mode values are the same, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is set as the first candidate intra-prediction mode, and the first neighboring prediction unit and the second neighboring prediction unit are set to the first candidate intra-prediction mode. 2 If only one of the neighboring prediction units is an available neighboring prediction unit, the intra-prediction mode value of the available neighboring prediction unit is set to the first candidate intra-prediction mode, and the first candidate intra-prediction is performed If the mode is not the planar mode, the second candidate intra-screen prediction mode may be set to the planar mode, and if the first candidate intra-screen prediction mode is the planar mode, the second candidate intra-screen prediction mode may be set to the DC mode. there is. The first candidate intra-prediction mode or the second candidate intra-prediction mode may be performed when both the first neighboring prediction unit and the second neighboring prediction unit of the current prediction unit are not available. Planar mode may be set, and the prediction mode within the second candidate screen may be set to DC mode. The intra prediction mode decoding method does not determine the first candidate intra prediction mode and the second candidate intra prediction mode when the number of intra prediction modes used in the current prediction unit is less than a predetermined number. The method may further include calculating intra-prediction mode information of the current prediction unit based on a codeword directly mapped to the intra-prediction mode. The step of determining whether the intra-prediction mode of the current prediction unit is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode based on the n-bit information includes the first candidate intra-prediction mode value. and when at least one candidate intra-prediction mode value among the second candidate intra-prediction mode values has a value greater than the number of intra-prediction modes available in the current prediction unit, intra-prediction available in the current prediction unit. It may include mapping at least one candidate intra-prediction mode value having a value greater than the number of modes to an available intra-prediction mode value in the current intra-prediction unit using a predetermined mapping table. The predetermined mapping table is a mapping table set so that at least one candidate intra-picture prediction mode value with a value greater than the number of intra-picture prediction modes available in the current prediction unit has the largest mapping proportion to the planar mode during mapping. You can. The predetermined mapping table may be a mapping table set so that at least one candidate intra-picture prediction mode value with a value greater than the number of intra-picture prediction modes available in the current prediction unit has the largest mapping proportion to the DC mode during mapping. there is. The n and the m may be 1.

상술한 본 발명의 제2 목적을 달성하기 위한 본 발명의 다른 측면에 따른 복호화기는 소정의 비트스트림에 포함된 n 비트 정보를 기초로 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지 여부에 관한 정보를 복호화하고 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 적어도 하나와 동일한 경우, 추가의 m 비트 정보를 기초로 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드와 상기 제2 후보 화면 내 예측 모드 중 어떠한 후보 화면 내 예측 모드와 동일한지 여부에 관련된 정보를 복호화하고 상기 현재 예측 단위의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 적어도 하나와 동일하지 않은 경우, 나머지 화면 내 예측 모드 정보를 표현하는 추가의 비트를 기초로 현재 예측 단위의 화면 내 예측 모드를 복호화하는 엔트로피 복호화부와 상기 엔트로피 복호화부로터 복호화된 상기 현재 예측 단위의 화면 내 예측 모드를 기초로 화면 내 예측을 수행하는 예측부를 포함할 수 있다. 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면내 예측 모드는 상기 현재 예측 단위의 주변 예측 단위로부터 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드 중 적어도 하나의 후보 화면 내 예측 모드가 산출되지 않는 경우, 상기 현재 예측 단위의 주변 예측 단위로부터 산출되지 않는 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드 중 적어도 하나의 후보 화면 내 예측 모드에 플레이너 모드(Planar Mode) 및 DC 모드가 순차적으로 설정되어 상기 제1 후보 화면 내 예측 모드와 상기 제2 후보 화면 내 예측 모드가 서로 다른 화면 내 예측 모드값을 가질 수 있다. 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드는 상기 현재 예측 단위의 제1 주변 예측 단위 및 제2 주변 예측 단위가 가용한 주변 예측 단위이지만 상기 가용한 주변 예측 단위의 화면 내 예측 모드값이 동일한 경우 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고, 상기 제1 주변 예측 단위 및 상기 제2 주변 예측 단위 중 하나의 주변 예측 단위만이 가용한 주변 예측 단위인 경우 상기 가용한 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고, 상기 제1 후보 화면 내 예측 모드가 플레이너 모드가 아니면 상기 제2 후보 화면 내 예측 모드가 플레이너 모드로 설정되고 상기 제1 후보 화면 내 예측 모드가 플레이너 모드이면 상기 제2 후보 화면 내 예측 모드가 DC 모드로 설정될 수 있다. 상기 예측부는 상기 제1 후보 화면 내 예측 모드값 및 상기 제2 후보 화면 내 예측 모드값 중 적어도 하나의 후보 화면 내 예측 모드값이 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가질 경우, 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가지는 적어도 하나의 후보 화면 내 예측 모드값을 소정의 매핑 테이블을 이용하여 상기 현재 화면 내 예측 단위에서 가용한 화면 내 예측 모드값으로 매핑시켜 상기 현재 예측 단위에 대한 화면 내 예측을 수행할 수 있다. 상기 소정의 매핑 테이블은 매핑시 상기 현재 예측 단위에서 가용한 화면 내 예측 모드 개수보다 큰 값을 가지는 적어도 하나의 후보 화면 내 예측 모드값이 플레이너 모드에 매핑되는 비중이 가장 크도록 설정될 수 있다. 상기 n 및 상기 m은, 1인 것을 특징으로 할 수 있다. In order to achieve the second object of the present invention described above, a decoder according to another aspect of the present invention sets the intra-prediction mode of the current prediction unit to the first candidate intra-prediction mode based on n-bit information included in a predetermined bitstream. or decode information regarding whether the intra-prediction mode of the current prediction unit is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode. In this case, whether the intra-prediction mode of the current prediction unit is the same as any candidate intra-prediction mode among the first candidate intra-prediction mode and the second candidate intra-prediction mode based on the additional m bit information Decode information and, if the intra-prediction mode of the current prediction unit is not the same as at least one of the first candidate intra-prediction mode or the second candidate intra-prediction mode, add to represent remaining intra-prediction mode information It may include an entropy decoding unit that decodes the intra-prediction mode of the current prediction unit based on the bits of and a prediction unit that performs intra-prediction based on the intra-prediction mode of the current prediction unit decoded from the entropy decoding unit. there is. The first candidate intra-prediction mode or the second candidate intra-prediction mode is at least one of the first candidate intra-prediction mode and the second candidate intra-picture prediction mode from neighboring prediction units of the current prediction unit. If the intra-prediction mode is not calculated, the planar mode is selected for at least one of the first candidate intra-prediction mode and the second candidate intra-prediction mode that is not calculated from neighboring prediction units of the current prediction unit. (Planar Mode) and DC mode are set sequentially, so that the first candidate intra-prediction mode and the second candidate intra-picture prediction mode may have different intra-prediction mode values. The first candidate intra-picture prediction mode or the second candidate intra-picture prediction mode means that the first neighboring prediction unit and the second neighboring prediction unit of the current prediction unit are available neighboring prediction units, but are within the picture of the available neighboring prediction unit. If the prediction mode values are the same, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is set as the first candidate intra-prediction mode, and the first neighboring prediction unit and the second neighboring prediction unit are set to the first candidate intra-prediction mode. 2 If only one of the neighboring prediction units is an available neighboring prediction unit, the intra-prediction mode value of the available neighboring prediction unit is set to the first candidate intra-prediction mode, and the first candidate intra-prediction is performed If the mode is not the planar mode, the second candidate intra-screen prediction mode may be set to the planar mode, and if the first candidate intra-screen prediction mode is the planar mode, the second candidate intra-screen prediction mode may be set to the DC mode. there is. The prediction unit may have a candidate intra-prediction mode value of at least one of the first candidate intra-prediction mode value and the second candidate intra-prediction mode value greater than the number of intra-prediction modes available in the current prediction unit. In this case, at least one candidate intra-prediction mode value having a value greater than the number of intra-prediction modes available in the current intra-prediction unit is converted to the intra-prediction mode value available in the current intra-prediction unit using a predetermined mapping table. By mapping to , intra-screen prediction for the current prediction unit can be performed. The predetermined mapping table may be set so that at least one candidate intra-picture prediction mode value with a value greater than the number of intra-picture prediction modes available in the current prediction unit is mapped to the planar mode at the time of mapping. . The n and the m may be 1.

상술한 바와 같이 본 발명의 실시예에 따른 두개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치에 따르면, 짧은 코드 워드를 이용하여 현재 예측 단위의 화면 내 예측 모드를 표현할 수 있고 현재 예측 단위의 화면 내 예측 모드를 고정된 개수의 후보 화면 내 예측 모드를 사용하여 표현함으로써 부호화 효율을 높이고 복잡도를 감소시킬 수 있다.As described above, according to the encoding/decoding method of the intra prediction mode using two candidate intra prediction modes according to an embodiment of the present invention and the device using this method, the intra prediction mode of the current prediction unit is encoded using a short code word. The prediction mode can be expressed, and the intra-picture prediction mode of the current prediction unit can be expressed using a fixed number of candidate intra-picture prediction modes, thereby increasing coding efficiency and reducing complexity.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명의 다른 실시예에 따른 영상 복호화기를 나타낸 블록도이다.
도 3는 본 발명의 또 다른 실시예에 따른 현재 예측 단위의 화면 내 예측 모드를 부호화하는 방법을 나타낸 개념도이다.
도 4는 본 발명의 또 다른 실시예에 따른 주변 예측 단위의 가용성을 판단하는 방법을 나타낸 개념도이다.
도 5는 본 발명의 또 다른 실시예에 따른 현재 예측 단위를 기초로 주변 예측 단위의 화면 내 예측 모드를 변경시키는 방법을 나타낸 순서도이다.
도 6은 본 발명의 또 다른 실시예에 따른 제1 후보 화면 예측 모드 및 제2 후보 화면 예측 모드를 생성하는 방법을 나타낸 순서도이다.
도 7은 본 발명의 또 다른 실시예에 따른 현재 예측 모드의 정보를 코드 워드로 매핑하는 방법을 나타낸 순서도이다.
도 8은 본 발명의 또 다른 실시예에 따른 현재 화면 내 예측 모드를 복호화하는 방법을 나타낸 순서도이다.
Figure 1 is a block diagram showing a video encoding device according to an embodiment of the present invention.
Figure 2 is a block diagram showing an image decoder according to another embodiment of the present invention.
Figure 3 is a conceptual diagram showing a method of encoding the intra-prediction mode of the current prediction unit according to another embodiment of the present invention.
Figure 4 is a conceptual diagram showing a method for determining the availability of a neighboring prediction unit according to another embodiment of the present invention.
Figure 5 is a flowchart showing a method of changing the intra-prediction mode of a neighboring prediction unit based on the current prediction unit according to another embodiment of the present invention.
Figure 6 is a flowchart showing a method for generating a first candidate screen prediction mode and a second candidate screen prediction mode according to another embodiment of the present invention.
Figure 7 is a flowchart showing a method of mapping information on the current prediction mode to a code word according to another embodiment of the present invention.
Figure 8 is a flowchart showing a method of decoding the current intra-picture prediction mode according to another embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all changes, equivalents, and substitutes included in the spirit and technical scope of the present invention. While describing each drawing, similar reference numerals are used for similar components.

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

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

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

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

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. Figure 1 is a block diagram showing a video encoding device according to an embodiment of the present invention.

도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(105), 예측부(110), 변환부(115), 양자화부(120), 재정렬부(125), 엔트로피 부호화부(130), 역양자화부(135), 역변환부(140), 필터부(145) 및 메모리(150)를 포함할 수 있다.Referring to FIG. 1, the image encoding device 100 includes a picture segmentation unit 105, a prediction unit 110, a transformation unit 115, a quantization unit 120, a rearrangement unit 125, and an entropy encoding unit 130. , may include an inverse quantization unit 135, an inverse transform unit 140, a filter unit 145, and a memory 150.

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

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

픽쳐 분할부(105)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(105)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다. The picture division unit 105 may divide the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU). The picture division unit 105 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined standard (e.g., cost function). You can encode the picture by selecting .

예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, one picture may be divided into a plurality of coding units. In order to split coding units in a picture, a recursive tree structure such as the Quad Tree Structure can be used. Coding units that are split into other coding units with one image or maximum size coding unit as the root are called split coding units. It can be divided into as many child nodes as there are units. A coding unit that is no longer divided according to certain restrictions becomes a leaf node. That is, assuming that only square division is possible for one coding unit, one coding unit can be divided into up to four different coding units.

이하, 본 발명의 실시예에서는 부호화 단위의 의미를 부호화를 하는 단위라는 의미뿐만 아니라 복호화를 하는 단위의 의미로 사용할 수 있다.Hereinafter, in the embodiments of the present invention, the meaning of the coding unit can be used not only as a unit for encoding but also as a unit for decoding.

예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할되거나 하나의 부호화 단위 내에서 분할된 예측 단위 중 하나의 예측 단위의 형태가 다른 예측 단위의 형태와 다른 형태를 가지고 분할될 수 있다.The prediction unit is divided into at least one square or rectangle of the same size within one coding unit, or the shape of one prediction unit among the prediction units divided within one coding unit is different from the shape of another prediction unit. It can be divided into shapes.

부호화 단위를 기초로 화면 내 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위(NxN)으로 분할하지 않고 화면 내 예측을 수행할 수 있다.If the prediction unit for performing intra-prediction based on the coding unit is not the minimum coding unit when generated, intra-prediction can be performed without dividing the unit into a plurality of prediction units (NxN).

예측부(110)는 화면 간 예측을 수행하는 화면 간 예측부와 화면 내 예측을 수행하는 화면 내 예측부를 포함할 수 있다. 예측 단위에 대해 화면 간 예측을 사용할 것인지 또는 화면 내 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 화면 내 예측 모드, 움직임 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(115)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 움직임 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(130)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(110)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다The prediction unit 110 may include an inter-screen prediction unit that performs inter-screen prediction and an intra-screen prediction unit that performs intra-screen prediction. It is possible to determine whether to use inter-screen prediction or intra-screen prediction for a prediction unit, and determine specific information (eg, intra-prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode are determined in prediction units, and prediction may be performed in transformation units. The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit 115. Additionally, prediction mode information, motion vector information, etc. used for prediction may be encoded in the entropy encoder 130 together with the residual value and transmitted to the decoder. When using a specific encoding mode, it is possible to encode the original block as is and transmit it to the decoder without generating a prediction block through the prediction unit 110.

화면 간 예측부는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수 있다. 화면 간 예측부는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부가 포함할 수 있다. The inter-screen prediction unit may predict a prediction unit based on information on at least one picture among the pictures before or after the current picture. The inter-screen prediction unit may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

참조 픽쳐 보간부에서는 메모리(150)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolation unit may receive reference picture information from the memory 150 and generate pixel information of an integer number of pixels or less from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/4 pixel units. In the case of color difference signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/8 pixel units.

움직임 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 움직임 예측을 수행할 수 있다. 움직임 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 움직임 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 움직임 벡터값을 가질 수 있다. 움직임 예측부에서는 움직임 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 움직임 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction)방법 등 다양한 방법이 사용될 수 있다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. Various methods, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm), can be used to calculate the motion vector. The motion vector may have a motion vector value in 1/2 or 1/4 pixel units based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using a different motion prediction method. As a motion prediction method, various methods such as the skip method, the merge method, and the AMVP (Advanced Motion Vector Prediction) method can be used.

화면 내 예측부는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 화면 간 예측을 수행한 블록이어서, 참조 픽셀이 화면 간 예측을 수행한 픽셀일 경우, 화면 간 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 화면 내 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra-screen prediction unit may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. If the surrounding block of the current prediction unit is a block that performed inter-screen prediction, and the reference pixel is a pixel that performed inter-screen prediction, the reference pixel included in the block that performed inter-screen prediction is used to perform intra-screen prediction in the surrounding area. It can be used instead of the reference pixel information of the block. That is, when a reference pixel is not available, the unavailable reference pixel information can be replaced with at least one reference pixel among available reference pixels.

화면 내 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보을 사용하지 않는 비 방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측한 화면 내 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra-screen prediction, the prediction mode can include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information may be different, and to predict chrominance information, intra-screen prediction mode information or predicted luminance signal information that predicts luminance information may be used.

화면 내 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 화면 내 예측을 수행하지만, 화면 내 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 화면 내 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 화면 내 예측을 사용할 수 있다.When performing intra-screen prediction, if the size of the prediction unit and the size of the conversion unit are the same, the within-screen prediction unit for the prediction unit is based on the pixel on the left, the pixel on the upper left, and the pixel on the top. Prediction is performed, but when performing intra-screen prediction, if the size of the prediction unit and the size of the transformation unit are different, intra-screen prediction can be performed using a reference pixel based on the transformation unit. Additionally, intra-picture prediction using NxN partitioning can be used only for the smallest coding unit.

화면 내 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 화면 내 예측 방법을 수행하기 위해 현재 예측 단위의 화면 내 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 화면 내 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 화면 내 예측 모드가 동일할 경우, 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약, 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이할 경우, 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다. The intra-screen prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to the reference pixel depending on the prediction mode. The type of AIS filter applied to the reference pixel may be different. To perform the intra-prediction method, the intra-prediction mode of the current prediction unit can be predicted from the intra-prediction mode of prediction units existing around the current prediction unit. When predicting the prediction mode of the current prediction unit using the mode information predicted from the surrounding prediction unit, if the on-screen prediction mode of the current prediction unit and the surrounding prediction unit are the same, the current prediction unit and the prediction mode are predicted using predetermined flag information. Information that the prediction modes of neighboring prediction units are the same can be transmitted, and if the prediction modes of the current prediction unit and neighboring prediction units are different, entropy encoding can be performed to encode prediction mode information of the current block.

예측부에서는 이하 도 3 내지 8에서의 본 발명의 실시예에서 설명하는 화면 내 부호화 모드 부호화 방법을 기초로 소정의 이진 부호를 사용하여 현재 예측 단위의 화면 내 예측 모드 정보를 표현할 수 있다. The prediction unit may express the intra-prediction mode information of the current prediction unit using a predetermined binary code based on the intra-picture mode encoding method described in the embodiments of the present invention in FIGS. 3 to 8 below.

또한, 예측부(110)에서 생성된 예측 단위을 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(115)로 입력될 수 있다. 변환부(115)에서는 원본 블록과 예측부(110)를 통해 생성된 예측 단위의 잔차값(residual) 정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform) 또는 DST(Discrete Sine Transform)와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지 DST를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 화면 내 예측 모드 정보를 기초로 결정할 수 있다. Additionally, a residual block may be generated that includes residual information that is the difference between the prediction unit on which prediction was performed based on the prediction unit generated by the prediction unit 110 and the original block of the prediction unit. The generated residual block may be input to the conversion unit 115. The transform unit 115 uses a transform method such as DCT (Discrete Cosine Transform) or DST (Discrete Sine Transform) to transform the residual block containing the original block and the residual value information of the prediction unit generated through the prediction unit 110. It can be converted using . Whether to apply DCT or DST to transform the residual block can be determined based on intra-screen prediction mode information of the prediction unit used to generate the residual block.

양자화부(120)는 변환부(115)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(120)에서 산출된 값은 역양자화부(135)와 재정렬부(125)에 제공될 수 있다. The quantization unit 120 may quantize the values converted to the frequency domain by the conversion unit 115. The quantization coefficient may change depending on the block or the importance of the image. The value calculated by the quantization unit 120 may be provided to the inverse quantization unit 135 and the realignment unit 125.

재정렬부(125)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit 125 may rearrange coefficient values for the quantized residual values.

재정렬부(125)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(125)에서는 지그재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 화면 내 예측 모드에 따라 지그 재그 스캔 방법이 아닌 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔 방법, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔 방법이 사용될 수 있다. 즉, 변환 단위의 크기 및 화면 내 예측 모드에 따라 지그재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The rearrangement unit 125 can change the coefficients in a two-dimensional block form into a one-dimensional vector form through a coefficient scanning method. For example, the realignment unit 125 can scan from DC coefficients to coefficients in the high frequency region using a zig-zag scan method and change it into a one-dimensional vector form. Depending on the size of the transformation unit and the intra-screen prediction mode, a vertical scan method that scans the two-dimensional block-type coefficients in the column direction and a horizontal scan method that scans the two-dimensional block-type coefficients in the row direction are used rather than the zigzag scan method. You can. That is, depending on the size of the conversion unit and the intra-screen prediction mode, it can be determined which scan method among zigzag scan, vertical scan, and horizontal scan will be used.

엔트로피 부호화부(130)는 재정렬부(125)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The entropy encoding unit 130 may perform entropy encoding based on the values calculated by the reordering unit 125. Entropy coding can use various coding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).

엔트로피 부호화부(130)는 재정렬부(125) 및 예측부(110)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 움직임 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoding unit 130 receives the residual value coefficient information and block type information of the coding unit, prediction mode information, division unit information, prediction unit information and transmission unit information, and motion vector information from the reordering unit 125 and the prediction unit 110. , various information such as reference frame information, block interpolation information, and filtering information can be encoded.

엔트로피 부호화부(130)에서는 재정렬부(125)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다. The entropy encoding unit 130 may entropy encode the coefficient value of the coding unit input from the reordering unit 125.

엔트로피 부호화부(130)에서는 가변 길이 부호화 테이블(Variable Length Coding Table)과 같은 엔트로피 부호화를 수행하기 위한 테이블이 저장될 수 있고 저장된 가변 길이 부호화 테이블을 사용하여 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화를 수행함에 있어서 테이블에 포함된 일부의 코드 워드(Codeword)에 카운터(Counter)를 이용한 방법 또는 직접 변환(Direct Swapping)방법을 사용하여 해당 정보의 코드 번호에 대한 코드 워드 할당을 변화시킬 수 있다. 예를 들어, 코드 번호와 코드 워드를 매핑하는 테이블에서 적은 비트수의 코드 워드가 할당된 상위 몇 개의 코드 번호의 경우, 카운터를 사용해 코드 번호의 합산된 발생 횟수가 가장 많은 코드 번호에 짧은 길이의 코드 워드를 할당할 수 있도록 적응적으로 코드 워드와 코드 번호를 매핑하는 테이블의 매핑 순서를 바꿀 수 있다. 카운터에서 카운팅된 횟수가 소정의 임계값에 이른 경우, 카운터에 기록된 카운팅 횟수를 반으로 나누어 다시 카운팅을 수행할 수 있다. In the entropy coding unit 130, a table for performing entropy coding, such as a variable length coding table, can be stored, and entropy coding can be performed using the stored variable length coding table. When performing entropy encoding, the code word allocation for the code number of the information can be changed by using a counter or direct swapping method for some of the code words included in the table. there is. For example, in the table mapping code numbers and code words, in the case of the top few code numbers to which code words with a small number of bits are assigned, a counter is used to assign a short length to the code number with the largest number of combined occurrences of the code number. The mapping order of the table that maps code words and code numbers can be changed adaptively so that code words can be assigned. If the number of times counted in the counter reaches a predetermined threshold, the counting number recorded in the counter can be divided in half and counting can be performed again.

카운팅을 수행하지 않는 테이블 내의 코드 번호는 직접 변환(Direct Swapping) 방법을 사용하여 코드 번호에 해당하는 정보가 발생할 경우, 바로 위의 코드 번호와 자리를 변환하는 방법을 통해 해당 코드 번호에 할당되는 비트 수를 적게하여 엔트로피 부호화를 수행할 수 있다. The code number in the table that does not perform counting uses the direct swapping method. When information corresponding to the code number is generated, the bit assigned to the code number is converted to the code number immediately above. Entropy encoding can be performed by reducing the number.

엔트로피 부호화부에서는 이하 도 3 내지 8에서의 본 발명의 실시예에서 설명하는 화면 내 부호화 모드 부호화 방법을 기초로 소정의 이진 부호를 사용하여 현재 예측 단위의 화면 내 예측 모드 정보를 표현할 수 있다. The entropy encoding unit can express the intra-prediction mode information of the current prediction unit using a predetermined binary code based on the intra-picture mode encoding method described in the embodiments of the present invention in FIGS. 3 to 8 below.

역양자화부(135) 및 역변환부(140)에서는 양자화부(120)에서 양자화된 값들을 역양자화하고 변환부(115)에서 변환된 값들을 역변환한다. 역양자화부(135) 및 역변환부(140)에서 생성된 잔차값(Residual)은 예측부(110)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. The inverse quantization unit 135 and the inverse transformation unit 140 inversely quantize the values quantized in the quantization unit 120 and inversely transform the values transformed in the transformation unit 115. The residual value generated in the inverse quantization unit 135 and the inverse transform unit 140 is combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit 110 to form a restored block ( Reconstructed Block) can be created.

필터부(145)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다. The filter unit 145 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).

디블록킹 필터(145)는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링을 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter 145 can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, it is possible to determine whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Additionally, when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when vertical filtering and horizontal filtering are performed.

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct the offset of the deblocked image from the original image in pixel units. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a certain number of areas, then the area to perform offset is determined and the offset is applied to that area, or the offset is performed by considering the edge information of each pixel. You can use the method of applying .

ALF (Adaptive Loop Filter)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF의 크기 및 계수는 달라질 수 있다. ALF는 다양한 형태를 가질 수 있으며, 필터에 그에 따라 포함되는 계수의 갯수도 달라질 수 있다. 이러한 ALF의 필터링 관련 정보(필터 계수 정보, ALF On/Off 정보, 필터 형태 정보)는 비트스트림에서 소정의 파라메터 셋에 포함되어 전송될 수 있다.ALF (Adaptive Loop Filter) can perform filtering based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, filtering can be performed differentially for each group by determining one filter to be applied to that group. As for information related to whether to apply ALF, the luminance signal may be transmitted for each coding unit (CU), and the size and coefficient of ALF to be applied may vary for each block. ALF may have various forms, and the number of coefficients included in the filter may vary accordingly. This ALF filtering-related information (filter coefficient information, ALF On/Off information, filter type information) can be transmitted in a bitstream by being included in a predetermined parameter set.

메모리(150)는 필터부(145)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 화면 간 예측을 수행 시 예측부(110)에 제공될 수 있다. The memory 150 may store a reconstructed block or picture calculated through the filter unit 145, and the stored reconstructed block or picture may be provided to the prediction unit 110 when performing inter-screen prediction.

도 2는 본 발명의 다른 실시예에 따른 영상 복호화기를 나타낸 블록도이다.Figure 2 is a block diagram showing an image decoder according to another embodiment of the present invention.

도 2를 참조하면, 영상 복호화기(200)는 엔트로피 복호화부(2110), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230), 필터부(235), 메모리(240)가 포함될 수 있다.Referring to FIG. 2, the image decoder 200 includes an entropy decoder 2110, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit 235. , memory 240 may be included.

영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.When a video bitstream is input from a video encoder, the input bitstream can be decoded in a procedure opposite to that of the video encoder.

엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 엔트로피 부호화를 수행하기 위해 사용된 VLC 테이블은 엔트로피 복호화부에서도 동일한 가변 길이 부호화 테이블로 구현되어 엔트로피 복호화를 수행할 수 있다. 엔트로피 복호화부(210)에서 복호화된 정보 중 예측 블록을 생성하기 위한 정보는 예측부(230)로 제공되고 엔트로피 복호화부에서 엔트로피 복호화를 수행한 잔차값은 재정렬부(215)로 입력될 수 있다. The entropy decoding unit 210 may perform entropy decoding in a procedure opposite to the procedure in which entropy encoding is performed in the entropy encoding unit of the video encoder. For example, the VLC table used to perform entropy coding in the video encoder can be implemented as the same variable length coding table in the entropy decoder to perform entropy decoding. Among the information decoded in the entropy decoding unit 210, information for generating a prediction block is provided to the prediction unit 230, and the residual value obtained by performing entropy decoding in the entropy decoding unit may be input to the reordering unit 215.

엔트로피 복호화부(210)에서도 엔트로피 부호화부와 마찬가지로 카운터(Counter) 또는 직접 변환(Direct Swapping) 방법을 이용해 코드 워드 할당 테이블을 변화시킬 수 있고, 변화된 코드 워드 할당 테이블에 기초하여 엔트로피 복호화를 수행할 수 있다.In the entropy decoding unit 210, like the entropy encoding unit, the code word allocation table can be changed using a counter or direct swapping method, and entropy decoding can be performed based on the changed code word allocation table. there is.

엔트로피 복호화부(210)에서는 부호화기에서 수행된 화면 내 예측 및 화면 간 예측에 관련된 정보를 복호화할 수 있다. 전술한 바와 같이 영상 부호화기에서 화면 내 예측 및 화면 간 예측을 수행시 소정의 제약이 있는 경우, 이러한 제약을 기초로 한 엔트로피 복호화를 수행해 현재 블록에 대한 화면 내 예측 및 화면 간 예측에 관련된 정보를 제공받을 수 있다. 엔트로피 복호화부에서는 이하 본 발명의 실시예의 도 3 내지 8에서 설명하는 복호화 동작을 수행할 수 있다. The entropy decoder 210 can decode information related to intra-screen prediction and inter-screen prediction performed by the encoder. As described above, if there are certain constraints when performing intra-screen prediction and inter-screen prediction in the video encoder, entropy decoding is performed based on these constraints to provide information related to intra-prediction and inter-screen prediction for the current block. You can receive it. The entropy decoding unit can perform the decoding operation described below with reference to FIGS. 3 to 8 of the embodiment of the present invention.

엔트로피 복호화부(210)에서는 이하 도 3 내지 8에서의 본 발명의 실시예에서 설명하는 화면 내 부호화 모드 복호화 방법을 기초로 소정의 이진 부호를 사용하여 현재 예측 단위의 화면 내 예측 모드 정보를 복호화할 수 있다.The entropy decoder 210 decodes the intra-prediction mode information of the current prediction unit using a predetermined binary code based on the intra-picture encoding mode decoding method described in the embodiments of the present invention in FIGS. 3 to 8 below. You can.

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다. The reordering unit 215 may rearrange the bitstream entropy-decoded by the entropy decoding unit 210 based on the method in which the encoder rearranges the bitstream. Coefficients expressed in the form of a one-dimensional vector can be restored and rearranged as coefficients in the form of a two-dimensional block. The reordering unit may receive information related to coefficient scanning performed in the encoder and perform reordering by reverse scanning based on the scanning order performed in the encoder.

역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values of the rearranged blocks.

역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 DCT 및 DST에 대해 역DCT 및 역 DST를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 부호화기의 변환부에서는 DCT와 DST는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 선택적으로 수행될 수 있고, 영상 복호화기의 역변환부(225)에서는 영상 부호화기의 변환부에서 수행된 변환 정보를 기초로 역변환을 수행할 수 있다. The inverse transform unit 225 may perform inverse DCT and inverse DST on the DCT and DST performed by the transform unit on the quantization result performed by the image encoder. Inverse transformation can be performed based on the transmission unit determined by the video encoder. In the transform unit of the video encoder, DCT and DST can be selectively performed according to a plurality of information such as prediction method, size of the current block, and prediction direction, and are performed in the inverse transform unit 225 of the video decoder. Inverse conversion can be performed based on the converted conversion information.

변환을 수행시 변환 단위가 아닌 부호화 단위를 기준으로 변환을 수행할 수 있다.When performing conversion, conversion can be performed based on the coding unit rather than the conversion unit.

예측부(230)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(240)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction unit 230 may generate a prediction block based on prediction block generation-related information provided by the entropy decoder 210 and previously decoded block or picture information provided by the memory 240.

전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 화면 내 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 화면 내 예측을 수행하지만, 화면 내 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 화면 내 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 화면 내 예측을 사용할 수 있다.As described above, when performing intra-screen prediction in the same manner as the operation in the video encoder, when the size of the prediction unit and the size of the transformation unit are the same, the pixel existing on the left of the prediction unit, the pixel existing on the upper left, and the size of the transformation unit are the same. In-screen prediction is performed for the prediction unit based on existing pixels. However, when performing intra-screen prediction, if the size of the prediction unit and the size of the conversion unit are different, the reference pixel based on the conversion unit is used to make the prediction unit within the screen. Predictions can be made. Additionally, intra-picture prediction using NxN partitioning can be used only for the smallest coding unit.

예측부(230)는 예측 단위 판별부, 화면 간 예측부 및 화면 내 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부에서 입력되는 예측 단위 정보, 화면 내 예측 방법의 예측 모드 정보, 화면 간 예측 방법의 움직임 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 화면 간 예측을 수행하는지 아니면 화면 내 예측을 수행하는지 여부를 판별할 수 있다. 화면 간 예측부는 영상 부호화기에서 제공된 현재 예측 단위의 화면 간 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 화면 간 예측을 수행할 수 있다.The prediction unit 230 may include a prediction unit determination unit, an inter-screen prediction unit, and an intra-screen prediction unit. The prediction unit discriminator receives various information such as prediction unit information input from the entropy decoder, prediction mode information from the intra-screen prediction method, and motion prediction-related information from the inter-screen prediction method, and distinguishes the prediction unit from the current encoding unit. It is possible to determine whether is performing inter-screen prediction or intra-screen prediction. The inter-picture prediction unit uses the information required for inter-prediction of the current prediction unit provided by the video encoder to predict the current prediction unit based on the information contained in at least one of the pictures before or after the current picture containing the current prediction unit. Inter-screen prediction can be performed for

화면 간 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 움직임 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode) 중 어떠한 방법인지 여부를 판단할 수 있다. To perform inter-screen prediction, based on the coding unit, whether the motion prediction method of the prediction unit included in the coding unit is Skip Mode, Merge Mode, or AMVP Mode. can be judged.

화면 내 예측부는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 화면 내 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 화면 내 예측 모드 정보를 기초로 화면 내 예측을 수행할 수 있다. 화면 내 예측부에는 AIS 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra-screen prediction unit may generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra-prediction, intra-prediction can be performed based on the intra-prediction mode information of the prediction unit provided by the video encoder. The in-screen prediction unit may include an AIS filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixels of the current block, and can be applied by determining whether or not to apply the filter according to the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 화면 내 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소을 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다. When the prediction mode of the prediction unit is a prediction unit that performs intra-screen prediction based on pixel values obtained by interpolating the reference pixel, the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel of the pixel unit having an integer value or less. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.

복원된 블록 또는 픽쳐는 필터부(235)로 제공될 수 있다. 필터부(235)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The restored block or picture may be provided to the filter unit 235. The filter unit 235 may include a deblocking filter, an offset correction unit, and an ALF.

영상 부호화기로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. 영상 부호화기에서와 마찬가지로 우선 수직 디블록킹 필터링 및 수평 디블록킹 필터링을 수행하되, 겹치는 부분에 있어서는 수직 디블록킹 및 수평 디블록킹 중 적어도 하나를 수행할 수 있다. 수직 디블록킹 필터링 및 수평 디블록킹 필터링이 겹치는 부분에서 이전에 수행되지 못한 수직 디블록킹 필터링 또는 수평 디블록킹 필터링이 수행될 수 있다. 이러한 디블록킹 필터링 과정을 통해서 디블록킹 필터링의 병행 처리(Parallel Processing)이 가능하다. Information on whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and when a deblocking filter has been applied, information on whether a strong filter or a weak filter has been applied. In the deblocking filter of the video decoder, information related to the deblocking filter provided by the video encoder is provided and the video decoder can perform deblocking filtering on the corresponding block. As in the video encoder, vertical deblocking filtering and horizontal deblocking filtering are first performed, but at least one of vertical deblocking and horizontal deblocking can be performed in overlapping parts. Vertical deblocking filtering or horizontal deblocking filtering that was not previously performed may be performed in areas where vertical deblocking filtering and horizontal deblocking filtering overlap. Through this deblocking filtering process, parallel processing of deblocking filtering is possible.

오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and offset value information.

ALF는 필터링을 수행 후 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 ALF를 적용할 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.ALF can perform filtering based on the value compared between the restored image and the original image after performing filtering. ALF can be applied to the coding unit based on ALF application availability information, ALF coefficient information, etc. provided from the encoder. This ALF information may be included and provided in a specific parameter set.

메모리(240)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다. The memory 240 can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.

전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화 뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다. 이하, 본 발명의 실시예에 따른 도 3내지 도 8에서 설명하는 두개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법은 도 1 및 도 2에서 전술한 각 모듈의 기능에서 맞게 구현될 수 있고 이러한 부호화기 및 복호화기는 본 발명의 권리범위에 포함된다. As described above, hereinafter, in the embodiments of the present invention, the term coding unit is used as a coding unit for convenience of explanation, but it may also be a unit that performs not only encoding but also decoding. Hereinafter, the encoding/decoding method of the intra prediction mode using the two candidate intra prediction modes described in FIGS. 3 to 8 according to an embodiment of the present invention is implemented appropriately in the functions of each module described above in FIGS. 1 and 2. It can be done, and such encoders and decoders are included in the scope of the present invention.

도 3은 본 발명의 또 다른 실시예에 따른 현재 예측 단위의 화면 내 예측 모드를 부호화하는 방법을 나타낸 개념도이다.Figure 3 is a conceptual diagram showing a method of encoding an intra-prediction mode of a current prediction unit according to another embodiment of the present invention.

도 3을 참조하면, 현재 예측 단위의 화면 내 예측 모드는 현재 예측 모드의 주변 예측 단위의 화면 내 예측 모드를 기초로 산출될 수 있다.Referring to FIG. 3, the intra-prediction mode of the current prediction unit may be calculated based on the intra-prediction mode of neighboring prediction units of the current prediction mode.

이하, 본 발명의 실시예에서는 현재 예측 단위(300)의 화면 내 예측 모드를 예측하여 예측 화면 내 예측 모드를 산출하기 위한 예측 단위를 주변 예측 단위라고 정의한다. 주변 예측 단위는 현재 예측 단위의 좌상단 화소의 좌표를 (x, y)라고 정의하는 경우, (x-1,y)에 위치한 화소값를 포함하는 제1 주변 예측 단위(310)와 (x, y-1)에 위치한 화소값을 포함하는 제2 주변 예측 단위(320)를 주변 예측 단위라고 할 수 있다.Hereinafter, in an embodiment of the present invention, a prediction unit for calculating the predicted intra-prediction mode by predicting the intra-prediction mode of the current prediction unit 300 is defined as a neighboring prediction unit. When the surrounding prediction unit defines the coordinates of the upper left pixel of the current prediction unit as (x, y), the first surrounding prediction unit 310 including the pixel value located at (x-1,y) and (x, y- The second neighboring prediction unit 320 including the pixel value located in 1) may be referred to as a neighboring prediction unit.

현재 예측 단위(300)의 화면 내 예측 모드는 현재 예측 단위(300)의 화면 내 예측 모드와 주변 예측 단위의 화면 내 예측 모드 또는 주변 예측 단위의 화면 내 예측 모드가 가용하지 않은 경우(주변 예측 단위가 존재하지 않거나, 화면 간 예측 모드를 사용할 경우) 미리 정해진 순서로 순차적으로 현재 예측 단위(300)의 화면 내 예측 모드의 예측 후보로 사용되는 화면 내 예측 모드(이하, 순차적 화면 내 예측 모드라고 함)와 동일한지 여부를 판단하고 동일한 경우, 소정의 플래그 정보를 통해 현재 예측 단위의 화면 내 예측 모드와 주변 예측 단위의 화면 내 예측 모드 또는 순차적 화면 내 예측 모드와 동일한지 여부를 판단한다.The intra-prediction mode of the current prediction unit 300 is the intra-prediction mode of the current prediction unit 300 and the intra-prediction mode of the neighboring prediction unit, or if the intra-prediction mode of the neighboring prediction unit is not available (surrounding prediction unit does not exist or when inter-screen prediction mode is used) the intra-screen prediction mode is used as a prediction candidate for the intra-screen prediction mode of the current prediction unit 300 sequentially in a predetermined order (hereinafter referred to as sequential intra-screen prediction mode) ) and, if the same, determine whether the intra-prediction mode of the current prediction unit is the same as the intra-prediction mode of the surrounding prediction unit or the sequential intra-prediction mode through predetermined flag information.

이하, 본 발명의 실시예에서는 현재 예측 단위의 화면 내 예측 모드를 예측하기 위해서는 주변 예측 단위의 화면 내 예측 모드 및 순차적 화면 내 예측 모드 중 두 개의 화면 내 예측 모드를 예측 후보로써 사용하고 예측 후보로써 사용되는 화면 내 예측 모드를 제1 후보 화면 내 예측 모드, 제2 후보 화면 내 예측 모드라고 한다.Hereinafter, in an embodiment of the present invention, in order to predict the intra-prediction mode of the current prediction unit, two intra-prediction modes among the intra-prediction mode of the surrounding prediction unit and the sequential intra-prediction mode are used as prediction candidates, and The intra-screen prediction mode used is called the first candidate intra-screen prediction mode and the second candidate intra-screen prediction mode.

현재 예측 단위(300)에서 제1 주변 예측 단위(310), 제2 주변 예측 단위(320)가 모두 존재하고 모두 화면 내 예측 모드를 사용하여 예측을 수행하며, 제1 주변 예측 단위(310), 제2 주변 예측 단위(320)가 가진 화면 내 예측 모드값이 서로 다른 경우, 제1 주변 예측 단위(310)와 제2 주변 예측 단위(320)의 화면 내 예측 모드 값 중 작은 값을 가진 화면 내 예측 모드를 제1 후보 화면 내 예측 모드로 설정하고, 제1 주변 예측 단위(310)와 제2 주변 예측 단위(320)의 화면 내 예측 모드 값 중 큰 값을 가진 화면 내 예측 모드를 제2 후보 화면 내 예측 모드로 설정할 수 있다. 또는 제1 주변 예측 단위의 화면 내 예측 모드를 제1 후보 화면 내 예측 모드로 설정하고, 제2 주변 예측 단위의 화면 내 예측 모드를 제2 후보 화면 내 예측 모드로 설정할 수도 있다.In the current prediction unit 300, there are both a first neighboring prediction unit 310 and a second neighboring prediction unit 320, and they all perform prediction using the intra-screen prediction mode. The first neighboring prediction unit 310, When the intra-screen prediction mode values of the second neighboring prediction units 320 are different from each other, the screen with the smaller value of the intra-screen prediction mode values of the first neighboring prediction unit 310 and the second neighboring prediction unit 320 Set the prediction mode to the first candidate intra-screen prediction mode, and set the intra-screen prediction mode with the larger value of the intra-prediction mode values of the first neighboring prediction unit 310 and the second neighboring prediction unit 320 to the second candidate. You can set it to on-screen prediction mode. Alternatively, the intra-prediction mode of the first neighboring prediction unit may be set to the first candidate intra-prediction mode, and the intra-prediction mode of the second neighboring prediction unit may be set to the second candidate intra-prediction mode.

이하, 주변 예측 단위가 존재하며, 주변 예측 단위가 화면 내 예측 모드를 사용하여 예측을 수행한 경우, 가용한 주변 예측 단위라고 한다.Hereinafter, if a surrounding prediction unit exists and the surrounding prediction unit performs prediction using the intra-screen prediction mode, it is referred to as an available surrounding prediction unit.

현재 예측 단위(300)에서 제1 주변 예측 단위(310), 제2 주변 예측 단위(320) 모두 존재하고 모두 화면 내 예측 모드를 사용하여 예측을 수행하여 제1 주변 예측 단위(310) 및 제2 주변 예측 단위(320) 모두 가용한 주변 예측 단위이지만 주변 예측 단위의 화면 내 예측 모드값의 화면 내 예측 모드 값이 동일한 경우, 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드값으로 사용하고 순차적 화면 내 예측 모드로써 플레이너 모드(Planar Mode) 또는 DC 모드(DC Mode) 중 하나를 순차적으로 제2 후보 화면 내 예측 모드값으로써 설정하여 사용할 수 있다. 제1 후보 화면 내 예측 모드값이 플레이너 모드가 아닌 화면 내 예측 모드로써 동일한 경우, 제2 후보 화면 내 예측 모드값을 플레이너 모드로 설정할 수 있다. 제1 후보 화면 내 예측 모드값 플레이너 모드일 경우는 DC 모드로 제2 후보 화면 내 예측 모드를 설정할 수 있다.In the current prediction unit 300, both the first neighboring prediction unit 310 and the second neighboring prediction unit 320 exist, and prediction is performed using the intra-screen prediction mode to form the first neighboring prediction unit 310 and the second neighboring prediction unit 320. All of the neighboring prediction units 320 are available neighboring prediction units, but if the intra-prediction mode values of the intra-prediction mode values of the neighboring prediction units are the same, the intra-prediction mode value of the neighboring prediction units is set to the first candidate intra-prediction mode value. As a sequential intra-screen prediction mode, either Planar Mode or DC Mode can be sequentially set as the second candidate intra-screen prediction mode value. If the prediction mode value within the first candidate screen is the same as the intra-screen prediction mode rather than the planar mode, the prediction mode value within the second candidate screen can be set to the planar mode. In the case of planar mode, the prediction mode within the first candidate screen can be set to DC mode.

유사한 방법으로 제1 주변 예측 단위(310), 제2 주변 예측 단위(320) 중 하나의 주변 예측 단위만이 가용한 주변 예측 단위인 경우, 가용한 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드값으로 사용하고 플레이너 모드(Planar Mode) 또는 DC 모드(DC Mode) 중 하나를 제2 후보 화면 내 예측 모드값으로써 사용할 수 있다. 제1 후보 화면 내 예측 모드값이 플레이너 모드가 아닌 화면 내 예측 모드인 경우, 제2 후보 화면 내 예측 모드를 플레이너 모드로 설정할 수 있다. 제1 후보 화면 내 예측 모드값 플레이너 모드일 경우는 DC 모드로 제2 후보 화면 내 예측 모드를 설정할 수 있다.In a similar way, when only one of the first neighboring prediction unit 310 and the second neighboring prediction unit 320 is an available neighboring prediction unit, the intra-screen prediction mode value of the available neighboring prediction unit is set to the first neighboring prediction unit. It can be used as a prediction mode value within a candidate screen, and either Planar Mode or DC Mode can be used as a prediction mode value within a second candidate screen. If the first candidate intra-screen prediction mode value is the intra-screen prediction mode rather than the planar mode, the second candidate intra-screen prediction mode may be set to the planar mode. In the case of planar mode, the prediction mode within the first candidate screen can be set to DC mode.

현재 예측 단위(300)의 제1 주변 예측 단위(310), 제2 주변 예측 단위(320) 모두 가용하지 않은 경우, 제1 후보 화면 내 예측 모드값을 플레이너 모드로 설정하고, 제2 후보 화면 내 예측 모드값을 DC 모드로 설정할 수 있다. If both the first neighboring prediction unit 310 and the second neighboring prediction unit 320 of the current prediction unit 300 are not available, the prediction mode value in the first candidate screen is set to planar mode, and the second candidate screen is set to planar mode. You can set your prediction mode value to DC mode.

즉, 본 발명의 실시예에 따른 두개의 주변 블록의 화면 내 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법에서는 후보 화면 내 예측 모드 중 적어도 하나가 가용하지 않은 경우, 순차적으로 플레이너 모드 또는 DC 모드를 가용하지 않은 후보 화면 내 예측 모드로 사용함으로써 제1 후보 화면 내 예측 모드와 제2 후보 화면 내 예측 모드를 모두 후보 화면 내 예측 모드로써 사용한다.That is, in the encoding/decoding method of the intra-prediction mode using the intra-prediction mode of two neighboring blocks according to an embodiment of the present invention, when at least one of the candidate intra-prediction modes is not available, planar mode or By using the DC mode as an unavailable intra-candidate prediction mode, both the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode are used as the candidate intra-picture prediction modes.

도 4는 본 발명의 또 다른 실시예에 따른 주변 예측 단위의 가용성을 판단하는 방법을 나타낸 개념도이다. Figure 4 is a conceptual diagram showing a method for determining the availability of a neighboring prediction unit according to another embodiment of the present invention.

도 4를 참조하면, 제1 주변 예측 단위가 가용한지 여부를 판단한다(단계 S400). Referring to FIG. 4, it is determined whether the first neighboring prediction unit is available (step S400).

현재 예측 단위의 좌측에 제1 주변 예측 단위가 존재하고, 화면 내 예측 모드를 기초로 예측이 수행된 경우, 제1 주변 예측 단위가 가용하다고 판단한다. If a first neighboring prediction unit exists to the left of the current prediction unit, and prediction is performed based on the intra-prediction mode, it is determined that the first neighboring prediction unit is available.

제1 주변 예측 단위가 가용하지 않은 경우, 제1 주변 예측 단위의 화면 내 예측 모드의 값을 -1로 설정한다(단계 S410).If the first neighboring prediction unit is not available, the value of the intra-prediction mode of the first neighboring prediction unit is set to -1 (step S410).

‘-1’은 제1 주변 예측 단위가 가용하지 않다는 것을 나타내기 위한 변수로써 다른 변수를 통해 제1 주변 예측 단위의 가용성 여부를 판단하는 것도 가능하다. ‘-1’ is a variable to indicate that the first neighboring prediction unit is not available, and it is also possible to determine the availability of the first neighboring prediction unit through other variables.

제1 주변 예측 단위의 모드값은 소정의 구문 요소를 기초로 표현될 수 있으며, 제1 주변 예측 단위의 모드 값은 구문 요소 neg_intra_mode[0]으로 표현되어 neg_intra_mode[0]의 값이 -1인 경우, 제1주변 예측 단위가 가용하지 않다는 것을 나타낼 수 있다.The mode value of the first neighboring prediction unit can be expressed based on a predetermined syntax element, and the mode value of the first neighboring prediction unit is expressed as a syntax element neg_intra_mode[0], where the value of neg_intra_mode[0] is -1. , may indicate that the first neighboring prediction unit is not available.

제1 주변 예측 단위가 가용한 경우, 제1 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 사용한다(단계 S420). If the first neighboring prediction unit is available, the intra-prediction mode value of the first neighboring prediction unit is used as the first candidate intra-prediction mode (step S420).

제1 주변 예측 단위의 화면 내 예측 모드 정보는 구문 요소 neg_intra_mode[0]로 표현될 수 있고, 제1 후보 화면 내 예측 모드를 나타내는 구문 요소 neg_intra_mode[0]에 제1 주변 예측 단위의 화면 내 예측 모드값이 저장될 수 있다.The intra-prediction mode information of the first neighboring prediction unit may be expressed as a syntax element neg_intra_mode[0], and the intra-prediction mode of the first neighboring prediction unit may be added to the syntax element neg_intra_mode[0] indicating the first candidate intra-prediction mode. Values can be stored.

화면 내 예측 모드의 값은 아래의 표 1과 같이 표현될 수 있다. The value of the intra-screen prediction mode can be expressed as Table 1 below.

표 1은 본 발명의 또 다른 실시예에 따른 화면 내 예측 모드와 화면 내 예측 모드에 대응되는 번호(이하, 화면 내 예측 모드 번호라고 함.)를 매핑한 표이다.Table 1 is a table mapping intra-prediction modes and numbers corresponding to the intra-prediction modes (hereinafter referred to as intra-prediction mode numbers) according to another embodiment of the present invention.

표 1을 참조하면, 플레이너 모드(Intra_Planar)는 화면 내 예측 번호로 ‘0’번, 수직 모드(Intra_Vertical)는 ‘1’번, 수평 모드(Intra_Horizontal)는 ‘2’번 DC 모드(Intra_DC)는 ‘3’번, 그외의 방향성 모드(Intra_Angular)는 4에서 34번에 할당될 수 있다. Referring to Table 1, planar mode (Intra_Planar) is predicted within the screen by number '0', vertical mode (Intra_Vertical) is numbered '1', and horizontal mode (Intra_Horizontal) is numbered '2'. DC mode (Intra_DC) is numbered '2'. Number '3', other directional modes (Intra_Angular) can be assigned to numbers 4 to 34.

본 발명의 실시예에 따른 화면 내 예측 모드와 화면 내 예측 모드 번호 매핑 방법에서는 플레이너 모드에 가장 작은 수의 화면 내 예측 모드 번호를 매핑시키고 그 다음으로 수직 모드, 수평 모드, DC 모드 순서로 화면 내 예측 모드를 코드 번호에 매핑시킴으로써 화면 내 예측 모드 발생 빈도 순서에 따라 작은 수의 코드 번호에 매핑되고 결과적으로 화면 내 예측 모드 정보를 전송하기 위한 이진 부호화를 수행시 적은 수의 비트로 예측 단위의 화면 내 예측 모드 정보를 표현할 수 있다. In the intra-prediction mode and intra-prediction mode number mapping method according to an embodiment of the present invention, the smallest intra-prediction mode number is mapped to the planar mode, and then the screen is sequentially selected in vertical mode, horizontal mode, and DC mode. By mapping my prediction mode to a code number, the prediction mode within the screen is mapped to a small number of code numbers according to the order of frequency of occurrence, and as a result, when performing binary coding to transmit the prediction mode information within the screen, the screen of the prediction unit is converted to a small number of bits. I can express my prediction mode information.

제2 주변 예측 단위가 가용한지 여부를 판단한다(단계 S430). It is determined whether the second neighboring prediction unit is available (step S430).

현재 예측 단위의 좌측에 제2 주변 예측 단위가 존재하고, 화면 내 예측 모드를 기초로 예측이 수행된 경우, 제2 주변 예측 단위가 가용하다고 판단한다. If a second neighboring prediction unit exists to the left of the current prediction unit, and prediction is performed based on the intra-prediction mode, it is determined that the second neighboring prediction unit is available.

제2 주변 예측 단위가 가용하지 않은 경우, 제1 주변 예측 단위의 화면 내 예측 모드의 값을 -1로 설정한다(단계 S440).If the second neighboring prediction unit is not available, the value of the intra-prediction mode of the first neighboring prediction unit is set to -1 (step S440).

‘-1’은 제2 주변 예측 단위가 가용하지 않다는 것을 나타내기 위한 변수로써 다른 변수를 통해 제2 주변 예측 단위의 가용성 여부를 판단하는 것도 가능하다. ‘-1’ is a variable to indicate that the second neighboring prediction unit is not available. It is also possible to determine the availability of the second neighboring prediction unit through other variables.

제2 주변 예측 단위의 모드값은 소정의 구문 요소를 기초로 표현될 수 있으며, 제2 주변 예측 단위의 모드 값은 구문 요소 neg_intra_mode[1]으로 표현되어 neg_intra_mode[1]의 값이 -1인 경우, 제2 주변 예측 단위가 가용하지 않다는 것을 나타낼 수 있다.The mode value of the second neighboring prediction unit can be expressed based on a predetermined syntax element, and the mode value of the second neighboring prediction unit is expressed as a syntax element neg_intra_mode[1], where the value of neg_intra_mode[1] is -1. , may indicate that the second neighboring prediction unit is not available.

제2 주변 예측 단위가 가용한 경우, 제2 주변 예측 단위의 화면 내 예측 모드값을 제2 후보 화면 내 예측 모드로 사용한다(단계 S450). If the second neighboring prediction unit is available, the intra-prediction mode value of the second neighboring prediction unit is used as the second candidate intra-prediction mode (step S450).

제2 주변 예측 단위의 화면 내 예측 모드 정보는 구문 요소 neg_intra_mode[1]로 표현될 수 있고, 구문 요소 neg_intra_mode[2]에 제2 주변 예측 단위의 화면 내 예측 모드값이 저장될 수 있다.The intra-prediction mode information of the second neighboring prediction unit may be expressed as a syntax element neg_intra_mode[1], and the intra-prediction mode value of the second neighboring prediction unit may be stored in the syntax element neg_intra_mode[2].

이하 본 발명의 실시예에서는 본 발명의 본질에서 벋어나지 않는 한 소정의 구문 요소는 다른 변수로써 정의되거나 다른 구문 요소 정보와 결합되어 표현될 수 있다. 또한 구문 요소에 할당된는 모드 정보의 값들은 임의적인 것으로 동일한 정보를 다른 값들로 표현하는 것도 가능하다. Hereinafter, in the embodiments of the present invention, as long as it does not deviate from the essence of the present invention, a given syntax element may be defined as another variable or expressed in combination with other syntax element information. Additionally, the values of mode information assigned to syntax elements are arbitrary, so it is possible to express the same information with different values.

표 2는 예측 단위의 크기에 따라 존재할 수 있는 화면 내 예측 모드의 수를 나타낸 것이다. Table 2 shows the number of prediction modes within the screen that can exist depending on the size of the prediction unit.

표 2를 참조하면, 변환 단위의 크기가 4x4일 때 표 1에서 매핑된 것과 같이 화면 내 예측 모드를 0번에서 17번까지 18 가지의 화면 내 예측 모드를 사용하고, 변환 단위의 크기가 8x8, 16x16, 32x32인 경우는, 0에서 34번까지의 35 가지의 화면 내 예측 모드를 사용하고, 변환 단위의 크기가 64x64인 경우에는 0에서 3번까지 4가지의 화면 내 예측 모드를 사용한다. Referring to Table 2, when the size of the transformation unit is 4x4, 18 intra-screen prediction modes are used from 0 to 17 as mapped in Table 1, and when the size of the transformation unit is 8x8, In the case of 16x16 and 32x32, 35 intra-screen prediction modes numbered from 0 to 34 are used, and if the conversion unit size is 64x64, 4 types of intra-screen prediction modes numbered from 0 to 3 are used.

본 발명의 실시예에 따른 두 개의 주변 블록의 화면 내 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법에서는 현재 예측 모드와 현재 예측 단위의 화면 내 예측 모드를 예측하기 위한 주변 예측 단위의 크기는 상이할 수 있다.In the encoding/decoding method of the intra prediction mode using the intra prediction mode of two neighboring blocks according to an embodiment of the present invention, the size of the current prediction mode and the neighboring prediction unit for predicting the intra prediction mode of the current prediction unit are may be different.

따라서, 가용한 예측 모드값이 현재 예측 단위와 주변 예측 단위에서 상이하다면 제1 후보 화면 내 예측 모드값과 제2 후보 화면 내 예측 모드값을 구하기 위해서 현재 예측 단위에서 가용한 예측 모드를 기초로 주변 예측 단위의 제1 후보 화면 내 예측 모드값과 제2 후보 화면 내 예측 모드값을 변화시켜야 한다. Therefore, if the available prediction mode values are different in the current prediction unit and the surrounding prediction units, the prediction mode values in the first candidate screen and the prediction mode values in the second candidate screen are based on the prediction modes available in the current prediction unit. The prediction mode value within the first candidate screen and the prediction mode value within the second candidate screen of the prediction unit must be changed.

도 5는 본 발명의 또 다른 실시예에 따른 현재 예측 단위를 기초로 주변 예측 단위의 화면 내 예측 모드를 변경시키는 방법을 나타낸 순서도이다.Figure 5 is a flowchart showing a method of changing the intra-prediction mode of a neighboring prediction unit based on the current prediction unit according to another embodiment of the present invention.

도 5를 참조하면, 후보 화면 내 예측 모드의 값이 현재 예측 단위의 가용한 화면 내 예측 모드의 수보다 크거나 같은지 여부를 판단한다(단계 S500).Referring to FIG. 5, it is determined whether the value of the candidate intra-prediction mode is greater than or equal to the number of available intra-prediction modes of the current prediction unit (step S500).

제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 현재 예측 단위의 가용한 화면 내 예측 모드의 수보다 크거나 같은지 여부를 판단하여, 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 변화시킬지 여부를 판단할 수 있다 By determining whether the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is greater than or equal to the number of available intra-prediction modes of the current prediction unit, the first neighboring prediction unit It can be determined whether to change the intra-screen prediction mode value of or the intra-screen prediction mode value of the second surrounding prediction unit.

구문 요소 neg_intra_mode[i]는 주변 예측 단위의 화면 내 예측 모드값이 될 수 있고 구문 요소 intra_pred_mode_num은 현재 예측 단위에서 가용한 화면 내 예측 모드의 개수가 될 수 있다.The syntax element neg_intra_mode[i] can be the intra-prediction mode value of the surrounding prediction unit, and the syntax element intra_pred_mode_num can be the number of intra-prediction modes available in the current prediction unit.

제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 현재 예측 단위의 가용한 화면 내 예측 모드의 수보다 크거나 같은 경우, 현재 예측 단위의 가용한 화면 내 예측 모드의 개수가 4개인지 여부를 판단한다(단계 S510).If the within-screen prediction mode value of the first neighboring prediction unit or the within-screen prediction mode value of the second neighboring prediction unit is greater than or equal to the number of available within-screen prediction modes of the current prediction unit, the number of available within-screen prediction modes of the current prediction unit It is determined whether the number of prediction modes is 4 (step S510).

현재 예측 단위의 가용한 화면 내 예측 모드의 개수를 판단하여 현재 예측 단위에서 가용한 화면 내 예측 모드에 맞게 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 변화시킬 수 있다.Determine the number of available intra-prediction modes in the current prediction unit and match the intra-prediction mode in the current prediction unit to the intra-prediction mode value of the first neighboring prediction unit or the intra-screen prediction mode value of the second neighboring prediction unit can change.

단계 S510에서 설명의 편의상 현재 예측 단위의 가용한 화면 내 예측 모드의 개수가 4개인지 여부를 판단한 것이고 현재 예측 단위의 가용한 화면 내 예측 모드의 개수가 18개인지 여부도 판단하여 이후 절차를 진행할 수도 있다.In step S510, for convenience of explanation, it is determined whether the number of prediction modes within the available screen of the current prediction unit is 4, and it is also determined whether the number of prediction modes within the available screen of the current prediction unit is 18 to proceed with the subsequent procedure. It may be possible.

현재 예측 단위의 가용한 화면 내 예측 모드의 개수가 4인 경우, 현재 예측 단위의 가용한 화면 내 예측 모드와 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 매핑시키는 소정의 매핑 테이블을 기초로 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 변화시킬 수 있다. If the number of available intra-prediction modes of the current prediction unit is 4, the available intra-prediction modes of the current prediction unit and the intra-prediction mode value of the first neighboring prediction unit or the intra-screen prediction mode of the second neighboring prediction unit The intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit may be changed based on a predetermined mapping table for mapping values.

아래의 표 3 및 표 4는 본 발명의 실시예에 따른 화면 내 예측 모드 매핑 테이블이다.Tables 3 and 4 below are intra-screen prediction mode mapping tables according to an embodiment of the present invention.

표 3 또는 표 4를 참조하면, 현재 예측 단위의 가용한 예측 모드의 개수가 4인 경우, 구문 요소 mapIntraPredMode4[]에 의해 산출된 화면 내 예측 모드의 값을 기초로 주변 예측 단위의 화면 내 예측 모드값을 현재 예측 단위의 가용한 예측 모드에 매핑할 수 있다. 또한, 현재 예측 단위의 가용한 예측 모드의 개수가 18개인 경우, 구문 요소 mapIntraPredMode10[]에 의해 산출된 화면 내 예측 모드의 값을 기초로 주변 예측 단위의 화면 내 예측 모드값을 현재 예측 단위의 가용한 예측 모드에 매핑할 수 있다.Referring to Table 3 or Table 4, if the number of available prediction modes in the current prediction unit is 4, the intra-prediction mode of the surrounding prediction unit is based on the value of the intra-prediction mode calculated by the syntax element mapIntraPredMode4[]. Values can be mapped to the available prediction modes of the current prediction unit. In addition, when the number of available prediction modes of the current prediction unit is 18, the intra-prediction mode value of the surrounding prediction unit is calculated based on the value of the intra-prediction mode calculated by the syntax element mapIntraPredMode10[] as the available prediction mode of the current prediction unit. Can be mapped to one prediction mode.

표 3의 화면 내 예측 모드 매핑 테이블은 0번 모드(플레이너 모드)에 매핑되는 경우가 많도록 생성된 매핑 테이블이고 표 4의 화면 내 예측 모드 매핑 테이블은 화면 내 예측 모드 매핑 테이블은 3번 모드(DC 모드)에 매핑되는 경우가 많도록 생성된 매핑 테이블이다. 즉, 표 3을 화면 내 예측 모드 매핑 테이블로 사용할 경우, 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 상대적으로 플레이너 모드에 많이 매핑되고, 표 4를 화면 내 예측 모드 매핑 테이블로 사용할 경우, 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 상대적으로 DC 모드에 많이 매핑된다.The intra-screen prediction mode mapping table in Table 3 is a mapping table created so that it is often mapped to mode 0 (planar mode), and the intra-screen prediction mode mapping table in Table 4 is a mapping table for mode 3. This is a mapping table created so that it is often mapped to (DC mode). That is, when Table 3 is used as an intra-screen prediction mode mapping table, the intra-screen prediction mode value of the first neighboring prediction unit or the intra-screen prediction mode value of the second neighboring prediction unit is relatively mapped to the planar mode, and the table When 4 is used as an intra-prediction mode mapping table, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is relatively mapped to DC mode.

화면 내 예측 모드 매핑 테이블을 기초로 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 4개의 예측 모드 중 적어도 하나로 변경한다(단계 S520).Based on the intra-prediction mode mapping table, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is changed to at least one of four prediction modes (step S520).

화면 내 예측 모드 매핑 테이블을 기초로 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 10개의 예측 모드 중 적어도 하나로 변경한다(단계 S530).Based on the intra-prediction mode mapping table, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is changed to at least one of 10 prediction modes (step S530).

단계 S520 및 단계 S530에서는 표 3 또는 표 4에서 전술한 소정의 화면 내 예측 매핑 테이블을 기초로 주변 예측 모드의 화면 내 예측 모드값을 가용한 현재 예측 단위의 화면 내 예측 모드 중 적어도 하나로 매핑시킬 수 있다. In steps S520 and S530, the intra-prediction mode value of the surrounding prediction mode can be mapped to at least one of the available intra-prediction modes of the current prediction unit based on the predetermined intra-prediction mapping table described above in Table 3 or Table 4. there is.

probMode[i]는 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 나타내는 구문 요소로 사용될 수 있다.probMode[i] can be used as a syntax element indicating the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit.

제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 현재 예측 단위의 가용한 화면 내 예측 모드의 수보다 작은 경우, 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 그대로 현재 예측 단위의 화면 내 예측 모드값을 예측하기 위한 정보로써 사용한다(단계 S540). If the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is smaller than the number of available intra-prediction modes of the current prediction unit, the intra-prediction mode of the first neighboring prediction unit The value or the intra-prediction mode value of the second neighboring prediction unit is used as information for predicting the intra-prediction mode value of the current prediction unit (step S540).

제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 현재 예측 단위의 가용한 화면 내 예측 모드의 수보다 작은 경우 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 변경하지 않고 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 그대로 사용할 수 있다.If the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is smaller than the number of available intra-prediction modes of the current prediction unit, the intra-prediction mode value of the first neighboring prediction unit Alternatively, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit may be used as is without changing the intra-prediction mode value of the second neighboring prediction unit.

도 6은 본 발명의 또 다른 실시예에 따른 제1 후보 화면 예측 모드 및 제2 후보 화면 예측 모드를 생성하는 방법을 나타낸 순서도이다.Figure 6 is a flowchart showing a method for generating a first candidate screen prediction mode and a second candidate screen prediction mode according to another embodiment of the present invention.

도 6을 참조하면, 제1 주변 예측 단위의 화면 내 예측 모드값과 제2 주변 예측 단위의 화면 내 예측 모드값이 가용한지 여부를 판단한다(단계 S600).Referring to FIG. 6, it is determined whether the intra-prediction mode value of the first neighboring prediction unit and the intra-prediction mode value of the second neighboring prediction unit are available (step S600).

도 5에서 전술한 절차를 기초로 현재 예측 단위에서 사용되는 화면 내 예측 모드의 수에 기초하여 화면 내 예측 모드 매핑 테이블을 사용하여 재설정된 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 사용하여 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 현재 예측 단위의 주변 예측 단위를 기초로 한 제1 후보 화면 내 예측 모드값 또는 제2 후보 화면 내 예측 모드값으로 사용될 수 있는지 여부를 판단할 수 있다.Based on the procedure described above in FIG. 5 , the intra-prediction mode value or second neighborhood of the first neighboring prediction unit is reset using the intra-prediction mode mapping table based on the number of intra-prediction modes used in the current prediction unit. A first candidate screen in which the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit is based on the neighboring prediction unit of the current prediction unit using the intra-prediction mode value of the prediction unit. It can be determined whether it can be used as an intra-prediction mode value or a intra-prediction mode value of the second candidate screen.

즉, 단계 S600에서는 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드로써 사용될 수 있는지 여부를 판단한다. 주변 예측 단위로부터 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드 중 적어도 하나의 후보 화면 내 예측 모드가 산출되지 않는 경우, 순차적 화면 내 예측 모드 중 하나의 화면 내 예측 모드를 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드로 사용할 수 있다.That is, in step S600, it is determined whether the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit can be used as the first candidate intra-prediction mode and the second candidate intra-prediction mode. judge. If at least one candidate intra-prediction mode among the first candidate intra-prediction mode and the second candidate intra-prediction mode is not calculated from the surrounding prediction unit, one of the sequential intra-prediction modes is selected from the first candidate intra-prediction mode. It can be used in the intra-screen prediction mode or the second candidate intra-screen prediction mode.

제1 주변 예측 단위의 화면 내 예측 모드값과 제2 주변 예측 단위의 화면 내 예측 모드값이 동일한지 여부를 판단한다(단계 S610).It is determined whether the intra-prediction mode value of the first neighboring prediction unit and the intra-prediction mode value of the second neighboring prediction unit are the same (step S610).

제1 주변 예측 단위의 화면 내 예측 모드값과 제2 주변 예측 단위의 화면 내 예측 모드값이 동일하지 않은 경우, 제1 주변 예측 단위의 화면 내 예측 모드값이 제2 주변 예측 단위의 화면 내 예측 모드값보다 큰 지를 판단한다(단계 S613).If the intra-prediction mode value of the first neighboring prediction unit and the intra-prediction mode value of the second neighboring prediction unit are not the same, the intra-prediction mode value of the first neighboring prediction unit is the same as the intra-prediction mode value of the second neighboring prediction unit. It is determined whether it is greater than the mode value (step S613).

제1 주변 예측 단위의 화면 내 예측 모드값이 제2 주변 예측 단위의 화면 내 예측 모드값보다 크다면, 제2 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고, 제1 주변 예측 단위의 화면 내 예측 모드값을 제2 후보 화면 내 예측 모드로 설정한다(단계 S615).If the intra-prediction mode value of the first neighboring prediction unit is greater than the intra-prediction mode value of the second neighboring prediction unit, set the intra-prediction mode value of the second neighboring prediction unit to the first candidate intra-prediction mode, The intra-prediction mode value of the first neighboring prediction unit is set to the second candidate intra-prediction mode (step S615).

제1 주변 예측 단위의 화면 내 예측 모드값이 제2 주변 예측 단위의 화면 내 예측 모드값보다 작다면, 제1 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고, 제2 주변 예측 단위의 화면 내 예측 모드값을 제2 후보 화면 내 예측 모드로 설정한다(단계 S617).If the intra-prediction mode value of the first neighboring prediction unit is smaller than the intra-prediction mode value of the second neighboring prediction unit, set the intra-prediction mode value of the first neighboring prediction unit to the first candidate intra-prediction mode, The intra-prediction mode value of the second neighboring prediction unit is set to the second candidate intra-prediction mode (step S617).

구문 요소 candMPM[0]은 제1 후보 화면 내 예측 모드를 나타내고 구문 요소 candMPM[1]은 제2 후보 화면 내 예측 모드를 나타낸다. The syntax element candMPM[0] represents the first candidate intra-picture prediction mode, and the syntax element candMPM[1] represents the second candidate intra-picture prediction mode.

제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값이 동일한 경우 제1 주변 예측 단위의 화면 내 예측 모드값 또는 제2 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정하고(단계 S630) 제1 후보 화면 내 예측 모드가 플레이너 모드인지 여부를 판단한다(단계 S640).If the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit are the same, the intra-prediction mode value of the first neighboring prediction unit or the intra-prediction mode value of the second neighboring prediction unit It is set to the first candidate intra-screen prediction mode (step S630), and it is determined whether the first candidate intra-screen prediction mode is the planar mode (step S640).

전술한 바와 같이 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드 중 적어도 하나의 화면 내 예측 모드만이 존재할 경우 순차적 화면 내 예측 모드를 사용하여 플레이너 모드 또는 DC 모드를 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드 중 적어도 하나로써 사용할 수 있다. As described above, when there is only one intra-prediction mode among the first candidate intra-prediction mode and the second candidate intra-prediction mode, the sequential intra-prediction mode is used to select the planar mode or DC mode for the first candidate screen. It can be used as at least one of the intra-prediction mode and the second candidate screen intra-prediction mode.

본 발명의 실시예에 따른 화면 내 예측 모드 할당 방법에서는 두개의 서로 다른 화면 내 예측 모드를 제1 후보 화면 내 예측 모드와 제2 후보 화면 내 예측 모드로써 사용하기 때문에 제1 후보 화면 내 예측 모드가 플레이너 모드가 아닌 경우, 제2 후보 화면 내 예측 모드를 플레이너 모드로 설정하고(단계 S650), 제1 후보 화면 내 예측 모드가 플레이너 모드인 경우, DC 모드를 제2 후보 화면 내 예측 모드로써 설정하여 사용할 수 있다(단계 S660). In the intra-prediction mode allocation method according to an embodiment of the present invention, two different intra-prediction modes are used as the first candidate intra-prediction mode and the second candidate intra-prediction mode, so the first candidate intra-prediction mode is If it is not the planar mode, the prediction mode within the second candidate screen is set to the planar mode (step S650), and if the prediction mode within the first candidate screen is the planar mode, the DC mode is set to the prediction mode within the second candidate screen. It can be set and used as (step S660).

제1 주변 예측 단위의 화면 내 예측 모드값만이 가용한지 여부를 판단한다(단계 S670). It is determined whether only the intra-screen prediction mode value of the first neighboring prediction unit is available (step S670).

제1 주변 예측 단위의 화면 내 예측 모드값만이 가용한 경우, 제1 주변 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드값으로 설정한다(단계 S680).If only the intra-prediction mode value of the first neighboring prediction unit is available, the intra-prediction mode value of the first neighboring prediction unit is set as the first candidate intra-prediction mode value (step S680).

제2 주변 예측 단위의 화면 내 예측 모드값만이 가용한지 여부를 판단한다(단계 S690). It is determined whether only the intra-screen prediction mode value of the second surrounding prediction unit is available (step S690).

제2 주변 예측 단위의 화면 내 예측 모드값만이 가용한 경우, 제2 주변 예측 단위의 화면 내 예측 모드값을 제2 후보 화면 내 예측 모드값으로 설정한다(단계 S693).If only the intra-prediction mode value of the second neighboring prediction unit is available, the intra-prediction mode value of the second neighboring prediction unit is set as the second candidate intra-prediction mode value (step S693).

단계 S670 내지 단계 S693에서는 두개의 주변 예측 단위 중 하나의 주변 예측 단위만 가용한 경우, 가용한 예측 단위의 화면 내 예측 모드값을 제1 후보 화면 내 예측 모드로 설정할 수 있다. In steps S670 to S693, when only one of the two neighboring prediction units is available, the intra-prediction mode value of the available prediction unit can be set to the first candidate intra-prediction mode.

두개의 주변 예측 단위 중 하나의 주변 예측 단위만 가용한 경우 제2 후보 화면 내 예측 모드는 단계 S640 내지 단계 S660에서 전술한 절차를 기초로 결정될 수 있다. If only one of the two neighboring prediction units is available, the second candidate intra-picture prediction mode may be determined based on the procedure described above in steps S640 to S660.

두개의 주변 예측 단위 모두 가용하지 않은 경우 제1 후보 화면 내 예측 모드로써 플레이너 모드를 설정하고, 제2 후보 화면 내 예측 모드로서 DC 모드를 설정할 수 있다(단계 S696). If both neighboring prediction units are not available, planar mode can be set as the first candidate intra-picture prediction mode and DC mode can be set as the second candidate intra-picture prediction mode (step S696).

두개의 주변 예측 단위 모두 가용하지 않은 경우 순차적 화면 내 예측 모드를 사용하여 제1 후보 화면 내 예측 모드로써 플레이너 모드를 설정하고, 제2 후보 화면 내 예측 모드로서 DC 모드를 설정할 수 있다If both neighboring prediction units are not available, sequential intra-picture prediction mode can be used to set planar mode as the first candidate intra-picture prediction mode and DC mode as the second candidate intra-picture prediction mode.

도 7은 본 발명의 또 다른 실시예에 따른 현재 예측 모드의 정보를 코드 워드로 매핑하는 방법을 나타낸 순서도이다. Figure 7 is a flowchart showing a method of mapping information on the current prediction mode to a code word according to another embodiment of the present invention.

도 7을 참조하면, 현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드가 동일한지 여부를 판단한다(단계 S700). Referring to FIG. 7, it is determined whether the intra-prediction mode of the current prediction unit and the first candidate intra-prediction mode or the second candidate intra-prediction mode are the same (step S700).

현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드가 동일한 경우, 코드 워드 정보로 1을 할당하고(단계 S710), 현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드가 동일하지 않을 경우, 코드 워드 정보로 0을 할당한다(단계 S720).If the intra-prediction mode of the current prediction unit and the first candidate intra-prediction mode or the second candidate intra-prediction mode are the same, 1 is assigned as code word information (step S710), and the intra-prediction mode of the current prediction unit and If the first candidate intra-picture prediction mode or the second candidate intra-picture prediction mode are not the same, 0 is assigned as code word information (step S720).

현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드가 동일한지 여부를 판단하여(단계 S730), 동일한 경우, 0을 코드 워드 정보로 추가적으로 할당하고(단계 S740) 다른 경우, 1을 코드 워드 정보로 추가적으로 할당한다(단계 S750).It is determined whether the intra-screen prediction mode of the current prediction unit and the first candidate intra-picture prediction mode are the same (step S730). If they are the same, 0 is additionally assigned as code word information (step S740), and if different, 1 is coded. It is additionally allocated as word information (step S750).

현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드가 동일하지 않아 코드 워드 정보로 0을 할당한 경우, 현재 예측 단위의 화면 내 예측 모드 정보를 표현하기 위해 나머지 화면 내 예측 모드 정보를 코드 워드에 매핑시킨 rem_intra_pred_mode(이하, 나머지 화면 내 예측 모드도 동일한 의미의 용어로 사용함.)를 코드 워드에 추가로 할당한다(단계 S760). If 0 is assigned as code word information because the intra-screen prediction mode of the current prediction unit and the first candidate intra-screen prediction mode or the second candidate intra-screen prediction mode are not the same, expressing the intra-screen prediction mode information of the current prediction unit To this end, rem_intra_pred_mode (hereinafter, the remaining intra-screen prediction mode is also used as a term with the same meaning), which maps the remaining intra-screen prediction mode information to the code word, is additionally assigned to the code word (step S760).

표 5는 현재 예측 단위의 화면 내 예측 모드와 코드 워드를 매핑한 것을 나타낸 표이다. Table 5 is a table showing the mapping of prediction modes and code words within the screen of the current prediction unit.

표 5를 참조하면, 현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드가 동일한 경우 2 비트의 코드 워드로 현재 예측 단위의 예측 모드를 알 수 있고, 현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드가 동일하지 않을 경우, 1비트에 rem_intra_pred_mode에 할당된 비트값을 기초로 현재 예측 단위의 화면 내 예측 모드를 알 수 있다. Referring to Table 5, if the intra-prediction mode of the current prediction unit and the first candidate intra-picture prediction mode or the second candidate intra-prediction mode are the same, the prediction mode of the current prediction unit can be known with a 2-bit code word; If the intra-prediction mode of the current prediction unit and the first candidate intra-prediction mode or the second candidate intra-prediction mode are not the same, the intra-prediction mode of the current prediction unit is based on the bit value assigned to rem_intra_pred_mode in 1 bit. can be seen.

나머지 화면 내 예측 모드인 rem_intra_pred_mode에 할당되는 코드 워드는 변화될 수 있다. 나머지 화면 내 예측 모드는 현재 예측 단위의 예측 모드의 모드값과 제1 후보 화면 내 예측 모드값 및 제2 후보 화면 내 예측 모드값의 크기를 비교하여 제1 후보 화면 내 예측 모드값과 제2 후보 화면 내 예측 모드값 중 현재 예측 단위의 예측 모드 값보다 작은 값을 가진 경우의 수를 판단하여 이를 현재 매핑 테이블 상에서 제외하고 코드 워드를 판단함으로써 현재 나머지 화면 내 예측 모드에 할당되는 화면 내 예측 모드의 코드 워드를 짧게 매핑시킬 수 있다.The code word assigned to rem_intra_pred_mode, the remaining intra-screen prediction mode, can be changed. The remaining intra-screen prediction modes compare the size of the prediction mode value of the current prediction unit, the prediction mode value within the first candidate screen, and the prediction mode value within the second candidate screen to determine the prediction mode value within the first candidate screen and the prediction mode value within the second candidate screen. By determining the number of cases where the intra-screen prediction mode value has a value smaller than the prediction mode value of the current prediction unit, excluding these from the current mapping table and determining the code word, the number of cases where the intra-screen prediction mode value is currently assigned to the remaining intra-screen prediction modes is determined. Code words can be mapped briefly.

본 발명의 실시예에 따른 화면 내 예측 모드 정보 판단 방법에서는 64x64 크기의 변환 단위를 사용할 경우, 현재 예측 단위의 화면 내 예측 모드의 종류와 코드 워드는 아래의 표 6과 같이 매핑될 수 있다. In the method for determining intra-prediction mode information according to an embodiment of the present invention, when a transformation unit of size 64x64 is used, the type and code word of the intra-prediction mode of the current prediction unit can be mapped as shown in Table 6 below.

표 6을 참조하면, 64x64 크기의 변환 단위를 사용하면 가용한 화면 내 예측 단위의 종류가 4 가지이기 때문에 현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드가 동일한지 여부를 판단하는 프로세스 없이도 현재 예측 단위의 화면 내 예측 모드 정보를 고정된 2비트로써 표현할 수 있다. Referring to Table 6, when a transformation unit of size 64x64 is used, there are four types of available intra-screen prediction units, so the intra-prediction mode of the current prediction unit, the first candidate intra-screen prediction mode, and the second candidate intra-screen prediction mode. Prediction mode information within the screen of the current prediction unit can be expressed as a fixed 2 bits without the process of determining whether the modes are the same.

도 8은 본 발명의 또 다른 실시예에 따른 현재 화면 내 예측 모드를 복호화하는 방법을 나타낸 순서도이다. Figure 8 is a flowchart showing a method of decoding the current intra-picture prediction mode according to another embodiment of the present invention.

도 8를 참조하면, 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지 여부를 판단한다(단계 S800). Referring to FIG. 8, it is determined whether the intra-prediction mode of the current prediction unit is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode (step S800).

현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지 여부를 판단하기 위해서 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일한지를 나타내는 소정의 플래그 정보 prev_intra_pred_flag를 사용할 수 있다. prev_intra_pred_flag가 1인 경우 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 또는 제2 후보 화면 내 예측 모드와 동일하고 prev_intra_pred_flag가 0인 경우 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드와 동일하지 않다.To determine whether the intra-prediction mode of the current prediction unit is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode, the intra-prediction mode of the current prediction unit is the first candidate intra-prediction mode or the second candidate intra-prediction mode. 2 Predetermined flag information prev_intra_pred_flag indicating whether the prediction mode within the candidate screen is the same can be used. If prev_intra_pred_flag is 1, the intra-screen prediction mode of the current prediction unit is the same as the first candidate screen intra-prediction mode or the second candidate screen intra-prediction mode, and if prev_intra_pred_flag is 0, the intra-screen prediction mode of the current prediction unit is the first candidate screen. My prediction mode and the second candidate screen's prediction mode are not the same.

prev_intra_pred_flag가 1인 경우 현재 예측 단위의 화면 내 예측 모드가 제1 후보 화면 내 예측 모드와 동일한지 아니면 제2 후보 화면 내 예측 모드와 동일한지 여부를 나타내는 플래그인 mpm_idx를 사용하여 현재 예측 단위의 화면 내 예측 모드 정보를 설정할 수 있다.If prev_intra_pred_flag is 1, then the within-screen prediction mode of the current prediction unit is used with mpm_idx, a flag that indicates whether the within-screen prediction mode of the current prediction unit is the same as the first candidate intra-screen prediction mode or the same as the second candidate intra-screen prediction mode. Prediction mode information can be set.

mpm_idx를 판단하여(단계 S810), mpm_idx가 0인 경우 현재 예측 단위의 화면 내 예측 모드를 제1 후보 화면 내 예측 모드로 결정할 수 있고(단계 S820), mpm_idx가 1인 경우 현재 예측 단위의 화면 내 예측 모드를 제2 후보 화면 내 예측 모드로 결정할 수 있다(단계 S830).By determining mpm_idx (step S810), if mpm_idx is 0, the intra-screen prediction mode of the current prediction unit can be determined as the first candidate intra-screen prediction mode (step S820), and if mpm_idx is 1, the intra-screen prediction mode of the current prediction unit can be determined (step S820). The prediction mode may be determined as the prediction mode within the second candidate screen (step S830).

prev_intra_pred_flag가 0인 경우 나머지 화면 내 예측 모드 정보를 나타내는 rem_intra_pred_mode를 기초로 현재 예측 단위의 화면 내 예측 모드 정보를 복호화할 수 있다(단계 S840).If prev_intra_pred_flag is 0, the intra-screen prediction mode information of the current prediction unit can be decoded based on rem_intra_pred_mode indicating the remaining intra-prediction mode information (step S840).

즉, 복호화기에서는 표 4에서 전술한 코드 워드값을 전송받고 해당 코드 워드에 할당된 현재 예측 단위의 화면 내 예측 모드 정보를 복호할 수 있다. That is, the decoder can receive the code word value described above in Table 4 and decode the intra-screen prediction mode information of the current prediction unit assigned to the code word.

rem_intra_pred_mode에 할당된 코드 워드를 변경한다(단계 S850).The code word assigned to rem_intra_pred_mode is changed (step S850).

복호화기에서는 부호화기에서 전술한 바와 마찬가지로 나머지 화면 내 예측 모드값이 새로운 코드 워드로 할당될 수 있다. 발생된 현재 예측 단위의 예측 모드의 모드값과 제1 후보 화면 내 예측 모드값 및 제2 후보 화면 내 예측 모드값의 크기를 비교하여 제1 후보 화면 내 예측 모드값과 제2 후보 화면 내 예측 모드값 중 현재 예측 단위의 예측 모드 값보다 작은 값을 가진 경우의 수를 판단하여 이를 현재 매핑 테이블 상에서 제외하여 코드 워드를 새롭게 할당할 수 있다.In the decoder, as described above in the encoder, the remaining intra-screen prediction mode values may be assigned to a new code word. By comparing the size of the prediction mode value of the generated current prediction unit, the prediction mode value within the first candidate screen, and the prediction mode value within the second candidate screen, the prediction mode value within the first candidate screen and the prediction mode within the second candidate screen are compared. The number of cases with values smaller than the prediction mode value of the current prediction unit can be determined and excluded from the current mapping table to assign a new code word.

본 발명의 실시예에 따른 화면 내 예측 모드 정보 판단 방법에서 전술한 바와64x64 같이 크기의 변환 단위를 사용할 경우, 현재 예측 단위의 화면 내 예측 모드의 종류와 코드 워드를 5와 같이 매핑하였다면, 현재 예측 단위의 화면 내 예측 모드와 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드가 동일한지 여부를 판단하는 프로세스 없이도 현재 예측 단위의 화면 내 예측 모드 정보를 고정된 2비트로써 표현할 수 있다. In the method for determining intra-prediction mode information according to an embodiment of the present invention, when a conversion unit of size such as 64x64 is used as described above, if the type of intra-prediction mode and code word of the current prediction unit are mapped as 5, the current prediction The intra-prediction mode information of the current prediction unit can be expressed as a fixed 2 bits without the process of determining whether the unit's intra-prediction mode, the first candidate intra-prediction mode, and the second candidate intra-prediction mode are the same.

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

Claims (3)

현재 블록의 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드를 유도하는 단계;
상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드와 동일한지 여부를 n 비트 정보를 기초로 결정하는 단계;
상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드와 동일한 경우, 추가의 m 비트 정보를 기초로 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 어떠한 후보 화면 내 예측 모드가 상기 현재 블록의 화면 내 예측 모드와 동일한지를 결정하는 단계;
상기 현재 블록의 화면 내 예측 모드를 획득하는 단계;
상기 현재 블록의 화면 내 예측 모드를 기초로 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함하고,
상기 현재 블록의 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 유도하는 단계는,
상기 현재 블록에 인접한 제1 이웃 블록을 기초로 제1 이웃 예측 모드를 유도하는 단계;
상기 제1 이웃 블록이 가용한 경우, 상기 제1 이웃 예측 모드는 상기 제1 이웃 블록의 화면 내 예측 모드로 설정되고,
상기 제1 이웃 블록이 가용하지 않은 경우, 상기 제1 이웃 예측 모드는 DC 모드로 설정되고,
상기 현재 블록에 인접한 제2 이웃 블록을 기초로 제2 이웃 예측 모드를 유도하는 단계;
상기 제2 이웃 블록이 가용한 경우, 상기 제2 이웃 예측 모드는 상기 제2 이웃 블록의 화면 내 예측 모드로 설정되고,
상기 제2 이웃 블록이 가용하지 않은 경우, 상기 제2 이웃 예측 모드는 DC 모드로 설정되고; 및
상기 제1 이웃 예측 모드 및 상기 제2 이웃 예측 모드로부터 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 유도하는 단계를 포함하고,
상기 제1 이웃 예측 모드와 상기 제2 이웃 예측 모드가 다른 경우, 상기 제1 후보 예측 모드 및 상기 제2 후보 예측 모드는 상기 제1 이웃 예측 모드와 상기 제2 이웃 예측 모드의 값을 비교하지 아니하고 결정되는, 영상 복호화 방법.
Deriving a first candidate intra-picture prediction mode and a second candidate intra-picture prediction mode of the current block;
determining whether the intra-prediction mode of the current block is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode based on n-bit information;
When the intra-prediction mode of the current block is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode, the first candidate intra-prediction mode or the second candidate intra-prediction mode is based on additional m-bit information. determining which of the candidate intra-prediction modes is the same as the intra-prediction mode of the current block;
Obtaining an intra-prediction mode of the current block;
Obtaining a prediction sample of the current block based on the intra-prediction mode of the current block,
The step of deriving the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode of the current block includes:
Deriving a first neighboring prediction mode based on a first neighboring block adjacent to the current block;
If the first neighboring block is available, the first neighboring prediction mode is set to the intra-screen prediction mode of the first neighboring block,
If the first neighboring block is not available, the first neighboring prediction mode is set to DC mode,
Deriving a second neighboring prediction mode based on a second neighboring block adjacent to the current block;
If the second neighboring block is available, the second neighboring prediction mode is set to the intra-screen prediction mode of the second neighboring block,
If the second neighboring block is not available, the second neighboring prediction mode is set to DC mode; and
Deriving the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode from the first neighbor prediction mode and the second neighbor prediction mode,
When the first neighbor prediction mode and the second neighbor prediction mode are different, the first candidate prediction mode and the second candidate prediction mode do not compare the values of the first neighbor prediction mode and the second neighbor prediction mode. Determined video decoding method.
현재 블록의 화면 내 예측 모드를 결정하는 단계;
화면 내 예측을 수행하여 부호화 대상 영상 신호에 포함되는 상기 현재 블록에 대한 예측 샘플을 생성하는 단계;
상기 현재 블록의 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드를 유도하는 단계;
상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드와 동일한지 여부를 지시하는 n 비트 정보를 부호화하는 단계;
상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드와 동일한 경우, 상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 현재 블록의 화면 내 예측 모드와 동일한 하나의 화면 내 예측 모드를 지시하는 추가의 m 비트 정보를 부호화하는 단계를 포함하고,
상기 현재 블록의 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 유도하는 단계는,
상기 현재 블록에 인접한 제1 이웃 블록을 기초로 제1 이웃 예측 모드를 유도하는 단계;
상기 제1 이웃 블록이 가용한 경우, 상기 제1 이웃 예측 모드는 상기 제1 이웃 블록의 화면 내 예측 모드로 설정되고,
상기 제1 이웃 블록이 가용하지 않은 경우, 상기 제1 이웃 예측 모드는 DC 모드로 설정되고,
상기 현재 블록에 인접한 제2 이웃 블록을 기초로 제2 이웃 예측 모드를 유도하는 단계;
상기 제2 이웃 블록이 가용한 경우, 상기 제2 이웃 예측 모드는 상기 제2 이웃 블록의 화면 내 예측 모드로 설정되고,
상기 제2 이웃 블록이 가용하지 않은 경우, 상기 제2 이웃 예측 모드는 DC 모드로 설정되고; 및
상기 제1 이웃 예측 모드 및 상기 제2 이웃 예측 모드로부터 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 유도하는 단계를 포함하고,
상기 제1 이웃 예측 모드와 상기 제2 이웃 예측 모드가 다른 경우, 상기 제1 후보 예측 모드 및 상기 제2 후보 예측 모드는 상기 제1 이웃 예측 모드와 상기 제2 이웃 예측 모드의 값을 비교하지 아니하고 결정되는, 영상 부호화 방법.
determining an intra-screen prediction mode for the current block;
performing intra-prediction to generate a prediction sample for the current block included in the video signal to be encoded;
Deriving a first intra-candidate prediction mode and a second intra-candidate prediction mode of the current block;
Encoding n-bit information indicating whether the intra-prediction mode of the current block is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode;
If the intra-prediction mode of the current block is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode, the intra-prediction mode of the current block is the first candidate intra-prediction mode or the second candidate intra-prediction mode. 2. Encoding additional m bits of information indicating one intra-prediction mode that is the same as the intra-prediction mode of the current block among the candidate intra-prediction modes,
The step of deriving the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode of the current block includes:
Deriving a first neighboring prediction mode based on a first neighboring block adjacent to the current block;
If the first neighboring block is available, the first neighboring prediction mode is set to the intra-screen prediction mode of the first neighboring block,
If the first neighboring block is not available, the first neighboring prediction mode is set to DC mode,
Deriving a second neighboring prediction mode based on a second neighboring block adjacent to the current block;
If the second neighboring block is available, the second neighboring prediction mode is set to the intra-screen prediction mode of the second neighboring block,
If the second neighboring block is not available, the second neighboring prediction mode is set to DC mode; and
Deriving the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode from the first neighbor prediction mode and the second neighbor prediction mode,
When the first neighbor prediction mode and the second neighbor prediction mode are different, the first candidate prediction mode and the second candidate prediction mode do not compare the values of the first neighbor prediction mode and the second neighbor prediction mode. Video encoding method determined.
영상 부호화 방법에 의하여 생성된 비트스트림을 저장한 컴퓨터 판독 가능한 비일시적 기록매체로서, 상기 영상 부호화 방법은,
현재 블록의 화면 내 예측 모드를 결정하는 단계;
화면 내 예측을 수행하여 부호화 대상 영상 신호에 포함되는 상기 현재 블록에 대한 예측 샘플을 생성하는 단계;
상기 현재 블록의 제1 후보 화면 내 예측 모드 및 제2 후보 화면 내 예측 모드를 유도하는 단계;
상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드와 동일한지 여부를 지시하는 n 비트 정보를 부호화하는 단계;
상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드와 동일한 경우, 상기 현재 블록의 화면 내 예측 모드가 상기 제1 후보 화면 내 예측 모드 또는 상기 제2 후보 화면 내 예측 모드 중 현재 블록의 화면 내 예측 모드와 동일한 하나의 화면 내 예측 모드를 지시하는 추가의 m 비트 정보를 부호화하는 단계를 포함하고,
상기 현재 블록의 화면 내 예측 모드를 획득하는 단계; 및
상기 현재 블록의 화면 내 예측 모드를 기초로 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함하고,
상기 현재 블록의 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 유도하는 단계는,
상기 현재 블록에 인접한 제1 이웃 블록을 기초로 제1 이웃 예측 모드를 유도하는 단계;
상기 제1 이웃 블록이 가용한 경우, 상기 제1 이웃 예측 모드는 상기 제1 이웃 블록의 화면 내 예측 모드로 설정되고,
상기 제1 이웃 블록이 가용하지 않은 경우, 상기 제1 이웃 예측 모드는 DC 모드로 설정되고,
상기 현재 블록에 인접한 제2 이웃 블록을 기초로 제2 이웃 예측 모드를 유도하는 단계;
상기 제2 이웃블록이 가용한 경우, 상기 제2 이웃 예측 모드는 상기 제2 이웃 블록의 화면 내 예측 모드로 설정되고,
상기 제2 이웃 블록이 가용하지 않은 경우, 상기 제2 이웃 예측 모드는 DC 모드로 설정되고; 및
상기 제1 이웃 예측 모드 및 상기 제2 이웃 예측 모드로부터 상기 제1 후보 화면 내 예측 모드 및 상기 제2 후보 화면 내 예측 모드를 유도하는 단계를 포함하고,
상기 제1 이웃 예측 모드와 상기 제2 이웃 예측 모드가 다른 경우, 상기 제1 후보 예측 모드 및 상기 제2 후보 예측 모드는 상기 제1 이웃 예측 모드와 상기 제2 이웃 예측 모드의 값을 비교하지 아니하고 결정되는, 컴퓨터 판독 가능한 비일시적 기록매체.
A computer-readable non-transitory recording medium storing a bitstream generated by an image encoding method, the image encoding method comprising:
determining an intra-screen prediction mode for the current block;
performing intra-prediction to generate a prediction sample for the current block included in the video signal to be encoded;
Deriving a first intra-candidate prediction mode and a second intra-candidate prediction mode of the current block;
Encoding n-bit information indicating whether the intra-prediction mode of the current block is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode;
If the intra-prediction mode of the current block is the same as the first candidate intra-prediction mode or the second candidate intra-prediction mode, the intra-prediction mode of the current block is the first candidate intra-prediction mode or the second candidate intra-prediction mode. 2. Encoding additional m bits of information indicating one intra-screen prediction mode that is the same as the intra-prediction mode of the current block among the candidate intra-prediction modes,
Obtaining an intra-prediction mode of the current block; and
Obtaining a prediction sample of the current block based on the intra-prediction mode of the current block,
The step of deriving the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode of the current block includes:
Deriving a first neighboring prediction mode based on a first neighboring block adjacent to the current block;
If the first neighboring block is available, the first neighboring prediction mode is set to the intra-screen prediction mode of the first neighboring block,
If the first neighboring block is not available, the first neighboring prediction mode is set to DC mode,
Deriving a second neighboring prediction mode based on a second neighboring block adjacent to the current block;
If the second neighboring block is available, the second neighboring prediction mode is set to the intra-screen prediction mode of the second neighboring block,
If the second neighboring block is not available, the second neighboring prediction mode is set to DC mode; and
Deriving the first candidate intra-picture prediction mode and the second candidate intra-picture prediction mode from the first neighbor prediction mode and the second neighbor prediction mode,
When the first neighbor prediction mode and the second neighbor prediction mode are different, the first candidate prediction mode and the second candidate prediction mode do not compare the values of the first neighbor prediction mode and the second neighbor prediction mode. A computer-readable, non-transitory recording medium, as determined.
KR1020230039829A 2020-11-26 2023-03-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same KR102639255B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020230039829A KR102639255B1 (en) 2020-11-26 2023-03-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020240022815A KR20240025580A (en) 2020-11-26 2024-02-16 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020200161561A KR102297268B1 (en) 2020-01-17 2020-11-26 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020220078456A KR102516137B1 (en) 2020-11-26 2022-06-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020230039829A KR102639255B1 (en) 2020-11-26 2023-03-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020220078456A Division KR102516137B1 (en) 2020-11-26 2022-06-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020240022815A Division KR20240025580A (en) 2020-11-26 2024-02-16 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Publications (2)

Publication Number Publication Date
KR20230044388A KR20230044388A (en) 2023-04-04
KR102639255B1 true KR102639255B1 (en) 2024-02-21

Family

ID=77794380

Family Applications (4)

Application Number Title Priority Date Filing Date
KR1020210113856A KR102415377B1 (en) 2020-11-26 2021-08-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020220078456A KR102516137B1 (en) 2020-11-26 2022-06-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020230039829A KR102639255B1 (en) 2020-11-26 2023-03-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020240022815A KR20240025580A (en) 2020-11-26 2024-02-16 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Family Applications Before (2)

Application Number Title Priority Date Filing Date
KR1020210113856A KR102415377B1 (en) 2020-11-26 2021-08-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR1020220078456A KR102516137B1 (en) 2020-11-26 2022-06-27 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020240022815A KR20240025580A (en) 2020-11-26 2024-02-16 Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same

Country Status (1)

Country Link
KR (4) KR102415377B1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
homas Wiegand, et. al., "WD3: Working Draft 3 of High-Efficiency Video Coding", Joint collaborative team on viedo coding of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, JCTVC-E603_d8.*

Also Published As

Publication number Publication date
KR102516137B1 (en) 2023-03-30
KR20240025580A (en) 2024-02-27
KR20210108354A (en) 2021-09-02
KR102415377B1 (en) 2022-07-04
KR20230044388A (en) 2023-04-04
KR20220097371A (en) 2022-07-07

Similar Documents

Publication Publication Date Title
KR102636668B1 (en) Methods of coding block information using quadtree and appararuses for using the same
KR102653005B1 (en) Intra prediction method of chrominance block using luminance sample, and apparatus using same
KR102194295B1 (en) Method for setting motion vector list and apparatus using same
KR101549910B1 (en) Adaptive transform method based on in-screen rediction and apparatus using the method
US10284841B2 (en) Method for encoding/decoding an intra-picture prediction mode using two intra-prediction mode candidate, and apparatus using such a method
WO2012074344A2 (en) Method for indexing motion information lists and apparatus using same
KR20130085979A (en) Method of mapping intra prediction modes and apparatus for using the same
KR101802375B1 (en) Methods of derivation of temporal motion vector predictor and appratuses using the same
KR102639255B1 (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR102185952B1 (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR102297268B1 (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR102069784B1 (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
US11973933B1 (en) Method for encoding/decoding an intra-picture prediction mode using two intra-prediction mode candidate, and apparatus using such a method

Legal Events

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