KR101464944B1 - Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock - Google Patents

Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock Download PDF

Info

Publication number
KR101464944B1
KR101464944B1 KR1020140041990A KR20140041990A KR101464944B1 KR 101464944 B1 KR101464944 B1 KR 101464944B1 KR 1020140041990 A KR1020140041990 A KR 1020140041990A KR 20140041990 A KR20140041990 A KR 20140041990A KR 101464944 B1 KR101464944 B1 KR 101464944B1
Authority
KR
South Korea
Prior art keywords
block
sub
residual
pixel
arbitrary
Prior art date
Application number
KR1020140041990A
Other languages
Korean (ko)
Other versions
KR20140058468A (en
Inventor
김하윤
문주희
이영렬
김해광
전병우
김동원
박민철
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Priority to KR1020140041990A priority Critical patent/KR101464944B1/en
Publication of KR20140058468A publication Critical patent/KR20140058468A/en
Application granted granted Critical
Publication of KR101464944B1 publication Critical patent/KR101464944B1/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/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Abstract

본 발명은 서브블록 내 임의 화소를 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다.
본 발명은 임의 화소 추출부; 제 1 예측부; 제 1 감산부; 제 1 변환부; 제 1 양자화부; 제 1 역 양자화부; 제 1 역 변환부; 제 1 가산부; 제 2 예측부; 제 2 감산부; 임의 잔차 화소 결합부; 제 2 변환부; 제 2 양자화부; 및 부호화부를 포함하여, 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 부호화하고 복호하하여 복원한 후 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측하고 부호화하는 것을 특징으로한다.
본 발명에 의하면, 영상을 부호화하거나 복호화하는 데 있어서, 현재 부호화하거나 복호화하고자 하는 블록의 화소를 인트라 예측할 때 예측의 정확도를 향상시켜 부호화 효율을 향상시킬 수 있다.
The present invention relates to a method and apparatus for image encoding / decoding using arbitrary pixels in a sub-block.
The present invention relates to an arbitrary pixel extracting unit. A first predictor; A first subtractor; A first conversion unit; A first quantization unit; A first inverse quantization unit; A first inverse transform unit; A first adder; A second predictor; A second subtraction unit; A random residual pixel combiner; A second conversion unit; A second quantization unit; And an encoding unit. The encoding unit extracts, encodes, and decodes arbitrary pixels in each sub-block of the current macroblock, reconstructs and restores the rest of the sub-blocks, and predicts and codes the remaining pixels of each sub-block.
According to the present invention, in coding or decoding an image, it is possible to improve coding efficiency by improving the accuracy of prediction when intraprediction of a pixel of a block to be coded or decoded at present is performed.

Description

서브블록 내 임의 화소를 이용한 영상 부호화/복호화 방법 및 장치{Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock}[0001] The present invention relates to a video encoding / decoding method and apparatus using arbitrary pixels in a sub-block,

본 발명은 서브블록 내 임의 화소를 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다. 더욱 상세하게는, 영상을 부호화하거나 복호화하는 데 있어서, 현재 부호화하거나 복호화하고자 하는 블록의 화소를 인트라 예측할 때 예측의 정확도를 향상시켜 부호화 효율을 향상시키는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for image encoding / decoding using arbitrary pixels in a sub-block. More particularly, the present invention relates to a method and an apparatus for improving coding efficiency by improving the accuracy of prediction when intra-prediction is performed on a pixel of a current block to be coded or decoded in coding or decoding an image.

MPEG(Moving Picture Experts Group)과 VCEG(Video Coding Experts Group)은 기존의 MPEG-4 Part 2와 H.263 표준안보다 우수하고 뛰어난 비디오 압축 기술을 개발하였다. 이 새로운 표준안은 H.264/AVC(Advanced video Coding)이라 하며, MPEG-4 Part 10 AVC와 ITU-T Recommendation H.264로 공동으로 발표되었다. 이러한 H.264/AVC(이하 'H.264'라 약칭함)에서는 MPEG-1, MPEG-2, MPEG-4 Part2 Visual 등 기존의 동영상 부호화와 관련된 국제 표준과는 다른 방법인 공간 예측 부호화(Spatial Predictive Coding) 방법을 사용한다.Moving Picture Experts Group (MPEG) and Video Coding Experts Group (VCEG) have developed superior video compression techniques superior to the existing MPEG-4 Part 2 and H.263 standards. This new standard is called H.264 / AVC (Advanced Video Coding) and is jointly announced as MPEG-4 Part 10 AVC and ITU-T Recommendation H.264. In this H.264 / AVC (abbreviated as 'H.264'), a spatial prediction coding method which is different from the international standard related to the conventional video coding such as MPEG-1, MPEG-2 and MPEG- Predictive Coding) method.

기존의 동영상 부호화 방법에서는 이산 코사인 변환 영역(DCT Domain: Discrete Cosine Transform Domain)에서 변환된 계수(Coefficient)값에 대한 "인트라 예측(Intra Prediction)"을 사용함으로써 부호화 효율 증대를 추구하며, 그로 인해 저역 전송 비트율 대의 주관적 화질을 열화시키는 결과를 초래하였다. 하지만, H.264에서는 변환 영역(Transform Domain)이 아닌 공간 영역(Spatial Domain)에서의 공간적 인트라 예측(Spatial Intra Prediction)을 기반으로 하는 부호화 방법을 채택하고 있다.In the conventional moving image encoding method, "intra prediction" is used for the coefficient value transformed in the discrete cosine transform domain (DCT domain), thereby seeking to increase the coding efficiency. As a result, Resulting in deterioration in the subjective image quality of the transmission bit rate band. However, H.264 adopts a coding method based on Spatial Intra Prediction in a Spatial Domain instead of a Transform Domain.

기존의 공간적 인트라 예측을 기반으로 하는 부호화 방법을 사용하는 부호화기(Encoder)는 이미 부호화가 완료되어 재생된 이전 블록의 정보로부터 현재 부호화하고자 하는 블록을 예측하고 부호화하고자 하는 실제 블록과의 차이(Difference) 정보만을 부호화해서 복호화기(Decoder)로 전송한다. 이때, 블록을 예측하는 데 필요한 파라미터를 복호화기로 전송하거나, 부호화기와 복호화기를 동기화시켜 예측에 필요한 파라미터를 공유하도록 함으로써 복호화기가 블록을 예측하도록 할 수도 있다. 복호화기는 이미 복호화가 완료된 주변 블록을 이용하여 현재 블록을 예측하고, 부호화기로부터 전송된 차이 정보와 예측된 현재 블록과 합을 구하여 원하는 현재 복호화하고자 하는 블록을 생성하여 재생한다. 이때도 역시 부호화기로부터 예측에 필요한 파라미터가 전송되었다면, 복호화기는 해당 파라미터를 이용하여 현재 블록을 예측하는데 이용한다.An encoder using an encoding method based on a conventional spatial intra prediction predicts a current block to be coded from information of a previous block that has been already encoded and reproduced and extracts a difference from an actual block to be encoded, Only information is encoded and transmitted to a decoder. At this time, parameters necessary for predicting the block may be transmitted to the decoder, or the encoder and the decoder may be synchronized to share parameters necessary for prediction, so that the decoder may predict the block. The decoder predicts the current block using the decoded neighboring block and generates a sum of the difference information and the predicted current block transmitted from the encoder to generate a desired block to be decoded. At this time, if parameters necessary for prediction are also transmitted from the encoder, the decoder uses the parameter to predict the current block.

하지만, 통상적인 영상 부호화 방법 또는 영상 복호화 방법에 따라 인트라 예측을 이용하여 예측하는 경우, 현재 부호화하고자 하는 블록 주위의 주변 블록(주로 현재 블록의 왼쪽 블록과 위쪽 블록)에 있는 이미 복원된 인접 화소를 이용하여 현재 블록의 화소들을 예측한다. 이 경우, 주변 블록의 인접 화소와 먼 위치에 있는 현재 블록의 화소들은 멀리 떨어진 인접 화소의 화소값으로 예측되기 때문에 그 예측 정확도가 저하될 수 있다. 이러한 예측 정확도의 저하는 원래의 화소의 화소값과 예측된 화소의 화소값의 차이를 증가시켜서 궁극적으로는 압축 효율을 저하시키는 문제점이 있다.However, in the case of predicting using intra prediction according to a conventional image coding method or an image decoding method, it is possible to predict a previously reconstructed adjacent pixel in a neighboring block (mainly a left block and an upper block of the current block) To predict the pixels of the current block. In this case, since the pixels of the current block located far away from the neighboring pixels of the neighboring block are predicted as the pixel values of the neighboring pixels farther away, the prediction accuracy may be lowered. This decrease in the prediction accuracy increases the difference between the pixel value of the original pixel and the pixel value of the predicted pixel, which ultimately causes a problem of lowering the compression efficiency.

전술한 문제점을 해결하기 위해 본 발명은, 영상을 부호화하거나 복호화하는 데 있어서, 현재 부호화하거나 복호화하고자 하는 블록의 화소를 인트라 예측할 때 예측의 정확도를 향상시켜 부호화 효율을 향상시키는 데 주된 목적이 있다.In order to solve the above-described problems, the present invention has a main purpose in improving coding efficiency by improving the accuracy of prediction when intra-prediction of a pixel of a block to be coded or decoded is performed in coding or decoding an image.

전술한 목적을 달성하기 위해 본 발명은, 영상을 부호화하는 장치에 있어서, 영상의 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성하는 임의 화소 추출부; 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하는 제 1 예측부; 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성하는 제 1 감산부; 임의 화소 잔차 블록을 변환하는 제 1 변환부; 변환된 임의 화소 잔차 블록을 양자화하는 제 1 양자화부; 양자화된 임의 화소 잔차 블록을 역 양자화하는 제 1 역 양자화부; 역 양자화된 임의 화소 잔차 블록을 역 변환하는 제 1 역 변환부; 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성하는 제 1 가산부; 현재 매크로블록의 인접 화소들 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측하여 예측 매크로블록을 생성하는 제 2 예측부; 현재 매크로블록에서 예측 매크로블록을 감산하여 잔차 매크로블록을 생성하는 제 2 감산부; 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 잔차 매크로블록의 각 위치에 결합하는 임의 잔차 화소 결합부; 각 역 변환된 임의 잔차 화소가 결합된 잔차 매크로블록을 변환하는 제 2 변환부; 변환된 잔차 매크로블록을 양자화하는 제 2 양자화부; 및 양자화된 잔차 매크블록을 부호화하여 비트스트림을 생성하는 부호화부를 포함하는 것을 특징으로 하는 영상 부호화 장치를 제공한다.According to an aspect of the present invention, there is provided an apparatus for encoding an image, comprising: an arbitrary pixel extracting unit for extracting arbitrary pixels from each sub-block of a current macroblock of an image to generate an arbitrary pixel block; A first predictor for generating a predictive arbitrary pixel block by predicting an arbitrary pixel block; A first subtractor for generating an arbitrary pixel residual block by subtracting the arbitrary pixel block and the predictive arbitrary pixel block; A first conversion unit for converting an arbitrary pixel residual block; A first quantization unit for quantizing the transformed arbitrary-pixel residual block; A first inverse quantization unit for inversely quantizing the quantized arbitrary pixel residual block; A first inverse transformer for inversely transforming the inversely quantized arbitrary pixel residual block; A first adder for adding the predictive arbitrary pixel block and the inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block; A second predictor for generating a predictive macroblock by predicting remaining pixels of each sub-block using adjacent pixels of the current macroblock and reconstructed arbitrary pixels of the reconstructed arbitrary pixel block; A second subtractor for subtracting the predictive macroblock from the current macroblock to generate a residual macroblock; An arbitrary residual pixel combining unit which combines each inverse transformed residual pixel of the inversely transformed arbitrary pixel residual block to each position of the residual macroblock; A second transform unit for transforming the residual macroblock to which each inverse transformed residual pixel is combined; A second quantization unit for quantizing the transformed residual macroblock; And a coding unit for coding the quantized residual macroblock to generate a bitstream.

또한, 본 발명의 다른 목적에 의하면, 영상을 부호화하는 장치에 있어서, 영상의 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성하는 임의 화소 추출부; 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하는 제 1 예측부; 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성하는 제 1 감산부; 임의 화소 잔차 블록을 변환하는 제 1 변환부; 변환된 임의 화소 잔차 블록을 양자화하는 제 1 양자화부; 양자화된 임의 화소 잔차 블록을 역 양자화하는 제 1 역 양자화부; 역 양자화된 임의 화소 잔차 블록을 역 변환하는 제 1 역 변환부; 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성하는 제 1 가산부; 각 서브블록의 인접 화소들 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측하여 각 예측 서브블록을 생성하는 제 2 예측부; 각 서브블록에서 각 예측 서브블록을 감산하여 각 잔차 서브블록을 생성하는 제 2 감산부; 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 각 잔차 서브블록의 각 위치에 결합하는 임의 잔차 화소 결합부; 각 역 변환된 임의 잔차 화소가 결합된 각 잔차 서브블록을 변환하는 제 2 변환부; 변환된 각 잔차 서브블록을 양자화하는 제 2 양자화부; 및 양자화된 각 잔차 서브블록을 부호화하여 비트스트림을 생성하는 부호화부를 포함하되, 각 서브블록은 하나의 서브 블록이 부호화되고 복호된 후 다음 서브블록이 부호화되고 복호화되는 것을 특징으로 하는 영상 부호화 장치를 제공한다.According to another aspect of the present invention, there is provided an apparatus for encoding an image, comprising: an arbitrary pixel extracting unit for extracting arbitrary pixels in each sub-block of a current macroblock of an image to generate an arbitrary pixel block; A first predictor for generating a predictive arbitrary pixel block by predicting an arbitrary pixel block; A first subtractor for generating an arbitrary pixel residual block by subtracting the arbitrary pixel block and the predictive arbitrary pixel block; A first conversion unit for converting an arbitrary pixel residual block; A first quantization unit for quantizing the transformed arbitrary-pixel residual block; A first inverse quantization unit for inversely quantizing the quantized arbitrary pixel residual block; A first inverse transformer for inversely transforming the inversely quantized arbitrary pixel residual block; A first adder for adding the predictive arbitrary pixel block and the inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block; A second predictor for generating each predicted sub-block by predicting remaining pixels of each sub-block using adjacent pixels of each sub-block and each reconstructed arbitrary pixel of the reconstructed arbitrary pixel block; A second subtractor for subtracting each predicted sub-block from each sub-block to generate each residual sub-block; An arbitrary residual pixel combiner for combining each inverse transformed residual pixel of the inversely transformed arbitrary pixel residual block to each position of each residual sub-block; A second transform unit for transforming each residual sub-block to which each inverse transformed residual pixel is combined; A second quantization unit for quantizing each transformed residual sub-block; And a coding unit for coding each quantized residual sub-block to generate a bitstream, wherein each sub-block is coded and decoded, and then the next sub-block is coded and decoded. to provide.

또한, 본 발명의 다른 목적에 의하면, 영상을 부호화하는 방법에 있어서, 영상의 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성하는 임의 화소 추출 단계; 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하는 제 1 예측 단계; 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성하는 제 1 감산 단계; 임의 화소 잔차 블록을 변환하는 제 1 변환 단계; 변환된 임의 화소 잔차 블록을 양자화하는 제 1 양자화 단계; 양자화된 임의 화소 잔차 블록을 역 양자화하는 제 1 역 양자화 단계; 역 양자화된 임의 화소 잔차 블록을 역 변환하는 제 1 역 변환 단계; 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성하는 제 1 가산 단계; 현재 매크로블록의 인접 화소들 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측하여 예측 매크로블록을 생성하는 제 2 예측 단계; 현재 매크로블록에서 예측 매크로블록을 감산하여 잔차 매크로블록을 생성하는 제 2 감산 단계; 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 잔차 매크로블록의 각 위치에 결합하는 임의 잔차 화소 결합 단계; 각 역 변환된 임의 잔차 화소가 결합된 잔차 매크로블록을 변환하는 제 2 변환 단계; 변환된 잔차 매크로블록을 양자화하는 제 2 양자화 단계; 및 양자화된 잔차 매크블록을 부호화하여 비트스트림을 생성하는 부호화 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법을 제공한다.According to another aspect of the present invention, there is provided a method of encoding an image, comprising: an arbitrary pixel extracting step of extracting arbitrary pixels in each sub-block of a current macroblock of an image to generate an arbitrary pixel block; A first prediction step of generating a prediction arbitrary pixel block by predicting an arbitrary pixel block; A first subtraction step of generating an arbitrary pixel residual block by subtracting an arbitrary pixel block and a predictive arbitrary pixel block; A first conversion step of converting an arbitrary pixel residual block; A first quantization step of quantizing the transformed arbitrary-pixel residual block; A first inverse quantization step of inversely quantizing the quantized arbitrary pixel residual block; A first inverse transformation step of inversely transforming the inversely quantized arbitrary pixel residual block; A first adding step of adding a predictive arbitrary pixel block and an inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block; A second prediction step of generating a predictive macroblock by predicting remaining pixels of each sub-block using adjacent pixels of the current macroblock and reconstructed arbitrary pixels of the reconstructed arbitrary pixel block; A second subtraction step of subtracting a predictive macroblock from a current macroblock to generate a residual macroblock; An arbitrary residual pixel combining step of combining each inverse transformed residual pixel of the inverse transformed arbitrary pixel residual block to each position of the residual macroblock; A second conversion step of converting a residual macroblock to which each inverse transformed residual pixel is combined; A second quantization step of quantizing the transformed residual macroblock; And a coding step of coding the quantized residual MK block to generate a bitstream.

