KR20040093253A - 16x16 intra luma prediction mode determining method and apparatus - Google Patents

16x16 intra luma prediction mode determining method and apparatus Download PDF

Info

Publication number
KR20040093253A
KR20040093253A KR1020030025529A KR20030025529A KR20040093253A KR 20040093253 A KR20040093253 A KR 20040093253A KR 1020030025529 A KR1020030025529 A KR 1020030025529A KR 20030025529 A KR20030025529 A KR 20030025529A KR 20040093253 A KR20040093253 A KR 20040093253A
Authority
KR
South Korea
Prior art keywords
prediction
block
prediction mode
group
mode
Prior art date
Application number
KR1020030025529A
Other languages
Korean (ko)
Inventor
하형석
이남숙
김소영
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020030025529A priority Critical patent/KR20040093253A/en
Publication of KR20040093253A publication Critical patent/KR20040093253A/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B23/00Record carriers not specific to the method of recording or reproducing; Accessories, e.g. containers, specially adapted for co-operation with the recording or reproducing apparatus ; Intermediate mediums; Apparatus or processes specially adapted for their manufacture
    • G11B23/02Containers; Storing means both adapted to cooperate with the recording or reproducing means
    • G11B23/04Magazines; Cassettes for webs or filaments
    • G11B23/08Magazines; Cassettes for webs or filaments for housing webs or filaments having two distinct ends
    • G11B23/087Magazines; Cassettes for webs or filaments for housing webs or filaments having two distinct ends using two different reels or cores
    • G11B23/08707Details
    • G11B23/0875Indicating means, e.g. quantity of tape
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B23/00Record carriers not specific to the method of recording or reproducing; Accessories, e.g. containers, specially adapted for co-operation with the recording or reproducing apparatus ; Intermediate mediums; Apparatus or processes specially adapted for their manufacture
    • G11B23/02Containers; Storing means both adapted to cooperate with the recording or reproducing means
    • G11B23/04Magazines; Cassettes for webs or filaments
    • G11B23/08Magazines; Cassettes for webs or filaments for housing webs or filaments having two distinct ends
    • G11B23/087Magazines; Cassettes for webs or filaments for housing webs or filaments having two distinct ends using two different reels or cores
    • G11B23/08707Details
    • G11B23/08714Auxiliary features
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B33/00Constructional parts, details or accessories not provided for in the other groups of this subclass
    • G11B33/02Cabinets; Cases; Stands; Disposition of apparatus therein or thereon
    • G11B33/04Cabinets; Cases; Stands; Disposition of apparatus therein or thereon modified to store record carriers
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B2220/00Record carriers by type
    • G11B2220/90Tape-like record carriers

Abstract

PURPOSE: A method and an apparatus for determining a 16x16 intra luminance prediction mode are provided to apply only certain modes without applying 4 modes, perform prediction, and determine an optimal 16x16 intra luminance prediction mode. CONSTITUTION: A prediction mode information analyzing unit(1310) receives mode information of sub-blocks of a block to be predicted, analyzes received mode information, and outputs a prediction mode of the block to be predicted. A 16x16 block prediction performing unit(1320) applies the prediction mode received from the prediction mode information analyzing unit, and performs prediction with respect to the block to be predicted. A residue calculating unit(1330) calculates residue with respect to a prediction sample outputted from the 16x16 block prediction performing unit. A residue comparing unit(1340) compares residues calculated in the residue calculating unit, selects a mode with the minimum residue, and outputs the selected mode.

Description

16×16 인트라 휘도 예측 모드 결정방법 및 장치 {16x16 intra luma prediction mode determining method and apparatus}16 × 16 intra luma prediction mode determining method and apparatus

본 발명은 비디오 데이터의 부호화/복호화에 관한 것으로, 구체적으로는 비디오 부호화/복호화에 사용되는 예측모드(prediction mode)를 결정하는 방법 및 장치에 관한 것이다.The present invention relates to encoding / decoding of video data, and more particularly, to a method and apparatus for determining a prediction mode used for video encoding / decoding.

디지털 TV와 DVD-비디오가 등장함에 따라서 방송 서비스 및 홈 엔터테인먼트(home entertainment) 서비스가 크게 변화하였다. 이러한 방송 서비스 및 홈 엔터테인먼트 서비스에서 제공되는 여러가지 응용 서비스는 비디오 압축 기술의 표준화에 의해 가능하게 되었다. 비디오 압축 기술에 관한 표준들 중에서, MPEG4-visual은 인터넷 기반의 비디오 응용 서비스를 가능하게 하였고, ITU-T의 H.263 표준은 비디오 영상회의(videoconferencing) 시스템에서 널리 사용되고 있다.With the advent of digital TV and DVD-Video, broadcast and home entertainment services have changed significantly. Various application services provided by such broadcasting services and home entertainment services are made possible by standardization of video compression technology. Among the standards for video compression technology, MPEG4-visual enabled Internet-based video application services, and ITU-T's H.263 standard is widely used in videoconferencing systems.

MPEG4-visual과 H.263은 비디오 압축에 기반을 둔 표준이다. 이들 표준에 관여한 동영상 전문가 그룹(Moving Picture Experts Group : MPEG)과 비디오 코딩 전문가 그룹(Video Coding Experts Group : VCEG)은, MPEG4와 H.263보다 고품질(high-quality) 및 저속 비트율(low-bitrate) 스트리밍 비디오(streaming video)를 지원하면서 더 많은 압축을 할 수 있는 기술에 관한 다음 단계의 표준을 제정하기 위하여 논의를 하였다.MPEG4-visual and H.263 are standards based on video compression. Moving Picture Experts Group (MPEG) and Video Coding Experts Group (VCEG) involved in these standards are higher-quality and lower-bitrate than MPEG4 and H.263. The next step was to establish a standard for the next level of technology that would allow more compression while supporting streaming video.

H.263 표준을 완성한 후에 ITU-T의 비디오 코딩 전문가 그룹(VCEG)은 H.263에 부가적인 기능을 추가한 H.263 version 2 표준에 관한 연구와, 저비트율로 영상 통신을 하기 위한 새로운 표준에 관한 연구를 시작하였다. 이중에서 저비트율의 영상 통신을 하기 위한 새로운 표준을 ITU-T H.26L로 명명하였다. 또한, ISO의 동영상 전문가 그룹(MPEG)에서도 이러한 새로운 표준에 대한 중요성을 인식하여 ITU-T의 비디오 코딩 전문가 그룹(VCEG)과 조인트 비디오 팀(Joint Video Team : JVT)을 구성하여 H.26L 모델을 국제 표준으로 정하기 위한 연구를 시작하였다. 이렇게 하여 정해진 표준이 ISO MPEG4 Part 10, 즉, ITU-T H.264이다. 이 표준의 공식 명칭은 MPEG-4 Advanced Video Coding(AVC)이지만, H.264로 더 잘 알려져 있다.After the completion of the H.263 standard, ITU-T's Video Coding Experts Group (VCEG) worked on the H.263 version 2 standard, which added additional functionality to H.263, and a new standard for low-bit rate video communications. Started research on. The new standard for low bit rate video communication is named ITU-T H.26L. In addition, ISO's Video Experts Group (MPEG) recognizes the importance of this new standard and has formed a joint video team (JVT) with ITU-T's Video Coding Experts Group (VCEG) to build the H.26L model. The study began to set international standards. The standard thus defined is ISO MPEG4 Part 10, that is, ITU-T H.264. The official name of this standard is MPEG-4 Advanced Video Coding (AVC), but is better known as H.264.

도 1은 H.264 인코더의 블록도이다.1 is a block diagram of an H.264 encoder.

H.264 인코더는 크게 예측부(prediction block)(110), 변환 및 양자화부(transform and quantization block)(120), 엔트로피 코딩부(entropy coding block)(130)를 구비한다.The H.264 encoder largely includes a prediction block 110, a transform and quantization block 120, and an entropy coding block 130.

예측부(110)는 인터 프리딕션(inter prediction)과 인트라 프리딕션(intra prediction)을 수행한다. 인터 프리딕션은, 이미 디코딩이 수행되고 디블록킹 필터링(deblocking filtering)이 수행되어 버퍼에 저장되어 있는 기준 픽처(reference picture)를 이용하여 현재 픽처의 블록예측을 수행하는 것을 말한다. 즉, 픽처들간의 정보를 이용하여 예측을 수행하는 것을 말한다. 이를 위하여 움직임 추정부(motion estimation block)(111) 및 움직임 보상부(motion compensation block)(112)를 구비한다. 인트라 프리딕션은, 이미 디코딩이 수행된 픽처내에서, 예측하고자 하는 블록에 인접한 블록의 픽셀 데이터를 이용하여 예측을 수행하는 것을 말한다.The prediction unit 110 performs inter prediction and intra prediction. Interprediction refers to performing block prediction of a current picture by using a reference picture stored in a buffer by performing decoding and deblocking filtering. That is, prediction is performed by using information between pictures. To this end, a motion estimation block 111 and a motion compensation block 112 are provided. Intra prediction refers to performing prediction using pixel data of a block adjacent to a block to be predicted in a picture that has already been decoded.

