KR20140057518A - Method of decoding moving pictures - Google Patents

Method of decoding moving pictures Download PDF

Info

Publication number
KR20140057518A
KR20140057518A KR1020140049712A KR20140049712A KR20140057518A KR 20140057518 A KR20140057518 A KR 20140057518A KR 1020140049712 A KR1020140049712 A KR 1020140049712A KR 20140049712 A KR20140049712 A KR 20140049712A KR 20140057518 A KR20140057518 A KR 20140057518A
Authority
KR
South Korea
Prior art keywords
block
prediction
mode
current block
pixels
Prior art date
Application number
KR1020140049712A
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 KR1020140049712A priority Critical patent/KR20140057518A/en
Publication of KR20140057518A publication Critical patent/KR20140057518A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/117Filters, e.g. for pre-processing or post-processing
    • 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
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • 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/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution

Abstract

The present invention relates to an image decoding method which adaptively generates reference pixels of a current block and filters the reference pixels to generate a prediction block close to an original image. According to the present invention, the image decoding method comprises following steps: an intra-prediction mode is reconstructed when an unavailable reference pixel of a current block exists; a reference pixel is generated using the available reference pixels; and whether the reference pixels of the current block are to be filtered is determined based on the reconstructed intra-prediction mode and the size of the current block. When it is determined that the reference pixels of the current block are to be filtered, a filter is selected using the size of the current block; and the difference in information between the reference pixels and the reference pixels of the current block are filtered using the selected filter. A prediction block is generated according to the reconstructed intra-prediction mode.

Description