또한, 본 발명의 또 다른 목적에 의하면, 영상을 부호화하는 방법에 있어서, 영상의 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성하는 임의 화소 추출 단계; 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하는 제 1 예측 단계; 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성하는 제 1 감산 단계; 임의 화소 잔차 블록을 변환하는 제 1 변환 단계; 변환된 임의 화소 잔차 블록을 양자화하는 제 1 양자화 단계; 양자화된 임의 화소 잔차 블록을 역 양자화하는 제 1 역 양자화 단계; 역 양자화된 임의 화소 잔차 블록을 역 변환하는 제 1 역 변환 단계; 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성하는 제 1 가산 단계; 각 서브블록의 인접 화소들 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측하여 각 예측 서브블록을 생성하는 제 2 예측 단계; 각 서브블록에서 각 예측 서브블록을 감산하여 각 잔차 서브블록을 생성하는 제 2 감산 단계; 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 각 잔차 서브블록의 각 위치에 결합하는 임의 잔차 화소 결합 단계; 각 역 변환된 임의 잔차 화소가 결합된 각 잔차 서브블록을 변환하는 제 2 변환 단계; 변환된 각 잔차 서브블록을 양자화하는 제 2 양자화 단계; 및 양자화된 각 잔차 서브블록을 부호화하여 비트스트림을 생성하는 부호화 단계를 포함하되, 각 서브블록이 부호화되고 복호된 후 다음 서브블록이 부호화되고 복호화되는 것을 특징으로 하는 영상 부호화 방법을 제공한다.According to still another aspect of the present invention, there is provided a method of encoding an image, comprising: an arbitrary pixel extracting step of extracting arbitrary pixels in each sub-block of a current macroblock of an image to generate an arbitrary pixel block; A first prediction step of generating a prediction arbitrary pixel block by predicting an arbitrary pixel block; A first subtraction step of generating an arbitrary pixel residual block by subtracting an arbitrary pixel block and a predictive arbitrary pixel block; A first conversion step of converting an arbitrary pixel residual block; A first quantization step of quantizing the transformed arbitrary-pixel residual block; A first inverse quantization step of inversely quantizing the quantized arbitrary pixel residual block; A first inverse transformation step of inversely transforming the inversely quantized arbitrary pixel residual block; A first adding step of adding a predictive arbitrary pixel block and an inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block; A second prediction step of generating each predicted sub-block by predicting remaining pixels of each sub-block using adjacent pixels of each sub-block and each reconstructed arbitrary pixel of the reconstructed arbitrary pixel block; A second subtraction step of subtracting each predicted sub-block from each sub-block to generate each residual sub-block; An arbitrary residual pixel combining step of combining each inverse transformed residual pixel of the inversely transformed arbitrary pixel residual block to each position of each residual sub-block; A second transforming step of transforming each residual sub-block to which each inverse transformed residual pixel is combined; A second quantization step of quantizing each transformed residual sub-block; And a coding step of coding each quantized residual sub-block to generate a bitstream, wherein each sub-block is coded and decoded, and the next sub-block is coded and decoded.

또한, 본 발명의 또 다른 목적에 의하면, 영상을 복호화하는 장치에 있어서, 비트스트림을 복호화하여 잔차 매크로블록 및 예측 모드를 추출하는 복호화부; 잔차 매크로블록을 역 양자화하는 역 양자화부; 역 양자화된 잔차 매크로블록에서 각 서브블록의 임의 화소의 위치에 대응하는 주파수 계수를 추출하는 계수 추출부; 추출된 주파수 계수를 역 변환하여 역 변환된 임의 화소 잔차 블록을 생성하는 제 1 역 변환부; 예측 모드에 따른 예측 방향에 따라 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하는 제 1 예측부; 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성하는 제 1 가산부; 역 양자화된 잔차 매크로블록을 역 변환하여 역 변환된 잔차 매크로블록을 생성하는 제 2 역 변환부; 영상의 현재 매크로블록의 인접 화소 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 예측 모드에 따른 예측 방향에 따라 영상의 현재 매크로블록을 예측하여 예측 현재 매크로블록을 생성하는 제 2 예측부; 예측 현재 매크로블록과 역 변환된 잔차 매크로블록을 이용하여 복원된 현재 매크로블록을 생성하는 제 2 가산부; 및 각 복원된 임의 화소를 복원된 현재 매크로블록의 각 위치에 결합하는 임의 화소 결합부를 포함하는 것을 특징으로 하는 영상 복호화 장치를 제공한다.According to another aspect of the present invention, there is provided an apparatus for decoding an image, the apparatus comprising: a decoding unit decoding a bitstream to extract a residual macroblock and a prediction mode; A dequantizer for dequantizing the residual macroblock; A coefficient extraction unit for extracting a frequency coefficient corresponding to a position of an arbitrary pixel of each sub-block in an inversely quantized residual macroblock; A first inverse transformer for inversely transforming the extracted frequency coefficients to generate an inverse transformed arbitrary pixel residual block; A first predictor for generating a predictive arbitrary pixel block by predicting an arbitrary pixel block according to a prediction direction according to a prediction mode; A first adder for adding the predictive arbitrary pixel block and the inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block; A second inverse transformer for inversely transforming the dequantized residual macroblock to generate an inverse transformed residual macroblock; A second predictor for generating a predictive current macroblock by predicting a current macroblock of an image according to a prediction direction according to a prediction mode using adjacent pixels of the current macroblock of the image and reconstructed arbitrary pixels of the reconstructed arbitrary pixel block, ; A second adder for generating a reconstructed current macroblock using the predictive current macroblock and the inverse transformed residual macroblock; And an arbitrary pixel combining unit for combining the reconstructed arbitrary pixel with each position of the reconstructed current macroblock.

또한, 본 발명의 또 다른 목적에 의하면, 영상을 복호화하는 방법에 있어서, 비트스트림을 복호화하여 잔차 매크로블록 및 예측 모드를 추출하는 복호화 단계; 잔차 매크로블록을 역 양자화하는 역 양자화 단계; 역 양자화된 잔차 매크로블록에서 각 서브블록의 임의 화소의 위치에 대응하는 주파수 계수를 추출하는 계수 추출 단계; 추출된 주파수 계수를 역 변환하여 복원된 임의 화소 잔차 블록을 생성하는 제 1 역 변환 단계; 예측 모드에 따른 예측 방향에 따라 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하는 제 1 예측 단계; 예측 임의 화소 블록과 복원된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성하는 제 1 가산 단계; 역 양자화된 잔차 매크로블록을 역 변환하여 역 변환된 잔차 매크로블록을 생성하는 제 2 역 변환 단계; 영상의 현재 매크로블록의 인접 화소 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 예측 모드에 따른 예측 방향에 따라 영상의 현재 매크로블록을 예측하여 예측 현재 매크로블록을 생성하는 제 2 예측 단계; 예측 현재 매크로블록과 역 변환된 잔차 매크로블록을 이용하여 복원된 현재 매크로블록을 생성하는 제 2 가산 단계; 및 각 복원된 임의 화소를 복원된 현재 매크로블록의 각 위치에 결합하는 임의 화소 결합 단계를 포함하는 것을 특징으로 하는 영상 복호화 방법을 제공한다.According to another aspect of the present invention, there is provided a method of decoding an image, the decoding method comprising: a decoding step of decoding a bitstream to extract a residual macroblock and a prediction mode; An inverse quantization step of dequantizing the residual macroblock; A coefficient extracting step of extracting a frequency coefficient corresponding to a position of an arbitrary pixel of each sub-block in an inversely quantized residual macroblock; A first inverse transform step of inversely transforming the extracted frequency coefficients to generate a reconstructed arbitrary pixel residual block; A first prediction step of generating a prediction arbitrary pixel block by predicting an arbitrary pixel block according to a prediction direction according to a prediction mode; A first addition step of generating an arbitrary pixel block reconstructed by adding a predictive arbitrary pixel block and a reconstructed arbitrary pixel residual block; A second inverse transform step of inversely transforming the inversely quantized residual macroblock to generate an inverse transformed residual macroblock; A second prediction step of generating a prediction current macroblock by predicting a current macroblock of an image according to a prediction direction according to a prediction mode using adjacent pixels of the current macroblock of the image and reconstructed arbitrary pixels of the reconstructed arbitrary pixel block, ; A second addition step of generating a reconstructed current macroblock using the prediction current macroblock and the inverse transformed residual macroblock; And an arbitrary pixel combining step of combining each reconstructed arbitrary pixel with each position of the reconstructed current macroblock.

이상에서 설명한 바와 같이 본 발명에 의하면, 영상을 부호화하거나 복호화하는 데 있어서, 현재 부호화하거나 복호화하고자 하는 블록의 화소를 인트라 예측할 때 예측의 정확도를 향상시켜 부호화 효율을 향상시킬 수 있다.As described above, according to the present invention, in coding or decoding an image, when the pixels of a current block to be coded or decoded are intra-predicted, the accuracy of prediction can be improved to improve the coding efficiency.

도 1은 영상 부호화 장치의 전자적인 구성을 간략하게 나타낸 블록 구성도,
도 2 및 도 3은 인트라 예측 모드를 나타낸 예시도,
도 4 및 도 5는 DCT 변환 및 역 변환을 위한 베이직 벡터를 나타낸 예시도,
도 6은 본 발명의 일 실시예에 따른 서브블록 내의 임의 화소를 나타낸 예시도,
도 7은 본 발명의 일 실시예에 따른 영상 부호화 장치의 전자적인 구성을 간략하게 나타낸 블록 구성도,
도 8는 현재 매클로블록에서 임의 화소 블록을 추출하는 모습을 나타낸 예시도,
도 9는 현재 매크로블록의 인접 화소를 이용하여 임의 화소 블록을 예측하는 모습을 나타낸 예시도,
도 10 및 도 11은 DCT 변환 및 역 변환을 위한 수정된 베이직 벡터를 나타낸 예시도,
도 12 내지 도 15는 각 서브블록의 나머지 화소를 예측하는 모습을 나타낸 예시도,
도 16는 2차원 DCT 변환을 위한 1차원 변환을 나타낸 예시도,
도 17 및 도 18은 역 변환 방향의 순서에 따라 수정된 베이직 벡터를 이용하여 역 변환하는 과정을 나타낸 예시도,
도 19는 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 순서도,
도 20은 본 발명의 일 실시예에 따른 영상 부호화 방법에 따라 현재 매크로블록을 복원하는 과정을 나타낸 순서도이다.
도 21은 본 발명의 일 실시예에 따른 영상 복호화 장치의 전자적인 구성을 간략하게 나타낸 블록 구성도,
도 22는 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 순서도,
도 23은 본 발명의 다른 실시예에 따라 각 서브블록을 부호화하는 순서를 나타낸 예시도,
도 24는 본 발명의 다른 실시에에 따라 각 서브블록의 예측 방향을 결정하는 모습을 나타낸 예시도,
도 25는 래스터 스캔 방향에 따른 각 서브블록의 부호화 복호화 순서를 나타낸 예시도,
도 26은 각 서브블록을 새롭게 결정된 최적의 예측 방향에 따라 예측하는 모습을 나타낸 예시도,
도 27 및 도 28은 본 발명의 일 실시예 및 다른 실시예에 따라 일부의 주파수 계수를 이용하여 나머지 주파수 계수를 예측하는 과정을 나타낸 예시도이다.
1 is a block diagram schematically showing an electronic configuration of a video encoding apparatus;
FIGS. 2 and 3 are diagrams illustrating an intra-prediction mode,
Figs. 4 and 5 are diagrams showing an example of a basic vector for DCT and inverse transform,
6 is a diagram illustrating an arbitrary pixel in a sub-block according to an exemplary embodiment of the present invention.
FIG. 7 is a block diagram schematically illustrating an electronic configuration of an image encoding apparatus according to an embodiment of the present invention; FIG.
FIG. 8 is an exemplary view showing an arbitrary pixel block extracted from a current macroblock,
FIG. 9 is a diagram illustrating an example of predicting an arbitrary pixel block using adjacent pixels of a current macroblock;
Figs. 10 and 11 are examples showing modified basic vectors for DCT and inverse transform,
FIGS. 12 to 15 are diagrams illustrating examples of predicting remaining pixels of each sub-block,
16 is an exemplary diagram showing one-dimensional transform for two-dimensional DCT transform,
17 and 18 are views illustrating a process of inverse conversion using a modified basic vector according to the order of the inverse conversion directions,
FIG. 19 is a flowchart illustrating an image encoding method according to an embodiment of the present invention. FIG.
20 is a flowchart illustrating a process of restoring a current macroblock according to an image encoding method according to an embodiment of the present invention.
FIG. 21 is a block diagram schematically illustrating an electronic configuration of an image decoding apparatus according to an embodiment of the present invention; FIG.
FIG. 22 is a flowchart illustrating a video decoding method according to an embodiment of the present invention. FIG.
FIG. 23 is a diagram illustrating a procedure for coding each sub-block according to another embodiment of the present invention; FIG.
FIG. 24 is a diagram illustrating an example of determining a prediction direction of each sub-block according to another embodiment of the present invention; FIG.
FIG. 25 is a diagram showing an encoding / decoding procedure of each sub-block according to a raster scan direction;
FIG. 26 is an exemplary view showing a state in which each sub-block is predicted according to a newly determined optimum prediction direction;
FIGS. 27 and 28 illustrate a process of predicting remaining frequency coefficients using a part of frequency coefficients according to an embodiment of the present invention and another embodiment.

이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail with reference to exemplary drawings. It should be noted that, in adding reference numerals to the constituent elements of the drawings, the same constituent elements are denoted by the same reference numerals whenever possible, even if they are shown in different drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In describing the components of the present invention, terms such as first, second, A, B, (a), and (b) may be used. These terms are intended to distinguish the constituent elements from other constituent elements, and the terms do not limit the nature, order or order of the constituent elements. When a component is described as being "connected", "coupled", or "connected" to another component, the component may be directly connected or connected to the other component, Quot; may be "connected," "coupled," or "connected. &Quot;

도 1은 영상 부호화 장치의 전자적인 구성을 간략하게 나타낸 블록 구성도이다.1 is a block diagram schematically showing an electronic configuration of a video encoding apparatus.

영상 부호화 장치(100)는 영상을 부호화하는 장치로서, 예측부(110), 감산기(120), 변환부(130), 양자화부(140), 부호화부(150) , 역 양자화부(160), 역 변환부(170) 및 가산부(180)를 포함하여 구성될 수 있다.The image encoding apparatus 100 includes a predictor 110, a subtractor 120, a transformer 130, a quantizer 140, a coder 150, an inverse quantizer 160, An inverse transform unit 170, and an adder 180. [

예측부(110)는 영상에서 현재 부호화하고자 하는 현재 블록을 예측하여 예측 블록을 생성한다. 즉, 예측부(110)는 영상에서 부호화하고자 하는 현재 블록의 각 화소의 화소값(Pixel Value)을 기 결정된 최적의 예측 모드(Prediction Mode)에 따라 예측하여 예측된 각 화소의 예측 화소값(Predicted Pixel Value)을 갖는 예측 블록(Predicted Block)을 생성한다. 또한, 예측부(110)는 예측 모드에 대한 정보를 부호화부(150)로 전달하여 부호화부(150)로 하여금 예측 모드에 대한 정보를 부호화하도록 할 수 있다.The prediction unit 110 generates a prediction block by predicting a current block to be coded in the image. That is, the predicting unit 110 predicts the pixel value of each pixel of the current block to be encoded in the image according to a predetermined optimal prediction mode and outputs the predicted pixel value Predicted Pixel Value) is generated. The prediction unit 110 may transmit information on the prediction mode to the encoding unit 150 so that the encoding unit 150 may encode information on the prediction mode.

여기서, 최적의 예측 모드란 인트라 예측을 위한 다양한 인트라 예측 모드(즉, 인트라 8×8 예측과 인트라 4 X 4 예측 각각에서의 9 가지의 예측 모드와 인트라 16 X 16 예측에서의 4 가지의 예측 모드) 중 부호화 비용이 최소인 예측 모드가 결정될 수 있다.Here, the optimal prediction mode is one of various intra prediction modes for intra prediction (i.e., nine prediction modes in intra 8x8 prediction and intra 4x4 prediction, and four prediction modes in intra 16x16 prediction) The prediction mode in which the coding cost is the minimum can be determined.

도 2 및 도 3은 인트라 예측 모드를 나타낸 예시도이다.FIGS. 2 and 3 are exemplary diagrams showing an intra-prediction mode.

도 2를 참조하면, 인트라 4×4 예측에는, 수직(Vertical) 모드, 수평(Horizontal) 모드, DC(Direct Current) 모드, 대각선 왼쪽(Diagonal down-left) 모드, 대각선 오른쪽(Diagonal down-right), 수직 오른쪽(Vertical-right) 모드, 수평 아래쪽(Horizontal-down) 모드, 수직 왼쪽(Vertical-left) 및 수평 위쪽(Horizontal-up) 모드를 포함하는 9 가지의 예측 모드가 있다. 인트라 8×8 예측도 인트라 4×4 예측과 유사하게 9 가지의 예측 모드가 있다. 또한, 도 3을 참조하면, 인트라 16×16 예측에는, 수직(Vertical) 모드, 수평(Horizontal) 모드, DC 모드 및 플래인(Plane) 모드를 포함하는 4 가지의 예측 모드가 있다.2, the intra 4x4 prediction includes a vertical mode, a horizontal mode, a DC (direct current) mode, a diagonal down-left mode, a diagonal down- There are nine prediction modes including a vertical-right mode, a horizontal-down mode, a vertical-left and a horizontal-up mode. Intra 8x8 prediction There are nine prediction modes similar to intra 4x4 prediction. Also, referring to FIG. 3, intra-16 × 16 prediction has four prediction modes including a vertical mode, a horizontal mode, a DC mode, and a plane mode.

예측부(110)는 현재 블록의 블록 모드 또는 블록 크기에 따라 도시한 9 개의 예측 모드 또는 4 개의 예측 모드에 따라 부호화 비용을 계산하고 부호화 비용이 최소인 예측 모드를 최적의 예측 모드로서 결정할 수 있다.The prediction unit 110 may calculate the coding cost according to the nine prediction modes or the four prediction modes shown in the block mode or the block size of the current block and determine the prediction mode having the minimum coding cost as the optimal prediction mode .

감산부(120)는 현재 블록에서 예측 블록을 감산하여 잔차 블록(Residual Block)을 생성한다. 즉, 감산부(120)는 부호화하고자 하는 현재 블록의 각 화소의 화소값과 예측부(110)에서 예측한 예측 블록의 각 화소의 예측 화소값의 차이를 계산하여 블록 형태의 잔차 신호(Residual Signal)인 잔차 블록을 생성한다.Subtraction unit 120 subtracts the prediction block from the current block to generate a residual block. That is, the subtractor 120 calculates the difference between the pixel value of each pixel of the current block to be encoded and the predicted pixel value of each pixel of the predicted block predicted by the predictor 110, and outputs a residual signal ). ≪ / RTI >

변환부(130)는 잔차 블록을 주파수 영역으로 변환하여 잔차 블록의 각 화소값을 주파수 계수로 변환한다. 여기서, 변환부(130)는 하다마드 변환(Hadamard Transform), 이산 코사인 변환 기반 변환(DCT based Transform: Discrete Cosine Transform Based Transform) 등과 같은 시간축의 화상 신호를 주파수축으로 변환하는 다양한 변환 기법을 이용하여 잔차 신호를 주파수 영역으로 변환할 수 있는데, 주파수 영역으로 변환된 잔차 신호가 주파수 계수가 된다.The transforming unit 130 transforms the residual block into the frequency domain and transforms each pixel value of the residual block into a frequency coefficient. Here, the transform unit 130 may transform the image signal on the time axis, such as a Hadamard transform, a discrete cosine transform based transform (DCT) transform, The residual signal can be transformed into the frequency domain, and the residual signal transformed into the frequency domain becomes the frequency coefficient.