변환 및 양자화부(120)는 예측부(110)에서 예측을 수행하여 얻은 예측 샘플을 변환하고(transform) 양자화(quantization)하여 압축한다. 엔트로피 코딩부(130)는 양자화된 비디오 데이터에 대해서 소정의 방식에 따라 부호화를 수행하여 H.264 비트스트림으로 만든다.The transform and quantization unit 120 transforms, predicts, and compresses the prediction samples obtained by performing the prediction in the prediction unit 110. The entropy coding unit 130 performs encoding on the quantized video data in a predetermined manner to form an H.264 bitstream.

도 2는 H.264 디코더의 블록도이다.2 is a block diagram of an H.264 decoder.

H.264 디코더는 H.264 인코더에서 인코딩된 비트스트림을 수신하여 엔트로피 디코딩하고 역양자화 및 역변환을 수행하며 움직임 보상 또는 인트라 프리딕션 수행된 기준 픽처 정보를 이용하여 디코딩을 수행한다.The H.264 decoder receives the bitstream encoded by the H.264 encoder, performs entropy decoding, performs inverse quantization and inverse transformation, and performs decoding using reference picture information that has been subjected to motion compensation or intra prediction.

도 3은 예측하고자 하는 휘도(luminance : luma) 블록(P)과 예측에 사용되는 인접 블록을 도시한 도면이다.FIG. 3 is a diagram illustrating a luma block P to be predicted and an adjacent block to be used for prediction.

블록 또는 매크로블록이 인트라 모드에서 인코딩되어 있으면, 예측하고자 하는 블록 P(310)는 그 블록에 인접한 디코딩된 블록(A 내지 L)을 이용하여 예측된다. 예측은 휘도(luma) 블록뿐만 아니라 색도(Cb, Cr) 블록에 대해서도 수행되는데, 본 발명에서는 휘도 블록의 예측에 관하여 설명한다. 휘도 예측 블록 P(310)는 여러개의 4x4 블록으로 구성된 16x16 블록이다. 여기에서, a 내지 p는 예측하고자 하는 4x4 블록이고, A, B, C, D 및 I, J, K, L은 예측에 사용되는 블록이다.If a block or macroblock is encoded in intra mode, block P 310 to be predicted is predicted using the decoded blocks A to L adjacent to the block. The prediction is performed not only on the luma block but also on the chromaticity (Cb, Cr) blocks. In the present invention, prediction of the luminance block will be described. The luminance prediction block P 310 is a 16x16 block composed of several 4x4 blocks. Here, a to p are 4x4 blocks to be predicted, and A, B, C, D and I, J, K, and L are blocks used for prediction.

인트라 프리딕션은 예측하고자 하는 블록의 크기에 따라서 4x4 예측과 16x16 예측의 두가지 종류가 있다. 그리고, 예측하는 방향에 따라, 4x4 예측에는 9가지의 모드가 있고, 16x16 예측에는 4가지 모드가 있다. 4x4 예측모드는 예측하고자 하는 4x4 블록에 인접한 블록(A, B, C, D 및 I, J, K, L)의 픽셀값을 이용하여 예측 샘플을 구할 때의 예측 방향에 따라서 나누어진다.There are two types of intra prediction, 4x4 prediction and 16x16 prediction, depending on the size of the block to be predicted. According to the prediction direction, there are nine modes for 4x4 prediction and four modes for 16x16 prediction. The 4x4 prediction mode is divided according to the prediction direction when a prediction sample is obtained using pixel values of blocks A, B, C, D and I, J, K, and L adjacent to the 4x4 block to be predicted.

도 4는 4x4 인트라 휘도 예측(intra luma prediction) 모드의 종류를 도시한 도표이다.4 is a diagram illustrating the types of 4x4 intra luma prediction modes.

도 4를 참조하면, 4x4 인트라 휘도 예측 모드는, vertical 모드, horizontal 모드, DC 모드, diagonal_down_left 모드, diagonal_down_right 모드, vertical_right 모드, horizontal_down 모드, vertical_up 모드, horizontal_up 모드가 있음을 알 수 있다. 각각의 예측 모드에서 예측이 수행되는 방향은 도 5를 참조하여 설명한다. 그리고, 각 모드에서의 블록의 예측은 도 6a 내지 도 6i를 참조하여 설명한다.Referring to FIG. 4, it can be seen that the 4x4 intra luminance prediction mode includes a vertical mode, a horizontal mode, a DC mode, a diagonal_down_left mode, a diagonal_down_right mode, a vertical_right mode, a horizontal_down mode, a vertical_up mode, and a horizontal_up mode. The direction in which the prediction is performed in each prediction mode will be described with reference to FIG. 5. The prediction of the block in each mode is described with reference to FIGS. 6A to 6I.

도 5는 H.264의 4x4 인트라 휘도 예측에서의 9가지 예측 방향을 도시한 도면이다.FIG. 5 is a diagram illustrating nine prediction directions in 4x4 intra luminance prediction of H.264.

도 5를 참조하면, 각각의 모드 이름에 대응되도록, 수직방향, 수평방향 또는 대각선 방향 등으로 블록의 예측이 수행됨을 알 수 있다.Referring to FIG. 5, it can be seen that prediction of a block is performed in a vertical direction, a horizontal direction, or a diagonal direction to correspond to each mode name.

도 6a 내지 도 6i는 4x4 인트라 휘도 예측 모드에 따라 예측을 수행하는 것을 설명하기 위한 도면이다.6A through 6I are diagrams for describing performing prediction according to a 4x4 intra luminance prediction mode.

예를 들어, 모드 0(vertical 모드)에서는 4x4 블록 a, e, i, m은 A 블록의 픽셀값을 사용하여 예측되고, b, f, j, n은 B 블록의 픽셀값을 사용하여 예측되고, c, g, k, o는 C 블록의 픽셀값을 사용하여 예측되며, d, h, l, p는 D 블록의 픽셀값을 사용하여 예측된다. 그 밖의 다른 모드에서의 예측방법은 H.264 표준에 상세히 설명되어 있는 바와 같다.For example, in mode 0 (vertical mode), the 4x4 blocks a, e, i, m are predicted using the pixel values of the A block, and b, f, j, n are predicted using the pixel values of the B block. , c, g, k, o are predicted using the pixel values of the C block, and d, h, l, p are predicted using the pixel values of the D block. Prediction methods in other modes are as detailed in the H.264 standard.

도 7은 16x16 인트라 휘도 예측(intra luma prediction) 모드의 종류를 도시한 도표이다.7 is a diagram illustrating the types of 16x16 intra luma prediction modes.

도 7을 참조하면, 16x16 인트라 휘도 예측 모드는, vertical 모드, horizontal 모드, DC 모드, plane 모드의 모두 4가지가 있음을 알 수 있다. 각각의 예측 모드에서 예측이 수행되는 방향은 도 8a 내지 도 8d를 참조하여 설명한다.Referring to FIG. 7, it can be seen that there are four types of 16x16 intra luminance prediction modes: vertical mode, horizontal mode, DC mode, and plane mode. The direction in which prediction is performed in each prediction mode is described with reference to FIGS. 8A to 8D.

도 8a 내지 도 8d는 16x16 인트라 휘도 예측 모드에 따라 예측을 수행하는 것을 설명하기 위한 도면이다.8A to 8D are diagrams for describing performing prediction according to a 16x16 intra luminance prediction mode.

16x16 휘도 매크로 블록내의 각 블록은 블록 H의 픽셀값과 블록 V의 픽셀값을 사용하여 예측된다. 다시 말하면, 모드 0(vertical 모드)에서 16x16 휘도 매크로 블록내의 각 블록은 블록 H의 픽셀값을 사용하여 예측되고, 모드 1(horizontal 모드)에서 16x16 휘도 매크로 블록내의 각 블록은 블록 V의 픽셀값을 사용하여 예측되고, 모드 2(DC 모드)에서 16x16 휘도 매크로 블록내의 각 블록은 블록 H의 픽셀값과 블록 V의 픽셀값을 평균하여 예측되고, 모드 3(plane 모드)에서 16x16 휘도 매크로 블록내의 각 블록은 블록 H의 픽셀값과 블록 V의 픽셀값을 모두 사용하여 예측된다. 상세한 예측방법은 MPEG-4 AVC 표준에 상세히 기술되어 있다.Each block in the 16x16 luma macroblock is predicted using the pixel value of block H and the pixel value of block V. In other words, in mode 0 (vertical mode) each block in the 16x16 luma macroblock is predicted using the pixel value of block H, and in mode 1 (horizontal mode) each block in the 16x16 luma macroblock is the pixel value of block V. Predicted by using each block in a 16x16 luma macroblock in mode 2 (DC mode) is estimated by averaging the pixel values in block H and pixel values in block V, and in each of the 16x16 luma macroblocks in mode 3 (plane mode) The block is predicted using both the pixel value of block H and the pixel value of block V. Detailed prediction methods are described in detail in the MPEG-4 AVC Standard.