영상 복호화 방법{METHOD OF DECODING MOVING PICTURES}[0001] METHOD OF DECODING MOVING PICTURES [

본 발명은 영상 복호화 방법에 관한 것으로, 더욱 상세하게는 현재 블록의 참조화소들을 적응적으로 생성하고 필터링하여 원본 영상에 가까운 예측 블록을 생성하는 영상 복호화 방법에 관한 것이다.
The present invention relates to a video decoding method, and more particularly, to a video decoding method for generating a prediction block close to an original video by adaptively generating and filtering reference pixels of a current block.

일반적으로 높은 영상 품질을 유지하면서 낮은 데이터 레이트로 동영상 신호를 효율적으로 전송하기 위해 다양한 디지털 동영상 압축 기술이 제안되어 왔다. 이러한 동영상 압축 기술로는 H.261, MPEG-2/H.262, H.263, MPEG-4, AVC/H.264등이 있다. 상기한 압축 기술은 이산 코사인 변환(DCT: Discrete CosineTransform) 기법, 움직임 보상(MC: Motion Compensation) 기법, 양자화(Quantization) 기법, 엔트로피 부호화(Entropy coding) 기법 등을 포함하고 있다.In general, various digital video compression techniques have been proposed to efficiently transmit moving image signals at a low data rate while maintaining a high image quality. Such video compression techniques include H.261, MPEG-2 / H.262, H.263, MPEG-4, and AVC / H.264. The compression techniques include discrete cosine transform (DCT), motion compensation (MC), quantization, entropy coding, and the like.

높은 영상 품질을 유지하기 위해서는, 동영상 부호화시 많은 양의 데이터를 요구하게 된다. 그러나, 동영상 데이터를 전달하기 위해 허용되는 대역폭은 한정되어 있어, 부호화 데이터 전송시에 적용할 수 있는 데이터 레이트를 제한할 수 있다. 예를 들어, 위성방송 시스템의 데이터 채널이나 디지털 케이블 텔레비전 네트워크의 데이터 채널은 일반적으로 고정 비트 레이트(CBR: Constant Bit Rate)로 데이터를 보내고 있다. In order to maintain a high image quality, a large amount of data is required in coding a moving image. However, the bandwidth that is allowed to transmit the moving picture data is limited, so that the data rate applicable at the time of transmitting the encoded data can be limited. For example, a data channel of a satellite broadcasting system or a data channel of a digital cable television network generally transmits data at a constant bit rate (CBR).

따라서, 동영상 부호화는 되도록이면 처리 방식의 복잡도와 전송 데이터율을 줄이면서도 고화질을 얻도록 하기 위한 동영상 부호화 방식이 제안되고 있다. Accordingly, a moving image encoding method has been proposed in order to obtain high image quality while reducing the complexity of the processing method and the transmission data rate, if possible.

예를 들어, H.264/AVC 표준은 인트라 부호화시 주변 화소값들을 이용하여 공간영역에서의 인트라 예측 부호화를 수행한다. 주변의 어떤 화소값을 이용할지 결정하는 것이 부호화 효율 향상에 중요한데, 이를 위해 최적의 인트라 예측 방향을 정하고 이 방향에 해당하는 주변 화소값들을 사용하여 부호화할 화소의 예측값을 계산한다. For example, the H.264 / AVC standard performs intraprediction encoding in a spatial domain by using neighboring pixel values in intra coding. It is important to determine which pixel value is to be used. In this case, an optimal intra-prediction direction is determined and a predicted value of a pixel to be encoded is calculated using neighboring pixel values corresponding to the direction.

그러나, 예측 블록의 크기가 커지고 다양해지면, 현재 블록에 인접한 참조 블록들의 수가 복수개가 존재할 가능성이 높아지게 된다. 이 경우에는 상기 참조 블록들의 양쪽 경계에 위치하는 참조 화소들 사이에는 단차가 발생할 수 있게 된다. 단차가 발생할 경우, 상기 참조 화소들을 이용하여 인트라 예측을 수행할 경우, 예측 블록 생성 후의 잔차 블록들은 고주파 성분을 많이 함유할 가능성이 높게 되어 부호화 효율을 떨어트리게 되는 문제점이 있다.
However, if the size of the prediction block is increased and diversified, there is a high possibility that a plurality of reference blocks adjacent to the current block exist. In this case, a step may be generated between the reference pixels located at both boundaries of the reference blocks. When intra prediction is performed using the reference pixels in the case where a step is generated, there is a high possibility that the residual blocks after generation of the prediction block contain a large amount of high-frequency components, which lowers the coding efficiency.

본 발명이 이루고자 하는 기술적 과제는 원본 영상에 가까운 인트라 예측 블록을 복원하는 방법을 제공하는데 있다. 이에 따라 인트라 예측 모드에서의 복원블록 생성시의 복원해야 할 잔차 신호의 부호화량을 최소화하여 영상의 화질을 높이면서 데이터량을 줄이는 방법을 제공하는데 있다.
SUMMARY OF THE INVENTION The present invention provides a method of restoring an intra prediction block close to an original image. The present invention provides a method of reducing the amount of data while enhancing image quality by minimizing the amount of residual signal to be reconstructed when a reconstruction block is generated in an intra prediction mode.

상기 기술적 과제를 해결하기 위한 본 발명의 목적을 달성하기 위한 본 발명에 따른 영상 복호화 방법은, 인트라 예측 모드를 복원하는 단계; 현재 블록의 이용 가능하지 않은 참조화소가 존재하면 이용 가능한 참조화소를 이용하여 참조화소를 생성하는 단계; 상기 인트라 예측 모드와 현재 블록의 크기에 기초하여 현재 블록의 참조화소들을 필터링할지 여부를 판단하는 단계; 현재 블록의 참조화소들을 필터링할 것으로 판단하면, 현재 블록의 크기 및 참조화소들간의 단차정보를 이용하여 필터를 선택하고, 상기 필터를 이용하여 현재 블록의 참조화소들을 필터링하는 단계: 및 상기 인트라 예측 모드에 따라 예측 블록을 생성하는 단계;를 포함한다.
According to an aspect of the present invention, there is provided an image decoding method comprising: restoring an intra prediction mode; Generating a reference pixel using an available reference pixel if there is a reference pixel that is not available in the current block; Determining whether to filter reference pixels of a current block based on the intra prediction mode and the size of the current block; Selecting a filter using the size of the current block and the step information between the reference pixels and filtering the reference pixels of the current block using the filter if it is determined to filter the reference pixels of the current block; And generating a prediction block according to the mode.

본 발명 따르면, 이용 가능하지 않은 참조화소를 이용 가능한 참조화소로부터 생성하고, 참조 화소를 현재 블록의 크기 및 인트라 예측 모드에 따라서 적응적으로 필터링한 후에 예측 블록을 생성함으로써, 원본 영상과 유사한 예측 블록을 생성할 수 있는 효과가 있다. 또한, 예측 블록을 원본 영상과 유사하게 예측함으로써, 부호화 및 복호화시의 잔차신호를 최소화하여 영상의 압축성능을 높일 뿐 아리나, 부호화 및 복호화 효율을 극대화할 수 있는 효과가 있다.
According to the present invention, a non-available reference pixel is generated from a usable reference pixel, and a reference block is adaptively filtered according to the current block size and intra-prediction mode, Can be generated. In addition, by predicting the prediction block similar to the original image, the residual signal at the time of encoding and decoding is minimized, thereby improving the compression performance of the image and maximizing the encoding and decoding efficiency.

도 1은 본 발명의 실시예에 따른 동영상 부호화 장치를 나타내는 블록도.
도 2는 본 발명의 실시예에 따른 인트라 예측부의 동작을 나타내는 블록도.
도 3은 본 발명의 실시예에 따른 플래너 모드 예측을 설명하기 위한 도면.
도 4는 본 발명의 실시예에 따른 동영상 복호화 장치를 나타내는 블록도.
도 5는 본 발명의 실시예에 따른 인트라 블록을 복원하기 위한 순서도.
1 is a block diagram showing a moving picture encoding apparatus according to an embodiment of the present invention;
2 is a block diagram illustrating an operation of an intra predictor according to an embodiment of the present invention;
3 is a diagram for explaining planner mode prediction according to an embodiment of the present invention;
4 is a block diagram illustrating a moving picture decoding apparatus according to an embodiment of the present invention;
FIG. 5 is a flowchart for restoring an intra block according to an embodiment of the present invention; FIG.

이하, 본 발명의 여러가지 실시예들을 예시적인 도면을 통해 상세히 설명한다. 본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
Hereinafter, various embodiments of the present invention will be described in detail with reference to exemplary drawings. It is to be understood that the invention is not to be limited to the specific embodiments thereof except as defined in the appended claims and all changes, Should be understood to include. Like reference numerals are used for like elements in describing each drawing.

도 1은 본 발명의 실시예에 따른 동영상 부호화 장치를 나타내는 블록도이다.1 is a block diagram illustrating a moving picture encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 동영상 부호화 장치는 부호화 모드 결정부(110), 인트라 예측부(120), 움직임 보상부(130), 움직임 추정부(131), 변환부호화/양자화부(140), 엔트로피 부호화부(150), 역양자화/변환복호화부(160), 디블록킹 필터링부(170), 픽쳐 저장부(180), 감산부(190) 및 가산부(200)를 포함한다.1, a moving picture encoding apparatus includes a coding mode determination unit 110, an intra prediction unit 120, a motion compensation unit 130, a motion estimation unit 131, a transform coding / quantization unit 140, an entropy coding A dequantization / conversion decoding unit 160, a deblocking filtering unit 170, a picture storage unit 180, a subtracting unit 190, and an adding unit 200. The dequantization /

부호화 모드 결정부(110)는 입력되는 비디오 신호를 분석하여 픽쳐를 소정 크기의 부호화 블록으로 분할하고, 분할된 소정 크기의 부호화 블록에 대한 부호화 모드를 결정한다. 상기 부호화 모드는 인트라 예측 부호화 및 인터 예측 부호화를 포함한다.The encoding mode determination unit 110 analyzes an input video signal to divide a picture into a predetermined size of an encoding block, and determines a coding mode for the divided predetermined size of the encoding block. The encoding mode includes intraprediction encoding and inter prediction encoding.

픽쳐는 복수의 슬라이스로 구성되고, 슬라이스는 복수개의 최대 부호화 단위(Largest coding unit: LCU)로 구성된다. 상기 LCU는 복수개의 부호화 단위(CU)로 분할될 수 있고, 부호기는 분할여부를 나타내는 정보(flag)를 비트스트림에 추가할 수 있다. 복호기는 LCU의 위치를 어드레스(LcuAddr)를 이용하여 인식할 수 있다. 분할이 허용되지 않는 경우의 부호화 단위(CU)는 예측 단위(Prediction unit: PU)로 간주되고, 복호기는 PU의 위치를 PU 인덱스를 이용하여 인식할 수 있다.The picture is composed of a plurality of slices, and the slice is composed of a plurality of maximum coding units (LCU). The LCU can be divided into a plurality of coding units (CUs), and the encoder can add information indicating whether or not to be divided to a bit stream. The decoder can recognize the position of the LCU by using the address (LcuAddr). The coding unit CU in the case where division is not allowed is regarded as a prediction unit (PU), and the decoder can recognize the position of the PU using the PU index.

예측 단위(PU)는 복수개의 파티션으로 나뉠 수 있다. 또한 예측 단위(PU)는 복수개의 변환 단위(Transformunit: TU)로 구성될 수 있다. The prediction unit PU may be divided into a plurality of partitions. The prediction unit (PU) may also be composed of a plurality of conversion units (TUs).

부호화 모드 결정부(110)는 결정된 부호화 모드에 따른 소정 크기의 블록 단위(예를 들면, PU 단위 또는 TU 단위)로 영상 데이터를 감산부(190)로 보낸다.The encoding mode determination unit 110 sends the image data to the subtraction unit 190 in units of blocks of a predetermined size (for example, in units of PU or TU) according to the determined encoding mode.

변환부호화/양자화부(140)는 감산부(190)에 의해 산출된 잔차 블록을 공간 영역으로부터 주파수 영역으로 변환한다. 예를 들면, 잔차 블록에 대해서 2차원의 이산 코사인 변환(DCT) 또는 이산 사인 변환(DST) 기반의 변환을 실행한다. 또한, 변환부호화/양자화부(140)는 변환 계수를 양자화하기 위한 양자화 스텝 사이즈를 결정하고, 결정된 양자화 스텝 사이즈를 이용하여 변환 계수를 양자화한다. 결정된 양자화 스텝 사이즈 및 부호화 모드에 따라 양자화 매트릭스가 결정될 수 있다.The transform coding / quantizing unit 140 transforms the residual block calculated by the subtracting unit 190 from the spatial domain to the frequency domain. For example, two-dimensional discrete cosine transform (DCT) or discrete cosine transform (DST) -based transform is performed on the residual block. In addition, the transcoding / quantization unit 140 determines a quantization step size for quantizing the transform coefficient, and quantizes the transform coefficient using the determined quantization step size. The quantization matrix can be determined according to the determined quantization step size and encoding mode.

양자화된 2차원의 변환 계수는 미리 정해진 스캐닝 방법 중 하나에 의해 1차원의 양자화 변환 계수로 변환된다.The quantized two-dimensional transform coefficients are transformed into one-dimensional quantized transform coefficients by one of the predetermined scanning methods.

상기 변환된 1차원의 양자화 변환 계수의 시퀀스는 엔트로피 부호화부(150)로 공급된다.The transformed one-dimensional sequence of quantization transform coefficients is supplied to the entropy encoding unit 150.

역양자화/변환복호화부(160)는 변환부호화/양자화부(140)에 의해 양자화된 양자화 계수를 역양자화 한다. 또한, 역양자화에 의해 얻어지는 역양자화 계수를 역변환한다. 이에 따라, 주파수 영역으로 변환된 잔차 블록을 공간영역의 잔차 블록으로 복원할 수 있다.The inverse quantization / conversion decoding unit 160 dequantizes the quantization coefficients quantized by the transcoding / quantization unit 140. Further, the inverse quantization coefficient obtained by inverse quantization is inversely transformed. Accordingly, the residual block transformed into the frequency domain can be restored into the residual block in the spatial domain.

디블록킹 필터링부(170)는 역양자화/변환부호화부(160)로부터 역양자화 및 역변환된 영상 데이터를 입력 받아 블록킹(blocking) 효과를 제거하기 위한 필터링을 수행한다.The deblocking filtering unit 170 receives the inverse quantized and inverse transformed image data from the inverse quantization / inverse transform coding unit 160 and performs filtering to remove a blocking effect.

픽쳐 저장부(180)는 필터링된 영상 데이터를 디블록킹 필터링부(170)로부터 입력 받아 픽쳐(picture) 단위로 영상을 복원하여 저장한다. 픽쳐는 프레임 단위의 영상이거나 필드 단위의 영상일 수 있다. 픽쳐 저장부(180)는 다수의 픽쳐를 저장할 수 있는 버퍼(도시되지 않음)를 구비한다. 버퍼에 저장된 다수의 픽쳐는 인트라 예측 및 움직임 추정을 위해 제공된다. 인트라 예측 또는 움직임 추정을 위해 제공되는 상기 픽쳐들은 참조 픽쳐로 불리운다.The picture storage unit 180 receives the filtered image data from the deblocking filtering unit 170 and restores and restores the image in picture units. The picture may be a frame-based image or a field-based image. The picture storage unit 180 has a buffer (not shown) capable of storing a plurality of pictures. A plurality of pictures stored in the buffer are provided for intra prediction and motion estimation. The pictures provided for intra prediction or motion estimation are referred to as reference pictures.

움직임 추정부(131)는 상기 픽쳐 저장부(180)에 저장된 적어도 하나의 참조 픽쳐를 제공받아 움직임 추정을 수행하여 움직임 벡터, 참조 픽쳐를 나타내는 인덱스 및 블록 모드를 포함한 모션 데이터(Motion Data)를 출력한다.The motion estimation unit 131 receives the at least one reference picture stored in the picture storage unit 180 and performs motion estimation to output motion data including an index indicating a motion vector and a reference picture and a block mode do.

예측 정밀도를 최적화하기 위해서, 소수 화소 정밀도, 예를 들면, 1/2 또는 1/4 화소 정밀도로 움직임 벡터를 결정한다. 움직임 벡터가 소수 화소 정밀도를 가질 수 있으므로, 움직임 보상부(130)는 소수 화소 위치의 화소값을 산출하기 위한 보간 필터를 참조 픽쳐에 적용함으로써, 정수 화소 위치의 화소값으로부터 소수 화소 위치의 화소값을 산출한다. In order to optimize the prediction precision, a motion vector is determined with a fractional pixel precision, for example, 1/2 or 1/4 pixel accuracy. Since the motion vector can have a fractional pixel precision, the motion compensation unit 130 applies the interpolation filter for calculating the pixel value of the fractional pixel position to the reference picture so that the pixel value of the fractional pixel position .

움직임 보상부(130)는 움직임 추정부(131)로부터 입력된 모션 데이터에 따라, 픽쳐 저장부(180)에 저장된 다수의 참조 픽쳐들 중 움직임 추정에 이용된 참조 픽쳐로부터, 부호화하고자 하는 블록에 대응하는 예측 블록을 추출하여 출력한다.The motion compensation unit 130 is configured to perform motion compensation on a block to be coded from a reference picture used for motion estimation among a plurality of reference pictures stored in the picture storage unit 180 according to the motion data input from the motion estimation unit 131 And outputs the extracted prediction block.

움직임 보상부(130)는 소수 정밀도의 움직임 보상에 필요한 적응적 보간 필터의 필터 특성을 결정한다. 필터 특성은, 예를 들면, 적응적 보간 필터의 필터 타입을 나타내는 정보, 및, 적응적 보간 필터의 사이즈를 나타내는 정보 등이다. 필터의 사이즈는, 예를 들면, 적응적 보간 필터의 필터 계수의 수인 탭 수 등이다.The motion compensation unit 130 determines a filter characteristic of the adaptive interpolation filter necessary for motion compensation with a decimal precision. The filter characteristic is, for example, information indicating the filter type of the adaptive interpolation filter and information indicating the size of the adaptive interpolation filter. The size of the filter is, for example, the number of taps, which is the number of filter coefficients of the adaptive interpolation filter.

구체적으로, 움직임 보상부(130)는 적응적 보간 필터로서, 분리형 및 비분리형 적응적 필터 중 어느 하나를 결정할 수 있다. 그리고 나서, 결정된 적응적 보간 필터의 탭 수, 및, 각 필터 계수의 값을 결정한다. 필터 계수의 값은, 정수 화소와의 상대적인 소수 화소의 위치마다 다르게 결정될 수 있다. 또한, 움직임 보상부(130)는, 필터 계수가 고정인 복수개의 비적응적 보간 필터를 이용할 수도 있다.Specifically, the motion compensation unit 130 may determine either a separate type or a non-separable type adaptive filter as an adaptive interpolation filter. Then, the number of taps of the determined adaptive interpolation filter and the value of each filter coefficient are determined. The value of the filter coefficient can be determined differently for each position of the fractional pixel relative to the integer pixel. Also, the motion compensation unit 130 may use a plurality of non-adaptive interpolation filters with fixed filter coefficients.

움직임 보상부(130)는, 보간 필터의 특성을 소정의 처리 단위로 설정할 수 있다. 예를 들면, 소수 화소 단위, 부호화 기본 단위(부호화 유닛), 슬라이스 단위, 픽쳐 단위, 또는, 시퀀스 단위로 설정할 수 있다. 또한, 1개의 영상 데이터에 대해서, 1개의 특성을 설정해도 된다. 따라서, 소정의 처리 단위 내에서는, 동일한 필터 특성을 이용하므로, 움직임 보상부(130)는 필터 특성을 일시적으로 유지하는 메모리를 구비한다. 이 메모리는 필요에 따라, 필터 특성 및 필터 계수 등을 유지한다. 예를 들면, 움직임 보상부(130)는, I픽쳐마다 필터 특성을 결정하고, 슬라이스 단위로 필터 계수를 결정할 수 있다.The motion compensation unit 130 can set the characteristics of the interpolation filter in a predetermined processing unit. For example, it can be set in a fractional pixel unit, a coding basic unit (encoding unit), a slice unit, a picture unit, or a sequence unit. In addition, one characteristic may be set for one video data. Therefore, since the same filter characteristic is used in a predetermined processing unit, the motion compensation unit 130 has a memory that temporarily holds the filter characteristic. This memory maintains filter characteristics, filter coefficients, and the like as needed. For example, the motion compensation unit 130 can determine the filter characteristic for each I picture and determine the filter coefficient for each slice.

움직임 보상부(130)는, 픽쳐 저장부(180)로부터 참조 픽쳐를 수신하고, 결정된 적응적 보간 필터를 이용하여 필터 처리를 적용함으로써, 소수 정밀도의 예측 참조 화상을 생성한다. The motion compensation unit 130 receives a reference picture from the picture storage unit 180 and applies a filter process using the determined adaptive interpolation filter to generate a prediction reference picture of a decimal precision.

그리고, 생성된 참조 화상과, 움직임 추정부(131)에 의해 결정된 움직임 벡터에 의거하여 소수 화소 정밀도의 움직임 보상을 행함으로써, 예측 블록을 생성한다.Then, based on the generated reference picture and the motion vector determined by the motion estimation unit 131, motion compensation is performed with a small number of pixels to generate a prediction block.

감산부(190)는 부호화하고자 하는 입력 블록을 픽쳐 간 예측 부호화하는 경우, 움직임 보상부(130)로부터 입력블록에 대응하는 참조 픽쳐 내의 블록을 입력받아 입력 매크로 블록과의 차분 연산을 수행하여 잔차 신호(residue signal)를 출력한다.The subtractor 190 receives the block in the reference picture corresponding to the input block from the motion compensator 130 and performs a difference operation with the input macroblock in the case of performing inter picture prediction coding on the input block to be coded, and outputs a residue signal.

인트라 예측부(120)는 예측이 수행되는 픽처 내부의 재구성된 화소값을 이용하여 인트라 예측 부호화를 수행한다. 인트라 예측부는 예측 부호화할 현재 블록을 입력 받아 현재 블록의 크기에 따라 미리 설정된 복수개의 인트라 예측 모드 중에 하나를 선택하여 인트라 예측을 수행한다. 인트라 예측부(120)는 현재 블록에 인접한 이전에 부호화된 화소들을 이용해 현재 블록의 인트라 예측 모드를 결정하고, 상기 결정된 모드에 대응하는 예측 블록을 생성한다.The intraprediction unit 120 performs intraprediction encoding using the reconstructed pixel values in a picture to be predicted. The intra prediction unit receives the current block to be predictively encoded and performs intra prediction by selecting one of a plurality of intra prediction modes preset according to the size of the current block. The intra predictor 120 determines the intra prediction mode of the current block using the previously coded pixels adjacent to the current block, and generates a prediction block corresponding to the determined mode.

현재 픽처에 포함된 영역 중에서 이전에 부호화된 영역은 인트라 예측부(120)가 이용할 수 있도록 다시 복호화되어 픽쳐 저장부(180) 에 저장되어 있다. 인트라 예측부(120)는 픽쳐 저장부(180)에 저장되어 있는 현재 픽처의 이전에 부호화된 영역에서 현재 블록에 인접한 화소 또는 인접하지 않지만 적용 가능한 화소들을 이용하여 현재 블록의 예측 블록을 생성한다.The previously encoded region of the current picture is decoded again for use by the intra prediction unit 120 and stored in the picture storage unit 180. [ The intra prediction unit 120 generates a prediction block of a current block using pixels neighboring the current block or non-adjacent but applicable pixels in the previously coded area of the current picture stored in the picture storage unit 180. [

인트라 예측부(120)는 인트라 블록을 예측하기 위하여 인접 화소를 적응적으로 필터링할 수 있다. 복호기에서의 동일한 동작을 위해 부호기에서 필터링 여부를 알려주는 정보를 전송할 수 있다. 또는 현재 블록의 인트라 예측모드 및 현재 블록의 크기 정보에 기초하여 필터링 여부를 결정할 수 있다.The intra prediction unit 120 may adaptively filter adjacent pixels to predict an intra block. For the same operation in the decoder, it is possible to transmit information indicating whether or not filtering is performed in the encoder. Or the intra-prediction mode of the current block and the size information of the current block.

영상 부호화 장치에 의해 사용되는 예측 타입은 상기 부호화 모드 결정부에 의해 입력 블록이 인트라 모드 또는 인터 모드로 부호화되는지 여부에 의존한다.The prediction type used by the image coding apparatus depends on whether the input block is coded in the intra mode or the inter mode by the coding mode determination unit.

인트라 모드와 인터 모드의 전환은, 인트라/인터 전환 스위치에 의해 제어된다.The switching between the intra mode and the inter mode is controlled by the intra / inter selector switch.

엔트로피 부호화부(150)는 변환부호화/양자화부(140)에 의해 양자화된 양자화 계수와 움직임 추정부(131)에 의해 생성된 움직임 정보를 엔트로피 부호화한다. 또한, 인트라 예측 모드, 제어 데이터(예를 들면, 양자화 스텝사이즈 등) 등도 부호화될 수 있다. 또한, 움직임 보상부(130)에 의해 결정된 필터 계수도 부호화되어 비트 스트림으로서 출력한다.The entropy encoding unit 150 entropy-codes the quantization coefficients quantized by the transcoding / quantization unit 140 and the motion information generated by the motion estimation unit 131. [ Also, an intra prediction mode, control data (e.g., quantization step size, etc.), and the like can be coded. Also, the filter coefficient determined by the motion compensation unit 130 is encoded and output as a bit stream.

도 2는 본 발명에 따른 인트라 예측부(120)의 동작을 나타내는 블록도이다.2 is a block diagram showing the operation of the intra predictor 120 according to the present invention.

먼저, 부호화 모드 결정부(110)에 의해 예측 모드 정보 및 예측 블록의 크기를 수신한다(S110). 예측 모드 정보는 인트라 모드를 나타낸다. 예측 블록의 크기는 64x64, 32x32, 16x16, 8x8, 4x4등의 정방형일 수 있으나, 이에 한정하지 않는다. 즉, 상기 예측 블록의 크기가 정방형이 아닌 비정방형일 수도 있다.First, the encoding mode determination unit 110 receives the prediction mode information and the size of the prediction block (S110). The prediction mode information indicates an intra mode. The size of the prediction block may be a square of 64x64, 32x32, 16x16, 8x8, 4x4, or the like, but is not limited thereto. That is, the size of the prediction block may be non-square instead of square.

다음으로, 예측 블록의 인트라 예측 모드를 결정하기 위해 참조 화소를 픽쳐 저장부(180)로부터 읽어 들인다.Next, the reference pixel is read from the picture storage unit 180 to determine the intra-prediction mode of the prediction block.

상기 이용 가능하지 않은 참조화소가 존재하는지 여부를 검토하여 참조 화소 생성 여부를 판단한다(S120). 상기 참조 화소들은 현재 블록의 인트라 예측 모드를 결정하는데 사용된다.It is determined whether the reference pixel is generated by examining whether or not the unavailable reference pixel exists (S120). The reference pixels are used to determine the intra prediction mode of the current block.

현재 블록이 현재 픽쳐의 상측 경계에 위치하는 경우에는 현재 블록의 상측에 인접한 화소들이 정의되지 않는다. 또한, 현재 블록이 현재 픽쳐의 좌측 경계에 위치하는 경우에는 현재 블록의 좌측에 인접한 화소들이 정의되지 않는다. 이러한 화소들은 이용 가능한 화소들이 아닌 것으로 판단한다. 또한, 현재 블록이 슬라이스경계에 위치하여 슬라이스의 상측 또는 좌측에 인접하는 화소들이 먼저 부호화되어 복원되는 화소들이 아닌 경우에도 이용 가능한 화소들이 아닌 것으로 판단한다.If the current block is located at the upper boundary of the current picture, pixels adjacent to the upper side of the current block are not defined. In addition, when the current block is located at the left boundary of the current picture, pixels adjacent to the left side of the current block are not defined. It is determined that these pixels are not usable pixels. In addition, it is determined that the pixels are not usable even if the current block is located at the slice boundary and pixels adjacent to the upper or left side of the slice are not encoded and reconstructed.

상기와 같이 현재 블록의 좌측 또는 상측에 인접한 화소들이 존재하지 않거나, 미리 부호화되어 복원된 화소들이 존재하지 않는 경우에는 이용 가능한 화소들만을 이용하여 현재 블록의 인트라 예측 모드를 결정할 수도 있다.As described above, if there are no pixels adjacent to the left or upper side of the current block, or if there are no pixels that have been previously coded and reconstructed, the intra prediction mode of the current block may be determined using only available pixels.

그러나, 현재 블록의 이용 가능한 참조화소들을 이용하여 이용 가능하지 않은 위치의 참조화소들을 생성할 수도 있다(S130). 예를 들어, 상측 블록의 화소들이 이용 가능하지 않은 경우에는 좌측 화소들의 일부 또는 전부를 이용하여 상측 화소들을 생성할 수 있고, 그 역으로도 가능하다. 즉, 이용 가능하지 않은 위치의 참조화소로부터 미리 정해진 방향으로 가장 가까운 위치의 이용 가능한 참조화소를 복사하여 참조화소로 생성할 수 있다. 미리 정해진 방향에 이용 가능한 참조화소가 존재하지 않는 경우에는 반대 방향의 가장 가까운 위치의 이용 가능한 참조화소를 복사하여 참조화소로 생성할 수 있다.However, it is also possible to generate reference pixels at positions that are not available using the available reference pixels of the current block (S130). For example, if the pixels of the upper block are not available, the upper pixels may be created using some or all of the left pixels, or vice versa. That is, available reference pixels at positions closest to the predetermined direction from the reference pixels at unavailable positions can be copied and generated as reference pixels. When there is no usable reference pixel in a predetermined direction, the usable reference pixel at the closest position in the opposite direction can be copied and generated as a reference pixel.

한편, 현재 블록의 상측 또는 좌측 화소들이 존재하는 경우에도 상기 화소들이 속하는 블록의 부호화 모드에 따라 이용 가능하지 않은 참조 화소로 결정될 수 있다. 예를 들어, 현재 블록의 상측에 인접한 참조 화소가 속하는 블록이 인터 부호화되어 복원된 블록일 경우에는 상기 화소들을 이용 가능하지 않은 화소들로 판단할 수 있다. 이 경우에는 현재 블록에 인접한 블록이 인트라 부호화되어 복원된 블록에 속하는 화소들을 이용하여 이용 가능한 참조 화소들을 생성할 수 있다. 이 경우에는 부호기에서 부호화 모드에 따라 이용 가능한 참조 화소를 판단한다는 정보를 복호기로 전송해야 한다.On the other hand, even if the upper or left pixels of the current block exist, the reference pixel may be determined as an unavailable reference pixel according to the encoding mode of the block to which the pixels belong. For example, if the block to which the reference pixel adjacent to the upper side of the current block belongs is inter-coded and the reconstructed block, the pixels can be determined as unavailable pixels. In this case, it is possible to generate usable reference pixels by using pixels belonging to the restored block by intra-coded blocks adjacent to the current block. In this case, information indicating that the encoder determines available reference pixels according to the encoding mode must be transmitted to the decoder.

다음으로, 상기 참조 화소들을 이용하여 현재 블록의 인트라 예측 모드를 결정한다(S140). 현재 블록에 허용 가능한 인트라 예측 모드의 수는 블록의 크기에 따라 달라질 수 있다. 예를 들어, 현재 블록의 크기가 8x8, 16x16, 32x32인 경우에는 34개의 인트라 예측 모드가 존재할 수 있고, 현재 블록의 크기가 4x4인 경우에는 17개의 인트라 예측 모드가 존재할 수 있다. 상기 34개 또는 17개의 인트라 예측 모드는 적어도 하나 이상의 비방향성 모드(non-directional mode)와 복수개의 방향성 모드들(directional modes)로 구성될 수 있다. 하나 이상의 비방향성 모드는 DC 모드 및/또는 플래너(planar) 모드일수 있다. DC 모드 및 플래너모드가 비방향성 모드로 포함되는 경우에는, 현재 블록의 크기에 관계없이 35개의 인트라 예측 모드가 존재할 수도 있다. 이때에는 2개의 비방향성 모드(DC 모드 및 플래너 모드)와 33개의 방향성 모드를 포함할 수 있다.Next, an intra prediction mode of the current block is determined using the reference pixels (S140). The number of intra prediction modes that can be allowed in the current block may vary depending on the size of the block. For example, if the current block size is 8x8, 16x16, or 32x32, there may be 34 intra prediction modes. If the current block size is 4x4, 17 intra prediction modes may exist. The 34 or 17 intra prediction modes may include at least one non-directional mode and a plurality of directional modes. The one or more non-directional modes may be a DC mode and / or a planar mode. When the DC mode and the planar mode are included in the non-directional mode, there may be 35 intra-prediction modes regardless of the size of the current block. At this time, it may include two non-directional modes (DC mode and planar mode) and 33 directional modes.

플래너 모드는 현재 블록의 우하측(bottom-right)에 위치하는 적어도 하나의 화소값(또는 상기 화소값의 예측값, 이하 제1 참조값이라 함)과 참조화소들을 이용하여 현재 블록의 예측 블록을 생성한다.The planner mode generates a prediction block of the current block using at least one pixel value (or a predicted value of the pixel value, hereinafter referred to as a first reference value) located at the bottom-right of the current block and the reference pixels .

도 3을 참조하여 플래너 모드를 설명한다. 도 3은 현재 블록이 8x8 블록일 경우의 플래너 모드 예측을 설명하기 위한 도면이다.The planner mode will be described with reference to Fig. FIG. 3 is a diagram for explaining planner mode prediction when the current block is 8x8 block.

현재 블록의 우하측(bottom-right)에 위치하는 제 1 참조값(D)과 현재 블록의 좌측에 인접하는 현재 블록의 가장 아래쪽 화소에 인접하는 화소값(C)을 이용하여 그 사이에 위치하는 화소들에 대응하는 예측 화소들을 생성한다. 마찬가지로 상기 제1참조값(D)과 현재 블록의 상측에 인접하는 화소들 중 현재 블록의 가장 우측의 화소와 인접하는 화소값(B)을 이용하여 그 사이에 위치하는 화소들에 대응하는 예측 화소들을 생성한다. 상기 예측 화소를 생성하기 위해서 선형결합을 사용할 수 있다. 그러나, 화소들의 배치가 선형이 아닌 경우에는 미리 정해진 비선형 결합으로 상기 예측 화소들을 생성할 수 있다.A first reference value D located at the bottom-right of the current block and a pixel value C adjacent to the lowermost pixel of the current block adjacent to the left of the current block are used to determine the pixel Lt; / RTI > Similarly, by using the first reference value D and a pixel value B adjacent to the rightmost pixel of the current block among the pixels adjacent to the upper side of the current block, prediction pixels corresponding to the pixels located therebetween . A linear combination may be used to generate the prediction pixel. However, when the arrangement of the pixels is not linear, the prediction pixels can be generated by a predetermined non-linear combination.

다음으로, 생성된 예측 화소들(즉, 화소 C와 D 사이의 화소들 및 화소 B와 D 사이의 화소들)과 현재 블록에 인접한 화소들(즉, A와 B 사이의 화소들 및 A와 C 사이의 화소들)을 이용하여 나머지 예측 화소들을 생성한다. 상기 예측 화소들은 상측 및 좌측에 인접한 2개의 화소 및 하측 및 우측에 생성된 2개의 화소들을 선형결합하여 생성할 수 있다. 또한, 상기 결합은 반드시 선형일 필요는 없으며, 화소들의 분포를 고려한 비선형 결합일 수도 있다. 이와 같이, 플래너 모드에서는 예측 화소를 생성하기 위해 사용되는 참조화소들의 수가 예측 화소의 위치에 따라 달라질 수 있다.Next, the generated predictive pixels (i.e., the pixels between the pixels C and D and the pixels between the pixels B and D) and the pixels adjacent to the current block (i.e., the pixels between A and B and the pixels A and C The remaining prediction pixels are generated. The prediction pixels can be generated by linearly combining two pixels adjacent to the upper side and the left side and two pixels generated at the lower side and the right side. In addition, the coupling does not necessarily have to be linear, but may be a nonlinear coupling considering the distribution of pixels. As described above, in the planar mode, the number of reference pixels used to generate the predictive pixel may vary depending on the position of the predictive pixel.

한편, 현재 블록의 좌측 참조화소들은 이용 가능하나, 상측 참조화소들이 이용 가능하지 않는 경우가 발생할 수 있다. 이때에는, 상기 제1 참조값 또는 상기 좌측 참조화소들 중 하나를 이용하여 상기 상측 참조화소들을 생성할 수 있다. 즉, 좌측 참조화소들만 이용 가능할 경우에는 좌측 참조화소들 중 최상측에 위치한 참조화소를 복사하여 상측 참조화소들을 생성할 수 있고, 상기 제1 참조값과 상기 상측 화소에 가장 근접한 위치에 있는 참조화소를 이용하여 B와 D 사이의 예측화소들을 생성할 수 있다.On the other hand, the left reference pixels of the current block can be used, but the upper reference pixels may not be available. At this time, the upper reference pixels may be generated using one of the first reference value and the left reference pixels. That is, when only the left reference pixels are available, the reference pixel located at the uppermost one of the left reference pixels can be copied to generate upper reference pixels, and the reference pixel located closest to the first reference pixel and the upper pixel To generate predicted pixels between B and D. [

마찬가지로, 현재 블록의 상측 참조화소들은 이용 가능하나, 좌측 참조화소들이 이용 가능하지 않은 경우에는 상기 상측 참조화소들 중 최좌측에 위치한 참조화소를 복사하여 좌측 참조화소를 생성할 수 있고, 상기 좌측 참조화소와 제1 참조값을 이용하여 C와 D 사이의 예측화소들을 생성할 수 있다.Similarly, when the left reference pixels are not available, the left reference pixel may be generated by copying the leftmost reference pixel among the upper reference pixels, The prediction pixels between C and D can be generated using the pixel and the first reference value.

한편, 상기 제1 참조값 또는 이를 나타내는 정보는 비트스트림에 추가되어 복호기로 전송되거나, 복호기가 상기 제1 참조값을 유도할 수도 있다.Meanwhile, the first reference value or information indicating the first reference value may be added to the bitstream and transmitted to the decoder, or the decoder may derive the first reference value.

상기 제1 참조값 또는 이를 나타내는 정보를 복호기로 전송하는 방법을 사용할 경우에는 현재 블록에 인접한 부호화되어 복원된 화소들 중 적어도 하나 이상을 이용한 제1 참조값의 예측값과 상기 제1 참조값과의 차이값을 전송하는 것이 비트수를 줄일 수 있다. 이를 위해 상기 제1 참조값의 예측값은 (1) 현재 블록에 인접한 참조 화소들의 평균값, (2) A, B, C의 평균값, (3) B와 C의 평균값 중 어느 하나일 수 있다. 또 다른 방법으로는, A와 C의 차이값과 A와 B의 차이값을 비교하여 차이값이 작은 방향을 나타내는 어느 하나(B또는 C)로 결정할 수도 있다.When the first reference value or the information indicating the first reference value is transmitted to the decoder, the difference between the predicted value of the first reference value and the first reference value using at least one of the encoded and reconstructed pixels adjacent to the current block is transmitted Can reduce the number of bits. To this end, the predicted value of the first reference value may be any one of (1) an average value of reference pixels adjacent to the current block, (2) an average value of A, B and C, and (3) an average value of B and C. As another method, the difference value between A and C and the difference value between A and B may be compared with each other (B or C) indicating a direction in which the difference value is small.

상기 제1 참조값을 부호기와 복호기가 유도할 경우에는 부호기와 복호기가 동일한 참조값을 유도할 수 있어야 한다. 이를 위해 부호기에서는 제1 참조값을 생성하기 위해 참조 화소 A, B, C를 이용할 수 있다. 화면이 평탄하게 변한다는 가정 하에서는 (1) B와 A의 차이값을 C에 더한 값 또는 C와 A의 차이값을 B에 더한 값, 즉 (B+CA), (2) B와 C의 평균값 중 어느 하나를 제1 참조값으로 설정할 수 있다. 이 경우, B, C 대신에 B의 인접 참조화소 및 C의 인접 참조화소를 이용할 수도 있다. 이와 같이, 부호기와 복호기가 동일하게 제1 참조값을 복원할 수 있으므로, 제1 참조값 또는 이를 나타내는 정보를 복호기로 전송할 필요가 없어 전송 비트 수를 줄일 수 있다.When the first reference value is derived by the encoder and the decoder, the encoder and the decoder should be able to derive the same reference value. For this purpose, the encoder can use the reference pixels A, B, and C to generate the first reference value. Assuming that the screen changes smoothly, (1) the value obtained by adding the difference between B and A to C or the difference between C and A to B, ie, (B + CA) Can be set as the first reference value. In this case, instead of B and C, B adjacent reference pixels and C adjacent reference pixels may be used. In this way, since the encoder and the decoder can restore the first reference value in the same manner, it is not necessary to transmit the first reference value or information indicating the first reference value to the decoder, so that the number of transmitted bits can be reduced.

다음으로, 현재 블록의 인트라 예측 모드가 결정되면, 예측 블록을 생성한다(S150). 상기 예측 블록은 현재 블록의 인트라 예측 모드에 기초하여 참조 화소(생성된 화소 포함) 또는 이들의 선형결합을 이용하여 생성한다.Next, when the intra-prediction mode of the current block is determined, a prediction block is generated (S150). The prediction block is generated using a reference pixel (including the generated pixel) or a linear combination thereof based on the intra-prediction mode of the current block.

DC 모드는 현재 블록에 인접한 참조 화소들의 평균값을 이용하여 현재 블록의 예측 블록을 생성한다. 상기 참조화소들은 이용 가능한 참조화소 및 생성된 참조화소를 모두 포함할 수 있다.The DC mode generates a prediction block of the current block using an average value of reference pixels adjacent to the current block. The reference pixels may include both a usable reference pixel and a generated reference pixel.

다음으로, 현재 블록의 인트라 예측 모드가 결정되면 상기 인트라 예측 모드를 부호화한다(S160). 상기 인트라예측 모드의 부호화는 인트라 예측부(120)에서 행해질 수도 있고, 별도의 인트라 예측 모드 부호화장치(미도시) 또는 엔트로피 부호화부(150)에서 행해질 수도 있다.Next, when the intra prediction mode of the current block is determined, the intra prediction mode is encoded (S160). The intra-prediction mode encoding may be performed in the intra-prediction unit 120 or in an intra-prediction mode encoding apparatus (not shown) or an entropy encoding unit 150.

한편, 현재 블록에 인접한 참조 블록들의 수가 다양한 경우에는 상기 참조 블록들의 경계에 위치하는 참조 화소들 간에 단차가 발생할 수 있다. 이 경우, 예측 블록 생성 후의 잔차 블록들은 고주파 성분을 많이 함유할 가능성이 높게 된다. 따라서, 참조 블록들 사이의 블록킹 아티펙트(blocking artifact)가 현재의 블록에도 영향을 미치는 문제가 발생한다. 이러한 문제점은 현재 블록의 크기가 클수록 빈도수가 높아지게 된다. 반대로, 참조블록의 사이즈가 현재 블록의 사이즈보다 클 경우에는 이러한 문제가 발생하지 않을 수 있다.On the other hand, when the number of reference blocks adjacent to the current block is varied, a step may occur between the reference pixels located at the boundary of the reference blocks. In this case, the residual blocks after the prediction block generation are likely to contain a high frequency component. Thus, a problem arises that the blocking artifact between the reference blocks also affects the current block. The problem is that the larger the size of the current block, the higher the frequency. Conversely, if the size of the reference block is larger than the size of the current block, such a problem may not occur.

따라서, 상기의 문제점을 극복하기 위한 하나의 방법은 상기 참조 화소들을 적응적으로 필터링하여 새로운 참조화소들을 생성하는 것이다. 이는 인트라 예측 모드를 결정하기 전에 수행할 수도 있다. 인트라 예측 모드 및 예측 블록의 크기에 따라 미리 상기 참조 화소들을 적응적으로 필터링하여 새로운 참조 화소들을 생성하고, 원래의 참조화소 및 상기 생성된 새로운 참조 화소들을 이용하여 현재 블록의 인트라 예측 모드를 결정할 수도 있다. 그러나, 현재 블록의 인트라 예측 모드를 결정한 후에 상기 방법을 수행할 수도 있다. 블록킹 아티펙트의 문제는 블록의 크기가 커질수록 커지므로, 특정 크기의 블록의 범위에서는 블록의 크기가 커질수록 참조화소를 필터링하는 예측모드의 수를 같거나 크게 할 수 있다.Therefore, one method to overcome the above problem is to adaptively filter the reference pixels to generate new reference pixels. This may be performed before determining the intra prediction mode. The reference pixels are adaptively filtered in advance according to the intra prediction mode and the size of the prediction block to generate new reference pixels and the intra prediction mode of the current block may be determined using the original reference pixels and the generated new reference pixels have. However, the above method may be performed after determining the intra prediction mode of the current block. Since the problem of the blocking artifact increases as the size of the block increases, the number of prediction modes for filtering the reference pixel may be equal to or greater than the size of the block in the range of the block of a specific size.

상기 이용 가능한 참조 화소의 필터링이 필요한 경우에는, 상기한 참조 화소들 간의 단차의 차이 정도에 따라 2개 이상의 필터를 적응적으로 적용할 수도 있다. 상기 필터는 저역 통과 필터인 것이 바람직하다. 예를 들어, 2개의 필터를 이용할 경우, 제1 필터는 3-tap 필터, 제2 필터는 5-tap 필터일 수 있다. 제2 필터는 제1 필터를 2번 적용하는 필터일수도 있다. 상기 필터의 필터계수는 대칭적인 것이 바람직하다. 또는 복잡도 감소를 위해 1개의 필터만을 사용할 수도 있다.If the available reference pixels need to be filtered, two or more filters may be adaptively applied according to the difference in level difference between the reference pixels. The filter is preferably a low-pass filter. For example, when using two filters, the first filter may be a 3-tap filter and the second filter may be a 5-tap filter. The second filter may be a filter that applies the first filter twice. The filter coefficient of the filter is preferably symmetrical. Alternatively, only one filter may be used to reduce complexity.

또한, 상기한 필터가 현재 블록(인트라 예측이 수행될 블록)의 크기에 따라 적응적으로 적용되는 것이 바람직하다. 즉, 필터를 적용할 경우, 현재 블록의 크기가 제1 크기보다 작을 경우에는 대역폭이 좁은 필터를 적용하거나 필터를 적용하지 않을 수 있으며, 제1 크기~제2 크기의 현재 블록에 대해서는 필터를 적용하는 인트라 예측모드의 수를 증가시키는 것이 바람직하다. 상기 인트라 예측이 수행될 현재 블록은 변환블록의 크기일 수 있다. In addition, it is preferable that the above-described filter is adaptively applied according to the size of a current block (block to be intra-predicted). That is, when the current block size is smaller than the first size, a filter having a narrow bandwidth may be applied or a filter may not be applied, and a filter may be applied to a current block having a first size to a second size It is desirable to increase the number of intra prediction modes. The current block in which the intra prediction is performed may be the size of the transform block.

DC 모드의 경우에는 참조 화소들의 평균값으로 예측 블록이 생성되므로, 필터를 적용할 필요가 없다. 즉, 필터를 적용할 경우 불필요한 연산량만이 많아지게 된다. 또한, 영상이 수직 방향으로 연관성(correlation)이 있는 수직 모드에서는 참조화소에 필터를 적용할 필요가 없다. 영상이 수평 방향으로 연관성이 있는 수평 모드에서도 참조화소에 필터를 적용할 필요가 없다. 이와 같이, 필터링의 적용 여부는 현재 블록의 인트라 예측 모드와도 연관성이 있으므로, 현재 블록의 인트라 예측 모드 및 인트라 예측이 수행될 블록의 크기에 기초하여 참조화소를 적응적으로 필터링할 수 있다. 인트라 예측이 수행될 블록의 크기가 미리 정해진 크기(예를 들어, 4x4)보다 작은 경우에는 참조화소를 필터링하지 않는다. 또는 복잡도 감소를 위해 미리 정해진 크기보다 큰 경우에도 참조화소를 필터링하지 않을 수도 있다. 상기 블록의 크기가 미리 정해진 크기 범위 내에 속하는 경우에는, 대각선 방향의 인트라 예측 모드(수평 또는 수직 모드와 45도 각도의 방향성을 갖는 모드)와 수평 방향의 인트라 예측 모드 사이의 인트라 예측 모드들 중 어느 하나의 모드에서 참조화소가 필터링되면, 상기 모드와 대각선 방향의 인트라 예측 모드 사이의 방향성 모드들에서는 참조화소를 필터링한다.In the case of the DC mode, since a prediction block is generated with an average value of reference pixels, there is no need to apply a filter. That is, when the filter is applied, only unnecessary calculation amount is increased. In addition, it is not necessary to apply the filter to the reference pixel in the vertical mode in which the image has vertical correlation. It is not necessary to apply the filter to the reference pixel even in the horizontal mode in which the image is related to the horizontal direction. Since the filtering is applied to the intra-prediction mode of the current block, the reference pixel can be adaptively filtered based on the intra-prediction mode of the current block and the size of the block to be intra-predicted. The reference pixel is not filtered if the size of the block on which intra prediction is to be performed is smaller than a predetermined size (for example, 4x4). Or may not filter the reference pixel even if it is greater than a predetermined size for complexity reduction. When the size of the block falls within a predetermined size range, any one of intra-prediction modes between a diagonal intra-prediction mode (a mode having a 45-degree angle with the horizontal or vertical mode) and a horizontal- When the reference pixels are filtered in one mode, the reference pixels are filtered in the directional modes between the mode and the diagonal intra prediction mode.

상기의 문제점을 극복하기 위한 또 다른 방법은 상기 참조 화소들을 이용하여 생성된 예측 블록의 일부 화소들을 적응적으로 필터링하여 새로운 예측 블록을 생성하는 것이다. 현재 블록의 인트라 예측 모드에 따라 예측 블록의 예측 화소들 중 참조화소들과 접하는 예측 화소들을 적어도 하나 이상의 참조 화소들을 이용하여 보정할 수 있다. 이는 예측 블록 생성시에 함께 적용될 수도 있다.Another method for overcoming the above problem is to adaptively filter some pixels of a prediction block generated using the reference pixels to generate a new prediction block. The prediction pixels in contact with the reference pixels among the prediction pixels of the prediction block according to the intra prediction mode of the current block can be corrected using at least one reference pixel. This may be applied together at the time of generating the prediction block.

예를 들어, DC 모드에서는 예측 화소들 중 참조화소들과 접하는 예측 화소는 상기 예측 화소와 접하는 참조화소를 이용하여 필터링한다. 따라서, 예측 화소의 위치에 따라 1개 또는 2개의 참조화소를 이용하여 예측 화소를 필터링한다. DC 모드에서의 예측화소의 필터링은 모든 크기의 예측 블록에 적용할 수 있다.For example, in the DC mode, a prediction pixel in contact with reference pixels among prediction pixels is filtered using a reference pixel in contact with the prediction pixel. Therefore, the predictive pixel is filtered using one or two reference pixels according to the position of the predictive pixel. The filtering of the prediction pixel in the DC mode can be applied to the prediction block of all sizes.

수직 모드에서는 예측 블록의 예측 화소들 중 좌측 참조화소와 접하는 예측화소들은 상기 예측블록을 생성하는데 이용되는 상측화소 이외의 참조화소들을 이용하여 변경될 수 있다. 마찬가지로, 수평 모드에서는 생성된 예측 화소들 중 상측 참조화소와 접하는 예측화소들은 상기 예측블록을 생성하는데 이용되는 좌측화소 이외의 참조화소들을 이용하여 변경될 수 있다.In the vertical mode, the prediction pixels adjacent to the left reference pixel among the prediction pixels of the prediction block may be changed using reference pixels other than the upper pixel used to generate the prediction block. Likewise, in the horizontal mode, the prediction pixels adjacent to the upper reference pixel among the generated prediction pixels may be changed using reference pixels other than the left pixel used to generate the prediction block.

한편, 현재 블록과 상기 인트라 예측부(120)에 의해 생성된 예측 블록의 잔차 블록은 변환부호화/양자화부(140) 및 엔트로피 부호화부(150)를 통해 부호화된다.Meanwhile, the current block and the residual block of the prediction block generated by the intraprediction unit 120 are encoded through the transcoding / quantization unit 140 and the entropy encoding unit 150.

상기 잔차 블록은 먼저 변환 부호화된다. 효과적인 에너지 압축을 위해, 상기 잔차 블록에 적용할 변환 부호화를 위한 변환 블록의 크기를 먼저 결정하고, 결정된 크기의 블록 단위로 변환 부호화한다. 또는 변환 변환의 크기는 미리 결정되어 있을 수도 있다. 이 경우, 인트라 예측을 수행하는 현재 블록의 크기가 변환블록의 크기일 수도 있다. 인트라 예측 모드 값에 따라 서로 다른 변환 부호화 방식이 적용될 수 있다. 예를 들어, DC mode로 인트라 예측된 잔차 블록에 대해서는 수평 및 수직방향으로 정수기반 DCT(Discrete cosinetransform)를, planar mode에 대해서는 수평 및 수직 방향으로 정수기반 DST(Discrete sine transform)을 적용할 수도 있다.The residual block is transcoded first. For efficient energy compression, the size of a transform block for transform coding to be applied to the residual block is first determined, and transformed into a block unit of a determined size. Or the size of the transform transform may be predetermined. In this case, the size of the current block performing intra prediction may be the size of the transform block. Different transcoding schemes may be applied depending on the intra prediction mode value. For example, integer-based DCT (Discrete Cosine Transform) may be applied in the horizontal and vertical directions for the intra-predicted residual block in the DC mode, and integer-based DST (discrete sine transform) may be applied in the horizontal and vertical directions for the planar mode .

이는 소정크기보다 작거나 같은 블록에 대해서 적용할 수 있다. 그러나, 소정 크기보다 큰 변환블록에 대해서는 인트라 예측 모드에 관계없이 정수기반 DCT만을 적용할 수도 있다. 수평 및 수직 방향 DCT 방식과 DST 방식이 예측 모드에 따라 적응적으로 적용될 수도 있다.This can be applied to blocks smaller than or equal to a predetermined size. However, only integer-based DCTs may be applied to transform blocks larger than a predetermined size regardless of the intra-prediction mode. The horizontal and vertical DCT and DST schemes may be applied adaptively according to the prediction mode.

다음으로, 변환 부호화된 잔차 블록이 양자화한다. 잔차 블록의 크기에 따라 서로 다른 양자화 매트릭스가 적용된다. 또한, 동일한 크기의 잔차 블록의 경우에도 서로 다른 양자화 매트릭스가 적용될 수 있다. 즉, 변환 부호화된 잔차 블록의 계수들의 분포에 기초하여 적어도 2개 이상의 양자화 매트릭스 중 가장 효과적인 양자화 매트릭스를 적용할 수 있다. 이 경우에는 상기 양자화 매트릭스를 나타내는 정보를 복호기로 전송한다. 또한, 인트라 예측 모드에 따라 서로 다른 양자화 매트릭스를 변환 부호화된 잔차 블록에 적용할 수도 있다.Next, the transform coded residual block is quantized. Different quantization matrices are applied depending on the size of the residual block. Also, different quantization matrices may be applied to residual blocks of the same size. That is, the most effective quantization matrix of at least two or more quantization matrices can be applied based on the distribution of the coefficients of the transform coded residual block. In this case, information indicating the quantization matrix is transmitted to the decoder. In addition, different quantization matrices may be applied to the transcoded residual block according to the intra prediction mode.

다음으로, 상기 2차원의 양자화된 계수들을 미리 정해진 복수개의 스캔 패턴 중 하나를 선택하여 1차원의 양자화 계수 시퀀스로 변경한 후에 엔트로피 부호화한다. 상기 스캔 패턴은 인트라 예측 모드에 따라 결정될 수도 있고, 인트라 예측 모드와 변환블록의 크기에 따라 결정될 수도 있다.Next, one of the predetermined two-dimensional quantized coefficients is selected and a one-dimensional quantized coefficient sequence is changed, followed by entropy coding. The scan pattern may be determined according to the intra-prediction mode or the size of the intra-prediction mode and the transform block.

도 4는 본 발명의 실시예에 따른 동영상 복호화 장치를 나타내는 블록도이다.4 is a block diagram illustrating a moving picture decoding apparatus according to an embodiment of the present invention.

도 4를 참조하면, 본 발명에 따른 동영상 복호화 장치는, 인트로피 복호화부(210), 역양자화/역변환부(220), 가산기(270), 디블록킹 필터부(250), 픽쳐 저장부(260), 인트라 예측부(230), 움직임 보상 예측부(240) 및 인트라/인터전환 스위치(280)를 구비한다.4, the moving picture decoding apparatus according to the present invention includes an intropy decoding unit 210, an inverse quantization / inverse transformation unit 220, an adder 270, a deblocking filter unit 250, a picture storage unit 260 An intra prediction unit 230, a motion compensation prediction unit 240, and an intra / inter changeover switch 280.

인트로피 복호화부(210)는, 동영상 부호화 장치로부터 전송되는 부호화 비트스트림을 복호하여, 인트라 예측 모드 인덱스, 움직임 정보, 양자화 계수 시퀀스 등으로 분리한다. 인트로피 복호화부(210)는 복호된 움직임 정보를 움직임 보상 예측부(240)에 공급한다. 인트로피 복호화부(210)는 상기 인트라 예측 모드 인덱스를 상기 인트라 예측부(230), 역양자화/역변환부(220)로 공급한다. 또한, 상기 인트로피 복호화부(210)는 상기 역양자화 계수 시퀀스를 역양자화/역변환부(220)로 공급한다.The intropy decoding unit 210 decodes the encoded bit stream transmitted from the moving picture encoding apparatus into an intra prediction mode index, motion information, and a quantization coefficient sequence. The intropy decoding unit 210 supplies the decoded motion information to the motion compensation prediction unit 240. [ The intropy decoding unit 210 supplies the intra prediction mode index to the intraprediction unit 230 and the inverse quantization / inverse transformation unit 220. Also, the intropy decoding unit 210 supplies the inverse quantization coefficient sequence to the inverse quantization / inverse transformation unit 220.

역양자화/역변환부(220)는 상기 양자화 계수 시퀀스를 2차원 배열의 역양자화 계수로 변환한다. 상기 변환을 위해 복수개의 스캐닝 패턴 중에 하나를 선택한다. 현재 블록의 예측모드(즉, 인트라 예측 및 인터 예측 중의 어느 하나)와 인트라 예측 모드 및 변환 블록의 크기에 기초하여 복수개의 스캐닝 패턴 중 하나를 선택한다. 상기 인트라 예측 모드는 인트라 예측부 또는 인트로피 복호화부(210)로부터 수신한다.The inverse quantization / inverse transform unit 220 transforms the quantized coefficient sequence into an inverse quantization coefficient of the two-dimensional array. One of a plurality of scanning patterns is selected for the conversion. One of a plurality of scanning patterns is selected based on the prediction mode of the current block (i.e., any one of intra prediction and inter prediction), the intra prediction mode, and the size of the conversion block. The intraprediction mode is received from the intra prediction unit or intropy decoding unit 210.

역양자화/역변환부(220)는 상기 2차원 배열의 역양자화 계수에 복수개의 양자화 매트릭스 중 선택된 양자화 매트릭스를 이용하여 양자화 계수를 복원한다. 상기 양자화 매트릭스는 부호기로부터 수신된 정보를 이용하여 결정될 수도 있다. 복원하고자 하는 현재 블록(변환 블록)의 크기에 따라 서로 다른 양자화 매트릭스가 적용되며, 동일 크기의 블록에 대해서도 상기 현재 블록의 예측 모드 및 인트라 예측 모드 중 적어도 하나에 기초하여 양자화 매트릭스를 선택할 수 있다. 그리고, 상기 복원된 양자화 계수를 역변환하여 잔차 블록을 복원한다.The inverse quantization / inverse transform unit 220 restores the quantization coefficients using the selected quantization matrix among the plurality of quantization matrices to the inverse quantization coefficients of the two-dimensional array. The quantization matrix may be determined using information received from the encoder. Different quantization matrices may be applied depending on the size of the current block (transform block) to be restored, and a quantization matrix may be selected based on at least one of a prediction mode and an intra prediction mode of the current block with respect to blocks of the same size. Then, the reconstructed quantized coefficient is inversely transformed to reconstruct the residual block.

가산기(270)는 역양자화/역변환부(220)에 의해 복원된 잔차 블록과 인트라 예측부(230) 또는 움직임 보상 예측부(240)에 의해 생성되는 예측 블록을 가산함으로써, 영상 블록을 복원한다.The adder 270 reconstructs the image block by adding the residual block reconstructed by the inverse quantization / inverse transforming unit 220 to the intra prediction unit 230 or the prediction block generated by the motion compensation prediction unit 240.

디블록킹 필터부(250)는 가산기(270)에 의해 생성된 복원 영상에 디블록킹 필터 처리를 실행한다. 이에 따라, 양자화 과정에 따른 영상 손실에 기인하는 디블록킹 아티펙트를 줄일 수 있다.The deblocking filter unit 250 performs deblocking filter processing on the reconstructed image generated by the adder 270. [ Accordingly, the deblocking artifact due to the video loss due to the quantization process can be reduced.

픽쳐 저장부(260)는 디블록킹 필터부(250)에 의해 디블록킹 필터 처리가 실행된 로컬 복호 영상을 유지하는 프레임 메모리이다.The picture storage unit 260 is a frame memory for holding a local decoded picture subjected to deblocking filter processing by the deblocking filter unit 250. [

인트라 예측부(230)는 인트로피 복호화부(210)로부터 수신된 인트라 예측 모드 인덱스에 기초하여 현재 블록의 인트라 예측 모드를 복원한다. 그리고, 복원된 인트라 예측 모드에 따라 예측 블록을 생성한다.The intraprediction unit 230 restores the intra prediction mode of the current block based on the intra prediction mode index received from the Intropy decoding unit 210. A prediction block is generated according to the restored intra prediction mode.

움직임 보상 예측부(240)는 움직임 벡터 정보에 기초하여 픽쳐 저장부(260)에 저장된 픽쳐로부터 현재 블록에 대한 예측 블록을 생성한다. 소수 정밀도의 움직임 보상이 적용될 경우에는 선택된 보간 필터를 적용하여 예측블록을 생성한다.The motion compensation prediction unit 240 generates a prediction block for the current block from the picture stored in the picture storage unit 260 based on the motion vector information. When motion compensation with a decimal precision is applied, a prediction block is generated by applying a selected interpolation filter.

인트라/인터 전환 스위치(280)는 부호화 모드에 기초하여 인트라 예측부(230)와 움직임 보상 예측부(240)의 어느 하나에서 생성된 예측 블록을 가산기(270)에 제공한다.The intra / inter selector switch 280 provides the adder 270 with a prediction block generated in either the intra prediction unit 230 or the motion compensation prediction unit 240 based on the coding mode.

이하, 상기 도 4를 참조하여, 현재 블록을 인트라 예측을 통해 복원하는 과정을 설명한다. 도 5는 본 발명의 실시예에 따른 인트라 블록을 복원하기 위한 순서도이다.Hereinafter, a process of restoring a current block through intraprediction will be described with reference to FIG. 5 is a flowchart for restoring an intra block according to an embodiment of the present invention.

먼저, 수신된 비트스트림으로부터 현재 블록의 인트라 예측 모드를 복호한다(S310).First, the intra-prediction mode of the current block is decoded from the received bitstream (S310).

이를 위해, 인트로피 복호화부(210)는 복수개의 인트라 예측 모드 테이블 중 하나를 참조하여 현재 블록의 제1인트라 예측 모드 인덱스를 복원한다.To this end, the intropy decoding unit 210 restores the first intra prediction mode index of the current block by referring to one of the plurality of intra prediction mode tables.

상기 복수개의 인트라 예측 모드 테이블은 부호기와 복호기가 공유하는 테이블로서, 현재 블록에 인접한 복수개의 블록들의 인트라 예측 모드의 분포에 따라 선택된 어느 하나의 테이블이 적용될 수 있다. 일예로써, 현재 블록의 좌측 블록의 인트라 예측 모드와 현재 블록의 상측 블록의 인트라 예측 모드가 동일하면 제1 인트라 예측모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원하고, 동일하지 않으면 제2 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원할 수 있다. 또 다른 예로써, 현재 블록의 상측 블록과 좌측 블록의 인트라 예측 모드가 모두 방향성 예측 모드(directional intra prediction mode)일 경우에는, 상기 상측 블록의 인트라 예측 모드의 방향과 상기 좌측 블록의 인트라 예측 모드의 방향이 소정 각도 이내이면, 제 1 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원하고, 소정 각도를 벗어나면 제2 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원할 수도 있다.The plurality of intra prediction mode tables are tables shared by the encoder and the decoder, and may be any one selected according to the distribution of intra prediction modes of a plurality of blocks adjacent to the current block. For example, if the intra prediction mode of the left block of the current block and the intra prediction mode of the upper block of the current block are the same, the first intra prediction mode table of the current block is restored by applying the first intra prediction mode table, The first intra prediction mode index of the current block can be restored by applying the second intra prediction mode table. As another example, when the intra prediction modes of the upper block and the left block of the current block are all the directional intra prediction modes, the direction of the intra prediction mode of the upper block and the intra prediction mode of the left block If the direction is within a predetermined angle, the first intra-prediction mode table of the current block is restored by applying the first intra-prediction mode table. If the direction is outside the predetermined angle, the second intra- The mode index can also be restored.

인트로피 복호화부(210)는 복원된 현재 블록의 제1 인트라 예측 모드 인덱스를 인트라 예측부(230)로 전송한다.The intropy decoding unit 210 transmits the first intraprediction mode index of the restored current block to the intra predictor 230.

상기 제1 인트라 예측 모드를 인덱스를 수신한 인트라 예측부(230)는 상기 상기 인덱스가 최소값을 가질 경우(즉, 0)에는 현재 블록의 최대가능모드를 현재 블록의 인트라 예측 모드로 결정한다. 그러나, 상기 인덱스가 0 이외의 값을 가질 경우에는 현재 블록의 최대가능모드가 나타내는 인덱스와 상기 제1 인트라 예측 모드 인덱스를 비교한다. 비교 결과, 상기 제1 인트라 예측 모드 인덱스가 상기 현재 블록의 최대가능모드가 나타내는 인덱스보다 작지 않으면, 상기 제 1 인트라 예측 모드 인덱스에 1을 더한 제2 인트라 예측 모드 인덱스에 대응하는 인트라 예측 모드를 현재 블록의 인트라 예측 모드로 결정하고, 그렇지 않으면 상기 제 1 인트라 예측 모드 인덱스에 대응하는 인트라 예측 모드를 현재 블록의 인트라 예측 모드를 결정한다.The intraprediction unit 230 receiving the index of the first intraprediction mode determines the maximum possible mode of the current block as the intra prediction mode of the current block when the index has the minimum value (i.e., 0). However, if the index has a value other than 0, the index indicating the maximum possible mode of the current block is compared with the first intra-prediction mode index. If the first intra-prediction mode index is not smaller than the index indicated by the maximum possible mode of the current block, the intra-prediction mode corresponding to the second intra-prediction mode index obtained by adding 1 to the first intra- The intra prediction mode of the current block is determined as the intra prediction mode corresponding to the first intra prediction mode index.

현재 블록에 허용 가능한 인트라 예측 모드는 적어도 하나 이상의 비방향성 모드(non-directional mode)와 복수개의 방향성 모드들(directional modes)로 구성될 수 있다. 하나 이상의 비방향성 모드는 DC 모드 및/또는 플래너(planar) 모드일수 있다. 또한, DC 모드와 플래너 모드 중 어느 하나가 적응적으로 상기 허용 가능한 인트라예측 모드 셋에 포함될 수 있다. 이를 위해, 픽쳐 헤더 또는 슬라이스 헤더에 상기 허용 가능한 인트라 예측 모드 셋에 포함되는 비방향성 모드를 특정하는 정보가 포함될 수 있다.The intra prediction mode acceptable for the current block may be composed of at least one non-directional mode and a plurality of directional modes. The one or more non-directional modes may be a DC mode and / or a planar mode. In addition, either the DC mode or the planar mode may be adaptively included in the allowable intra prediction mode set. To this end, information specifying the non-directional mode included in the allowable intra prediction mode set may be included in the picture header or slice header.

다음으로, 인트라 예측부(230)는 인트라 예측 블록을 생성하기 위해, 참조 화소들을 픽쳐 저장부(260)로터 읽어 들이고, 이용 가능하지 않은 참조 화소가 존재하는지 여부를 판단한다(S320). 상기 판단은 현재 블록의 복호된 인트라 예측 모드를 적용하여 인트라 예측 블록을 생성하는데 이용되는 참조 화소들의 존재 여부에 따라 행해질 수도 있다.Next, in order to generate an intra prediction block, the intra predictor 230 rotates the reference pixels stored in the picture storage unit 260, and determines whether there is a non-available reference pixel (S320). The determination may be made according to the presence or absence of the reference pixels used to generate the intra prediction block by applying the decoded intra prediction mode of the current block.

다음으로, 인트라 예측부(230)는 참조 화소를 생성할 필요가 있을 경우에는 미리 복원된 이용 가능한 참조 화소들을 이용하여 이용 가능하지 않은 위치의 참조화소들을 생성한다(S325). 이용 가능하지 않은 참조 화소에 대한 정의 및 참조 화소의 생성 방법은 도 2에 따른 인트라 예측부(120)에서의 동작과 동일하다. 다만, 현재 블록의 복호된 인트라 예측 모드에 따라 인트라 예측 블록을 생성하는데 이용되는 참조 화소만들을 선택적으로 복원할 수도 있다.Next, when it is necessary to generate a reference pixel, the intra-prediction unit 230 generates reference pixels at positions that are not available using the reconstructed available reference pixels (S325). The definition of a reference pixel that is not available and the method of generating a reference pixel are the same as those in the intra prediction unit 120 shown in FIG. However, it is also possible to selectively reconstruct a reference pixel used for generating an intra prediction block according to the decoded intra prediction mode of the current block.

다음으로, 인트라 예측부(230)는 예측 블록을 생성하기 위하여, 참조 화소들에 필터를 적용할지 여부를 판단한다(S330). 즉, 인트라 예측부(230)는 현재 블록의 인트라 예측 블록을 생성하기 위하여 참조 화소들에 대해 필터링을 적용할지 여부를 상기 복호된 인트라 예측 모드 및 현재 예측 블록의 크기에 기초하여 결정한다. 블록킹아티펙트의 문제는 블록의 크기가 커질수록 커지므로, 블록의 크기가 커질수록 참조화소를 필터링하는 예측모드의 수를 증가시킬 수 있다. 그러나, 블록이 소정 크기보다 커지는 경우에는 평탄한 영역으로 볼 수 있으므로 복잡도 감소를 위해 참조화소를 필터링하지 않을 수 있다.Next, in order to generate the prediction block, the intra-prediction unit 230 determines whether to apply the filter to the reference pixels (S330). That is, the intra-prediction unit 230 determines whether to apply filtering on the reference pixels to generate an intra-prediction block of the current block based on the decoded intra-prediction mode and the size of the current prediction block. Since the problem of blocking artifacts increases as the size of the block increases, the larger the size of the block, the larger the number of prediction modes for filtering reference pixels. However, when the block is larger than a predetermined size, it can be regarded as a flat area, so that reference pixels may not be filtered to reduce the complexity.

상기 참조 화소에 필터 적용이 필요하다고 판단된 경우에는 필터를 이용하여 상기 참조 화소들을 필터링한다(S335).If it is determined that the reference pixel needs to be applied to the reference pixel, the reference pixels are filtered using the filter (S335).

상기한 참조 화소들 간의 단차의 차이 정도에 따라 적어도 2개 이상의 필터를 적응적으로 적용할 수도 있다. 상기 필터의 필터계수는 대칭적인 것이 바람직하다.At least two or more filters may be adaptively applied according to the difference in level difference between the reference pixels. The filter coefficient of the filter is preferably symmetrical.

또한, 상기한 2개 이상의 필터가 현재 블록의 크기에 따라 적응적으로 적용될 수도 있다. 즉, 필터를 적용할 경우, 크기가 작은 블록에 대해서는 대역폭이 좁은 필터를, 크기가 큰 블록들에 대해서는 대역폭이 넓은 필터를 적용할 수도 있다.In addition, the above two or more filters may be adaptively applied according to the size of the current block. That is, when a filter is applied, a filter having a narrow bandwidth may be applied to a block having a small size, and a filter having a wide bandwidth may be applied to a block having a large size.

DC 모드의 경우에는 참조 화소들의 평균값으로 예측 블록이 생성되므로, 필터를 적용할 필요가 없다. 즉, 필터를 적용할 경우 불필요한 연산량만이 많아지게 된다. 또한, 영상이 수직 방향으로 연관성(correlation)이 있는 수직 모드에서는 참조화소에 필터를 적용할 필요가 없다. 영상이 수평 방향으로 연관성이 있는 수평 모드에서도 참조화소에 필터를 적용할 필요가 없다. 이와 같이, 필터링의 적용 여부는 현재 블록의 인트라 예측 모드와도 연관성이 있으므로, 현재 블록의 인트라 예측 모드 및 예측 블록의 크기에 기초하여 참조화소를 적응적으로 필터링할 수 있다.In the case of the DC mode, since a prediction block is generated with an average value of reference pixels, there is no need to apply a filter. That is, when the filter is applied, only unnecessary calculation amount is increased. In addition, it is not necessary to apply the filter to the reference pixel in the vertical mode in which the image has vertical correlation. It is not necessary to apply the filter to the reference pixel even in the horizontal mode in which the image is related to the horizontal direction. Since the filtering is applied to the intra-prediction mode of the current block, the reference pixel can be adaptively filtered based on the intra-prediction mode of the current block and the size of the prediction block.

다음으로, 상기 복원된 인트라 예측 모드에 따라, 상기 참조 화소 또는 상기 필터링된 참조 화소들을 이용하여 예측 블록을 생성한다(S340). 상기 예측 블록의 생성은 도 2의 부호기에서의 동작과 동일하므로 생략한다. 플래너 모드의 경우에도 도 2의 부호기에서의 동작과 동일하므로 생략한다.Next, in step S340, a prediction block is generated using the reference pixel or the filtered reference pixels according to the reconstructed intra prediction mode. The generation of the prediction block is the same as the operation in the encoder of FIG. 2 and thus is omitted. The planner mode is also the same as the operation in the encoder of FIG.

다음으로, 상기 생성된 예측 블록을 필터링할지 여부를 판단한다(S350). 상기 필터링 여부의 판단은 슬라이스헤더 또는 부호화 유닛 헤더에 포함된 정보를 이용할 수 있다. 또한, 현재 블록의 인트라 예측 모드에 따라 결정될 수도 있다.Next, it is determined whether to filter the generated prediction block (S350). The determination as to whether to perform the filtering may use information included in the slice header or the encoding unit header. It may also be determined according to the intra prediction mode of the current block.

상기 생성된 예측 블록을 필터링할 것으로 판단할 경우, 생성된 예측 블록을 필터링한다(S335). 구체적으로, 현재 블록에 인접한 이용 가능한 참조 화소들을 이용하여 생성된 예측 블록의 특정 위치의 화소를 필터링하여 새로운 화소를 생성한다. 이는 예측 블록 생성시에 함께 적용될 수도 있다. 예를 들어, DC 모드에서는 예측 화소들 중 참조화소들과 접하는 예측 화소는 상기 예측 화소와 접하는 참조화소를 이용하여 필터링한다. 따라서, 예측 화소의 위치에 따라 1개 또는 2개의 참조화소를 이용하여 예측 화소를 필터링한다. DC 모드에서의 예측화소의 필터링은 모든 크기의 예측 블록에 적용할 수 있다. 수직 모드에서는 예측 블록의 예측 화소들 중 좌측 참조화소와 접하는 예측화소들은 상기 예측블록을 생성하는데 이용되는 상측화소 이외의 참조화소들을 이용하여 변경될 수 있다. 마찬가지로, 수평 모드에서는 생성된 예측 화소들 중 상측 참조화소와 접하는 예측화소들은 상기 예측블록을 생성하는데 이용되는 좌측화소 이외의 참조화소들을 이용하여 변경될 수 있다.If it is determined to filter the generated prediction block, the generated prediction block is filtered (S335). Specifically, a new pixel is generated by filtering pixels at a specific position of a prediction block generated using available reference pixels adjacent to the current block. This may be applied together at the time of generating the prediction block. For example, in the DC mode, a prediction pixel in contact with reference pixels among prediction pixels is filtered using a reference pixel in contact with the prediction pixel. Therefore, the predictive pixel is filtered using one or two reference pixels according to the position of the predictive pixel. The filtering of the prediction pixel in the DC mode can be applied to the prediction block of all sizes. In the vertical mode, the prediction pixels adjacent to the left reference pixel among the prediction pixels of the prediction block may be changed using reference pixels other than the upper pixel used to generate the prediction block. Likewise, in the horizontal mode, the prediction pixels adjacent to the upper reference pixel among the generated prediction pixels may be changed using reference pixels other than the left pixel used to generate the prediction block.

이와 같은 방식으로 복원된 현재 블록의 예측 블록과 복호화한 현재 블록의 잔차 블록을 이용하여 현재 블록이 복원된다.The current block is reconstructed using the predicted block of the current block restored in this manner and the residual block of the decoded current block.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that

110 : 부호화 모드 결정부 120 : 인트라 예측부
130 : 움직임 보상부 131 : 움직임 추정부
140 : 변환부호화/양자화부 150 : 엔트로피 부호화부
160 : 역양자화/변환복호화부 170 : 디블록킹 필터링부
180 : 픽쳐 저장부 190 : 감산부
200 : 가산부 210 : 인트로피 복호화부
220 : 역양자화/역변환부 230 : 인트라 예측부
240 : 움직임 보상 예측부 250 : 디블록킹 필터부
260 : 픽쳐 저장부 270 : 가산기
280 : 인트라/인터 전환 스위치
110: coding mode determination unit 120: intra prediction unit
130: motion compensation unit 131: motion estimation unit
140: Transcoding / quantization unit 150: Entropy encoding unit
160: Inverse quantization / conversion decoding unit 170: De-blocking filtering unit
180: Picture storage unit 190:
200: adder 210: intropy decoder
220: Inverse quantization / inverse transform unit 230:
240: motion compensation prediction unit 250: deblocking filter unit
260: Picture storage unit 270:
280: Intra / Inter switch

Claims (10)

인트라 예측 모드를 복원하는 단계;
현재 블록의 이용 가능하지 않은 참조화소가 존재하면 이용 가능한 참조화소를 이용하여 참조화소를 생성하는 단계;
상기 인트라 예측 모드와 현재 블록의 크기에 기초하여 현재 블록의 참조화소들을 필터링할지 여부를 판단하는 단계;
현재 블록의 참조화소들을 필터링할 것으로 판단하면, 현재 블록의 크기 및 참조화소들간의 단차정보를 이용하여 필터를 선택하고, 상기 필터를 이용하여 현재 블록의 참조화소들을 필터링하는 단계: 및
상기 인트라 예측 모드에 따라 예측 블록을 생성하는 단계;를 포함하는 것을 특징으로 하는 영상 복호화 방법.
Restoring an intra prediction mode;
Generating a reference pixel using an available reference pixel if there is a reference pixel that is not available in the current block;
Determining whether to filter reference pixels of a current block based on the intra prediction mode and the size of the current block;
Selecting a filter using the size of the current block and the step information between the reference pixels and filtering the reference pixels of the current block using the filter if it is determined to filter the reference pixels of the current block;
And generating a prediction block according to the intra prediction mode.
제1항에 있어서, 상기 인트라 예측 모드는 미리 정해진 개수의 방향성 인트라 예측 모드들과 2개의 비방향성 인트라 예측 모드들 중에서 선택되는 것을 특징으로 하는 영상 복호화 방법. The video decoding method of claim 1, wherein the intra prediction mode is selected from a predetermined number of directional intra prediction modes and two non-directional intra prediction modes. 제1항에 있어서, 상기 현재 블록의 크기가 커질수록 참조화소를 필터링하는 인트라 예측 모드의 수가 증가하는 것을 특징으로 하는 영상 복호화 방법.The method of claim 1, wherein as the size of the current block increases, the number of intra prediction modes for filtering a reference pixel increases. 제1항에 있어서, 상기 이용 가능하지 않은 참조화소의 위치로부터 미리 정해진 방향의 가장 가까운 위치의 이용 가능한 참조화소를 이용하여 참조화소를 생성하는 것을 특징으로 하는 영상 복호화 방법. The video decoding method according to claim 1, wherein a reference pixel is generated using an available reference pixel nearest to a predetermined direction from a position of the unavailable reference pixel. 제4항에 있어서, 상기 미리 정해진 방향에 이용 가능한 참조화소가 존재하지 않으면, 반대 방향의 가장 가까운 위치의 이용 가능한 참조화소를 복사하여 참조화소를 생성하는 것을 특징으로 하는 영상 복호화 방법. 5. The video decoding method according to claim 4, wherein if there is no reference pixel available in the predetermined direction, the reference pixel is generated by copying the available reference pixel in the nearest position in the opposite direction. 제4항에 있어서, 인터 부호화되어 복원된 블록에 속하는 현재 블록의 참조화소들을 이용 가능하지 않은 것으로 설정하는 것을 특징으로 하는 영상 복호화 방법.5. The image decoding method of claim 4, wherein reference pixels of a current block belonging to the inter-coded reconstructed block are set as unavailable. 제1항에 있어서, 대각선 방향의 인트라 예측 모드와 수평 방향의 인트라 예측모드 사이의 제1 인트라 예측 모드에서 참조화소가 필터링되면, 상기 제1 인트라 예측 모드와 상기 대각선 방향의 인트라 예측 모드 사이의 방향성 인트라 예측모드에서도 참조화소들을 필터링하는 것을 특징으로 하는 영상 복호화 방법.2. The method of claim 1, wherein when the reference pixels are filtered in a first intraprediction mode between a diagonal intra-prediction mode and a horizontal intra-prediction mode, the directionality between the first intraprediction mode and the diagonal- Wherein the reference pixels are filtered even in the intra prediction mode. 제2항에 있어서, 상기 2개의 비방향성 모드들은 DC 모드와 플래너 모드인 것을 특징으로 하는 영상 복호화 방법. 3. The method of claim 2, wherein the two non-directional modes are a DC mode and a planar mode. 제1항에 있어서, 상기 복원된 인트라 예측 모드가 수직 모드이면, 상기 예측 블록의 예측 화소들은 예측블록 생성에 이용되는 참조화소들 이외의 참조화소들을 이용하여 변경되는 것을 특징으로 하는 영상 복호화 방법.The method of claim 1, wherein if the reconstructed intra prediction mode is a vertical mode, prediction pixels of the prediction block are changed using reference pixels other than reference pixels used for generating a prediction block. 제1항에 있어서, 상기 복원된 인트라 예측 모드가 수평 모드이면, 상기 예측 블록의 예측 화소들은 예측블록 생성에 이용되는 참조화소들 이외의 참조화소들을 이용하여 변경되는 것을 특징으로 하는 영상 복호화 방법.The method of claim 1, wherein, when the reconstructed intra prediction mode is a horizontal mode, prediction pixels of the prediction block are changed using reference pixels other than reference pixels used for generating a prediction block.
KR1020140049712A 2014-04-25 2014-04-25 Method of decoding moving pictures KR20140057518A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140049712A KR20140057518A (en) 2014-04-25 2014-04-25 Method of decoding moving pictures

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140049712A KR20140057518A (en) 2014-04-25 2014-04-25 Method of decoding moving pictures

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020120027268A Division KR20130105114A (en) 2012-03-16 2012-03-16 Method of decoding moving pictures in intra prediction

Publications (1)

Publication Number Publication Date
KR20140057518A true KR20140057518A (en) 2014-05-13

Family

ID=50888241

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140049712A KR20140057518A (en) 2014-04-25 2014-04-25 Method of decoding moving pictures

Country Status (1)

Country Link
KR (1) KR20140057518A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278236A (en) * 2015-08-28 2022-11-01 株式会社Kt Method and non-transitory computer readable medium for decoding or encoding an image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278236A (en) * 2015-08-28 2022-11-01 株式会社Kt Method and non-transitory computer readable medium for decoding or encoding an image

Similar Documents

Publication Publication Date Title
US11272218B2 (en) Method of decoding moving pictures in intra prediction
KR20130105114A (en) Method of decoding moving pictures in intra prediction
KR101204385B1 (en) Method of decoding moving pictures in intra prediction
KR20140057519A (en) Method of encoding moving pictures
KR20140057518A (en) Method of decoding moving pictures
KR20140057516A (en) Prediction block generation method
KR20140057517A (en) Prediction block generation method

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
A302 Request for accelerated examination
E902 Notification of reason for refusal
E601 Decision to refuse application