도 4 및 도 5에는 DCT 변환 및 역 변환을 위한 베이직 벡터를 예시적으로 나타내었다. 예를 들면, 변환부(130)는 수학식 1에 의해 만들어진 도 4에 도시한 베이직 벡터를 이용하여 가로 방향으로 1차원 DCT를 수행하고 세로 방향으로 1차원 DCT를 수행하여 총 2차원의 DCT를 수행함으로써 공간 도메인의 화소값을 주파수 도메인으로 변환한다. 이때, 블록 모드가 인트라 16x16인 경우에는 4x4 블록 크기의 16 개의 각 서브블록에 대해 16개(4x4)의 DC 성분의 주파수 계수들만 모아서 다시 수학식 2와 같이 하다마드 변환을 수행한다.FIGS. 4 and 5 illustrate exemplary basic vectors for DCT and inverse transform. For example, the transforming unit 130 performs a one-dimensional DCT in the horizontal direction and a one-dimensional DCT in the vertical direction using the basic vector shown in FIG. 4 created by Equation (1) Thereby converting the pixel value of the spatial domain into the frequency domain. At this time, when the block mode is intra 16x16, only the frequency coefficients of 16 (4x4) DC components are collected for each of 16 sub-blocks of 4x4 block size, and then Hadamard transform is performed as shown in Equation (2).

Figure 112014033646292-pat00001
Figure 112014033646292-pat00001

Figure 112014033646292-pat00002
Figure 112014033646292-pat00002

양자화부(140)는 변환부(130)에 의해 주파수 영역으로 변환된 잔차 신호를 갖는 잔차 블록을 양자화(Quantization)한다. 여기서, 양자화부(240)는 변환된 잔차 블록을 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization, 이하 'DZUTQ'라 칭함), 양자화 가중치 매트릭스(Quantization Weightrd Matrix) 또는 이를 개량한 양자화 기법 등을 사용하여 양자화할 수 있다.The quantization unit 140 quantizes the residual block having the residual signal transformed into the frequency domain by the transform unit 130. The quantization unit 240 quantizes the transformed residual block using a dead zone uniform threshold quantization (DZUTQ), a quantization weight matrix or a quantization technique such as a modified quantization weight matrix Can be quantized.

부호화부(150)는 변환되고 양자화된 잔차 블록을 엔트로피 부호화(Entropy Coding) 기법 등을 이용하여 부호화함으로써 비트스트림을 출력한다. 이때, 부호화부(150)는 양자화된 잔차 블록의 양자화 주파수 계수들을 다양한 방법으로 스캔하여 양자화 주파수 계수열을 생성하고 양자화 주파수 계수 열을 엔트로피 부호화 기법 등을 이용하여 부호화하여 비트스트림으로 출력할 수 있다. 또한, 부호화부(150)는 예측부(110)에서 현재 블록을 예측한 예측 모드에 대한 정보를 함께 부호화할 수 있다.The encoding unit 150 outputs the bitstream by encoding the transformed and quantized residual block using an entropy coding technique or the like. At this time, the encoder 150 scans the quantized frequency coefficients of the quantized residual block by various methods to generate a quantized frequency coefficient string, and outputs the quantized frequency coefficient string as a bit stream using an entropy coding method or the like . Also, the encoding unit 150 may encode information on a prediction mode in which the current block is predicted by the predicting unit 110 together.

역 양자화부(160)는 양자화부(140)에 의해 양자화된 잔차 블록을 역 양자화(Inverse Quantization)한다. 즉, 역 양자화부(160)는 앙자화된 잔차 블록의 양자화 주파수 계수들을 역 양자화하여 주파수 계수를 갖는 잔차 블록을 생성한다.The inverse quantization unit 160 performs inverse quantization on the residual blocks quantized by the quantization unit 140. That is, the dequantizer 160 dequantizes the quantization frequency coefficients of the coarse residual block to generate a residual block having a frequency coefficient.

역 변환부(170)는 역 양자화부(160)에 의해 역 양자화된 잔차 블록을 역 변환(Inverse Transform)한다. 즉, 역 변환부(170)는 역 양자화된 잔차 블록의 주파수 계수들을 역 변환하여 화소값을 갖는 잔차 블록 즉, 복원된 잔차 블록을 생성한다. 여기서, 역 변환부(170)는 변환부(130)에서 사용한 변환한 방식을 역으로 사용하여 역 변환할 수 있다. 예를 들면, 역 변환부(170)는 DC 성분의 주파수 계수들을 모아서 수학식 3과 같이 역 하다마드 변환을 수행하고, 도 5에 도시한 베이직 벡터를 이용하여 현재 블록을 세로 방향으로 1차원 역 DCT를 수행하고 가로 방향으로 1차원 역 DCT를 수행함으로써 주파수 도메인의 주파수 계수를 공간 도메인 화소값으로 역 변환한다.The inverse transform unit 170 performs an inverse transform on the inversely quantized residual block by the inverse quantization unit 160. That is, the inverse transform unit 170 inversely transforms the frequency coefficients of the inversely quantized residual block to generate a residual block having a pixel value, that is, a reconstructed residual block. Here, the inverse transform unit 170 may inversely transform the transformed transformed transformed image using the transformed transformed transformed image. For example, the inverse transform unit 170 collects the frequency coefficients of the DC component, performs inverse Hadamard transformation as shown in Equation (3), and uses the basic vector shown in FIG. 5 to transform the current block into a one- DCT and performs inverse one-dimensional DCT in the horizontal direction to inversely transform the frequency coefficient of the frequency domain into the spatial domain pixel value.

Figure 112014033646292-pat00003
Figure 112014033646292-pat00003

가산부(180)는 예측부(110)에서 예측된 예측 블록과 역 변환부(170)에 의해 복원된 잔차 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록은 예측부(110)에 참조 픽처로서 저장되어 현재 블록의 다음 블록이나 향후 다른 블록을 부호화할 때 참조 픽처로서 사용된다.The adder 180 adds the prediction block predicted by the predictor 110 and the residual block reconstructed by the inverse transformer 170 to reconstruct the current block. The reconstructed current block is stored in the predictor 110 as a reference picture, and is used as a reference picture when coding a next block or a future block of the current block.

도 1에서는 도시하지 않았지만, 예측부(110)와 가산부(180) 사이에는 디블로킹 필터부(미도시)가 추가로 연결될 수 있다. 디블로킹 필터부는 가산부(180)에 의해 복원된 현재 블록을 디블로킹 필터링(Deblcking Filtering)한다. 여기서, 디블로킹 필터링이란 영상을 블록 단위로 부호화하면서 발생하는 블록 왜곡을 감소시키는 작업을 말하며, 블록 경계와 매크로블록 경계에 디블로킹 필터를 적용하거나 매크로블록 경계에만 디블로킹 필터를 적용하거나 디블로킹 필터를 사용하지 않는 방법 중 하나를 선택적으로 사용할 수 있다.Although not shown in FIG. 1, a deblocking filter unit (not shown) may be additionally connected between the predictor 110 and the adder 180. The deblocking filter unit deblocking filters the current block restored by the adder 180. Here, deblocking filtering refers to a task of reducing block distortion caused by coding an image block by block. The deblocking filter may be applied to a block boundary or a macro block boundary, a deblocking filter may be applied to a macro block boundary, Can be selectively used.

도 6은 본 발명의 일 실시예에 따른 서브블록 내의 임의 화소를 나타낸 예시도이다.FIG. 6 is a diagram illustrating an arbitrary pixel in a sub-block according to an exemplary embodiment of the present invention. Referring to FIG.

본 발명은 임의의 크기의 매크로블록을 부호화할 때, 임의의 크기의 서브블록 단위로 부호화하되, 서브블록 내의 임의의 위치의 화소인 임의 화소를 먼저 예측하고 부호화하고 복호화함으로써 복원하고 복원된 임의 화소를 이용하여 서브블록 내의 나머지 화소를 예측함으로써 매크로블록 내의 모든 화소들이 먼 위치에 있는 인접 화소로부터 예측되는 것이 아니라 가까운 위치의 화소로부터 예측될 수 있도록 하여 예측의 정확도가 저하되는 것을 방지한다.In encoding a macroblock of an arbitrary size, an arbitrary pixel, which is a pixel at an arbitrary position in a sub-block, is encoded in units of sub-blocks of an arbitrary size, Predicts the remaining pixels in the sub-block so that all the pixels in the macro-block can be predicted from nearby pixels instead of being predicted from neighboring pixels at distant positions, thereby preventing the accuracy of prediction from being lowered.

여기서, 임의의 크기의 매크로블록(610)은 사용자에 의해 그 크기가 NxM 크기로 지정될 수 있으며, 임의의 크기의 매크로블록(610) 내의 임의의 크기의 서브블록(620)도 사용자에 의해 그 크기가 OxP 크기(단, O≤N, P≤M)로 지정될 수 있다.Here, the macroblock 610 of an arbitrary size may be designated by the user as the size of NxM, and any size of the subblock 620 of any size within the macroblock 610 of arbitrary size may be specified by the user The size may be designated as the OxP size (where O? N, P? M).

도 6에서는 현재 부호화하고자 하는 임의의 크기의 매크로블록(610)이 16x16 블록이고 서브블록(620)이 4x4 블록인 경우의 임의 화소(630)를 나타내었다. 이하의 실시예에서는 도시한 바와 같은 예를 통해 본 발명을 설명한다. 또한, 본 발명에서는 임의 화소를 서브블록 내에서 오른쪽 끝과 아래쪽 끝의 위치에 있는 화소로서 결정하고 Xi(630)라 칭한다. 하지만, 이러한 매크로블록의 크기, 서브블록의 크기, 임의 화소의 위치 등은 예시적인 것으로서 다양한 블록 크기 또는 다양한 위치의 화소가 사용될 수 있다.FIG. 6 shows an arbitrary pixel 630 when a macroblock 610 of an arbitrary size to be encoded is a 16x16 block and a sub-block 620 is a 4x4 block. In the following examples, the present invention will be described by way of examples. In the present invention, any pixel is determined as a pixel located at the right end and the bottom end in a sub-block and is referred to as X i (630). However, the size of the macro block, the size of the sub-block, the position of the arbitrary pixel, and the like are illustrative, and pixels of various block sizes or various positions can be used.

도 7은 본 발명의 일 실시예에 따른 영상 부호화 장치의 전자적인 구성을 간략하게 나타낸 블록 구성도이다.FIG. 7 is a block diagram schematically illustrating an electronic configuration of an image encoding apparatus according to an embodiment of the present invention. Referring to FIG.

본 발명의 일 실시예에 따른 영상 부호화 장치(700)는 영상을 부호화하는 장치로서, 임의 화소 추출부(702), 제 1 예측부(704), 제 1 감산부(706), 제 1 변환부(708), 제 1 양자화부(710), 제 1 역 양자화부(712), 제 1 역 변환부(714), 제 1 가산부(716), 제 1 예측부(718), 제 2 감산부(720), 임의 잔차 화소 결합부(7220), 제 2 변환부(724), 제 2 양자화부(726), 부호화부(728), 제 2 역 양자화부(730), 제 2 역 변환부(732), 제 2 가산부(734) 및 임의 복원 화소 결합부(736)를 포함하여 구성될 수 있다.An image encoding apparatus 700 according to an embodiment of the present invention encodes an image and includes an arbitrary pixel extracting unit 702, a first predicting unit 704, a first subtracting unit 706, A second inverse quantization unit 708, a first quantization unit 710, a first inverse quantization unit 712, a first inverse transformation unit 714, a first addition unit 716, a first prediction unit 718, A second inverse quantization unit 720, an arbitrary residual pixel combination unit 7220, a second transform unit 724, a second quantization unit 726, an encoding unit 728, a second inverse quantization unit 730, 732, a second adder 734, and an arbitrary reconstructed pixel combiner 736.

이러한 영상 부호화 장치(700)는 이러한 영상 부호화 장치(100)는 개인용 컴퓨터(PC: Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 이동통신 단말기(Mobile Communication Terminal) 등일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미한다.The image encoding apparatus 700 may include a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP) A PlayStation Portable (PSP), a Mobile Communication Terminal, or the like, and may be a communication device such as a communication modem for performing communication with various devices or wired / wireless communication networks, various programs and data for encoding an image A memory for storing the program, and a microprocessor for executing and calculating the program and controlling the program.

임의 화소 추출부(702)는 영상의 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성한다. 즉, 임의 화소 추출부(700)는 도 6에 도시한 현재 매크로블록(610)의 각 서브블록(620) 내에 있는 화소들 중 임의의 위치에 있는 임의의 화소(630) X0 ~ X15를 추출하여, 도 8에 도시한 바와 같이 임의 화소 블록을 생성한다. 도 8에는 현재 매클로블록에서 임의 화소 블록을 추출하는 모습을 예시적으로 나타내었다.The arbitrary-pixel extracting unit 702 extracts arbitrary pixels in each sub-block of the current macroblock of the image to generate an arbitrary pixel block. That is, the arbitrary-pixel extracting unit 700 extracts arbitrary pixels 630 X 0 to X 15 at arbitrary positions among the pixels in each sub-block 620 of the current macroblock 610 shown in FIG. 6 And an arbitrary pixel block is generated as shown in Fig. FIG. 8 illustrates an example of extracting an arbitrary pixel block from a current macroblock.

제 1 예측부(704)는 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성한다. 즉, 제 1 예측부(704)는 도 8에 예시적으로 도시한 바와 같은 현재 매크로블록의 왼쪽과 위쪽의 매크로블록의 화소 중 현재 매클로블록과 인접해 있으며 현재 매클로블록이 부호화되기 이전에 이미 복호화된 화소 Vi(V0~V15)와 Hi(H0~H15)를 임의 화소 블록을 예측하기 위한 인접 화소로서 사용하여, 임의 화소 블록의 각 임의 화소를 예측하여 예측된 임의 화소를 갖는 예측 임의 화소 블록을 생성한다.The first predictor 704 predicts an arbitrary pixel block to generate a predictive arbitrary pixel block. That is, the first predicting unit 704 is adjacent to the current macroblock among the pixels of the left and upper macroblocks of the current macroblock as illustrated in FIG. 8, and before the current macroblock is coded using the pixel V i (V 0 ~ V 15 ) and H i (H 0 ~ H 15 ) has already been decoded as the adjacent pixels for prediction of any pixel block, a predicted any predicts each arbitrary pixels of any pixel block Thereby generating a predictive arbitrary pixel block having pixels.

또한, 제 1 예측부(704)는 현재 매크로블록의 인접 화소들을 저역 통과 필터링을 수행하고 다운 샘플링한 화소들을 이용하여 임의 화소 블록을 예측할 수 있다. 도 9에는 현재 매크로블록의 인접 화소를 이용하여 임의 화소 블록을 예측하는 모습을 예시적으로 나타내었다. 도 9를 참조하면, 제 1 예측부(704)는 현재 매크로블록의 인접 화소 중 Vi(V0~V15)를 저역 통과 필터링한 후 다운 샘플링하여 Va, Vb, Vc, Vd를 계산함으로써 임의 화소 블록의 왼쪽 인접 화소를 결정할 수 있다. 마찬가지로, 제 1 예측부(704)는 현재 매크로블록의 인접 화소 중 Hi(H0~H15)를 저역 통과 필터링한 후 다운 샘플링하여 Ha, Hb, Hc, Hd를 계산함으로써 임의 화소 블록의 위쪽 인접 화소를 결정할 수 있다.In addition, the first predictor 704 may perform low-pass filtering on neighboring pixels of the current macroblock and predict an arbitrary pixel block using the downsampled pixels. FIG. 9 illustrates an example of predicting an arbitrary pixel block using adjacent pixels of a current macroblock. 9, the first predictor 704 low-pass-filters the V i (V 0 to V 15 ) among the neighboring pixels of the current macroblock and downsamples the result to obtain V a , V b , V c , and V d The left adjacent pixel of the arbitrary pixel block can be determined. Similarly, the first prediction unit 704 is an optionally by calculating the current of the adjacent pixels of the macro-block H i (H 0 ~ H 15 ) a low pass to downsampling after filtering H a, H b, H c, H d The upper adjacent pixel of the pixel block can be determined.