H.264 인코딩시에는 16x16 인트라 휘도 예측 모드들 중에서 가장 좋은 모드를 선택하여 예측을 수행한다. 어떤 모드를 선택하여 16x16 블록의 휘도 예측을 수행하는가에 따라서 H.264의 압축효율이 달라지는데, 가장 좋은 모드를 선택하기 위해서 모든 모드를 적용하여 블록의 예측을 수행하고, 소정의 코스트 함수(cost function)를 사용하여 코스트(cost)를 계산한 후, 코스트가 적은 모드를 선택한다. 따라서, 예측하고자 하는 블록에 대해서 4가지 각각의 모드를 모두 적용하여 예측을 수행하고 코스트를 계산하여야 하므로, 인코더가 매우 복잡해진다는 문제점이 있다.In H.264 encoding, prediction is performed by selecting a best mode among 16x16 intra luminance prediction modes. The compression efficiency of H.264 varies according to which mode is selected to perform the 16x16 block luminance prediction.To select the best mode, the prediction of the block is performed by applying all modes and a predetermined cost function Calculate the cost using, and select the mode with the lowest cost. Therefore, since all four modes must be applied to the block to be predicted to perform the prediction and the cost is calculated, the encoder becomes very complicated.

본 발명이 이루고자 하는 기술적 과제는, 16x16 인트라 휘도 예측 모드를 결정하는데 있어 16x16 인트라 휘도 예측의 4가지 모드를 모두 적용하여 예측을 수행하지 않고도, 몇 개의 모드만을 적용하여 예측을 수행하고도 최적의 16x16 인트라 휘도 예측 모드를 결정할 수 있는 16x16 인트라 휘도 예측 모드 결정방법 및 장치를 제공하는데 있다.The technical problem to be achieved by the present invention is to determine the 16x16 intra luminance prediction mode, without applying all four modes of 16x16 intra luminance prediction to perform the prediction by applying only a few modes of the prediction 16x16 The present invention provides a method and apparatus for determining a 16x16 intra luminance prediction mode capable of determining an intra luminance prediction mode.

도 1은 H.264 인코더의 블록도이다.1 is a block diagram of an H.264 encoder.

도 2는 H.264 디코더의 블록도이다.2 is a block diagram of an H.264 decoder.

도 3은 예측하고자 하는 휘도 블록(P)과 예측에 사용되는 인접 블록을 도시한 도면이다.3 is a diagram illustrating a luminance block P to be predicted and an adjacent block used for prediction.

도 4는 4x4 인트라 휘도 예측(intra luma prediction) 모드의 종류를 도시한 도표이다.4 is a diagram illustrating the types of 4x4 intra luma prediction modes.

도 5는 H.264의 4x4 인트라 휘도 예측에서의 9가지 예측 방향을 도시한 도면이다.FIG. 5 is a diagram illustrating nine prediction directions in 4x4 intra luminance prediction of H.264.

도 6a 내지 도 6i는 4x4 인트라 휘도 예측 모드에 따라 예측을 수행하는 것을 설명하기 위한 도면이다.6A through 6I are diagrams for describing performing prediction according to a 4x4 intra luminance prediction mode.

도 7은 16x16 인트라 휘도 예측(intra luma prediction) 모드의 종류를 도시한 도표이다.7 is a diagram illustrating the types of 16x16 intra luma prediction modes.

도 8a 내지 도 8i는 16x16 인트라 휘도 예측 모드에 따라 예측을 수행하는 것을 설명하기 위한 도면이다.8A to 8I are diagrams for describing performing prediction according to a 16x16 intra luminance prediction mode.

도 9는 4x4 인트라 휘도 예측모드를 3개의 그룹으로 나눈 것을 도시한 도면이다.9 is a diagram illustrating dividing a 4x4 intra luminance prediction mode into three groups.

도 10은 본 발명의 16x16 인트라 휘도 예측 모드 결정방법의 플로우차트이다.10 is a flowchart of a method for determining a 16x16 intra luminance prediction mode of the present invention.

도 11은 본 발명의 다른 16x16 인트라 휘도 예측 모드 결정방법을 설명하기 위한 도면이다.11 is a view for explaining another 16x16 intra luminance prediction mode determination method of the present invention.

도 12는 본 발명의 또 다른 16x16 인트라 휘도 예측 모드 결정방법을 설명하기 위한 도면이다.12 is a view for explaining another 16x16 intra luminance prediction mode determination method of the present invention.

도 13은 본 발명의 예측 모드 결정장치의 블록도이다.13 is a block diagram of the prediction mode determination apparatus of the present invention.

상기의 과제를 이루기 위하여 본 발명에 의한 예측모드 결정방법은, (a) 예측하고자 하는 블록의 서브 블록들의 예측모드 정보를 수신하여 분석하는 단계; 및 (b) 상기 분석결과에 따라서 상기 예측하고자 하는 블록의 예측모드를 선택하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method of determining a prediction mode, comprising: (a) receiving and analyzing prediction mode information of sub-blocks of a block to be predicted; And (b) selecting a prediction mode of the block to be predicted according to the analysis result.

상기의 과제를 이루기 위하여 본 발명에 의한 예측모드 결정방법은, (a) 16x16 휘도 블록의 첫번째 열 내에 위치한 4x4 휘도 블록의 예측모드가 속한 제1그룹과, 첫번째 행 내에 위치한 4x4 휘도 블록의 예측모드가 속한 제2그룹과, 그 외의 4x4 휘도 블록의 예측모드가 속한 제3그룹의 예측모드의 수를 계수하는 단계; 및 (b) 상기 예측모드의 수가 가장 큰 그룹에 대응되는 예측모드를 선택하여 출력하는 단계를 포함한다.In order to achieve the above object, the method of determining a prediction mode according to the present invention includes: (a) a prediction mode of a 4x4 luma block located in a first group and a first group to which a prediction mode of a 4x4 luma block located in a first column of a 16x16 luma block belongs; Counting the number of prediction modes of the third group to which the second group belongs and the prediction mode of other 4x4 luma blocks; And (b) selecting and outputting a prediction mode corresponding to the group having the largest number of prediction modes.

상기의 과제를 이루기 위하여 본 발명에 의한 예측모드 결정방법은, (a) 16x16 인트라 휘도 예측에 사용되는 상위 매크로 블록 샘플 및 좌측 매크로 블록 샘플, 그리고 4x4 인트라 휘도 예측에 사용되는 상위 블록 샘플 및 좌측 블록 샘플의 픽셀값을 행 단위 또는 열 단위로 비교하는 단계; 및 (b) 상기 비교결과 동일한가의 여부 또는 소정의 차이 이내인가의 여부에 따라서 16x16 예측모드를 선택하여 출력하는 단계를 포함한다.In order to achieve the above object, the prediction mode determination method according to the present invention includes (a) a higher macroblock sample and a left macroblock sample used for 16x16 intra luminance prediction, and an upper block sample and a left block used for 4x4 intra luminance prediction. Comparing pixel values of the sample in a row unit or a column unit; And (b) selecting and outputting a 16x16 prediction mode according to whether the comparison result is the same or within a predetermined difference.

상기의 과제를 이루기 위하여 본 발명에 의한 예측모드 결정장치는, 예측하고자 하는 블록의 서브블록의 모드정보를 입력받아 분석하여 상기 예측하고자 하는 블록의 예측모드를 출력하는 예측모드정보 분석부; 상기 서브블록 예측모드정보 분석부로부터 수신된 예측모드를 적용하여 상기 예측하고자 하는 블록에 대한 예측을 수행하는 블록 예측 수행부; 상기 블록 예측 수행부에서 출력된 예측 샘플에 대한예측오차를 계산하는 예측오차 계산부; 및 상기 예측오차 계산부에서 계산된 예측오차를 비교하여 예측오차가 최소인 모드를 선택하여 출력하는 예측오차 비교부를 포함한다.According to an aspect of the present invention, there is provided a prediction mode determining apparatus comprising: a prediction mode information analysis unit configured to receive mode information of a subblock of a block to be predicted and to output the prediction mode of the block to be predicted; A block prediction performing unit for performing prediction on the block to be predicted by applying the prediction mode received from the subblock prediction mode information analyzing unit; A prediction error calculator configured to calculate a prediction error of the prediction sample output from the block prediction execution unit; And a prediction error comparison unit comparing the prediction error calculated by the prediction error calculator to select and output a mode having the smallest prediction error.

상기한 과제를 이루기 위하여 본 발명에서는, 상기 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.In order to achieve the above object, the present invention provides a computer-readable recording medium recording a program for executing the method on a computer.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 9는 4x4 인트라 휘도 예측모드를 3개의 그룹으로 나눈 것을 도시한 도면이다.9 is a diagram illustrating dividing a 4x4 intra luminance prediction mode into three groups.

4x4 인트라 휘도 예측 모드를 예측방향이 유사한 3개의 그룹을 나눈다. 비슷한 예측방향을 갖는 모드간에는 유사성이 있다는 점에 착안하여, 4x4 인트라 휘도 예측에서의 9개의 모드를 3개의 그룹으로 나누고 그 결과를 16x16 인트라 휘도 예측에 사용한다.The 4x4 intra luminance prediction mode is divided into three groups with similar prediction directions. Considering the similarity between the modes having similar prediction directions, the nine modes in 4x4 intra luminance prediction are divided into three groups and the result is used for 16x16 intra luminance prediction.

다시 말하면, 모드 0(vertical 모드)을 포함하고 그에 인접한 방향인 모드 7 및 모드 5를 한 개의 그룹1(901)로 묶고, 모드 1(horizontal 모드)을 포함하고 그에 인접한 방향인 모드 8 및 모드 6을 다른 한 개의 그룹2(902)로 묶고, 모드 2(DC 모드)를 포함하고 나머지 대각선 방향의 모드인 모드 3 및 모드 4를 한 개의 그룹3(903)으로 묶는다. 그리고 어느 그룹에 속하는 4x4 블록의 휘도 예측모드가 가장 많이 발생하였는가를 판단한다. 그 결과에 따라서 후술하는 여러가지 방법을 사용하여 16x16 인트라 휘도 예측 모드를 결정한다. 이하 도 10 내지 도 12를 참조하여 16x16 인트라 휘도 예측 모드를 결정하는 여러가지 방법을 상세히 설명한다.In other words, mode 7 and mode 5, including mode 0 (vertical mode) and adjacent directions, are grouped into one group 1 901, and mode 8 and mode 6, including mode 1 (horizontal mode) and adjacent directions. And group 2 into the other group 2 (902), and group 3 (mode 3 and mode 4) including the mode 2 (DC mode) and the remaining diagonal modes into one group 3 (903). In addition, it is determined whether the luminance prediction mode of the 4x4 block belonging to which group occurs the most. According to the result, the 16x16 intra luminance prediction mode is determined using various methods described below. Hereinafter, various methods of determining a 16x16 intra luminance prediction mode will be described in detail with reference to FIGS. 10 to 12.

도 10은 본 발명의 16x16 인트라 휘도 예측 모드 결정방법의 플로우차트이다.10 is a flowchart of a method for determining a 16x16 intra luminance prediction mode of the present invention.

먼저 도 9를 참조하여 설명한 각 그룹에 속한 4x4 인트라 휘도 예측 모드들의 수를 계수한다(S1010). 그리고 각 그룹의 계수값과 소정의 기준치 A 값을 이용하여 하나의 그룹 또는 두개의 그룹을 선택한다. 다시 말하면, 만일 어느 한 그룹의 계수값과 다른 그룹들의 계수값들과의 차이가 소정의 기준치 이상인가를 판단하고(S1020), 기준치 이상이면 기준치 이상 큰 계수값을 갖는 그룹에 대응되는 16x16 인트라 휘도 예측모드를 선택하여 출력한다(S1030). 그렇지 않고, 각 그룹의 계수값들의 차이가 소정의 기준치를 넘지 않으면 비슷한 계수값을 갖는 그룹에 대응되는 16x16 인트라 휘도 예측모드들을 모두 선택하여 출력한다(S1040). 소정의 기준치는 예측성능과 예측방법의 복잡도에 따라서 달리 설정될 수 있다. 소정의 기준치 A를 크게 설정하면 예측성능은 좋아지지만 예측방법은 복잡해진다. 하나의 실시예로 소정의 기준치 A를 0으로 설정하면, 16x16 인트라 휘도 예측모드를 보다 간단히 선택할 수 있다.First, the number of 4x4 intra luminance prediction modes belonging to each group described with reference to FIG. 9 is counted (S1010). Then, one group or two groups are selected using coefficient values of each group and a predetermined reference value A. In other words, it is determined whether a difference between the coefficient value of one group and the coefficient values of other groups is greater than or equal to a predetermined reference value (S1020). The prediction mode is selected and output (S1030). Otherwise, if the difference between the coefficient values of each group does not exceed a predetermined reference value, all 16x16 intra luminance prediction modes corresponding to the group having similar coefficient values are selected and output (S1040). The predetermined reference value may be set differently according to the prediction performance and the complexity of the prediction method. If the predetermined reference value A is set large, the prediction performance is improved, but the prediction method is complicated. In one embodiment, when the predetermined reference value A is set to 0, the 16x16 intra luminance prediction mode can be selected more simply.

상기 S1030 단계와 S1040 단계에서 그룹 1이 선택되면 16x16 인트라 휘도 모드 0이 선택되어 출력되고, 그룹 2가 선택되면 16x16 인트라 휘도 예측모드 1이 선택되어 출력되며, 그룹 3이 선택되면 16x16 인트라 휘도 예측모드 2와 16x16 인트라 휘도 예측모드 3이 선택되어 출력된다. 따라서 16x16 인트라 휘도 예측모드 모두를 적용하여 예측을 수행하지 않고도 최대 2번의 모드만 적용하여 예측을 수행하여도 최적의 모드를 결정할 수 있다.In step S1030 and step S1040, if the group 1 is selected, 16x16 intra luminance mode 0 is selected and outputted; if the group 2 is selected, 16x16 intra luminance prediction mode 1 is selected and outputted; if the group 3 is selected, 16x16 intra luminance prediction mode 2 and 16x16 intra luminance prediction mode 3 are selected and output. Therefore, the optimal mode can be determined even if the prediction is performed by applying the maximum of two modes without performing the prediction by applying all the 16x16 intra luminance prediction modes.

도 11은 본 발명의 다른 16x16 인트라 휘도 예측 모드 결정방법을 설명하기 위한 도면이다.11 is a view for explaining another 16x16 intra luminance prediction mode determination method of the present invention.

각각의 4x4 휘도 블록의 인트라 휘도 예측모드가 어느 그룹에 속해 있는가를 검사한다. 즉, 만일 첫번째 열(1110) 내에 위치한 4x4 휘도 블록의 예측모드가 모두 그룹 1에 속하고, 첫번째 행(1120) 내에 위치한 4x4 휘도 블록의 예측모드가 모두 그룹 2에 속하지 않으며, 그 외(1130)에 위치한 4x4 휘도 블록의 예측모드가 소정의 설정개수 이상 그룹 1에 속하면 16x16 인트라 휘도 예측모드 0(vertical 모드)을 선택한다.It is checked to which group the intra luminance prediction mode of each 4x4 luma block belongs. That is, if the prediction modes of the 4x4 luma blocks located in the first column 1110 belong to group 1, the prediction modes of the 4x4 luma blocks located in the first row 1120 do not all belong to group 2, and others (1130). 16x16 intra luminance prediction mode 0 (vertical mode) is selected when the prediction mode of the 4x4 luma block located in the group 1 is greater than or equal to a predetermined number.

만일 첫번째 열(1110) 내에 위치한 4x4 휘도 블록의 예측모드가 모두 그룹 1에 속하지 않고, 첫번째 행(1120) 내에 위치한 4x4 휘도 블록의 예측모드가 모두 그룹 2에 속하며, 그 외(1130)에 위치한 4x4 휘도 블록의 예측모드가 소정의 설정개수 이상 그룹 2에 속하면 16x16 인트라 휘도 모드 1(horizontal 모드)을 선택한다.If the prediction modes of the 4x4 luma blocks located in the first column 1110 do not all belong to Group 1, the prediction modes of the 4x4 luma blocks located in the first row 1120 all belong to Group 2, and the 4x4 located in the other 1130. If the prediction mode of the luminance block belongs to Group 2 or more by a predetermined number of times, 16x16 intra luminance mode 1 (horizontal mode) is selected.

그리고, 만일 첫번째 열(1110) 내와 첫번째 행(1120) 내에 위치한 소정의 설정개수 이상의 4x4 휘도 블록의 DC 값이 16x16 매크로 블록의 DC 값과 동일한 경우에는, 16x16 인트라 휘도 모드 2(DC 모드)를 선택한다.If the DC value of the 4x4 luminance block of the predetermined number or more located in the first column 1110 and the first row 1120 is the same as the DC value of the 16x16 macroblock, the 16x16 intra luminance mode 2 (DC mode) is determined. Choose.