이때, 제 1 예측부(704)는 현재 매크로블록의 예측 모드에 따른 예측 방향과 동일한 예측 방향으로 임의 화소 블록을 예측할 수 있다. 여기서, 현재 매크로블록의 예측 방향은 도 3에 도시한 바와 같은 인트라 16x16 예측의 예측 모드에 따른 예측 방향이 될 수 있으며, 각 예측 모드에 따른 예측을 수행하여 부호화할 때의 부호화 비용이 최소인 예측 방향을 최적의 예측 방향으로서 결정할 수 있으며, 그에 따른 예측 모드에 대한 정보를 부호화부(728)로 전달할 수 있다.At this time, the first predictor 704 can predict an arbitrary pixel block in the same prediction direction as the prediction direction according to the prediction mode of the current macroblock. Here, the prediction direction of the current macroblock may be a prediction direction in accordance with the prediction mode of the intra 16x16 prediction as shown in FIG. 3, and it may be predicted that prediction cost according to each prediction mode is minimized Direction as an optimal prediction direction and can transmit information on the prediction mode to the encoding unit 728. [

제 1 감산부(706)는 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성한다. 즉, 제 1 감산부(706)는 임의 화소 블록의 각 임의 화소의 화소값과 예측 임의 화소 블록의 각 예측 임의 화소의 화소값을 뺀 값을 갖는 잔차 신호를 갖는 잔차 블록인 임의 화소 잔차 블록을 생성한다.The first subtractor 706 subtracts the arbitrary pixel block and the predictive arbitrary pixel block to generate an arbitrary pixel residual block. That is, the first subtractor 706 subtracts an arbitrary pixel residual block, which is a residual block having a residual signal having a value obtained by subtracting the pixel value of each arbitrary pixel in the arbitrary pixel block from the pixel value of each predictive arbitrary pixel in the predictive arbitrary pixel block .

제 1 변환부(708)는 임의 화소 잔차 블록을 변환한다. 즉, 제 1 변환부(708)는 임의 화소 잔차 블록의 각 임의 잔차 신호를 주파수 영역으로 변환하여 임의 잔차 화소에 대한 주파수 계수를 생성한다. 또한, 제 1 변환부(708)는 임의 화소 잔차 블록의 각 임의 화소 잔차 신호만을 독립적으로 변환할 수 있다. 이를 위해, 제 1 변환부(708)는 임의 화소 잔차 블록의 각 임의 화소 잔차 신호를 DCT 변환을 위한 수정된 베이직 벡터를 이용하여 DCT 변환을 수행함으로써 각 임의 화소 잔차 신호만을 독립적으로 변환할 수 있다.The first transform unit 708 transforms the arbitrary pixel residual block. That is, the first converter 708 converts the arbitrary residual signals of the arbitrary pixel residual block into the frequency domain to generate the frequency coefficients for the arbitrary residual pixels. Also, the first conversion unit 708 can independently convert only the arbitrary pixel residual signals of the arbitrary pixel residual block. To this end, the first transform unit 708 can perform DCT transform on each arbitrary-pixel residual signal of the arbitrary-pixel residual block using the modified basic vector for DCT transform, thereby independently transforming only the arbitrary-pixel residual signal .

또한, 제 1 변환부(708)는 DCT 변환을 수행한 후 하다마드 변환을 추가로 수행할 수 있다. 즉, 제 1 변환부(708)는 현재 매크로블록이 인트라 16x16 블록인 경우에는 DCT 변환된 주파수 계수를 다시 하다마드 변환할 수 있으며, 현재 매클로블록이 인트라 4x4 블록인 경우에는 하다마드 변환을 추가로 수행하지 않을 수 있다. 현재 매클로블록이 인트라 4x4 블록으로 결정된 경우에는 영상의 상관성이 작으므로 하다마드 변환을 수행하는 경우 그 효율이 오히려 저하될 수 있기 때문이다.Also, the first transform unit 708 may perform the Hadamard transform after performing the DCT transform. That is, when the current macroblock is an intra 16x16 block, the first transform unit 708 can perform Hadamard transform on the DCT-transformed frequency coefficients. If the current macroblock is an intra 4x4 block, Hadamard transform is added . ≪ / RTI > If the current macroblock is determined to be an intra 4x4 block, the efficiency of the Hadamard transformation may be lowered because the correlation of the image is small.

제 1 양자화부(710)는 변환된 임의 화소 잔차 블록을 양자화한다. 즉, 제 1 양자화부(710)는 임의 화소 잔차 블록의 주파수 계수를 양자화하여 양자화 주파수 계수를 갖는 임의 화소 잔차 블록을 생성한다.The first quantization unit 710 quantizes the converted arbitrary pixel residual block. That is, the first quantization unit 710 quantizes the frequency coefficients of the arbitrary pixel residual block to generate an arbitrary pixel residual block having the quantization frequency coefficient.

제 1 역 양자화부(710)는 양자화된 임의 화소 잔차 블록을 역 양자화한다. 즉, 제 1 역 양자화부(710)는 임의 화소 잔차 블록의 양자화 주파수 계수를 역 양자화하여 주파수 계수를 갖는 임의 화소 잔차 블록을 생성한다.The first dequantization unit 710 dequantizes the quantized arbitrary pixel residual block. That is, the first dequantization unit 710 dequantizes the quantization frequency coefficients of the arbitrary pixel residual block to generate an arbitrary pixel residual block having a frequency coefficient.

제 1 역 변환부(712)는 역 양자화된 임의 화소 잔차 블록을 역 변환한다. 즉, 제 1 역 변환부(712)는 임의 화소 잔차 블록의 주파수 계수를 공간 영역으로 변환하여 복원된 임의 잔차 신호를 갖는 복원된 임의 화소 잔차 블록을 생성한다. 이때, 제 1 역 변환부(712)는 각 임의 화소 잔차 신호가 변환된 주파수 계수를 DCT 역 변환을 위한 수정된 베이직 벡터를 이용하여 역 이산 코사인 변환을 수행함으로써 각 임의 화소 잔차 신호만을 독립적으로 역 변환할 수 있다. 또한, 제 1 역 변환부(712)는 각 임의 화소 잔차 신호가 변환된 주파수 계수를 역 하다마드 변환한 후 역 이산 코사인 변환을 수행할 수 있다.The first inverse transform unit 712 inversely transforms the inversely quantized arbitrary pixel residual block. That is, the first inverse transform unit 712 transforms the frequency coefficients of the arbitrary pixel residual block into a spatial domain, and generates a reconstructed arbitrary pixel residual block having the reconstructed arbitrary residual signal. At this time, the first inverse transform unit 712 performs inverse discrete cosine transform using the modified basic vectors for DCT inverse transform of the frequency coefficients in which the arbitrary pixel residual signals are transformed, Can be converted. In addition, the first inverse transform unit 712 can perform inverse discrete cosine transform after inverse Hadamard transform of the transformed frequency coefficients of the arbitrary pixel residual signals.

여기서, DCT 변환과 DCT 역 변환을 위한 수정된 베이직 벡터란 임의 화소를 각 서브블록의 나머지 화소들과 독립적으로 변환하고 역 변환하기 위해, 도 4 및 도 5에 도시한 DCT 변환 베이직 벡터와 DCT 역 변환 베이직 벡터 즉, 기존 베이직 벡터들을 개량한 베이직 벡터로서, 도 10 및 도 11에 도시한 바와 같이 결정될 수 있다. 도 10 및 도 11에는 DCT 변환 및 역 변환을 위한 수정된 베이직 벡터를 예시적으로 나타내었다. 즉, 제 1 변환부(708)와 제 1 역 변환부(712)는 제 2 변환부(724)와 제 2 역 변환부(732)에서 서브블록의 나머지 화소를 변환 및 역 변환할 때 임의 화소 잔차 신호(Xdi)만 독립적으로 변환 및 역변환할 수 있도록 하기 위해, 도 10 및 도 11에 도시한 수정된 베이직 벡터를 사용한다.Here, the modified basic vector for the DCT transform and the DCT inverse transform is a method of transforming an arbitrary pixel independently of the remaining pixels of each subblock and inverse transforming the DCT transform basic vector and the DCT transform A conversion basic vector, that is, a basic vector obtained by improving existing basic vectors, can be determined as shown in FIGS. 10 and 11. FIG. 10 and 11 illustrate modified basic vectors for DCT and inverse transform. That is, the first and the second inverse transform units 704 and 712 transform and invert the remaining pixels of the sub-block in the second and third inverse transform units 724 and 732, In order to allow only the residual signal Xd i to be independently converted and inverse transformed, the modified basic vector shown in Figs. 10 and 11 is used.

예를 들어 도 10에 도시한 수정된 DCT 변환의 베이직 벡터를 가지고 4개의 화소(P0 ~3)를 1차원 변환을 하는 경우, 변환된 첫 번째 주파수 계수(Coeff0)와 대응되는 베이직 벡터(0, 0, 0, 2)는 임의 화소 잔차 신호(Xdi)의 성분만 반영되므로, 첫 번째 주파수 계수는 수학식 4와 같이 계산될 수 있다.For example, when one pixel of four pixels P 0 to P 3 is transformed with the basic vector of the modified DCT transform shown in FIG. 10, a basic vector corresponding to the transformed first frequency coefficient Coeff 0 0, 0, 0, 2) reflects only the component of the arbitrary pixel residual signal Xd i , the first frequency coefficient can be calculated as shown in Equation (4).

Figure 112014033646292-pat00004
Figure 112014033646292-pat00004

따라서, 변환할 때, 도 10의 수정된 DCT 변환의 베이직 벡터를 사용하면 첫 번째 주파수 계수는 화소 P3의 성분만 있다. 따라서, 나머지 화소들(P0 ~2)의 값이 변하더라도 첫 번째 주파수 계수의 값이 변화가 없으므로, 임의 화소들을 나머지 화소들(P0 ~2)과 독립적으로 변환할 수 있다.Therefore, when converting, using the basic vector of the modified DCT transform of FIG. 10, the first frequency coefficient has only the component of pixel P 3 . Therefore, even if the values of the remaining pixels P 0 to P 2 change, the values of the first frequency coefficients do not change, so that arbitrary pixels can be independently converted from the remaining pixels P 0 to P 2 .

제 1 변환부(708)는 현재 매크로블록 내의 각 서브블록에서 추출한 임의 화소의 잔차 신호인 임의 화소 잔차 신호(Xdi)를 각 서브블록의 나머지 화소들과 독립적으로 변환하기 위해, 변환된 첫 번째 주파수 계수(Coeff0)와 대응되는 베이직 벡터(0, 0, 0, 2)로 총 2차원 변환한다. 1차원 변환을 수행할 때는 임의 화소 잔차 신호(Xdi)의 값에 2를 곱한 것과 같으므로, 2차원 변환을 수행하면 임의 화소 잔차 신호(Xdi)의 값에 4를 곱한 것과 같다. 즉, 현재 매크로블록의 각 서브블록을 도 10에 도시한 수정된 DCT 변환의 베이직 벡터로 2차원 변환을 수행한 다음에 각 서브블록의 왼쪽 위의 주파수 계수만 모은 결과와 동일하다. 따라서, 제 1 변환부(708)는 현재 매크로블록 내의 각 서브블록에서 추출한 16개(4x4)의 임의 위치 화소 잔차 신호(Xdi)의 값에 4를 곱하여 수직 방향 및 수평 방향으로 2차원 변환을 수행한 다음, 변환된 주파수 계수를, H.264의 인트라 16x16 블록의 각 서브블록의 DC 성분의 주파수 계수들처럼, 수학식 2를 이용하여 하다마드 변환을 수행한다.The first transform unit 708 transforms the arbitrary pixel residual signal Xd i , which is a residual signal of an arbitrary pixel extracted from each sub-block in the current macroblock, independently from the remaining pixels of each sub-block, Two-dimensionally transformed into a basic vector (0, 0, 0, 2) corresponding to the frequency coefficient (Coeff 0 ). Dimensional conversion is the same as multiplying the value of the arbitrary-pixel residual signal (Xd i ) by 2, the two-dimensional conversion is equivalent to multiplying the value of the arbitrary-pixel residual signal (Xd i ) by four. That is, the result of performing the two-dimensional conversion of each sub-block of the current macroblock to the basic vector of the modified DCT transform shown in FIG. 10, and then collecting only the frequency coefficient at the upper left of each sub-block. Accordingly, the first conversion unit 708 multiplies the value of the 16 (4x4) random position pixel residual signal Xd i extracted from each sub-block in the current macroblock by 4, and performs two-dimensional conversion in the vertical direction and the horizontal direction Then, the transformed frequency coefficients are subjected to Hadamard transform using Equation (2), such as the frequency coefficients of the DC component of each sub-block of the intra 16x16 block of H.264.

마찬가지로, 임의 화소 잔차 신호에 대응하는 주파수 계수는 다른 주파수 계수(Coeff1 ~3)와는 독립적으로 역변환될 수 있다. 역변환할 때의 해당 주파수 계수는 수학식 5와 같이 계산될 수 있다.Similarly, the frequency coefficient corresponding to the arbitrary pixel residual signal can be inversely transformed independently of the other frequency coefficients (Coeff 1 to 3 ). The corresponding frequency coefficient at the time of inverse transform can be calculated as shown in Equation (5).

Figure 112014033646292-pat00005
Figure 112014033646292-pat00005

제 1 가산부(716)는 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성한다.The first adder 716 adds the predictive arbitrary pixel block and the inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block.

제 2 예측부(718)는 현재 매크로블록의 인접 화소들 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측함으로써 예측 매크로블록을 생성한다. 즉, 제 2 예측부(718)는 현재 매크로블록 내의 각 서브블록을 예측하는데, 각 서브블록의 임의 화소를 제외한 나머지 화소를 예측한다.The second predictor 718 generates the predictive macroblock by predicting the remaining pixels of each sub-block using the reconstructed arbitrary pixels of the neighboring pixels of the current macroblock and the reconstructed arbitrary pixel block. That is, the second predictor 718 predicts each sub-block in the current macroblock, and predicts the remaining pixels excluding the arbitrary pixel in each sub-block.

도 12 내지 도 15에는 각 서브블록의 나머지 화소를 예측하는 모습을 예시적으로 나타내었다. 제 2 예측부(718)는 도 12 내지 도 15와 같이, 이미 부호화되고 복호화되어 복원된 임의 화소 블록의 각 복원된 임의 화소와 현재 매크로블록 주변의 매크로블록 중 현재 매크로블록과 인접한 화소 Vi(V0~V15)와 Hi(H0~H15)를 각 서브블록의 나머지 화소를 예측한다. 이때, 예측 방향은 제 1 예측부(704)의 예측 방향과 동일할 수 있다.FIGS. 12 to 15 illustrate exemplary prediction of the remaining pixels of each sub-block. As shown in FIGS. 12 to 15, the second predicting unit 718 predicts a pixel V i ( i, j ) adjacent to the current macroblock among the restored arbitrary pixel of the arbitrary pixel block which has been already coded and decoded and restored, V 0 to V 15 ) and H i (H 0 to H 15 ) to the remaining pixels of each sub-block. In this case, the prediction direction may be the same as the prediction direction of the first prediction unit 704.

도 12를 참조하면, 예측 방향이 수직 방향인 경우, 현재 매크로블록에서 좌표 (0,0)~(0,15)에 위치한 나머지 화소는 H0 화소의 값으로 예측되고, 좌표 (1,0)~(1,15)에 위치한 나머지 화소는 H1 화소의 값으로 예측되며, 좌표 (2,0)~(2,15)에 위치한 나머지 화소는 H2 화소의 값으로 예측된다. 하지만, 복원된 임의 화소(X0', X4', X8', X12')를 지나가는 구간인 좌표 (3,0)~(3,15)에 위치한 화소의 경우는, 좌표 (3,0)~(3,2)에 위치한 화소까지는 H3 화소의 값으로 예측되지만, 좌표 (3,4)~(3,6)에 위치한 화소까지는 복원된 임의 화소 X0'으로 예측되고, 좌표 (3,8)~(3,10)에 위치한 화소까지는 복원된 임의 화소 X4'로 예측되며, 좌표 (3,12)~(3,14)에 위치한 화소까지는 복원된 임의 화소 X8'로 예측된다. 현재 매크로블록의 나머지 열들도 전술한 바와 유사하게 예측되나.12, when the prediction direction is vertical, the remaining pixels located at the coordinates (0,0) to (0,15) in the current macroblock are H 0 And the remaining pixels located at the coordinates (1,0) to (1,15) are predicted by the values of H 1 And the remaining pixels located at coordinates (2,0) to (2,15) are predicted by the value of H 2 Is predicted as the value of the pixel. However, in the case of the restored random pixel (X 0 ', X 4' , X 8 ', X 12') of the pixel located in the region of the coordinates (3,0) ~ (3,15) passing through the coordinates (3, 0) to (3, 2), H 3 The pixel located at the coordinates (3, 4) to (3, 6) is predicted as the reconstructed arbitrary pixel X 0 ', and the pixel located at the coordinates (3, 8) The reconstructed arbitrary pixel X 4 'is predicted, and the pixel located at the coordinates (3, 12) to (3, 14) is predicted as the reconstructed arbitrary pixel X 8 '. The remaining columns of the current macroblock are also predicted similar to the above.

도 13을 참조하면, 예측 방향이 수평 방향인 경우는 수직 방향인 경우와 유사하게, 현재 매크로블록에서 좌표 (0,0)~(15,0), (0,1)~(15,1), (0,2)~(15,2)에 위치한 화소는 각각 V0, V1, V2 화소의 값으로 예측되지만, 복원된 임의 화소(X0', X1', X2', X3')를 지나가는 구간인 좌표 (0,3)~(15,3)에 위치한 화소의 경우에는, 좌표 (0,3)~(2,3)에 위치한 화소는 V3 화소의 값으로 예측되고, 좌표 (4,3)~(6,3)에 위치한 화소는 X0'으로 예측되며, 좌표 (8,3)~(10,3)에 위치한 화소는 X1'로 예측되며, 좌표 (12,3)~(14,3)에 위치한 화소는 X2'로 예측된다.13, in the case where the prediction direction is the horizontal direction, the coordinates (0,0) to (15,0), (0,1) to (15,1) in the current macroblock, , And (0,2) to (15,2) are V 0 , V 1 , V 2 But the predicted value of the pixel, the restored random pixel (X 0 ', X 1' , X 2 ', X 3') the passing interval of the coordinates (0,3) ~ For the pixel located in the (15,3) is , Pixels located at coordinates (0, 3) to (2, 3) are V 3 Is predicted as the pixel value of the pixel located at the coordinates (4,3) ~ (6,3) is 'is predicted, the pixel located at the coordinates (8,3) - (10,3) is X 1' X 0 to And the pixel located at the coordinates (12, 3) to (14, 3) is predicted as X 2 '.

도 14를 참조하면, 예측 방향이 DC 평균값 예측인 경우, 현재 매크로블록의 왼쪽의 매크로블록의 인접 화소 Vi(V0~V15)과 위쪽 매크로블록의 인접 화소 Hi(H0~H15)의 화소들과 각 서브블록의 각 복원된 임의 화소(Xi')에 임의의 가중치를 준 후 평균값을 계산하여 예측을 수행한다14, when the prediction direction is the DC average value prediction, the adjacent pixels V i (V 0 to V 15 ) of the macroblock on the left side of the current macroblock and the adjacent pixels H i (H 0 to H 15 ) And each reconstructed arbitrary pixel (X i ') of each sub-block are given weight values, and an average value is calculated to perform prediction

도 15를 참조하면, 예측 방향이 플래인 방향인 경우, 좌표 (3,0)~(3,2)에 위치한 화소는 H3 화소 값과 X0' 값을 거리에 따른 임의의 가중치를 주어 예측하고, 좌표 (0,3)~(2,3)에 위치한 화소는 V3 화소 값과 X0' 값을 거리에 따라 임의의 가중치를 주어 예측한 후, 예측된 좌표 (3,0)~(3,2)에 위치한 화소와 좌표 (0,3)~(2,3)에 위치한 화소 및 복원된 임의 화소 X0', 인접 화소 V0~V3와 H0~H3에 거리에 따라 거리에 따른 임의의 가중치를 주어 좌표 (0,0)~(2,2)에 위치한 화소를 예측한다. 다른 서브블록도 이와 유사하게 예측된다.Referring to FIG. 15, when the prediction direction is a plane direction, pixels located at coordinates (3, 0) to (3, 2) are predicted by assigning arbitrary weights to H 3 pixel values and X 0 ' , Pixels located at the coordinates (0, 3) to (2, 3) are V 3 Pixel value and the prediction was given an arbitrary weight depending on the distance X 0 'value, a pixel with the coordinates (0,3) ~ located on the predicted coordinate (3,0) - (3,2) (2,3) (0,0) to (2,2) by assigning arbitrary weights to the restored arbitrary pixel X 0 ', neighboring pixels V 0 to V 3 and H 0 to H 3 according to the distance, And predicts the located pixel. Other subblocks are similarly predicted.

제 2 감산부(720)는 원 영상의 현재 매크로블록에서 예측 매크로블록을 감산하여 잔차 매크로블록을 생성한다. 즉, 제 2 감산부(720)는 현재 매크로블록 내의 각 서브블록에서 임의 위치 화소(Xi)를 제외한 나머지 화소들의 잔차 신호를 계산하여, 잔차 신호를 갖는 잔차 매크로블록을 생성한다.The second subtractor 720 subtracts the predictive macroblock from the current macroblock of the original image to generate a residual macroblock. That is, the second subtractor 720 calculates residual signals of pixels other than the arbitrary-positioned pixel X i in each sub-block in the current macroblock, and generates a residual macroblock having the residual signal.

임의 잔차 화소 결합부(722)는 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 잔차 매크로블록의 각 위치에 결합한다. 즉, 임의 잔차 화소 결합부(722)는 역 변환부(714)에 의해 역 변환된 임의 화소 잔차 블록 내의 각 역 변환되어 복원된 임의 잔차 화소(Xdi')를 제 2 감산부(720)에서 생성된 잔차 매크로블록에서 해당 각 서브블록의 해당 화소의 위치에 결합한다. 따라서, 제 2 감산부(720)에 의해 생성된 잔차 매크로블록은 나머지 화소들의 잔차 신호만이 있었지만, 임의 잔차 화소 결합부(722)에 의해 복원된 임의 잔차 화소가 결합되어 전체의 잔차 매크로블록이 완성된다. 이와 같이, 잔차 매클로블록의 각 잔차 서브블록의 임의 잔차 화소의 위치에 이미 복원된 임의 화소 잔차 신호(Xdi')를 결합함으로써, 변환과 양자화에 따라 발생할 수 있는 양자화 오류를 줄일 수 있다. 즉, 복원된 임의 잔차 화소에는 이미 양자화 오류가 반영되어 있기 때문에, 영상 부호화 장치와 영상 복호화 장치가 양자화 오류와 관계없이 복원된 임의 화소 잔차 신호(Xdi')는 동일한 값으로 부호화 및 복호화가 가능하다. 따라서, 부호화 및 복호화 과정에서 나머지 화소들의 양자화 오류만 추가되므로, 양자화 오류가 반영되지 않은 임의 화소 잔차 신호(Xdi)를 사용하는 경우보다 양자화 오류를 줄일 수 있다.The random residual pixel combiner 722 combines each inverse transformed residual pixel of the inverse transformed arbitrary pixel residual block into each position of the residual macroblock. That is, the arbitrary residual pixel combining unit 722 receives the inverse transformed random residual pixel (Xd i ') in the inverse-transformed arbitrary pixel residual block by the inverse transform unit 714 from the second subtractor 720 And combines the generated residual macroblock with the position of the corresponding pixel of each sub-block. Therefore, although the residual macroblock generated by the second subtractor 720 includes only the residual signal of the remaining pixels, the residual residual macroblock reconstructed by the random residual pixel combiner 722 is combined, Is completed. As described above, the arbitrary pixel residual signal (Xd i ') reconstructed at the position of the arbitrary residual pixel of each residual sub-block of the block of residual macroblock can be combined to reduce the quantization error that may occur according to the conversion and quantization. That is, since the quantized error is already reflected in the reconstructed arbitrary residual pixel, the reconstructed arbitrary pixel residual signal Xd i 'can be encoded and decoded to the same value irrespective of the quantization error of the image encoding apparatus and the image decoding apparatus Do. Therefore, since only the quantization error of the remaining pixels is added in the encoding and decoding processes, the quantization error can be reduced as compared with the case of using the arbitrary pixel residual signal Xd i that does not reflect the quantization error.

제 2 변환부(724)는 역 변환된 임의 잔차 화소가 결합된 잔차 매크로블록을 변환한다. 즉, 제 2 변환부(724)는 임의 잔차 화소 결합부(722)에 의해 역 변환된 임의 잔차 화소가 결합된 잔차 매크로 블록의 각 잔차 신호를 주파수 영역으로 변환하여 주파수 계수를 갖는 잔차 매크로블록을 생성한다.The second transform unit 724 transforms the residual macroblock to which the inverse transformed residual pixels are combined. That is, the second transform unit 724 transforms each residue signal of the residual macroblock combined with the inverse transformed residual pixels by the random residual pixel combining unit 722 into the frequency domain, and outputs the residual macroblock having the frequency coefficient .

또한, 제 2 변환부(724)는 DCT 변환을 이용하여 4x4 블록 단위로 잔차 매크로블록을 변환하되, DCT 변환의 1차원 변환 방향의 순서에 따라 다른 베이직 벡터를 사용할 수 있다. 여기서, 1차원 변환 방향의 순서는 제 1 예측부(704)의 예측 방향에 따라 결정될 수 있다.Also, the second transforming unit 724 transforms the residual macroblocks in units of 4x4 blocks using the DCT transform, but can use another basic vector according to the order of the one-dimensional transform direction of the DCT transform. Here, the order of the one-dimensional conversion direction may be determined according to the prediction direction of the first prediction unit 704. [

도 16에는 2차원 DCT 변환을 위한 1차원 변환을 예시적으로 나타내었다. 도 16을 참조하면, 제 2 변환부(724)는 수평 방향으로 1차원 변환을 먼저 수행하고 수직 방향으로 1차원 변환을 수행하여 2차원의 DCT 변환을 수행하거나 수직 방향으로 1차원 변환을 먼저 수행하고 수평 방향으로 1차원 변환을 수행하여 2차원의 DCT 변환을 수행할 수 있는데, 수평 방향으로 1차원 변환을 먼저 수행할지 또는 수직 방향으로 1차원 변환을 먼저 수행할지 여부 제 1 예측부(704)에서 임의 화소 블록을 예측한 예측 방향에 따라 결정될 수 있다.FIG. 16 exemplarily shows one-dimensional transform for two-dimensional DCT transform. Referring to FIG. 16, the second transform unit 724 performs a one-dimensional transform in the horizontal direction first, a one-dimensional transform in the vertical direction to perform a two-dimensional DCT transform, or a one- Dimensional DCT transform by performing one-dimensional transform in the horizontal direction. The first predictor 704 determines whether to perform the one-dimensional transform in the horizontal direction first or the one-dimensional transform in the vertical direction first. May be determined according to a prediction direction in which an arbitrary pixel block is predicted.

제 2 변환부(724)는 이와 같이 결정된 1차원 변환 방향의 순서에 따라 1차원 변환에 사용하는 베이직 벡터를 다르게 적용할 수 있다. 도 17 및 도 18에는 역 변환 방향의 순서에 따라 수정된 베이직 벡터를 이용하여 역 변환하는 과정을 예시적으로 나타내었다. 제 2 변환부(724)는 1차원 수평 변환을 수행한 후 1차원 수직 변환을 수행하는 경우에는, 도 17에 도시한 바와 같이, 각 4x4 블록의 제 1 행 내지 제 3 행은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 행은 수정된 베이직 벡터를 이용하여 1차원 수평 변환을 수행하며, 각 4x4 블록의 제 1 열은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 열 내지 제 4 열은 수정된 베이직 벡터를 이용하여 1차원 수직 변환을 수행할 수 있다.The second conversion unit 724 can apply the basic vector used for the one-dimensional conversion differently according to the determined order of the one-dimensional conversion direction. 17 and 18 illustrate a process of performing inverse transformation using a modified basic vector according to the order of the inverse transformation directions. In the case where the one-dimensional vertical conversion is performed after the one-dimensional horizontal conversion is performed, the second conversion unit 724 converts the original basic vector into the first to third rows of each 4x4 block as shown in FIG. And the fourth row of each 4x4 block performs a one-dimensional horizontal transformation using the modified basic vector, the first column of each 4x4 block uses the modified basic vector and the second column to the fourth column of each 4x4 block The column can perform a one-dimensional vertical transformation using the modified basic vector.

또한, 제 2 변환부(724)는 1차원 수직 변환을 수행한 후 1차원 수평 변환을 수행하는 경우에는, 도 18에 도시한 바와 같이, 각 4x4 블록의 제 1 열 내지 제 3열은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 열은 수정된 베이직 벡터를 이용하여 1차원 수직 변환을 수행하며, 각 4x4 블록의 제 1 행은 수정된 베이직 벡터늘 이용하고 각 4x4 블록의 제 2 행 내지 제 4 행은 수정된 베이직 벡터를 이용하여 1차원 수평 변환을 수행할 수 있다.When the one-dimensional horizontal conversion is performed after the one-dimensional vertical conversion is performed by the second conversion unit 724, as shown in FIG. 18, the first to third columns of each 4x4 block are converted into the basic Vector is used and the fourth column of each 4x4 block performs a one-dimensional vertical transformation using the modified basic vector, the first row of each 4x4 block is modified using the modified basic vector vector and the second row of each 4x4 block The fourth row can perform one-dimensional horizontal transform using the modified basic vector.

이와 같이, 예측 방향에 따라 1차원 변환의 방향의 순서를 결정하고 결정된 순서에 따라 변환할 때 사용하는 베이직 벡터를 기존 베이직 벡터 또는 수정된 베이직 벡터를 선택적으로 사용하여 변환함으로써, 고주파 성분을 줄일 수 있을 뿐만 아니라 각 서브블록의 나머지 화소에 대한 잔차 신호를 변환할 때 각 임의 화소 잔차 신호와 독립적으로 변환할 수 있다. 여기서, 기존 베이직 벡터와 수정된 베이직 벡터는 도 10을 통해 전술한 바와 같다.As described above, by determining the order of the directions of the one-dimensional transform according to the prediction direction and converting the basic vector used in the transformation according to the determined order by selectively using the existing basic vector or the modified basic vector, In addition, when the residual signal for the remaining pixels of each sub-block is transformed, it can be transformed independently of each of the arbitrary-pixel residual signals. Here, the existing basic vector and the modified basic vector are as described above with reference to FIG.

제 2 양자화부(726)는 변환된 잔차 매크로블록을 양자화한다. 즉, 제 2 양자화부(726)는 제 2 변환부(724)에 의해 변환된 잔차 매크로블록의 주파수 계수를 양자화하여 양자화 주파수 계수를 갖는 잔차 매크로블록인 양자화된 잔차 매크로블록을 생성한다.The second quantization unit 726 quantizes the transformed residual macroblock. That is, the second quantization unit 726 quantizes the frequency coefficients of the residual macroblocks transformed by the second transform unit 724 to generate quantized residual macroblocks, which are residual macroblocks having quantization frequency coefficients.

부호화부(728)는 양자화된 잔차 매크로블록을 부호화하여 비트스트림을 생성한다. 즉, 부호화부(728)는 양자화된 잔차 매크로블록의 양자화 주파수 계수를 지그재그 스캐닝 등 다양한 스캐닝 방식을 이용하여 스캐닝함으로써 양자화 주파수 계수열을 생성하고 생성된 양자화 주파수 계수열을 엔트로피 부호화 등 다양한 부호화 기법을 이용하여 부호화함으로써 비트스트림을 출력한다. 이때, 부호화부(728)는 양자화된 잔차 매크로블록뿐만 아니라 제 1 예측부(704) 또는 제 2 예측부(718)로부터 전달되는 예측 모드에 대한 정보를 추가로 부호화할 수 있다.The encoding unit 728 encodes the quantized residual macroblock to generate a bitstream. That is, the encoding unit 728 generates a quantized frequency coefficient sequence by scanning the quantized frequency coefficients of the quantized residual macroblock using various scanning methods such as zigzag scanning, and generates a variety of encoding techniques such as entropy encoding, And outputs the bit stream. At this time, the encoding unit 728 can further encode information on the prediction mode transmitted from the first predictor 704 or the second predictor 718 as well as the quantized residual macroblock.

제 2 역 양자화부(730)는 양자화된 잔차 매크로블록을 역 양자화한다. 즉, 제 2 역 양자화부(730)는 제 2 양자화부(726)에 의해 양자화된 잔차 매크로블록의 양자화 주파수 계수를 역 양자화하여 주파수 계수를 갖는 역 양자화된 잔차 매크로블록을 생성한다.The second inverse quantization unit 730 dequantizes the quantized residual macroblock. That is, the second inverse quantization unit 730 dequantizes the quantization frequency coefficients of the residual macroblock quantized by the second quantization unit 726 to generate an inverse-quantized residual macroblock having the frequency coefficients.

제 2 역 변환부(732)는 역 양자화된 잔차 매크로블록을 역 변환한다. 즉, 제 2 역 변환부(732)는 제 2 역 양자화주(730)에 의해 역 양자화된 잔차 매크로블록의 주파수 계수를 공간 영역으로 역 변환하여 임의 화소 잔차 신호를 복원하여 복원된 임의 화소 잔차 블록을 생성한다.The second inverse transform unit 732 inversely transforms the dequantized residual macroblock. That is, the second inverse transformer 732 inversely transforms the frequency coefficients of the residual macroblock inversely quantized by the second inverse quantization transformer 730 into a spatial domain, restores the arbitrary pixel residual signal, .

제 2 역 변환부(732)는 역 양자화된 잔차 매크로블록을 역 변환하는 데 있어서, 역 DCT 변환을 이용하여 4x4 블록 단위로 잔차 매크로블록의 주파수 계수를 역 변환하되, 역 DCT 변환의 1차원 역 변환 방향의 순서에 따라 다른 베이직 벡터를 사용하여 역 변환할 수 있다. 또한, 제 2 역 변환부(732)는 제 2 변환부(724)의 1차원 변환 방향의 순서의 역 순으로 1차원 역 변환 방향의 순서를 결정할 수 있다.The second inverse transform unit 732 inversely transforms the dequantized residual macroblock by inverse transforming the frequency coefficients of the residual macroblocks in units of 4x4 blocks using the inverse DCT transform, The inverse transformation can be performed using another basic vector according to the order of the conversion directions. The second inverse transformation unit 732 can determine the order of the one-dimensional inverse transformation direction in the reverse order of the order of the one-dimensional transformation direction of the second transformation unit 724.

즉, 제 2 역 변환부(732)는, 1차원 수평 역 변환을 수행한 후 1차원 수직 역 변환을 수행하는 경우에는 도 17에 도시한 바와 같이, 각 4x4 블록의 제 1 행은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 행 내지 제 4 행은 기존 베이직 벡터를 이용하여 1차원 수평 역 변환을 수행하며, 각 4x4 블록의 제 1 열 내지 제 3열은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 열은 수정된 베이직 벡터를 이용하여 1차원 수직 역 변환을 수행할 수 있다.That is, when the one-dimensional vertical inverse transformation is performed after performing the one-dimensional horizontal inverse transformation, the second inverse transformation unit 732 transforms the first row of each 4x4 block into the modified basic Dimensional horizontal inverse transformation using the existing basic vectors, and the first to third columns of each 4x4 block use the existing basic vector and the second to fourth rows of the 4x4 block are subjected to the one- The fourth column of the 4x4 block can perform one-dimensional vertical inverse transform using the modified basic vector.

또한, 제 2 역 변환부(732)는, 1차원 수직 역 변환을 수행한 후 1차원 수평 역 변환을 수행하는 경우에는 도 18에 도시한 바와 같이, 각 4x4 블록의 제 1열은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 열 내지 제 4 열은 기존 베이직 벡터를 이용하여 1차원 수직 역 변환을 수행하며, 각 4x4 블록의 제 1 행 내지 제 3 행은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 행은 수정된 베이직 벡터를 이용하여 1차원 수평 역 변환을 수행할 수 있다.18, when the one-dimensional vertical inverse transform is performed and the one-dimensional horizontal inverse transform is performed, the second inverse transform unit 732 transforms the first row of each 4x4 block into a modified basic Dimensional vertical inverse transformation using the existing basic vector, and the first to third rows of each 4x4 block use the existing basic vector and the The fourth row of the 4x4 block can perform one-dimensional horizontal inverse transform using the modified basic vector.

제 2 가산부(734)는 역 변환된 잔차 매크로블록을 예측 매크로블록과 가산하여 복원된 현재 매크로블록을 생성한다. 즉, 제 2 가산부(734)는 제 2 역 변환부(732)에 의해 역 변환된 잔차 매크로블록의 각 잔차 신호와 제 2 예측부(718)에 의해 예측된 예측 매크로블록의 각 화소를 가산하여 복원된 화소를 갖는 매크로블록인 복원된 현재 매크로블록을 생성한다.The second adder 734 adds the inverse transformed residual macroblock to the predictive macroblock to generate a reconstructed current macroblock. That is, the second adder 734 adds each residual signal of the residual macroblock inversely transformed by the second inverse transform unit 732 and the respective pixels of the predictive macroblock predicted by the second predictor 718 Thereby generating a reconstructed current macroblock, which is a macroblock having reconstructed pixels.

임의 복원 화소 결합부(736)는 복원된 임의 화소 블록의 각 복원된 임의 화소를 복원된 현재 매크로블록의 각 위치에 결합한다. 즉, 임의 복원 화소 결합부(736)는 제 1 가산부(716)에 의해 복원된 임의 화소 블록의 각 복원된 임의 화소를 제 2 가산부(734)에 의해 복원된 현재 매크로블록의 각 서브블록의 해당 위치에 복사하여 최종으로 복원되는 현재 매크로블록을 생성한다. 이와 같이 최종으로 복원된 현재 매크로블록은 메모리(미도시)에 저장되어 제 1 예측부(704)와 제 2 예측부(718)에서 다음 매크로블록을 부호화할 때 활용된다.The arbitrary reconstruction pixel combiner 736 combines each reconstructed arbitrary pixel of the reconstructed arbitrary pixel block with each position of the reconstructed current macroblock. That is, the arbitrary reconstructed pixel combiner 736 reconstructs each reconstructed arbitrary pixel of the arbitrary pixel block reconstructed by the first adder 716 to each sub-block of the current macroblock reconstructed by the second adder 734, To generate a current macroblock that is finally restored. The finally restored current macroblock is stored in a memory (not shown) and is used when the first predictor 704 and the second predictor 718 encode the next macroblock.

도 19는 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 순서도이다.FIG. 19 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

영상 부호화 장치(700)는 부호화하고자 하는 영상이 입력되면 영상을 매크로 블록 단위로 구분하고 다양한 부호화 모드 중 최적의 블록 모드를 결정하여 결정된 블록 모드에 따라 현재 부호화하고자 하는 매크로블록을 예측하여 부호화한다.When the image to be coded is input, the image coding device 700 divides the image into macroblock units, determines an optimal block mode among the various coding modes, and predicts and encodes macroblocks to be coded according to the determined block mode.

이때, 부호화 모드로서 인트라 모드가 결정되어 인트라 예측을 수행하는 경우, 영상 부호화 장치(700)는 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성하고(S1910), 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하고, 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성한다(S1920).At this time, when the intra mode is determined as the encoding mode and intra prediction is performed, the image encoding apparatus 700 extracts arbitrary pixels from each sub-block of the current macro block to generate an arbitrary pixel block (S1910) And generates an arbitrary pixel residual block by subtracting the arbitrary pixel block from the predictive arbitrary pixel block (S1920).

영상 부호화 장치(700)는 임의 화소 잔차 블록을 변환하고 변환된 임의 화소 잔차 블록을 양자화한 후 양자화된 임의 화소 잔차 블록을 역 양자화하고 역 양자화된 임의 화소 잔차 블록을 역 변환하며(S1930), 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성한다(S1940). 영상 부호화 장치(700)는 현재 매크로블록의 인접 화소들과 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측함으로써 예측 매크로블록을 생성하고 현재 매크로블록에서 예측 매크로블록을 감산하여 잔차 매크로블록을 생성한다(S1950).The image encoding apparatus 700 transforms an arbitrary pixel residual block, quantizes the transformed arbitrary pixel residual block, inversely quantizes the quantized arbitrary pixel residual block, and inversely transforms the inverse quantized arbitrary pixel residual block (S1930) The arbitrary pixel block and the arbitrary pixel residual block inversely transformed are added to generate a reconstructed arbitrary pixel block (S1940). The image encoding apparatus 700 generates a predictive macroblock by predicting the remaining pixels of each sub-block using the reconstructed arbitrary pixels of the neighboring pixels of the current macroblock and the reconstructed arbitrary pixel block, The residual macroblock is generated by subtracting the block (S1950).

또한, 영상 부호화 장치(700)는 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 잔차 매크로블록의 각 위치에 결합하며(S1960), 각 역 변환된 임의 잔차 화소가 결합된 잔차 매크로블록을 변환하고 변환된 잔차 매크로블록을 양자화하고 양자화된 잔차 매크로블록을 부호화함으로써 비트스트림을 생성한다(S1970).In addition, the image encoding apparatus 700 combines each inverse transformed residual pixel of the inverse-transformed arbitrary pixel residual block to each position of the residual macroblock (S1960) The quantized residual macroblock is transformed, and the quantized residual macroblock is encoded to generate a bitstream (S1970).

이후, 영상 부호화 장치(700)는 도 20에 도시한 바와 같이, 현재 매크로블록을 복원할 수 있다. 즉, 영상 부호화 장치(700)는 단계 S1960에서 양자화한 잔차 매크로블록을 역 양자화하고 역 양자화된 잔차 매크로블록을 역 변환하며(S2010), 역 변환된 잔차 매크로블록을 예측 매크로블록과 가산하여 복원된 현재 매크로블록을 생성하며(S2020), 복원된 임의 화소 블록의 각 복원된 임의 화소를 복원된 현재 매크로블록의 각 위치에 결합하여 최종적으로 복원된 현재 매크로블록을 생성한다(S2030).Then, as shown in FIG. 20, the image encoding apparatus 700 can restore the current macroblock. That is, the image encoding apparatus 700 dequantizes the residual macroblock quantized in step S1960 and inversely transforms the dequantized residual macroblock (S2010), adds the inverse transformed residual macroblock to the predictive macroblock, The current macroblock is generated (S2020), and each reconstructed arbitrary pixel of the reconstructed arbitrary pixel block is combined with each reconstructed current macroblock to generate a reconstructed current macroblock (S2030).

전술한 바와 같이, 영상 부호화 장치(700)에 의해 비트스트림으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등의 유무선 통신망 등을 통하거나 케이블, 범용 직렬 버스(USB: Universal Serial Bus) 등의 통신 인터페이스를 통해 후술할 영상 복호화 장치로 전송되어 영상 복호화 장치에서 복호화되어 영상으로 복원되고 재생될 수 있다.As described above, the image encoded by the image encoding apparatus 700 can be transmitted in real time or in non-real time through a wired / wireless communication network such as the Internet, a local area wireless communication network, a wireless LAN network, a WiBro network, And transmitted to a video decoding apparatus to be described later through a communication interface such as a serial bus (USB: Universal Serial Bus), decoded by the video decoding apparatus, and restored and reproduced as an image.

도 21은 본 발명의 일 실시예에 따른 영상 복호화 장치의 전자적인 구성을 간략하게 나타낸 블록 구성도이다.FIG. 21 is a block diagram schematically illustrating an electronic configuration of an image decoding apparatus according to an embodiment of the present invention. Referring to FIG.

본 발명의 일 실시예에 따른 영상 복호화 장치(2100)는 영상을 복호화하는 장치로서, 복호화부(2102), 역 양자화부(2104), 계수 추출부(2106), 제 1 역 변환부(2108), 제 1 예측부(2110), 제 1 가산부(2112), 제 2 역 변환부(2114), 제 2 예측부(2116), 제 2 가산부(2118) 및 화소 결합부(2120)를 포함하여 구성될 수 있다.The image decoding apparatus 2100 according to an embodiment of the present invention is an apparatus for decoding an image and includes a decoding unit 2102, an inverse quantization unit 2104, a coefficient extraction unit 2106, a first inverse transformation unit 2108, A first predictor 2110, a first adder 2112, a second inverse transformer 2114, a second predictor 2116, a second adder 2118, and a pixel combiner 2120 .

복호화부(2102)는 비트스트림을 복호화하여 잔차 매크로블록 및 예측 모드를 추출한다. 즉, 복호화부(2102)는 비트스트림을 복호화하여 양자화 주파수 계수열과 예측 모드를 추출하고, 양자화 주파수 계수열을 역 지그재그 스캔 등 다양한 역 스캐닝 방식으로 역 스캐닝하여 잔차 매크로블록을 생성한다,The decoding unit 2102 decodes the bitstream to extract residual macroblocks and prediction modes. That is, the decoding unit 2102 decodes the bitstream to extract the quantized frequency coefficient sequence and the prediction mode, and inversely scans the quantized frequency coefficient sequence using various inverse scanning methods such as inverse zigzag scanning to generate residual macroblocks.

역 양자화부(2104)는 잔차 매크로블록을 역 양자화하고, 계수 추출부(2106)는 역 양자화된 잔차 매크로블록에서 각 서브블록의 임의 화소의 위치에 대응하는 주파수 계수를 추출한다. 여기서, 임의 화소의 위치에 대응하는 주파수 계수는 DC 성분의 주파수 계수가 될 수 있다.The inverse quantization unit 2104 dequantizes the residual macroblock, and the coefficient extraction unit 2106 extracts the frequency coefficients corresponding to the positions of arbitrary pixels of each sub-block in the dequantized residual macroblock. Here, the frequency coefficient corresponding to the position of an arbitrary pixel may be the frequency coefficient of the DC component.

제 1 역 변환부(2108)는 계수 추출부(2106)에 의해 추출된 주파수 계수를 역 변환하여 역 변환된 임의 화소 잔차 블록을 생성한다. 제 1 역 변환부(2108)가 추출된 주파수 계수를 역 변환하는 방법은 도 7을 통해 전술한 제 1 역 변환부(714)가 역 변환하는 방식과 동일 또는 유사하므로 상세한 설명은 생략한다.The first inverse transform unit 2108 generates an inverse transformed arbitrary pixel residual block by inversely transforming the frequency coefficients extracted by the coefficient extracting unit 2106. The method of inverse transforming the extracted frequency coefficients by the first inverse transform unit 2108 is the same as or similar to the inverse transform performed by the first inverse transform unit 714 described above with reference to FIG. 7, and thus a detailed description thereof will be omitted.

제 1 예측부(2110)는 복호화부(2102)에서 추출된 예측 모드에 따른 예측 방향에 따라 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성한다. 제 1 예측부(2110)가 예측 방향에 따라 임의 화소 블록을 예측하는 방법은 도 7을 통해 전술한 제 1 예측부(704)가 예측하는 방식과 동일 또는 유사하므로 상세한 설명은 생략한다. 제 1 가산부(2112)는 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성한다.The first predictor 2110 predicts an arbitrary pixel block according to a prediction direction according to the prediction mode extracted by the decoding unit 2102 to generate a predictive arbitrary pixel block. The method of predicting an arbitrary pixel block according to the prediction direction by the first predicting unit 2110 is the same as or similar to the method predicted by the first predicting unit 704 through FIG. 7, and thus a detailed description thereof will be omitted. The first adder 2112 adds the predictive arbitrary pixel block and the inverse-transformed arbitrary pixel residual block to generate a reconstructed arbitrary pixel block.

제 2 역 변환부(2114)는 역 양자화된 잔차 매크로블록을 역 변환하여 역 변환된 잔차 매크로블록을 생성한다. 제 2 역 변환부(2108)가 역 양자화된 잔차 매크로블록의 주파수 계수를 역 변환하는 방법은 도 7을 통해 전술한 제 2 역 변환부(724)가 역 변환하는 방식과 동일 또는 유사하므로 상세한 설명은 생략한다.The second inverse transform unit 2114 inversely transforms the dequantized residual macroblock to generate an inverse transformed residual macroblock. The method of inverse transforming the frequency coefficients of the inverse quantized residual macroblock by the second inverse transform unit 2108 is the same as or similar to the inverse transform performed by the second inverse transform unit 724 described above with reference to FIG. Is omitted.

제 2 예측부(2116)는 영상의 현재 매크로블록의 인접 화소 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 예측 모드에 따른 예측 방향에 따라 영상의 현재 매크로블록을 예측하여 예측 현재 매크로블록을 생성한다. 제 2 예측부(2116)가 영상의 현재 매크로블록의 인접 화소 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 예측 모드에 따른 예측 방향에 따라 영상의 현재 매크로블록을 예측하는 방법은 도 7을 통해 전술한 제 2 예측부(718)가 예측하는 방법과 동일 또는 유사하므로 상세한 설명은 생략한다.The second predictor 2116 predicts the current macroblock of the image according to the prediction direction according to the prediction mode using the neighboring pixels of the current macroblock of the image and each reconstructed arbitrary pixel of the reconstructed arbitrary pixel block, Block. The second predictor 2116 predicts a current macroblock of an image according to a prediction direction according to a prediction mode using adjacent pixels of the current macroblock of the image and reconstructed arbitrary pixels of the reconstructed arbitrary pixel block, 7, the method is the same as or similar to the method predicted by the second predicting unit 718, and thus a detailed description thereof will be omitted.

제 2 가산부(2118)는 예측 현재 매크로블록과 역 변환된 잔차 매크로블록을 이용하여 복원된 현재 매크로블록을 생성한다. 임의 화소 결합부(2120)는 복원된 임의 화소를 복원된 현재 매크로블록의 각 위치에 결합한다. 이와 같이, 결합된 현재 매크로블록이 최종으로 복원된 현재 매크로블록이 되며, 최종으로 복원된 현재 매크로블록이 픽처 단위로 결합되어 복원 영상으로서 출력된다. 또한, 최종으로 복원된 현재 매크로블록은 제 1 예측부(2110) 및 제 2 예측부(2116)에서 다음 매크로블록을 복호화할 때 활용된다.The second adder 2118 generates the restored current macroblock using the prediction current macroblock and the inverse transformed residual macroblock. The arbitrary-pixel combining unit 2120 combines the reconstructed arbitrary pixel into each position of the reconstructed current macroblock. In this manner, the combined current macroblock becomes the last reconstructed current macroblock, and the reconstructed current macroblock is concatenated on a picture-by-picture basis and output as a reconstructed image. In addition, the finally restored current macroblock is utilized when the next macroblock is decoded by the first predictor 2110 and the second predictor 2116.

도 22는 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 순서도이다.22 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

유무선 통신망 또는 케이블 등을 통해 영상에 대한 비트스트림을 수신하여 저장한 영상 복호화 장치(2100)는 사용자의 선택 또는 실행 중인 다른 프로그램의 알고리즘에 따라 영상을 재생하기 위해, 영상을 복호화하여 복원한다.The video decoding apparatus 2100 receives and stores a bitstream of an image through a wired / wireless communication network or a cable, and decodes and restores the video in order to reproduce the video according to a user's selection or an algorithm of another program being executed.

이를 위해, 영상 복호화 장치(2100)는 비트스트림을 복호화하여 잔차 매크로블록 및 예측 모드를 추출하고(S2210), 추출된 잔차 매크로블록을 역 양자화한다(S2220).To this end, the image decoding apparatus 2100 decodes the bitstream to extract the residual macroblock and the prediction mode (S2210), and dequantizes the extracted residual macroblock (S2220).

영상 복호화 장치(2100)는 역 양자화된 잔차 매크로블록에서 각 서브블록의 임의 화소의 위치에 대응하는 주파수 계수를 추출하고(S2230), 추출된 주파수 계수를 역 변환하여 복원된 임의 화소 잔차 블록을 생성하며(S2240), 예측 모드에 따른 예측 방향에 따라 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성한다(S2250). 또한, 영상 복호화 장치(2100)는 단계 S2250에서 생성된 예측 임의 화소 블록과 단계 S2240에서 역 변환된 복원된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성한다(S2250).The image decoding apparatus 2100 extracts a frequency coefficient corresponding to a position of an arbitrary pixel of each sub-block in the dequantized residual macroblock (S2230), and generates a reconstructed arbitrary pixel residual block by inversely transforming the extracted frequency coefficient (S2240) and generates a predictive arbitrary pixel block by predicting the arbitrary pixel block according to the predictive direction according to the predictive mode (S2250). In operation S2250, the image decoding apparatus 2100 generates an arbitrary pixel block by adding the predictive arbitrary pixel block generated in operation S2250 and the reconstructed arbitrary pixel residual block in operation S2240.

영상 복호화 장치(2100)는 역 양자화된 잔차 매크로블록을 역 변환하여 역 변환된 잔차 매크로블록을 생성하고(S2260), 영상의 현재 매크로블록의 인접 화소 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 예측 모드에 따른 예측 방향에 따라 영상의 현재 매크로블록을 예측하여 예측 현재 매크로블록을 생성한다(S2270). 영상 복호화 장치(2100)는 예측 현재 매크로블록과 역 변환된 잔차 매크로블록을 이용하여 복원된 현재 매크로블록을 생성하고(S2280), 각 복원된 임의 화소를 복원된 현재 매크로블록의 각 위치에 결합하여 복원 영상을 생성하여 출력한다(S2290).The image decoding apparatus 2100 generates an inverse transformed residual macroblock by inversely transforming the dequantized residual macroblock (S2260), and reconstructs the reconstructed arbitrary pixel of the neighboring pixel of the current macroblock of the image and the reconstructed arbitrary pixel block The current macroblock of the image is predicted according to the prediction direction according to the prediction mode to generate a predictive current macroblock (S2270). The image decoding apparatus 2100 generates a reconstructed current macroblock using the predictive current macroblock and the inverse transformed residual macroblock (S2280), and combines the reconstructed arbitrary pixel with each position of the reconstructed current macroblock A restored image is generated and output (S2290).

이하에서는 본 발명의 다른 실시예에 따른 영상 부호화 장치에 대해 설명한다. 본 발명의 다른 실시예에 따른 영상 부호화 장치는 도 7을 통해 전술한 본 발명의 일 실시예에 따른 영상 부호화 장치(700)와 그 구성 요소는 동일하지만, 그 구성 요소의 기능이 상이하다.Hereinafter, an image encoding apparatus according to another embodiment of the present invention will be described. The image encoding apparatus according to another embodiment of the present invention is the same as the image encoding apparatus 700 according to an embodiment of the present invention described above with reference to FIG. 7, but the functions of the image encoding apparatus are different.

즉, 본 발명의 일 실시예에 따른 영상 부호화 장치(700)는 현재 부호화하고자 하는 현재 매크로브록의 각 서브블록을 부호화하고 복호화하는 데 있어서, 모든 서브블록을 모두 부호화한 후 모든 서브블록을 복호화하여 현재 매크로블록 단위로 변환과 양자화를 수행한다. 하지만, 본 발명의 다른 실시예에 따른 영상 부호화 장치는 현재 매크로블록의 모든 서브블록을 부호화하고 복호화하는 데 있어서, 하나의 서브블록을 부호화하고 복호화한 후 다음 서브블록을 부호화하고 복호화하는 방식으로 모든 서브블록을 부호화하고 복호화한다. 따라서, 본 발명의 다른 실시예에 따르면, 변환과 양자화가 서브블록 단위로 이루어진다.That is, the image encoding apparatus 700 according to an embodiment of the present invention encodes and decodes each sub-block of the current macro block to be coded, and after coding all the sub-blocks, decodes all the sub-blocks Conversion and quantization are performed on a macroblock basis. However, in order to encode and decode all the sub-blocks of the current macroblock, the image encoding apparatus according to another embodiment of the present invention encodes and decodes one sub-block and then encodes and decodes the next sub- The subblock is coded and decoded. Therefore, according to another embodiment of the present invention, the transformation and the quantization are performed in units of subblocks.

도 23을 참조하면, 본 발명의 일 실시예에 따른 영상 부호화 장치(700)는 현재 매크로블록 내의 각 서브블록을 도시한 바와 같은 순서로 부호화를 완료한 후, 각 서브블록을 복호화한다. 즉, 본 발명의 일 실시예에 따른 영상 부호화 장치(700)는 1번 서브블록 내지 16번 서브블록을 현재 매크로블록의 인접 화소들과 각 서브블록의 복원된 임의 화소를 이용하여 순서대로 예측하고 감산한 후 매크로블록 단위로 변환하고 양자화하여 모든 서브블록을 부호화한 후 다시 양자화된 매크로블록을 역 양자화하고 역 변환한 후 변환된 잔차 매크로블록에서 예측된 각 서브블록을 감산하여 1번 서브블록 내지 16번 서브블록을 복호화한다.Referring to FIG. 23, an image encoding apparatus 700 according to an embodiment of the present invention decodes each sub-block after completing encoding of each sub-block in a current macroblock in the order shown. That is, the image encoding apparatus 700 according to an embodiment of the present invention sequentially predicts the first subblock to the 16th subblock using adjacent pixels of the current macroblock and reconstructed arbitrary pixels of each subblock The quantized macroblocks are inversely quantized and inversely transformed, and each of the sub-blocks predicted by the transformed residual macroblocks is subtracted to obtain the quantized sub-blocks, Decodes the 16 sub-blocks.

하지만, 본 발명의 다른 실시예에 따른 영상 부호화 장치는 제 2 예측부(718)가 1번 서브블록을 인접 화소와 복원된 임의 화소를 이용하여 예측하고, 제 2 감산부(720)에서 1번 서브블록에 대한 잔차 서브블록을 생성하며, 제 2 변환부(724)에서 잔차 서브블록을 변환하고 제 2 양자화부(726)에서 변환된 잔차 서브블록을 양자화한다. 그리고 제 2 역 양자화부(730)는 양자화된 잔차 서브블록을 역 양자화하고, 제 2 역 변환부(732)는 역 양자화된 잔차 서브블록을 역 변환하여 예측된 예측 서브블록과 가산하여 1번 서브블록을 복원한다. 이후, 제 2 예측부(718)는 2번 서브블록을 예측하는데, 예측에 사용할 인접 화소는 현재 매클로블록의 인접 화소가 되는 것이 아니라 왼쪽의 인접 화소는 2번 서브블록과 인접해 있는 복원된 1번 서브블록의 인접 화소를 이용하고 위쪽의 인접 화소는 현재 매클로블록의 인접 화소가 되며, 이러한 인접 화소들과 2번 서브블록 내의 복원된 임의 화소를 이용하여 2번 서브블록을 예측한다. 예측된 2번 서브블록을 2번 서브블록과 감산하여 잔차 서브블록을 생성하고 변환하고 양자화한 후 역 양자화하고 역 변환하여 2번 서브블록을 복원한다. 이러한 과정을 도시한 순서대로 수행하여 각 서브블록을 부호화하는 데 복원된 각 서브블록을 이용한다.However, in the image encoding apparatus according to another embodiment of the present invention, the second predictor 718 predicts the first sub-block using adjacent pixels and reconstructed arbitrary pixels, and the second subtractor 720 predicts Block, and the second transform unit 724 transforms the residual sub-block, and the second quantization unit 726 quantizes the transformed residual sub-block. The second inverse quantization unit 730 dequantizes the quantized residual sub-blocks, and the second inverse transform unit 732 adds the inverse quantized residual sub-blocks to the predicted sub-blocks, Restore the block. Subsequently, the second predictor 718 predicts the second sub-block. The adjacent pixel to be used for prediction is not the adjacent pixel of the current macroblock but the neighboring pixel on the left is the restored The neighboring pixel of the first sub-block is used, and the adjacent pixel at the upper side becomes the adjacent pixel of the current macroblock, and the second sub-block is predicted using the restored random pixels in the adjacent pixels and the second sub-block. The predicted 2 subblocks are subtracted from the 2 subblocks, and the residual subblocks are generated, transformed, quantized, inverse-quantized, and inverse transformed to restore the 2 subblocks. This process is performed in the order shown and each sub-block restored is used to encode each sub-block.

이러한 본 발명의 다른 실시예에 따른 영상 부호화 장치는, 영상의 현재 매크로블록의 각 서브블록에서 임의 화소를 추출하여 임의 화소 블록을 생성하고, 임의 화소 블록을 예측하여 예측 임의 화소 블록을 생성하여, 임의 화소 블록과 예측 임의 화소 블록을 감산하여 임의 화소 잔차 블록을 생성한 후, 임의 화소 잔차 블록을 변환하고 변환된 임의 화소 잔차 블록을 양자화하며, 양자화된 임의 화소 잔차 블록을 역 양자화하고 역 양자화된 임의 화소 잔차 블록을 역 변환하며, 예측 임의 화소 블록과 역 변환된 임의 화소 잔차 블록을 가산하여 복원된 임의 화소 블록을 생성한다. 그리고 각 서브블록의 인접 화소들 및 복원된 임의 화소 블록의 각 복원된 임의 화소를 이용하여 각 서브블록의 나머지 화소를 예측하여 각 예측 서브블록을 생성하고, 서브블록에서 각 예측 서브블록을 감산하여 각 잔차 서브블록을 생성하고, 역 변환된 임의 화소 잔차 블록의 각 역 변환된 임의 잔차 화소를 각 잔차 서브블록의 각 위치에 결합하며, 각 역 변환된 임의 잔차 화소가 결합된 각 잔차 서브블록을 변환하고 변환된 각 잔차 서브블록을 양자화한 후, 양자화된 각 잔차 서브블록을 부호화하여 비트스트림을 생성한다. 이때, 각 서브블록은 하나의 서브블록이 부호화되고 복호화된 후 다음 서브블록이 부호화되고 복호화된다.According to another aspect of the present invention, there is provided an image encoding apparatus for generating an arbitrary pixel block by extracting an arbitrary pixel in each sub-block of a current macroblock of an image, generating an arbitrary pixel block by predicting the arbitrary pixel block, An arbitrary pixel residual block is generated by subtracting the arbitrary pixel block and the predictive arbitrary pixel block, and then the arbitrary pixel residual block is transformed, the quantized arbitrary pixel residual block is quantized, the quantized arbitrary pixel residual block is dequantized, An arbitrary pixel residual block is inversely transformed and an arbitrary pixel block reconstructed by adding the predictive arbitrary pixel block and the inverse transformed arbitrary pixel residual block is generated. Then, the remaining pixels of each sub-block are predicted using adjacent pixels of each sub-block and each reconstructed arbitrary pixel of the reconstructed arbitrary pixel block to generate each predicted sub-block, and subtracting each predicted sub-block from the sub- Each residual sub-block is generated, each inverse-transformed residual pixel of the inverse-transformed arbitrary-pixel residual block is combined with each position of each residual sub-block, and each residual sub-block in which each inverse- Transforms each transformed residual sub-block, quantizes each quantized residual sub-block, and generates a bit stream by encoding each residual residual sub-block. At this time, one sub-block is coded and decoded in each sub-block, and the next sub-block is coded and decoded.

또한, 본 발명의 다른 실시예에 따른 영상 부호화 장치는 양자화된 각 잔차 서브블록을 역 양자화하고 역 양자화된 각 잔차 서브블록을 역 변환하며 역 변환된 각 잔차 서브 블록을 각 예측 서브블록과 가산하여 복원된 각 서브블록을 생성한 후, 복원된 임의 화소 블록의 각 복원된 임의 화소를 복원된 각 서브블록의 각 위치에 결합한다. 이때, 각 서브블록의 나머지 화소를 예측하는 데 있어서, 각 복원된 임의 화소가 결합된 각 서브블록을 저장하며 저장된 각 서브블록을 이용하여 다음 서브블록을 예측한다.In addition, the image encoding apparatus according to another embodiment of the present invention dequantizes each quantized residual sub-block, inversely quantizes each residual sub-block inversely quantized, adds each inverse transformed residual sub-block to each predicted sub-block After reconstructed sub-blocks are generated, each reconstructed arbitrary pixel of the restored arbitrary pixel block is combined with each restored position of each sub-block. At this time, in predicting the remaining pixels of each sub-block, each restored sub-block is stored, and the next sub-block is predicted using each stored sub-block.

또한, 본 발명의 다른 실시예에 따른 영상 부호화 장치는 현재 매크로블록의 예측 방향 또는 제 1 예측부(704)의 예측 방향을 이용하는 것이 아니라, 각 서브블록마다 예측 방향을 결정하여 결정된 예측 방향으로 각 서브블록의 나머지 화소를 예측할 수 있다. 이를 위해, 본 발명의 다른 실시예에 따른 영상 부호화 장치의 제 2 예측부(718)는 각 서브블록의 인접 화소들 중 각 복원된 임의 화소와의 값의 차이가 최소인 인접 화소에서 각 복원된 임의 화소를 향하는 방향을 예측 방향으로서 결정할 수 있다. 이 경우, 본 발명의 다른 실시예에 따른 제 2 예측부(718)는 각 서브블록에 대한 예측 방향에 따른 예측 모드에 대한 정보를 생성하여 부호화부(728)로 전달할 수도 있고 전달하지 않을 수 있다. 각 서브블록에 대한 예측 모드에 대한 정보가 부호화부(728)로 전달되는 경우, 부호화부(728)는 각 서브블록에 대한 예측 모드에 대한 정보를 부호화하여 비트스트림에 각 서브블록에 대한 예측 모드에 대한 정보가 포함되며, 영상 복호화 장치에서 각 서브블록을 예측할 때 예측 모드에 대한 정보를 이용하여 예측 방향을 동기화할 수 있다. 만일 각 서브블록에 대한 예측 모드에 대한 정보가 부호화되지 않을 때에는 영상 복호화 장치에서는, 영상 부호화 장치에서와 마찬가지로, 각 서브블록의 예측 방향을 결정하여 결정된 예측 방향으로 예측한다.In addition, the image encoding apparatus according to another embodiment of the present invention does not use the prediction direction of the current macroblock or the prediction direction of the first prediction unit 704, but determines the prediction direction for each sub-block, The remaining pixels of the sub-block can be predicted. For this, the second predictor 718 of the image encoding apparatus according to another embodiment of the present invention estimates each reconstructed neighboring pixel in the neighboring pixels having the smallest value difference from each reconstructed arbitrary pixel among the neighboring pixels of each sub- The direction toward the arbitrary pixel can be determined as the prediction direction. In this case, the second predictor 718 according to another embodiment of the present invention may generate information on the prediction mode according to the prediction direction for each sub-block, and may transmit or not transmit information to the encoder 728 . When the information on the prediction mode for each sub-block is transmitted to the encoding unit 728, the encoding unit 728 encodes the information on the prediction mode for each sub-block, and outputs the prediction mode for each sub- And the prediction direction can be synchronized using the information on the prediction mode when the image decoding apparatus predicts each sub-block. If the information on the prediction mode for each sub-block is not coded, the image decoding apparatus determines the prediction direction of each sub-block and predicts it in the determined prediction direction as in the image coding apparatus.

도 24를 참조하면, 본 발명의 다른 실시예에 따른 제 2 예측부(718)는 제 1 예측부(704)의 예측 방향과는 별도로 서브블록의 왼쪽(Vi)과 위쪽(Hi)의 먼저 복원된 화소들과 복원된 임의 화소(Xi')를 비교하여 각 서브블록의 새로운 최적의 예측 방향을 결정한 후, 결정된 새로운 최적의 예측 방향에 따라 각 서브블록을 예측한다. 각 서브블록의 새로운 최적의 예측 방향을 방법은 임의 화소(Xi)와 현재 매크로블록의 주위의 인접 화소(V0 ~ V3, H0 ~ H7)를 이용하여 모서리(Edge)의 방향을 예측함으로써 결정한다.Referring to FIG. 24, the second predictor 718 according to another embodiment of the present invention may include a prediction unit 704 for estimating a difference between the left (V i ) and the upper (H i ) First, the reconstructed pixels are compared with the reconstructed arbitrary pixel (X i ') to determine a new optimum prediction direction of each sub-block, and then each sub-block is predicted according to the determined new optimum prediction direction. The new optimal prediction direction of each sub-block is determined by the direction of the edge (edge) by using the arbitrary pixel (X i ) and the neighboring pixels (V 0 to V 3 , H 0 to H 7 ) Is determined by prediction.

예를 들어, Xi와 H3의 값이 가장 비슷하면 해당 서브블록의 최적의 예측 방향은 수직 방향으로 결정되고, Xi와 V3의 값이 가장 비슷하면 해당 서브블록의 최적의 예측 방향은 수평방향으로 결정된다. DC예측 모드는 V0 ~ V3 , H0 ~ H7와 Xi값이 비슷할 때 결정된다. 대각선 왼쪽은 V0와 H0, V1과 H1, V2와 H2, V3와 H3 및 H7과 Xi값이 비슷할 결정된다. 대각선 오른쪽 방향인 경우는 N과 Xi값이 비슷할 때 결정된다. 수직 오른쪽 방향인 경우는 H1과 Xi값이 비슷할 때 결정된다. 수평 아래쪽 방향인 경우는 V2과 Xi값이 비슷할 때 결정된다. 수직 왼쪽 방향인 경우는 H5과 Xi값이 비슷하고, H0과 V1, H1과 V2및 H2과 V3이 비슷할 때 결정된다. 수평 위쪽 방향인 경우는 H1과 V0, H2과 V1, H3과 V2및 H4과 V3이 비슷할 때 결정된다. 이와 같이, 본 발명의 다른 실시예에 따른 제 2 예측부(718)는 각 서브블록마다 최적의 예측 방향을 결정하여 예측함으로써 예측의 정확도를 높일 수 있다. 즉, 각 서브블록마다 복원된 임의 화소를 이용하여 나머지 화소를 예측하므로 복원된 임의 화소와 인접 화소들의 관계에 따라 기존의 예측 방법과는 달리 각 서브블록마다 최적의 예측 방향이 결정될 수 있으며, 이와 같은 예측 방향의 전환을 통해 부호화 및 복호화를 통한 압축 효율을 향상시킬 수 있다.For example, if the values of X i and H 3 are the closest, the optimal prediction direction of the sub-block is determined to be the vertical direction, and if the values of X i and V 3 are closest to each other, And is determined in the horizontal direction. The DC prediction mode is determined when V 0 to V 3 , H 0 to H 7 and X i values are similar. The left diagonal is determined to be similar to V 0 and H 0 , V 1 and H 1 , V 2 and H 2 , V 3 and H 3, and H 7 and X i values. The diagonal right direction is determined when the values of N and X i are similar. Vertical right direction is determined when H 1 and X i values are similar. Horizontal downward direction is determined when V 2 and X i values are similar. Vertical leftward direction is determined when H 5 and X i are similar, H 0 and V 1 , H 1 and V 2, and H 2 and V 3 are similar. Horizontal upward direction is determined when H 1 and V 0 , H 2 and V 1 , H 3 and V 2, and H 4 and V 3 are similar. As described above, the second predicting unit 718 according to another embodiment of the present invention can increase the accuracy of prediction by determining and predicting the optimum prediction direction for each sub-block. That is, since the rest of the pixels are predicted using the reconstructed arbitrary pixel for each sub-block, the optimal prediction direction can be determined for each sub-block unlike the conventional prediction method depending on the relationship between the reconstructed arbitrary pixel and the adjacent pixels. It is possible to improve compression efficiency through encoding and decoding through switching of the same prediction direction.

여기서, 본 발명의 다른 실시예에 따른 영상 부호화 장치가 각 서브블록을 부호화하고 복호화하는 순서는 H.264/AVC의 인트라 4x4 매크로블록을 부호화하고 복호화하는 순서이거나 래스터(Raster) 스캔 방향일 수 있다. 도 23에 도시한 순서가 H.264/AVC 표준에서 인트라 4x4 매크로블록을 부호화하고 복호화하는 순서를 나타낸 것이고, 도 25에서는 래스터 스캔 방향에 따른 각 서브블록의 부호화 복호화 순서를 나타낸 것이다. 도시한 바와 같이, 본 발명의 다른 실시예에 따른 영상 부호화 장치는 그 순서에 관계없이, 하나의 서브블록을 예측, 변환, 양자화, 역 양자화, 역 변환하여 복원한 후 다음 서브블록을 이전에 복원된 서브블록을 이용하여 예측, 변환, 양자화, 역 양자화, 역 변환하는 방식으로 각 서브블록을 부호화하고 복호화하는 것이다.Here, the order in which the image encoding apparatus according to another embodiment of the present invention encodes and decodes each sub-block may be a sequence of encoding and decoding an intra 4x4 macroblock of H.264 / AVC or a raster scan direction . The procedure shown in Fig. 23 shows a procedure for coding and decoding intra 4x4 macroblocks in the H.264 / AVC standard, and Fig. 25 shows the coding / decoding procedure for each sub-block in the raster scanning direction. As shown in the figure, the image encoding apparatus according to another embodiment of the present invention restores and restores one sub-block by predicting, transforming, quantizing, inverse-quantizing, Block, and performs decoding, prediction, conversion, quantization, inverse-quantization, and inverse transform using the sub-blocks.

도 26에는 각 서브블록의 나머지 화소를 복원된 임의 화소(X)와 인접 화소(H, V, N)를 이용하여 새롭게 결정된 최적의 예측 방향에 따라 예측하는 모습을 예시적으로 나타내었다. 본 발명의 다른 실시예에서는 도시한 바와 같은 방법으로 각 서브블록의 나머지 화소들을 예측한다.FIG. 26 exemplarily shows how the remaining pixels of each sub-block are predicted according to a newly determined optimal prediction direction using the reconstructed arbitrary pixel X and adjacent pixels H, V, and N. FIG. In another embodiment of the present invention, the remaining pixels of each sub-block are predicted in the manner as shown.

또한, 본 발명의 다른 실시예에 따른 영상 부호화 장치는 본 발명의 일 실시예에 따른 영상 부호화 장치(700)의 다른 특징들을 모두 포함한다. 즉, 본 발명의 다른 실시예에 따른 영상 부호화 장치의 제 1 변환부(708)는 임의 화소 잔차 블록의 각 임의 화소 잔차 신호만을 독립적으로 변환 및 역 변환할 수 있으며, 임의 화소 잔차 블록의 각 임의 화소 잔차 신호를 수정된 베이직 벡터를 이용하여 이산 코사인 변환을 수행함으로써 각 임의 화소 잔차 신호만을 독립적으로 변환할 수 있으며, 이산 코사인 변환을 수행한 후 하다마드 변환을 추가로 수행할 수 있다.In addition, the image encoding apparatus according to another embodiment of the present invention includes all the other features of the image encoding apparatus 700 according to an embodiment of the present invention. That is, the first transform unit 708 of the image encoding apparatus according to another embodiment of the present invention can independently convert and inverse transform only the arbitrary pixel residual signals of the arbitrary pixel residual block, Only the arbitrary pixel residual signal can be independently transformed by performing discrete cosine transform using the corrected pixel basic signal, and Hadamard transform can be further performed after discrete cosine transform.

또한, 본 발명의 다른 실시예에 따른 영상 부호화 장치의 제 1 역 변환부(714)는 각 임의 화소 잔차 신호가 변환된 주파수 계수를 수정된 베이직 벡터를 이용하여 역 이산 코사인 변환을 수행함으로써 각 임의 화소 잔차 신호만을 독립적으로 역 변환할 수 있으며, 각 임의 화소 잔차 신호가 변환된 주파수 계수를 역 하다마드 변환한 후 역 이산 코사인 변환을 수행할 수 있다.In addition, the first inverse transform unit 714 of the image encoding apparatus according to another embodiment of the present invention performs inverse discrete cosine transform using the corrected basic vector, Only the pixel residual signal can be independently inversely transformed, and the inverse discrete cosine transform can be performed after inverse Hadamard transform of the transformed frequency coefficient of each arbitrary pixel residual signal.

또한, 본 발명의 다른 실시예에 따른 영상 부호화 장치의 제 2 변환부(724)는 이산 코사인 변환을 이용하여 4x4 블록 단위로 잔차 매크로블록을 변환하되, 이산 코사인 변환의 1차원 변환 방향의 순서에 따라 다른 베이직 벡터를 사용할 수 있다. 이때, 1차원 변환 방향의 순서는 제 1 예측부의 예측 방향에 따라 결정될 수 있다. 또한, 제 2 변환부(724)는 1차원 수평 변환을 수행한 후 1차원 수직 변환을 수행하는 경우에는, 각 4x4 블록의 제 1 행 내지 제 3 행은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 행은 수정된 베이직 벡터를 이용하여 1차원 수평 변환을 수행하며, 각 4x4 블록의 제 1 열은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 열 내지 제 4 열은 수정된 베이직 벡터를 이용하여 1차원 수직 변환을 수행할 수 있으며, 1차원 수직 변환을 수행한 후 1차원 수평 변환을 수행하는 경우에는, 각 4x4 블록의 제 1 열 내지 제 3 열은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 열은 수정된 베이직 벡터를 이용하여 1차원 수직 변환을 수행하며, 각 4x4 블록의 제 1 행은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 행 내지 제 4 행은 수정된 베이직 벡터를 이용하여 1차원 수평 변환을 수행할 수 있다.The second transform unit 724 of the image encoding apparatus according to another embodiment of the present invention transforms the residual macroblocks in 4x4 block units using the discrete cosine transform, You can then use another basic vector. At this time, the order of the one-dimensional conversion direction may be determined according to the prediction direction of the first predictor. When the one-dimensional vertical conversion is performed after performing the one-dimensional horizontal conversion, the second conversion unit 724 uses the existing basic vectors in the first to third rows of each 4x4 block, The fourth row performs a one-dimensional horizontal transform using the modified basic vector, the first column of each 4x4 block uses the modified basic vector, and the second to fourth columns of each 4x4 block are modified basic vectors Dimensional vertical transformation can be performed using the conventional basic vector. When performing the one-dimensional vertical transformation after performing the one-dimensional vertical transformation, the first to third columns of each 4x4 block use the existing basic vector, The fourth column of the 4x4 block performs a one-dimensional vertical transformation using the modified basic vector, the first row of each 4x4 block uses the modified basic vector, and the second through fourth rows of each 4x4 block are modified Basic vector < RTI ID = 0.0 > You can perform a circle horizontal conversion.

또한, 본 발명의 다른 실시예에 따른 영상 부호화 장치의 제 2 역 변환부(732)는 역 이산 코사인 변환을 이용하여 4x4 블록 단위로 주파수 계수를 역 변환하되, 역 이산 코사인 변환의 1차원 역 변환 방향의 순서에 따라 다른 베이직 벡터를 사용할 수 있으며, 제 2 변환부(724)의 1차원 변환 방향의 순서의 역 순으로 1차원 역 변환 방향의 순서를 결정할 수 있다. 또한, 제 2 역 변환부(732)는 1차원 수평 역 변환을 수행한 후 1차원 수직 역 변환을 수행하는 경우에는, 각 4x4 블록의 제 1 행은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 행 내지 제 4 행은 기존 베이직 벡터를 이용하여 1차원 수평 역 변환을 수행하며, 각 4x4 블록의 제 1 열 내지 제 3 열은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 열은 수정된 베이직 벡터를 이용하여 1차원 수직 역 변환을 수행할 수 있으며, 1차원 수직 역 변환을 수행한 후 1차원 수평 역 변환을 수행하는 경우에는, 각 4x4 블록의 제 1 열은 수정된 베이직 벡터를 이용하고 각 4x4 블록의 제 2 열 내지 제 4 열은 기존 베이직 벡터를 이용하여 1차원 수직 역 변환을 수행하며, 각 4x4 블록의 제 1 행 내지 제 3 행은 기존 베이직 벡터를 이용하고 각 4x4 블록의 제 4 행은 수정된 베이직 벡터를 이용하여 1차원 수평 역 변환을 수행할 수 있다. 또한, 제 2 역 변환부(732)는 역 이산 코사인 변환을 이용하여 4x4 블록 단위로 주파수 계수를 역 변환하되, 기존 베이직 벡터를 사용할 수 있으며, 주파수 계수 중 일부의 주파수 계수와 각 복원된 임의 화소 중 일부의 화소를 이용하여 주파수 계수 중 나머지 주파수 계수를 예측할 수 있다.In addition, the second inverse transform unit 732 of the image encoding apparatus according to another embodiment of the present invention inverts the frequency coefficients in units of 4x4 blocks using inverse discrete cosine transform, and performs a one-dimensional inverse transform of the inverse discrete cosine transform The order of the one-dimensional inverse transformation directions can be determined in the reverse order of the order of the one-dimensional transformation directions of the second transformation unit 724. When the one-dimensional vertical inverse transform is performed after performing the one-dimensional horizontal inverse transform, the second inverse transform unit 732 uses the modified basic vector in the first row of each 4x4 block, The second to fourth rows perform a one-dimensional horizontal inverse transformation using the existing basic vector, and the first to third columns of each 4x4 block use the existing basic vector and the fourth column of each 4x4 block is modified Dimensional vertical inverse transformation can be performed using the basic vector, and in the case of performing the one-dimensional vertical inverse transformation after performing the one-dimensional vertical inverse transformation, the first column of each 4x4 block is transformed into the modified basic vector Dimensional vertical inverse transformation using the existing basic vector, and the first to third rows of each 4x4 block are generated by using the existing basic vector and each 4x4 block, The fourth row of < RTI ID = 0.0 > Using the emitter may perform a one-dimensional horizontal inverse transform. In addition, the second inverse transform unit 732 can inversely transform the frequency coefficients in units of 4x4 blocks using the inverse discrete cosine transform, and can use the existing basic vectors. The second inverse transform unit 732 transforms a part of the frequency coefficients, The remaining frequency coefficients among the frequency coefficients can be predicted by using a part of pixels.

또한, 본 발명의 다른 실시예에 따른 제 1 예측부(704)는 현재 매크로블록의 인접 화소들을 저역 통과 필터링을 수행하고 다운 샘플링한 화소들을 이용하여 임의 화소 블록을 예측할 수 있으며, 현재 매크로블록의 예측 모드에 따른 예측 방향과 동일한 예측 방향으로 예측할 수도 있다.In addition, the first predictor 704 according to another embodiment of the present invention may predict an arbitrary pixel block using pixels that are subjected to low-pass filtering and downsampled on the adjacent pixels of the current macroblock, It may be predicted in the same prediction direction as the prediction direction according to the prediction mode.

한편, 본 발명의 일 실시예에 따른 영상 부호화 장치와 본 발명의 다른 실시예에 따른 영상 부호화 장치에서, 제 2 역 변환부(732)는 주파수 계수 중 일부의 주파수 계수와 각 복원된 임의 화소 중 일부의 화소를 이용하여 주파수 계수 중 나머지 주파수 계수를 예측할 수 있으며, 이를 통해 수정된 베이직 벡터를 사용하지 않고 기존 베이직 벡터를 사용하여 역 DCT 변환하면서도 임의 화소를 나머지 화소와 독립적으로 역 변환하도록 할 수 있다.Meanwhile, in the image encoding apparatus according to the embodiment of the present invention and the image encoding apparatus according to the other embodiment of the present invention, the second inverse transform unit 732 transforms a part of the frequency coefficients, It is possible to predict the remaining frequency coefficients of the frequency coefficients using a part of the pixels and to invert the arbitrary pixel independently of the other pixels while performing inverse DCT transformation using the existing basic vector without using the modified basic vector have.

이와 같은 2차원 역 변환에서는 제 2 역 변환부(732)에서 수정된 베이직 벡터가 아닌 도 5에 도시한 DCT 역 변환 베이직 벡터 즉, 기존 베이직 벡터를 사용하여 2차원 변환한다. 역 변환된 후에는 양자화된 주파수 계수를 DC 성분의 주파수 계수의 위치에 대입하여 전송한다.In such a two-dimensional inverse transform, the second inverse transform unit 732 performs two-dimensional transform using the DCT inverse transformed basic vector shown in FIG. 5, that is, the existing basic vector, instead of the modified basic vector. After the inverse transformation, the quantized frequency coefficient is substituted for the frequency coefficient of the DC component and transmitted.

도 27 및 도 28은 본 발명의 일 실시예 및 다른 실시예에 따라 일부의 주파수 계수를 이용하여 나머지 주파수 계수를 예측하는 과정을 나타낸 예시도이다.FIGS. 27 and 28 illustrate a process of predicting remaining frequency coefficients using a part of frequency coefficients according to an embodiment of the present invention and another embodiment.

제 2 변환부(724)에서 수평 방향으로 먼저 1차원 변환한 후 수직 방향으로 1차원 변환한 경우, 제 2 역 변환부(732)는 수학식 6을 통해 DCP를 계산할 수 있다. 수학식 6은 도 5에 도시한 역 변환을 위한 기존 베이직 벡터를 이용하여 1차원 역 DCT 변환하기 위한 수학식이다. When the first transform unit 724 first transforms one-dimensional transforms in the horizontal direction and then vertically transforms one-dimensional transforms, the second inverse transform unit 732 can calculate DC P using Equation (6). Equation (6) is a mathematical expression for performing one-dimensional inverse DCT using the existing basic vector for inverse transformation shown in FIG.

(1)에 나타낸 DC00는 제 1 변환부(708)에서 변환된 주파수 계수이고 나머지 AC01~AC33의 주파수 계수들은 제 2 변환부(724)에서 변환된 후 주파수 계수들이고, 해당 서브블록의 복원된 임의 화소(Xi')가 (2)와 같다면, (3)과 같이 1번 내지 3번 열만을 세로 방향으로 1차원 역 DCT 변환을 수행하여 AC①, AC②, AC③를 구하고, (4)와 같이 AC①, AC②, AC③, 복원된 임의 화소(Xi')를 이용하여 DCP를 계산한다.DC 00 shown in equation (1) is a frequency coefficient transformed by the first transform unit 708, and the remaining AC 01 through AC 33 frequency coefficients are frequency coefficients after being transformed by the second transform unit 724, If the reconstructed arbitrary pixel X i 'is the same as (2), AC 1, AC 2, and AC 3 are obtained by performing one-dimensional inverse DCT on only the first through third columns in the vertical direction as shown in (3) ) calculates a DC P using AC①, AC②, AC③, the restored random pixels (X i '), such as.

Figure 112014033646292-pat00006
Figure 112014033646292-pat00006

수학식 6을 Coef①에 대해 정리하면, 수학식 7을 도출할 수 있다.Summarizing Equation (6) with respect to Coef (1), Equation (7) can be derived.

Figure 112014033646292-pat00007
Figure 112014033646292-pat00007

여기서, Coef②, Coef③, Coef④가 각각 도 27 및 도 28에서의 AC①, AC②, AC③이고, Coef①가 DCP이다.Here, Coef②, Coef③, and the Coef④ 27 and AC①, AC②, AC③ in Fig. 28, respectively, and the DC Coef① P.

이후, (5)와 같이 AC10, AC20, AC30과 DCp를 가지고 DC00p를 계산한다. DC00p를 계산하는 방법은 전술한 DCP를 계산하는 방법과 같다. 계산된 DC00p와 AC10, AC20, AC30를 이용하여, (6)과 같이 나머지 1번 열을 세로 방향으로 1차원 역 변환한다. 나머지 수평 방향의 1차원 역 변환도 도 5의 DCT 역변환 베이직 벡터 즉, 기존 베이직 벡터를 이용하여 (7)과 같이 역 변환하여 (8)과 같은 해당 서브블록의 복원된 화소가 출력된다. 이와 같은 방법을 사용하면 도 11과 같은 수정된 베이직 벡터를 이용할 때보다 AC 성분의 주파수 계수들의 값을 줄일 수 있다. 또한, 수정된 베이직 벡터가 아닌 기존 베이직 벡터를 이용하여 임의 화소를 서브블록의 나머지 화소 또는 나머지 화소의 주파수 계수들과 독립적으로 역 변환할 수 있다.Then, calculate DC 00 p with AC 10 , AC 20 , AC 30 and DCp as in (5). The method of calculating DC 00 p is the same as the method of calculating DC P described above. Using the calculated DC 00 p and AC 10 , AC 20 , and AC 30 , the remaining one column is subjected to one-dimensional inverse transformation in the vertical direction as shown in (6). The one-dimensional inverse transform of the other horizontal direction is also inversely transformed as shown in (7) using the DCT inverse basic vector of FIG. 5, that is, the existing basic vector, and the restored pixel of the corresponding sub-block as shown in (8) is output. By using such a method, the value of the frequency coefficients of the AC component can be reduced as compared with the case of using the modified basic vector as shown in FIG. Further, the arbitrary pixel can be inversely transformed independently of the frequency coefficients of the remaining pixels or the remaining pixels of the sub-block using the existing basic vector instead of the modified basic vector.

이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합되어 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 캐리어 웨이브 매체 등이 포함될 수 있다.While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments. That is, within the scope of the present invention, all of the components may be selectively coupled to one or more of them. In addition, although all of the components may be implemented as one independent hardware, some or all of the components may be selectively combined to perform a part or all of the functions in one or a plurality of hardware. As shown in FIG. The codes and code segments constituting the computer program may be easily deduced by those skilled in the art. Such a computer program can be stored in a computer-readable storage medium, readable and executed by a computer, thereby realizing an embodiment of the present invention. As the storage medium of the computer program, a magnetic recording medium, an optical recording medium, a carrier wave medium, or the like may be included.

또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재될 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥 상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.It is also to be understood that the terms such as " comprises, "" comprising," or "having ", as used herein, mean that a component can be implanted unless specifically stated to the contrary. But should be construed as including other elements. All terms, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Commonly used terms, such as predefined terms, should be interpreted to be consistent with the contextual meanings of the related art, and are not to be construed as ideal or overly formal, unless expressly defined to the contrary.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The foregoing description is merely illustrative of the technical idea of the present invention, and various changes and modifications may be made by those skilled in the art without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are intended to illustrate rather than limit the scope of the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The scope of protection of the present invention should be construed according to the following claims, and all technical ideas within the scope of equivalents should be construed as falling within the scope of the present invention.

이상에서 설명한 바와 같이 본 발명은 영상을 부호화하거나 복호화하는 장치 및 방법 분야에 적용되어, 현재 부호화하거나 복호화하고자 하는 블록의 화소를 인트라 예측할 때 예측의 정확도를 향상시켜 부호화 효율을 향상시키는 효과를 발생하는 매우 유용한 발명이다.
As described above, the present invention is applied to an apparatus and a method for encoding or decoding an image, and it is an object of the present invention to improve the accuracy of prediction when intraprediction of pixels of a block to be currently encoded or decoded, It is a very useful invention.

Claims (7)

현재블록을 서브블록 단위로 인트라 예측하는 방법에 있어서,
상기 현재블록의 인트라 예측 모드를 결정하는 예측 모드 결정 단계; 및
상기 현재블록을 구성하는 복수 개의 서브블록을 상기 결정된 현재블록의 인트라 예측 모드에 따라 순차적으로 복원하는 서브블록 복원 단계를 포함하되,
상기 서브블록 복원 단계는, 복원 대상 서브블록에 대하여,
상기 현재블록 내에서 상기 결정된 현재블록의 인트라 예측 모드에 따라 기 예측되어 복원된 주변 서브블록의 화소를 이용하여 예측 서브블록을 생성하는 단계;
상기 복원 대상 서브블록의 주파수 변환된 잔차 신호를 공간 영역으로 변환하여 잔차 서브블록을 생성하는 단계; 및
상기 예측 서브블록과 상기 잔차 서브블록을 합산하여 서브블록을 복원하는 단계를 포함하고,
상기 잔차 서브블록을 생성하는 단계는, 상기 주파수 변환된 잔차 신호를 공간 영역으로 변환하기 위해,
상기 주파수 변환된 잔차 신호의 각 열(column)에 대해 일차원 변환을 수행하는 단계; 및
상기 각 열에 대해 변환이 수행된 잔차 신호의 각 행(row)에 대해 일차원 변환을 수행하는 단계
를 포함하는 것을 특징으로 하는 인트라 예측 방법.
A method for intraprediction of a current block in units of subblocks,
A prediction mode determining step of determining an intra prediction mode of the current block; And
And restoring a plurality of subblocks constituting the current block sequentially according to an intra prediction mode of the determined current block,
Wherein, in the sub-block reconstructing step,
Generating predicted subblocks using pixels of neighboring subblocks predicted and restored according to an intra prediction mode of the determined current block in the current block;
Transforming the frequency-transformed residual signal of the restored sub-block into a spatial domain to generate residual sub-blocks; And
And summing the predicted sub-block and the residual sub-block to reconstruct the sub-block,
Wherein the generating of the residual sub-block comprises: transforming the frequency-
Performing one-dimensional transform on each column of the frequency-converted residual signal; And
Performing one-dimensional transform on each row of the transformed residual signal for each column;
The intra prediction method comprising:
제1항에 있어서,
상기 주변 서브블록은 상기 복원 대상 서브블록의 상단 또는 좌측에 위치하는 것을 특징으로 하는 인트라 예측 방법.
The method according to claim 1,
And the neighboring sub-blocks are located at the upper or left side of the restoration target sub-block.
삭제delete 삭제delete 제1항에 있어서,
상기 현재블록을 구성하는 복수 개의 서브블록은 상기 현재블록의 잔차 신호가 변환되는 변환 단위와 일치하는 것을 특징으로 하는 인트라 예측 방법
The method according to claim 1,
Wherein a plurality of subblocks constituting the current block coincide with a conversion unit in which a residual signal of the current block is transformed,
제1항에 있어서,
상기 인트라 예측 방향과 관련되는 복수 개의 인트라 예측 모드는 주변 서브블록의 화소를 선택적으로 조합하여 서브블록을 예측하기 위한 계산식을 각각 결정하는 것인 인트라 예측 방법.

The method according to claim 1,
Wherein a plurality of intra-prediction modes associated with the intra-prediction direction are determined by calculating a formula for predicting a sub-block by selectively combining pixels of neighboring sub-blocks.

삭제delete
KR1020140041990A 2014-04-08 2014-04-08 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock KR101464944B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140041990A KR101464944B1 (en) 2014-04-08 2014-04-08 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140041990A KR101464944B1 (en) 2014-04-08 2014-04-08 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020080088088A Division KR101432775B1 (en) 2008-09-08 2008-09-08 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR20140089348A Division KR101483495B1 (en) 2014-07-15 2014-07-15 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock

Publications (2)

Publication Number Publication Date
KR20140058468A KR20140058468A (en) 2014-05-14
KR101464944B1 true KR101464944B1 (en) 2014-11-27

Family

ID=50888777

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140041990A KR101464944B1 (en) 2014-04-08 2014-04-08 Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock

Country Status (1)

Country Link
KR (1) KR101464944B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080069069A (en) * 2007-01-22 2008-07-25 삼성전자주식회사 Method and apparatus for intra/inter prediction

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080069069A (en) * 2007-01-22 2008-07-25 삼성전자주식회사 Method and apparatus for intra/inter prediction

Also Published As

Publication number Publication date
KR20140058468A (en) 2014-05-14

Similar Documents

Publication Publication Date Title
KR101432775B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101888333B1 (en) Image Encoding/Decoding Method and Apparatus Using Deblocking Filtering
KR101444667B1 (en) Video Coding Method and Apparatus Using Bi-Direction Intra Prediction
KR101772046B1 (en) Video Encoding/Decoding Method and Apparatus for Intra-Predicting Using Filtered Value of Pixel According to Prediction Mode
KR101379187B1 (en) Image Encoding/Decoding Method and Apparatus Using Block Transformation
KR102164752B1 (en) Intra prediction apparatus
KR101444675B1 (en) Method and Apparatus for Encoding and Decoding Video
KR101739579B1 (en) Video Encoding/Decoding Method and Apparatus Using Unit-level Parallel Intra Prediction
KR20110028734A (en) High definition video encoding/decoding method and apparatus
KR20120012383A (en) Prediction block generating apparatus
KR101531186B1 (en) Video Encoding/Decoding Method and Apparatus by Using Selective Encoding
KR101369174B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101537767B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101483495B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101997599B1 (en) Method and Apparatus for Image Encoding/Decoding using Efficient Non-fixed Quantization
KR101582501B1 (en) Intra Prediction Method and Apparatus and Image Encoding/Decoding Method and Apparatus Using Same
KR101943425B1 (en) Method and Apparatus for Image Encoding/Decoding using Efficient Non-fixed Quantization
KR101534014B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101464944B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101464949B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101533434B1 (en) Intra Prediction Method and Apparatus and Image Encoding/Decoding Method and Apparatus Using Same
KR101575634B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101544379B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101379189B1 (en) Video Coding Method and Apparatus by Using Filtering Motion Compensation Frame
KR101487436B1 (en) Video Encoding/Decoding Method and Apparatus by Using Selective Encoding

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E902 Notification of reason for refusal
A107 Divisional application of patent
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20171102

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20181105

Year of fee payment: 5