그리고, 나머지 경우에는 16x16 인트라 휘도 모드 3(plane 모드)을 선택한다.In the other cases, 16x16 intra luminance mode 3 (plane mode) is selected.

상술한 예에서 소정의 설정개수는 특정하지 않는다. 그 값을 크게 하면 예측성능은 좋아지지만 예측장치가 매우 복잡해진다. 예측성능과 예측장치의 복잡도를 고려하여 설정되는데, 일실시예로서 비교대상의 모든 블록으로 설정하면 예측장치의 복잡도를 크게 줄일 수 있다.In the above example, the predetermined number of settings is not specified. Increasing the value improves the prediction performance, but makes the prediction device very complicated. In consideration of the prediction performance and the complexity of the prediction apparatus, the complexity of the prediction apparatus can be greatly reduced by setting all blocks to be compared.

도 12는 본 발명의 또 다른 16x16 인트라 휘도 예측 모드 결정방법을 설명하기 위한 도면이다.12 is a view for explaining another 16x16 intra luminance prediction mode determination method of the present invention.

예측하고자 하는 매크로블록 내의 16개의 4x4 블록을 1 부터 16까지 raster scan order로 번호를 할당한다. 16x16 인트라 휘도 예측에 사용되는 샘플을 상위 매크로 블록 샘플(upper macroblock sample)(1210) 및 좌측 매크로 블록 샘플(left macroblock sample)(1220)이라고 한다. 그리고 4x4 인트라 휘도 예측에 사용되는 샘플을 상위 블록 샘플(upper block sample)(1230) 및 좌측 블록 샘플(left block sample)(1240)이라 한다. 도 12에서는 상위 블록 샘플과 좌측 블록 샘플의 일례를 도시한 것으로 4x4 블록마다 대응되는 상위 블록 샘플과 좌측 블록 샘플이 존재한다.16 4x4 blocks in the macroblock to be predicted are assigned numbers in raster scan order from 1 to 16. The samples used for 16 × 16 intra luminance prediction are referred to as upper macroblock sample 1210 and left macroblock sample 1220. The samples used for 4x4 intra luminance prediction are referred to as an upper block sample 1230 and a left block sample 1240. In FIG. 12, an example of an upper block sample and a left block sample is shown, and there are upper block samples and left block samples corresponding to 4 × 4 blocks.

만일 번호 {1, 2, 3, 4, 5, 6, 7, 9, 10, 13}인 4x4 블록들(1250)의 4x4 인트라 휘도 예측 모드가 모두 그룹 1에 속하면, 16x16 인트라 휘도 예측 모드 0과 모드 3을 선택한다. 모드 0과 모드 3의 선택은 다음과 같다. 각 상위 매크로 블록 샘플(1210)과 동일한 열(column)에 위치한 상위 블록 샘플들을 비교하여 그 픽셀값이 모두 동일하거나 소정의 4x4 블록 설정개수 이하에서 소정의 설정값 이하의 차이가 발생하는 경우에는 16x16 인트라 휘도 예측모드 0을 적용하여 예측을 수행한다. 그렇지 않고 소정의 4x4 블록 설정개수를 초과하는 4x4 블록의 픽셀값이 소정의 설정값을 초과하는 차이가 발생하는 경우에는 16x16 인트라 휘도 예측모드 3을 적용하여 예측을 수행한다. 상술한 예에서 상위 매크로 블록 샘플과 상위 블록 샘플들을 비교하는 방법으로는 각 픽셀값별로 비교하는 방법 또는 모든 픽셀값들을 평균한 후 평균값을 비교하는 방법 등을 사용할 수 있다.If the 4x4 intra luminance prediction modes of the 4x4 blocks 1250 with the numbers {1, 2, 3, 4, 5, 6, 7, 9, 10, 13} all belong to group 1, 16x16 intra luminance prediction mode 0 And mode 3 are selected. The selection of mode 0 and mode 3 is as follows. Compares the upper block samples located in the same column with each upper macro block sample 1210, and if the pixel values are all the same or a difference less than or equal to the predetermined setting is less than the predetermined number of 4x4 block settings, 16x16. Prediction is performed by applying intra luminance prediction mode 0. Otherwise, when a difference occurs in which the pixel value of the 4x4 block exceeding the predetermined 4x4 block setting number exceeds the predetermined setting value, prediction is performed by applying the 16x16 intra luminance prediction mode 3. In the above-described example, a method of comparing the upper macroblock sample and the upper block samples may be performed by comparing each pixel value or by averaging all pixel values and then comparing the average value.

만일 번호 {1, 2, 3, 4, 5, 6, 7, 9, 10, 13}인 4x4 블록들(1250)의 4x4 인트라 휘도 예측 모드가 모두 그룹 2에 속하면, 16x16 인트라 휘도 예측 모드 1과 모드 3을 선택한다. 이때 각 좌측 매크로 블록 샘플과 동일한 행(row)에 위치한 좌측 블록 샘플들을 비교하여 그 픽셀값이 모두 동일하거나 소정의 4x4 블록 설정개수 이하에서 소정의 설정값 이하의 차이가 발생하는 경우에는 16x16 인트라 휘도 예측모드 1을 적용하여 예측을 수행한다. 그렇지 않고 소정의 4x4 블록 설정개수를 초과하는 4x4 블록의 픽셀값이 소정의 설정값을 초과하는 차이가 발생하는 경우에는 16x16 인트라 휘도 예측모드 3을 적용하여 예측을 수행한다. 상술한 예에서 좌측 매크로 블록 샘플과 좌측 블록 샘플들을 비교하는 방법으로는 각 픽셀값별로 비교하는 방법 또는 모든 픽셀값들을 평균한 후 평균값을 비교하는 방법 등을 사용할 수 있다.If the 4x4 intra luminance prediction modes of the 4x4 blocks 1250 with the numbers {1, 2, 3, 4, 5, 6, 7, 9, 10, 13} all belong to group 2, 16x16 intra luminance prediction mode 1 And mode 3 are selected. At this time, the left block samples located in the same row are compared with each left macro block sample, and when the pixel values are all the same or a difference less than or equal to the predetermined setting is less than the predetermined number of 4x4 block settings, 16x16 intra luminance is used. Prediction is performed by applying prediction mode 1. Otherwise, when a difference occurs in which the pixel value of the 4x4 block exceeding the predetermined 4x4 block setting number exceeds the predetermined setting value, prediction is performed by applying the 16x16 intra luminance prediction mode 3. In the above-described example, a method of comparing the left macroblock sample and the left block samples may be performed by comparing each pixel value or by averaging all pixel values and then comparing the average value.

상술한 예에서 소정의 4x4 블록 설정개수와 소정의 설정값은 예측성능과 예측방법의 복잡도에 따라서 달리 설정될 수 있다. 소정의 설정개수와 소정의 설정값을 크게 설정하면 예측성능은 좋아지지만 예측방법은 복잡해진다.In the above example, the predetermined number of 4x4 block settings and the predetermined setting value may be differently set according to the prediction performance and the complexity of the prediction method. If the predetermined number of settings and the predetermined value are set large, the prediction performance is improved, but the prediction method is complicated.

그리고 한개의 16x16 매크로 블록의 DC 값과 16개의 4x4 블록의 DC 값을 비교하여, 만일 16개의 4x4 블록의 DC 값이 16x16 매크로 블록의 DC 값과 소정의 설정값 이하의 차이가 나는 경우에는 16x16 인트라 휘도 예측모드 2(DC 모드)를 적용하여 예측을 수행한다. 소정의 설정값은 예측장치의 성능과 예측방법의 복잡도를 고려하여 설정된다. DC 값을 비교할 때는 평균의 차(difference of average)를 비교하는 방법을 사용하거나 차의 합(sum of difference)을 비교하는 방법 등을 사용할 수 있다.The DC value of one 16x16 macroblock is compared with the DC values of 16 4x4 blocks. If the DC value of 16 4x4 blocks is less than the predetermined value from the DC value of the 16x16 macroblock, it is 16x16 intra. Prediction is performed by applying luminance prediction mode 2 (DC mode). The predetermined set value is set in consideration of the performance of the prediction apparatus and the complexity of the prediction method. When comparing DC values, a method of comparing a difference of average or a sum of difference may be used.

이렇게 각각의 4x4 블록의 예측모드에 따라서 결정된 16x16 인트라 휘도 예측 모드들을 적용하여 16x16 매크로 블록에 대하여 예측을 수행하고 예측 cost를 계산한다. 예측 cost는 예측 대상 샘플의 본래 픽셀값에서 예측값을 뺀 레지듀(residue) 값, 즉 예측오차를 대상으로 SSD, SAD 또는 SATD를 계산한 값이다. 이들 cost 값을 서로 비교하여 최적의 cost 값을 갖는 16x16 인트라 휘도 예측 모드를 결정하고 그 때의 cost 값을 이미 계산된 4x4 인트라 휘도 예측 모드를 적용하여 예측을 수행하였을 때의 cost 값과 비교한다.The 16x16 intra luminance prediction modes determined according to the prediction modes of each 4x4 block are applied to perform prediction on the 16x16 macroblock, and the prediction cost is calculated. The prediction cost is a residual value obtained by subtracting the prediction value from the original pixel value of the sample to be predicted, that is, a value calculated by SSD, SAD or SATD based on a prediction error. These cost values are compared with each other to determine the 16x16 intra luminance prediction mode having the optimal cost value, and the cost value at that time is compared with the cost value when the prediction is performed by applying the 4x4 intra luminance prediction mode that has already been calculated.

cost의 계산은 여러가지 방법에 의해서 수행될 수 있다. 사용되는 코스트 함수는 SAD(sum of absolute value), SATD(sum of absolute transformed difference), SSD(sum of squared difference), MAD(mean of absolute difference), 라그란지 함수(LaGrange function) 등이 있다. SAD는 각 4x4 블록 예측오차(residue) 값의 절대치를 취하여 그 값들을 합한 값이다. SATD는 각 4x4 블록의 예측오차값에 Hadamard Transform을 적용하여 생성된 계수들(coefficients)의 절대치를 취하여 더한 값이다. SSD는 각 4x4 블록 예측 샘플의 예측 오차값을 제곱하여 더한 값이고, MAD는 각 4x4 블록 예측 샘플의 예측 오차값에 절대치를 취하여평균을 구한 값이다. 라그란지 함수는 코스트 함수에 비트스트림(bitstream)의 길이정보를 포함하여 만들어진 새로운 코스트 함수이다.The calculation of the cost can be performed by several methods. Cost functions used include sum of absolute value (SAD), sum of absolute transformed difference (SATD), sum of squared difference (SSD), mean of absolute difference (MAD), LaGrange function, and the like. SAD is a value obtained by taking the absolute value of each 4x4 block prediction error value and adding the values together. The SATD is obtained by adding an absolute value of coefficients generated by applying a Hadamard transform to a prediction error value of each 4x4 block. The SSD is a value obtained by multiplying a prediction error value of each 4x4 block prediction sample, and the MAD is a value obtained by taking an absolute value of the prediction error value of each 4x4 block prediction sample and obtaining an average. The Lagrange function is a new cost function created by including the length information of a bitstream in the cost function.

4x4 인트라 휘도 예측모드를 사용하였을 때보다 16x16 인트라 휘도 예측 모드를 사용하였을 때 압축효율이 좋으므로, cost를 비교할 때 가중치(weighting factor: α)를 사용한다. α> 1이며 조절할 수 있다. 가중치를 사용하여 비교할 때, 만일 각각의 4x4 블록에 대하여 4x4 인트라 휘도 예측모드를 적용하였을 때의 cost 값에 가중치를 곱한 값이, 16x16 인트라 휘도 예측모드를 적용하였을 때의 cost 값보다 크거나 같으면 16x16 인트라 휘도 예측모드를 적용하여 예측을 수행한다.Since the compression efficiency is better when the 16x16 intra luminance prediction mode is used than when the 4x4 intra luminance prediction mode is used, a weighting factor α is used when comparing the costs. α> 1 and can be adjusted. When comparing using weights, if the cost value obtained by applying the 4x4 intra luminance prediction mode to each 4x4 block is multiplied by the weight, the value of 16x16 is greater than or equal to the cost value using the 16x16 intra luminance prediction mode. The prediction is performed by applying the intra luminance prediction mode.

만일, 각각의 4x4 블록에 대하여 4x4 인트라 휘도 예측모드를 적용하였을 때의 cost 값에 가중치를 곱한 값이, 16x16 인트라 휘도 예측모드를 적용하였을 때의 cost 값보다 작으면 4x4 인트라 휘도 예측모드를 적용하여 예측을 수행한다.If the value obtained by multiplying the cost value when the 4x4 intra luminance prediction mode is applied to each 4x4 block is smaller than the cost value when the 16x16 intra luminance prediction mode is applied, the 4x4 intra luminance prediction mode is applied. Make predictions.

라그란지 함수는 종래의 코스트 함수에 비트스트림(bitstream)의 길이정보를 포함하여 만들어진 새로운 코스트 함수이므로 별도로 가중치를 사용할 필요가 없다.Since the Lagrange function is a new cost function created by including the bitstream length information in the conventional cost function, there is no need to use weights separately.

도 13은 본 발명의 예측 모드 결정장치의 블록도이다.13 is a block diagram of the prediction mode determination apparatus of the present invention.

예측 모드 결정장치는 4x4 블록 예측모드정보 분석부(1310), 16x16 블록 예측 수행부(1320), 예측오차 계산부(1330), 예측오차 비교부(1340)를 구비한다.The prediction mode determining apparatus includes a 4x4 block prediction mode information analyzing unit 1310, a 16x16 block prediction performing unit 1320, a prediction error calculating unit 1330, and a prediction error comparing unit 1340.

4x4 블록 예측모드정보 분석부(1310)는 16개의 4x4 블록의 모드정보를 입력받는다. 그리고, 4x4 예측모드정보를 분석한다. 즉, 각각의 4x4 휘도 예측 모드를그룹별로 분류하고 각 그룹에 속한 모드의 수를 계수한다. 그리고 도 10 내지 도 12를 참조하여 설명한 방법에 의하여 하나 또는 두개의 16x16 인트라 휘도 예측모드 정보를 선택하여 출력한다.The 4x4 block prediction mode information analyzer 1310 receives mode information of 16 4x4 blocks. And 4x4 prediction mode information is analyzed. That is, each 4x4 luminance prediction mode is classified by group and the number of modes belonging to each group is counted. Then, one or two pieces of 16x16 intra luminance prediction mode information are selected and output by the method described with reference to FIGS. 10 to 12.

16x16 블록 예측 수행부(1320)는 4x4 블록 예측모드정보 분석부(1310)로부터 수신된 16x16 인트라 휘도예측모드를 적용하여 예측을 수행한다.The 16x16 block prediction performing unit 1320 performs the prediction by applying the 16x16 intra luminance prediction mode received from the 4x4 block prediction mode information analyzing unit 1310.

예측오차 계산부(1330)는 16x16 블록 예측 수행부(1320)에서 출력된 예측 샘플에 대한 cost를 계산하여 출력한다. 예측오차는, 예측 샘플의 픽셀값에서 예측된 픽셀값을 뺀 레지듀(residue) 값이다.The prediction error calculator 1330 calculates and outputs a cost for the prediction sample output from the 16x16 block prediction execution unit 1320. The prediction error is a residue value obtained by subtracting the predicted pixel value from the pixel value of the predicted sample.

예측오차 비교부(1340)는 예측오차 계산부(1330)에서 계산된 cost 값을 비교하여 그 값이 최소인 모드를 선택하여 출력한다. 그리고, 최종적으로 가중치를 사용하여 4x4 인트라 휘도 예측모드를 적용하여 얻은 cost 값과 16x16 인트라 휘도 예측모드를 적용하여 얻은 cost 값을 비교하여 더 적은 cost 값을 갖는 모드를 선택하여 출력한다.The prediction error comparing unit 1340 compares the cost value calculated by the prediction error calculating unit 1330 and selects and outputs a mode having the minimum value. Finally, the cost value obtained by applying the 4x4 intra luminance prediction mode is compared with the cost value obtained by applying the 16x16 intra luminance prediction mode by using the weight to select and output a mode having a lower cost value.

인코더에서는 상술한 바와 같은 과정을 거쳐서 선택된 예측모드를 적용하여 예측오차(residue) 샘플을 얻고, 예측오차 샘플에 대하여 변환 및 양자화를 수행한다. 따라서, 디코더에서도 선택된 예측모드를 적용하여 인트라 예측을 수행한다.The encoder obtains a prediction error sample by applying the selected prediction mode through the above-described process, and performs transformation and quantization on the prediction error sample. Therefore, the decoder also performs the intra prediction by applying the selected prediction mode.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment for the present invention. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the scope will be construed as being included in the present invention.

상술한 바와 같이 본 발명의 예측모드 결정방법 및 장치를 사용하면, 16x16 인트라 예측모드에서 최적의 모드를 선택하는데 있어, 4가지 모드를 모두 적용해 보지 않고도 최적의 모드를 선택할 수 있어, 인코더가 복잡해지는 것을 방지할 수 있는 효과가 있다.As described above, when the prediction mode determination method and apparatus of the present invention are used, in selecting the optimal mode in the 16x16 intra prediction mode, the optimum mode can be selected without applying all four modes. There is an effect that can prevent the deterioration.

다시 말하면, 이미 계산된 4x4 인트라 휘도 예측모드 정보를 이용하여 16x16 인트라 휘도 예측모드를 선택함으로써, 1번 또는 2번만의 예측모드를 적용하여 예측오차를 비교하여 최적의 16x16 인트라 휘도 예측모드를 선택할 수 있는 효과가 있다.In other words, by selecting the 16x16 intra luminance prediction mode using the 4x4 intra luminance prediction mode information calculated previously, the optimal 16x16 intra luminance prediction mode can be selected by comparing the prediction errors by applying only one or two prediction modes. It has an effect.

Claims (17)

(a) 예측하고자 하는 블록의 서브 블록들의 예측모드 정보를 수신하여 분석하는 단계; 및(a) receiving and analyzing prediction mode information of sub-blocks of a block to be predicted; And (b) 상기 분석결과에 따라서 상기 예측하고자 하는 블록의 예측모드를 선택하는 단계를 포함하는 것을 특징으로 하는 예측모드 결정방법.(b) selecting a prediction mode of the block to be predicted according to the analysis result. 제1항에 있어서, 상기 (a) 단계는The method of claim 1, wherein step (a) (a1) 예측하고자 하는 블록의 서브 블록들의 예측모드정보를 수신하여 소정의 그룹으로 그룹화하는 단계;(a1) receiving prediction mode information of sub-blocks of a block to be predicted and grouping them into a predetermined group; (a2) 상기 각 그룹에 속한 상기 서브블록의 예측 모드들의 수를 계수하는 단계; 및(a2) counting the number of prediction modes of the subblocks belonging to each group; And (a3) 상기 각 그룹의 계수값과 소정의 기준치를 이용하여 하나의 그룹 또는 두개의 그룹을 선택하여 출력하는 단계를 포함하는 것을 특징으로 하는 예측모드 결정방법.and (a3) selecting and outputting one group or two groups using coefficient values of each group and a predetermined reference value. 제2항에 있어서,The method of claim 2, 상기 예측하고자 하는 블록은 16x16 휘도 블록이며, 서브블록은 4x4 휘도 블록인 것을 특징으로 하는 예측모드 결정방법.The block to be predicted is a 16x16 luminance block, and the subblock is a 4x4 luminance block. 제2항에 있어서, 상기 (a1) 단계는The method of claim 2, wherein step (a1) 예측을 수행하는 방향에 따라서 수직방향의 예측모드와 그 인접모드들을 제1 그룹으로 묶고, 수평방향의 예측모드와 그 인접모드들을 제2그룹으로 묶고, 나머지 예측모드를 하나의 제3그룹으로 묶어 그룹화 하는 것을 특징으로 하는 예측모드 결정방법.According to the direction in which prediction is performed, the vertical prediction mode and its adjacent modes are grouped into a first group, the horizontal prediction mode and its adjacent modes are grouped into a second group, and the remaining prediction modes are grouped into one third group. Prediction mode determination method characterized in that the grouping. 제2항에 있어서, 상기 (a3) 단계는The method of claim 2, wherein step (a3) 만일 어느 한 그룹의 계수값과 다른 그룹들의 계수값들과의 차이가 소정의 기준치 이상인가를 판단하고, 기준치 이상이면 기준치 이상 큰 계수값을 갖는 그룹을 선택하여 출력하고, 각 그룹의 계수값들의 차이가 소정의 기준치를 넘지 않으면 비슷한 계수값을 갖는 그룹을 모두 선택하여 출력하는 것을 특징으로 하는 예측모드 결정방법.If it is determined whether the difference between coefficient values of one group and coefficient values of other groups is greater than or equal to a predetermined reference value, and if the threshold value is greater than or equal to the reference value, a group having a coefficient value greater than or equal to the reference value is selected and outputted, If the difference does not exceed a predetermined reference value, all the groups having a similar coefficient value is selected and outputted. 제5항에 있어서,The method of claim 5, 상기 소정의 기준치는 예측성능과 예측방법의 복잡도에 따라서 임의로 설정되는 것을 특징으로 하는 예측모드 결정방법.The predetermined reference value is arbitrarily set according to the prediction performance and the complexity of the prediction method. 제2항에 있어서, 상기 (b) 단계는The method of claim 2, wherein step (b) 상기 (a3) 단계에서 출력된 그룹에 대응되는 예측모드를 선택하여 출력하는 것을 특징으로 하는 예측모드 결정방법.The prediction mode determination method, characterized in that for selecting and outputting the prediction mode corresponding to the group output in the step (a3). 제7항에 있어서, 상기 (b) 단계는The method of claim 7, wherein step (b) 상기 (a3) 단계에서 수직방향의 예측모드가 속한 그룹 1이 선택되면 16x16 인트라 휘도 모드 0이 선택되어 출력되고, 수평방향의 예측모드가 속한 그룹 2가 선택되면 16x16 인트라 휘도 예측모드 1이 선택되어 출력되며, 그 외의 예측모드가 속한 그룹 3이 선택되면 16x16 인트라 휘도 예측모드 2와 16x16 인트라 휘도 예측모드 3이 선택되어 출력되는 것을 특징으로 하는 예측모드 결정방법.In step (a3), if Group 1 to which the vertical prediction mode belongs is selected, 16x16 intra luminance mode 0 is selected and output. If Group 2 to which the horizontal prediction mode belongs is selected, 16x16 intra luminance prediction mode 1 is selected. And 16x16 intra luminance prediction mode 2 and 16x16 intra luminance prediction mode 3 are selected and output when the group 3 to which the other prediction mode belongs is selected. 제1항에 있어서, 상기 (a) 단계는The method of claim 1, wherein step (a) 각각의 16x16 휘도 블록의 첫번째 열 내에 위치한 4x4 휘도 블록의 예측모드가 속한 제1그룹과, 첫번째 행 내에 위치한 4x4 휘도 블록의 예측모드가 속한 제2그룹과, 그 외의 4x4 휘도 블록의 예측모드가 속한 제3그룹의 예측모드의 수에 따라 하나 또는 두개의 그룹을 선택하여 출력하는 것을 특징으로 하는 예측모드 결정방법.The first group belongs to the prediction mode of the 4x4 luma block located in the first column of each 16x16 luma block, the second group belongs to the prediction mode of the 4x4 luma block located in the first row, and the other includes the prediction mode of the 4x4 luma block. The method of claim 1, wherein one or two groups are selected and output according to the number of prediction modes of the third group. 제1항에 있어서, 상기 (a) 단계는The method of claim 1, wherein step (a) 16x16 인트라 휘도 예측에 사용되는 상위 매크로 블록 샘플 및 좌측 매크로 블록 샘플, 그리고 4x4 인트라 휘도 예측에 사용되는 상위 블록 샘플 및 좌측 블록 샘플의 픽셀값을 행 단위 또는 열 단위로 비교하여 동일한가의 여부 또는 소정의 차이 이내인가의 여부에 따라서 예측하고자 하는 블록에 대한 예측모드를 선택하여출력하는 것을 특징으로 하는 예측모드 결정방법.Pixel values of the upper macroblock sample and the left macroblock sample used for the 16x16 intra luminance prediction, and the upper block sample and the left block sample used for the 4x4 intra luminance prediction are compared in a row unit or a column unit to determine whether they are equal or predetermined. A prediction mode determination method comprising selecting and outputting a prediction mode for a block to be predicted according to whether the difference is within a difference. (a) 16x16 휘도 블록의 첫번째 열 내에 위치한 4x4 휘도 블록의 예측모드가 속한 제1그룹과, 첫번째 행 내에 위치한 4x4 휘도 블록의 예측모드가 속한 제2그룹과, 그 외의 4x4 휘도 블록의 예측모드가 속한 제3그룹의 예측모드의 수를 계수하는 단계; 및(a) The first group to which the prediction mode of the 4x4 luma block located in the first column of the 16x16 luma block belongs, the second group to which the prediction mode of the 4x4 luma block is located in the first row, and other prediction modes of the 4x4 luma block Counting the number of prediction modes of the third group to which the device belongs; And (b) 상기 예측모드의 수가 가장 큰 그룹에 대응되는 예측모드를 선택하여 출력하는 단계를 포함하는 것을 특징으로 하는 예측모드 결정방법.(b) selecting and outputting a prediction mode corresponding to the group having the largest number of prediction modes. (a) 16x16 인트라 휘도 예측에 사용되는 상위 매크로 블록 샘플 및 좌측 매크로 블록 샘플, 그리고 4x4 인트라 휘도 예측에 사용되는 상위 블록 샘플 및 좌측 블록 샘플의 픽셀값을 행 단위 또는 열 단위로 비교하는 단계; 및(a) comparing pixel values of upper macroblock samples and left macroblock samples used for 16x16 intra luminance prediction, and upper block samples and left block samples used for 4x4 intra luminance prediction in a row unit or a column unit; And (b) 상기 비교결과 동일한가의 여부 또는 소정의 차이 이내인가의 여부에 따라서 16x16 예측모드를 선택하여 출력하는 단계를 포함하는 것을 특징으로 하는 예측모드 결정방법.and (b) selecting and outputting a 16x16 prediction mode according to whether the comparison result is the same or within a predetermined difference. 제12항에 있어서,The method of claim 12, 상기 상위 및 좌측 매크로 블록 샘플과 상기 상위 및 좌측 블록 샘플들을 각 픽셀값별로 비교하거나 모든 픽셀값들을 평균한 후 평균값을 비교하는 것을 특징으로 하는 예측모드 결정방법.And comparing the upper and left macroblock samples with the upper and left block samples for each pixel value or averaging all pixel values and then comparing the average values. 예측하고자 하는 블록의 서브블록의 모드정보를 입력받아 분석하여 상기 예측하고자 하는 블록의 예측모드를 출력하는 예측모드정보 분석부;A prediction mode information analyzer configured to receive mode information of a subblock of a block to be predicted and to output a prediction mode of the block to be predicted; 상기 서브블록 예측모드정보 분석부로부터 수신된 예측모드를 적용하여 상기 예측하고자 하는 블록에 대한 예측을 수행하는 블록 예측 수행부;A block prediction performing unit for performing prediction on the block to be predicted by applying the prediction mode received from the subblock prediction mode information analyzing unit; 상기 블록 예측 수행부에서 출력된 예측 샘플에 대한 예측오차를 계산하는 예측오차 계산부; 및A prediction error calculator configured to calculate a prediction error of the prediction sample output from the block prediction execution unit; And 상기 예측오차 계산부에서 계산된 예측오차를 비교하여 예측오차가 최소인 모드를 선택하여 출력하는 예측오차 비교부를 포함하는 것을 특징으로 하는 예측모드 결정장치.And a prediction error comparison unit for comparing the prediction errors calculated by the prediction error calculation unit to select and output a mode having a minimum prediction error. 제14항에 있어서,The method of claim 14, 상기 예측하고자 하는 블록은 16x16 휘도 블록이며, 서브블록은 4x4 휘도 블록인 것을 특징으로 하는 예측모드 결정장치.And a block to be predicted is a 16x16 luma block and a subblock is a 4x4 luma block. 제14항에 있어서, 상기 예측모드정보 분석부는15. The method of claim 14, wherein the prediction mode information analysis unit 각각의 4x4 휘도 예측 모드를 그룹별로 분류하고 각 그룹에 속한 모드의 수를 계수하고 그 계수값이 가장 크거나 다른 그룹의 계수값보다 소정의 차이 이상으로 큰 하나 또는 두개의 그룹에 대응되는 16x16 인트라 휘도 예측모드 정보를 선택하여 출력하는 것을 특징으로 하는 예측모드 결정장치.Classify each 4x4 luma prediction mode by group, count the number of modes belonging to each group, and 16x16 intra corresponding to one or two groups whose coefficient value is largest or greater than a predetermined difference greater than the coefficient value of another group Prediction mode determination device characterized in that for selecting and outputting the luminance prediction mode information. (a) 예측하고자 하는 블록의 서브 블록들의 예측모드 정보를 수신하여 분석하는 단계; 및(a) receiving and analyzing prediction mode information of sub-blocks of a block to be predicted; And (b) 상기 분석결과에 따라서 상기 예측하고자 하는 블록의 예측모드를 선택하는 단계를 포함하는 것을 특징으로 하는 예측모드 결정방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.and (b) selecting a prediction mode of the block to be predicted according to the analysis result. A computer-readable recording medium having recorded thereon a program for executing the method of determining a prediction mode in a computer.
KR1020030025529A 2003-04-22 2003-04-22 16x16 intra luma prediction mode determining method and apparatus KR20040093253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030025529A KR20040093253A (en) 2003-04-22 2003-04-22 16x16 intra luma prediction mode determining method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030025529A KR20040093253A (en) 2003-04-22 2003-04-22 16x16 intra luma prediction mode determining method and apparatus

Publications (1)

Publication Number Publication Date
KR20040093253A true KR20040093253A (en) 2004-11-05

Family

ID=37373363

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030025529A KR20040093253A (en) 2003-04-22 2003-04-22 16x16 intra luma prediction mode determining method and apparatus

Country Status (1)

Country Link
KR (1) KR20040093253A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100739714B1 (en) * 2005-07-06 2007-07-13 삼성전자주식회사 Method and apparatus for intra prediction mode decision
WO2010077071A2 (en) * 2009-01-05 2010-07-08 에스케이텔레콤 주식회사 Block mode encoding/decoding method and apparatus, and method and apparatus for image encoding/decoding using the same
KR101118592B1 (en) * 2008-12-02 2012-02-27 한국전자통신연구원 High speed intra prediction method
US8199815B2 (en) 2005-08-27 2012-06-12 Samsung Electronics Co., Ltd. Apparatus and method for video encoding/decoding and recording medium having recorded thereon program for executing the method
KR20150057801A (en) * 2013-11-20 2015-05-28 한국전자통신연구원 Video coding method for fast intra prediction and apparatus thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100739714B1 (en) * 2005-07-06 2007-07-13 삼성전자주식회사 Method and apparatus for intra prediction mode decision
US8199815B2 (en) 2005-08-27 2012-06-12 Samsung Electronics Co., Ltd. Apparatus and method for video encoding/decoding and recording medium having recorded thereon program for executing the method
KR101118592B1 (en) * 2008-12-02 2012-02-27 한국전자통신연구원 High speed intra prediction method
WO2010077071A2 (en) * 2009-01-05 2010-07-08 에스케이텔레콤 주식회사 Block mode encoding/decoding method and apparatus, and method and apparatus for image encoding/decoding using the same
WO2010077071A3 (en) * 2009-01-05 2010-09-30 에스케이텔레콤 주식회사 Block mode encoding/decoding method and apparatus, and method and apparatus for image encoding/decoding using the same
US8811469B2 (en) 2009-01-05 2014-08-19 Sk Telecom Co., Ltd. Block mode encoding/decoding method and apparatus, and method and apparatus for image encoding/decoding using the same
KR20150057801A (en) * 2013-11-20 2015-05-28 한국전자통신연구원 Video coding method for fast intra prediction and apparatus thereof

Similar Documents

Publication Publication Date Title
KR101246294B1 (en) Method of and apparatus for video intraprediction encoding/decoding
US9838718B2 (en) Secondary boundary filtering for video coding
KR101538704B1 (en) Method and apparatus for coding and decoding using adaptive interpolation filters
US7266149B2 (en) Sub-block transform coding of prediction residuals
KR100739714B1 (en) Method and apparatus for intra prediction mode decision
CN107197256B (en) Method and apparatus for encoding and decoding a sequence of images
US7830963B2 (en) Decoding jointly coded transform type and subblock pattern information
KR100750136B1 (en) Method and apparatus for encoding and decoding of video
KR101510108B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
US8331448B2 (en) Systems and methods for efficient spatial intra predictabilty determination (or assessment)
KR100727969B1 (en) Apparatus for encoding and decoding image, and method theroff, and a recording medium storing program to implement the method
US9503725B2 (en) Method and apparatus for encoding/decoding image for performing intraprediction using pixel value filtered according to prediction mode
KR101483750B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
JP4391809B2 (en) System and method for adaptively encoding a sequence of images
US20070002945A1 (en) Intra-coding apparatus and method
KR100727970B1 (en) Apparatus for encoding and decoding image, and method theroff, and a recording medium storing program to implement the method
KR101215614B1 (en) Apparatus for encoding and decoding image, and method theroff, and a recording medium storing program to implement the method
US20070171970A1 (en) Method and apparatus for video encoding/decoding based on orthogonal transform and vector quantization
JP2008503177A (en) Method for color difference deblocking
JP2004289796A (en) System and method for adaptively encoding sequence of image
WO2008056931A1 (en) Method and apparatus for encoding and decoding based on intra prediction
KR20040093253A (en) 16x16 intra luma prediction mode determining method and apparatus
KR100718468B1 (en) Method and device for video down-sampling transcoding
RU2808075C1 (en) Method for image coding and decoding, coding and decoding device and corresponding computer programs
KR101366088B1 (en) Method and apparatus for encoding and decoding based on intra prediction

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application