KR20080084589A - Method and apparatus for encoding and decoding image in pixel domain - Google Patents

Method and apparatus for encoding and decoding image in pixel domain Download PDF

Info

Publication number
KR20080084589A
KR20080084589A KR1020080016061A KR20080016061A KR20080084589A KR 20080084589 A KR20080084589 A KR 20080084589A KR 1020080016061 A KR1020080016061 A KR 1020080016061A KR 20080016061 A KR20080016061 A KR 20080016061A KR 20080084589 A KR20080084589 A KR 20080084589A
Authority
KR
South Korea
Prior art keywords
block
residual block
residual
prediction
encoding
Prior art date
Application number
KR1020080016061A
Other languages
Korean (ko)
Other versions
KR100939358B1 (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 PCT/KR2008/001115 priority Critical patent/WO2008111744A1/en
Publication of KR20080084589A publication Critical patent/KR20080084589A/en
Application granted granted Critical
Publication of KR100939358B1 publication Critical patent/KR100939358B1/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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/124Quantisation
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A method and an apparatus for coding and decoding an image in a pixel domain are provided to allow an image decoding side to restore an image based on subtraction and addition of a pixel domain quickly and easily without a complicated inverse-transformation calculation. A prediction unit(210) generates a prediction block of a current block by using an intra-prediction or an inter-prediction. A subtracting unit(220) generates the first residual block by subtracting the generated prediction block from the current block. A residual block generating unit(230) loss-codes the first residual block in a frequency domain and decodes the coded first residual block to restore the second residual block of a pixel domain. A lossless coding unit(240) entropy-codes the restored second residual block.

Description

픽셀 도메인에서 영상을 부호화, 복호화하는 방법 및 장치{Method and apparatus for encoding and decoding image in pixel domain}Method and apparatus for encoding and decoding an image in a pixel domain {Method and apparatus for encoding and decoding image in pixel domain}

본 발명은 영상을 부호화, 복호화하는 방법 및 장치에 관한 것으로 보다 상세히는 영상을 복호화할 때에 주파수 도메인에서의 복잡한 연산을 수행하지 않도록 픽셀 도메인에서 영상을 부호화, 복호화하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for encoding and decoding an image, and more particularly, to a method and apparatus for encoding and decoding an image in a pixel domain such that a complex operation in the frequency domain is not performed when the image is decoded.

MPEG-1, MPEG-2, MPEG-4 H.264/MPEG-4 AVC(Advanced Video coding)와 같은 영상 압축 방식에서는 영상을 부호화하기 위해서 하나의 픽처를 복수의 블록으로 나눈다. 그런 다음, 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)을 이용해 각각의 블록을 부호화한다. In video compression schemes such as MPEG-1, MPEG-2 and MPEG-4 H.264 / MPEG-4 Advanced Video coding (AVC), a picture is divided into a plurality of blocks in order to encode an image. Then, each block is encoded using inter prediction or intra prediction.

인터 예측은 픽처들 사이의 시간적인 중복성을 제거하여 영상을 압축하는 방법으로 움직임 추정 부호화가 대표적인 예이다. 움직임 추정 부호화는 하나 이상의 참조 픽처를 이용하여 현재 픽처에 포함된 블록들 각각의 움직임 추정한다. 소정의 평가 함수를 이용하여 현재 블록과 가장 유사한 참조 블록을 하나 이상의 참조 픽처의 정해진 검색 범위에서 검색하고, 검색 결과에 기초해 현재 블록을 예측한다.Inter prediction is a method of compressing an image by removing temporal redundancy between pictures, and motion estimation coding is a representative example. Motion estimation coding estimates the motion of each of the blocks included in the current picture using one or more reference pictures. A predetermined evaluation function is used to search the reference block most similar to the current block in a given search range of one or more reference pictures, and predict the current block based on the search result.

인트라 예측은 현재 블록을 부호화하기 위해 참조 픽처를 참조하는 것이 아니라, 부호화하려는 블록과 공간적으로 인접한 이전에 부호화된 영역에 포함되어 있는 픽셀값을 이용한다. 이전에 부호화된 영역에 포함되어 있는 픽셀값에 기초해 소정의 방향으로 인트라 예측을 수행하여 현재 블록을 예측한다.Intra prediction does not refer to a reference picture to encode a current block, but uses a pixel value included in a previously encoded region spatially adjacent to a block to be encoded. An intra prediction is performed in a predetermined direction based on pixel values included in a previously encoded region to predict the current block.

도 1은 종래 기술에 따른 영상을 부호화하는 장치를 도시한다.1 illustrates an apparatus for encoding an image according to the prior art.

도 1을 참조하면, 종래 기술에 따른 영상 부호화 장치(100)는 움직임추정부(102), 움직임보상부(104), 인트라예측부(106), 변환부(108), 양자화부(110), 엔트로피코딩부(112), 역양자화부(114), 역변환부(116), 필터(118) 및 프레임메모리(120)를 포함한다. Referring to FIG. 1, the image encoding apparatus 100 according to the related art includes a motion estimation unit 102, a motion compensator 104, an intra prediction unit 106, a transform unit 108, a quantization unit 110, An entropy coding unit 112, an inverse quantization unit 114, an inverse transform unit 116, a filter 118, and a frame memory 120 are included.

움직임추정부(102)는 프레임메모리(120)에 저장되어 있는 적어도 하나의 참조 픽처를 참조하여 현재 블록의 움직임을 추정한다. 현재 블록과의 SAD(Sum of Absolute Difference) 값이 가장 작은 블록을 적어도 하나의 참조 픽처에서 검색한다. 검색 결과 현재 블록의 움직임 벡터가 생성된다. 움직임 보상부(104)는 움직임추정부(102)의 움직임 추정 결과에 기초해 현재 블록을 움직임 보상한다. 현재 블록의 예측 블록을 생성함에 있어 움직임 추정부(102)의 움직임 추정 결과를 이용한다. The motion estimation unit 102 estimates the motion of the current block by referring to at least one reference picture stored in the frame memory 120. At least one reference picture is searched for a block having the smallest sum of absolute difference (SAD) value with the current block. As a result of the search, a motion vector of the current block is generated. The motion compensation unit 104 performs motion compensation on the current block based on the motion estimation result of the motion estimation unit 102. In generating the prediction block of the current block, the motion estimation result of the motion estimation unit 102 is used.

인트라예측부(106)는 현재 블록에 인접한 이전에 부호화된 영역에 포함되어 있는 픽셀들을 이용해 현재 블록을 인트라 예측한다. 현재 블록에 인접한 이전에 부호화된 영역에 포함되어 있는 픽셀들의 픽셀 값에 기초해 소정의 방향으로 인트라 예측을 수행해 현재 블록의 예측 블록을 생성한다. The intra prediction unit 106 intra-predicts the current block by using pixels included in a previously encoded region adjacent to the current block. The prediction block of the current block is generated by performing intra prediction in a predetermined direction based on pixel values of pixels included in a previously encoded region adjacent to the current block.

움직임보상부(104) 또는 인트라예측부(106)에서 생성된 예측 블록에서 현재 블록을 감산하여 레지듀얼 블록(Dn)이 생성된다. 생성된 레지듀얼 블록은 변환부(108)에서 이산 코사인 변환(discrete cosine transform)된다. 이산 코사인 변환 결과 이산 코사인 계수들이 생성되고 생성된 이산 코사인 계수들은 양자화부(110)에서 양자화된다. 엔트로피코딩부(112)는 양자화부(110)에서 양자화된 이산 코사인 계수들을 엔트로피 부호화하여 현재 블록에 대한 데이터를 포함하고 있는 비트스트림을 생성한다. The residual block Dn is generated by subtracting the current block from the prediction block generated by the motion compensator 104 or the intra prediction unit 106. The generated residual block is discrete cosine transformed by the transform unit 108. Discrete cosine coefficients are generated as a result of the discrete cosine transform, and the generated cosine coefficients are quantized in the quantization unit 110. The entropy coding unit 112 entropy codes the quantized discrete cosine coefficients in the quantization unit 110 to generate a bitstream including data for the current block.

양자화된 이산코사인 계수들은 역양자화(114) 및 역변환부(116)에서 각각 역양자화 및 역이산 코사인 변환되어 레지듀얼 블록(D'n)으로 복원된다. 복원된 레지듀얼 블록은 변환부(108)에 입력되는 레지듀얼 블록(Dn)과는 상이한 블록이다. 양자화부(110)에서 이산 코사인 계수들을 양자화하는 과정에서 손실이 발생하게 되고, 이러한 손실이 발생한 계수들을 역양자화 및 역이산 코사인 변환하므로, 손실을 포함하고 있는 레지듀얼 블록(D'n)이 복원된다. 복원된 레지듀얼 블록을 예측 블록과 가산하여 현재 블록을 복원하고, 필터(118)는 복원된 현재 블록을 디블록킹 필터링하여 프레임메모리(120)에 저장한다. 복원된 현재 블록 또한 부호화되기 전의 현재 블록과는 상이한데, 이는 손실을 포함하고 있는 레지듀얼 블록을 예측 블록과 가산하여 현재 블록을 복원하기 때문이다.The quantized discrete cosine coefficients are inverse quantized and inverse discrete cosine transformed by the inverse quantization 114 and the inverse transform unit 116, respectively, to be restored to the residual block D'n. The restored residual block is a block different from the residual block Dn input to the converter 108. In the process of quantizing the discrete cosine coefficients in the quantization unit 110, a loss occurs, and the residual block D'n including the loss is restored because the coefficients in which the loss occurs are inverse quantized and inverse discrete cosine transform. do. The reconstructed residual block is added to the prediction block to reconstruct the current block, and the filter 118 deblocks and filters the reconstructed current block and stores it in the frame memory 120. The reconstructed current block is also different from the current block before being encoded because the residual block containing the loss is added to the prediction block to reconstruct the current block.

도 1에 도시된 종래 기술에 따른 영상 부호화 장치(100)는 영상을 이산 코사인 변환하여 주파수 도메인으로 변환한 다음 양자화하여 현재 블록을 손실 부호화한다. 주파수 도메인으로 변환한 다음 부호화를 수행하는 이유는 인간의 눈이 고 주파 성분에 둔감하고 저주파 성분에 민감하기 때문에 주파수 도메인으로 변환하여 보다 효율적으로 부호화하기 위함이다. 또한, 양자화를 통해 손실 부호화를 하는 이유는 무손실 부호화보다 손실 부호화하는 경우 비트율을 높일 수 있기 때문이다.The image encoding apparatus 100 according to the related art shown in FIG. 1 performs a discrete cosine transform on an image, transforms the image into a frequency domain, and then quantizes the lossy encoding of the current block. The reason why the encoding is performed after the conversion to the frequency domain is because the human eye is insensitive to high frequency components and sensitive to low frequency components. The reason why lossy coding is performed through quantization is that the bit rate can be increased when lossy coding is used rather than lossless coding.

그러나, 종래 기술에 따라 영상을 부호화, 복호화하면 이산 코사인 변환 등을 이용해 영상을 주파수 도메인에서 부호화, 복호화하기 위해 많은 연산을 수행한다. 따라서, 영상의 부호화, 복호화 속도가 느리고, 영상 처리에 소모되는 부호화 장치 또는 복호화 장치의 하드웨어 자원이 풍부해야 하는 단점이 있었다.However, when the image is encoded and decoded according to the prior art, many operations are performed to encode and decode the image in the frequency domain using discrete cosine transform. Therefore, there is a disadvantage that the encoding and decoding speed of an image is slow and the hardware resources of the encoding apparatus or the decoding apparatus consumed for image processing must be abundant.

본 발명이 이루고자 하는 기술적 과제는 주파수 도메인에서 영상을 손실 부호화하면서, 영상의 복호화를 빠르게 수행할 수 있는 영상 부호화, 복호화 방법 및 장치를 제공하는데 있고, 상기 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는데 있다.An object of the present invention is to provide an image encoding, decoding method and apparatus which can perform decoding of an image quickly while lossy encoding an image in a frequency domain, wherein a computer program for executing the method is recorded. It is to provide a recording medium that can be.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 영상 부호화 방법은 인트라 예측 또는 인터 예측을 이용해 현재 블록의 제1 레지듀얼 블록을 생성하는 단계; 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화하는 단계; 상기 부호화된 제1 레지듀얼 블록을 복호화하여 픽셀 도메인의 제2 레지듀얼 블록을 복원하는 단계; 및 상기 복원된 제2 레지듀얼 블록을 엔트로피 부호화하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method of encoding an image, the method including generating a first residual block of a current block by using intra prediction or inter prediction; Lossy coding the first residual block in the frequency domain; Reconstructing the second residual block of the pixel domain by decoding the encoded first residual block; And entropy encoding the reconstructed second residual block.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 엔트로피 부호화하는 단계는 상기 복원된 제2 레지듀얼 블록에 포함된 잔차값들을 각각 잔차값에 수직 또는 수평 방향으로 인접한 잔차값으로부터 예측하고, 예측 결과에 기초해 제3 레지듀얼 블록을 생성하는 단계; 및 상기 생성된 제3 레지듀얼 블록을 엔트로피 부호화하는 단계를 포함한다.According to a more preferred embodiment of the present invention, the step of entropy encoding is to predict the residual values included in the reconstructed second residual block from the residual values adjacent to the residual value in the vertical or horizontal direction, respectively, Generating a third residual block based on the result; And entropy encoding the generated third residual block.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 엔트로피 부호화하는 단계는 상기 제1 레지듀얼 블록의 잔차값들과 상기 제2 레지듀얼 블록의 잔차값들 을 비교하여 절대값의 크기가 작은 잔차값들만을 포함하는 제3 레지듀얼 블록을 생성하는 단계; 상기 제3 레지듀얼 블록에 포함된 잔차값들을 각각의 잔차값에 수직 또는 수평 방향으로 인접한 잔차값으로부터 예측하고, 예측 결과에 기초해 제4 레지듀얼 블록을 생성하는 단계; 및 상기 생성된 제4 레지듀얼 블록을 엔트로피 부호화하는 단계를 포함한다.According to a more preferred embodiment of the present invention, the entropy encoding may be performed by comparing the residual values of the first residual block with the residual values of the second residual block, so that only residual values having a small absolute value are present. Generating a third residual block comprising a; Predicting residual values included in the third residual block from residual values adjacent to each residual value in a vertical or horizontal direction, and generating a fourth residual block based on a prediction result; And entropy encoding the generated fourth residual block.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 영상 복호화 방법은 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 상기 레지듀얼 블록을 복원하는 단계; 및 상기 복원된 레지듀얼 블록에 기초하여 상기 현재 블록을 복원하는 단계를 포함하고, 상기 레지듀얼 블록에 대한 데이터는 상기 레지듀얼 블록의 부호화 시에 인트라 예측 또는 인터 예측을 이용해 상기 현재 블록의 제1 레지듀얼 블록을 생성하고, 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화한 후에 상기 손실 부호화된 제1 레지듀얼 블록을 복호화하여 복원된 제2 레지듀얼 블록에 대한 데이터인 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method of decoding an image, the method including: restoring the residual block by entropy decoding data of the residual block of the current block; And reconstructing the current block based on the reconstructed residual block, wherein data for the residual block is obtained by using intra prediction or inter prediction when encoding the residual block. After the residual block is generated, the first residual block is loss-coded in the frequency domain, and the first residual block is decoded to decode the first residual block.

상기 기술적 과제를 해결하기 위한 영상 부호화 장치는 인트라 예측 또는 인터 예측을 이용해 현재 블록의 예측 블록을 생성하는 예측부; 상기 현재 블록에서 생성된 예측 블록을 감산해 제1 레지듀얼 블록을 생성하는 감산부; 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화하고, 상기 부호화된 제1 레지듀얼 블록을 복호화하여 픽셀 도메인의 제2 레지듀얼 블록을 복원하는 레지듀얼블록생성부; 및 상기 복원된 제2 레지듀얼 블록을 엔트로피 부호화하는 무손실부호화부를 포함한다.According to an aspect of the present invention, there is provided an image encoding apparatus comprising: a prediction unit configured to generate a prediction block of a current block by using intra prediction or inter prediction; A subtraction unit configured to subtract the prediction block generated in the current block to generate a first residual block; A residual block generation unit for loss coding the first residual block in the frequency domain and reconstructing the second residual block of the pixel domain by decoding the encoded first residual block; And a lossless encoding unit entropy encoding the reconstructed second residual block.

상기 기술적 과제를 해결하기 위한 영상 복호화 장치는 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 상기 레지듀얼 블록을 복원하는 무손실복호화부; 및 상기 복원된 레지듀얼 블록에 기초하여 상기 현재 블록을 복원하는 복원부를 포함하고, 상기 레지듀얼 블록에 대한 데이터는 상기 레지듀얼 블록의 부호화 시에 인트라 예측 또는 인터 예측을 이용해 상기 현재 블록의 제1 레지듀얼 블록을 생성하고, 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화한 후에 상기 손실 부호화된 제1 레지듀얼 블록을 복호화하여 복원된 제2 레지듀얼 블록에 대한 데이터인 것을 특징으로 한다.An image decoding apparatus for solving the technical problem includes a lossless decoding unit for entropy decoding data of a residual block of a current block to restore the residual block; And a reconstruction unit reconstructing the current block based on the reconstructed residual block, wherein the data for the residual block is obtained by using intra prediction or inter prediction at the time of encoding the residual block. After the residual block is generated, the first residual block is loss-coded in the frequency domain, and the first residual block is decoded to decode the first residual block.

상기 기술적 과제를 해결하기 위해 본 발명은 상기된 영상 부호화, 복호화 방법 및 장치를 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.In order to solve the above technical problem, the present invention provides a computer-readable recording medium having recorded thereon a program for executing the above-described image encoding and decoding method and apparatus.

본 발명에 따르면, 영상을 주파수 도메인에서 손실 부호화하여 영상 부호화의 압축률을 높일 수 있다. 또한, 영상을 복호화하는 측은 주파수 도메인에서의 복잡한 역변환 연산없이 픽셀 도메인의 가감에 기초하여 손쉽게 영상을 복원할 수 있어 영상 복호화의 속도가 빨라진다. According to the present invention, the video may be loss encoded in the frequency domain to increase the compression rate of the video encoding. In addition, the image decoding side can easily reconstruct the image based on the subtraction of the pixel domain without complicated inverse transform operation in the frequency domain, thereby speeding up the image decoding.

이하에서는 도면을 참조하여 본 발명의 바람직한 실시예들을 보다 상세히 설명한다.Hereinafter, with reference to the drawings will be described in detail preferred embodiments of the present invention.

도 2는 본 발명의 일 실시예에 따른 영상을 부호화하는 장치를 도시한다.2 illustrates an apparatus for encoding an image according to an embodiment of the present invention.

도 2를 참조하면, 본 발명에 따른 영상 부호화 장치(200)는 예측부(210), 감산부(220), 레지듀얼블록생성부(230), 무손실부호화부(240), 가산부(250), 필터(260) 및 프레임메모리(270)를 포함한다. 이하 도 2를 포함한 본원 발명의 명세서에서는 입력 영상의 소정의 블록 즉, 현재 블록을 부호화하는 경우를 예로 들어 설명한다. Referring to FIG. 2, the image encoding apparatus 200 according to the present invention may include a predictor 210, a subtractor 220, a residual block generator 230, a lossless encoder 240, and an adder 250. And a filter 260 and a frame memory 270. Hereinafter, in the specification of the present invention including FIG. 2, a case in which a predetermined block of the input image, that is, a current block is encoded, will be described as an example.

예측부(210)는 인터 예측 또는 인트라 예측을 이용해 현재 블록을 예측한다. 적어도 하나의 참조 픽처를 검색하여 인터 예측하거나, 현재 블록에 인접한 이전에 부호화된 영역에 포함되어 있는 픽셀들을 이용해 인트라 예측하여 현재 블록의 예측 블록을 생성한다. 감산부(220)는 예측부(210)로부터 예측 블록을 수신하고, 현재 블록에서 예측 블록을 감산해 제1 레지듀얼 블록을 생성한다. The prediction unit 210 predicts the current block by using inter prediction or intra prediction. The prediction block of the current block is generated by inter prediction by searching for at least one reference picture or intra prediction using pixels included in a previously encoded region adjacent to the current block. The subtraction unit 220 receives the prediction block from the prediction unit 210 and subtracts the prediction block from the current block to generate a first residual block.

레지듀얼블록생성부(230)는 감산부(220)로부터 수신한 제1 레지듀얼 블록을 손실 부호화한다. 도 3을 참조하여 상세히 설명한다.The residual block generator 230 loss-codes the first residual block received from the subtractor 220. This will be described in detail with reference to FIG. 3.

도 3은 본 발명의 일 실시예에 따른 레지듀얼블록생성부(230)를 도시한다. 3 illustrates a residual block generation unit 230 according to an embodiment of the present invention.

도 3을 참조하면, 본 발명에 따른 레지듀얼블록생성부(230)는 변환부(232), 양자화부(234), 역양자화부(236) 및 역변환부(238)을 포함한다. Referring to FIG. 3, the residual block generator 230 according to the present invention includes a transformer 232, a quantizer 234, an inverse quantizer 236, and an inverse transformer 238.

변환부(232)는 제1 레지듀얼 블록을 주파수 도메인으로 변환한다. 바람직하게는 제1 레지듀얼 블록을 이산 코사인 변환하여 이산 코사인 계수들을 생성한다. 양자화부(234)는 변환부(232)에서 생성된 이산 코사인 계수들을 양자화한다. 양자화를 수행하는 과정에서 손실이 발생한다.The converter 232 converts the first residual block into the frequency domain. Preferably, the discrete residual cosine transforms the first residual block to generate discrete cosine coefficients. The quantization unit 234 quantizes the discrete cosine coefficients generated by the transform unit 232. Losses occur in the course of performing quantization.

역양자화부(236)는 양자화된 이산 코사인 계수들을 다시 역양자화하여 이산 코사인 계수들을 복원한다. 역변환부(238)는 복원된 이산 코사인 계수들에 기초해 역이산 코사인 변환을 수행하여 복원된 제1 레지듀얼 블록 즉, 제2 레지듀얼 블록을 생성한다. 양자화 과정에서 손실이 발생하였으므로, 제2 레지듀얼 블록은 감산부(220)에서 생성된 제1 레지듀얼 블록과 상이하다.The inverse quantization unit 236 dequantizes the quantized discrete cosine coefficients again to restore the discrete cosine coefficients. The inverse transform unit 238 generates a reconstructed first residual block, that is, a second residual block by performing inverse discrete cosine transform based on the reconstructed discrete cosine coefficients. Since a loss occurs in the quantization process, the second residual block is different from the first residual block generated by the subtractor 220.

무손실부호화부(240)는 레지듀얼블록생성부(230)에서 생성된 제2 레지듀얼 블록을 픽셀 도메인에서 그대로 엔트로피 부호화한다. 종래 기술에 따르면, 주파수 도메인의 양자화된 이산 코사인 계수들이 엔트로피 부호화되었으나, 본원 발명은 픽셀 도메인의 레지듀얼 블록의 잔차값들이 엔트로피 부호화된다.The lossless encoder 240 entropy encodes the second residual block generated by the residual block generator 230 in the pixel domain. According to the prior art, the quantized discrete cosine coefficients of the frequency domain are entropy coded, but the present invention entropy codes the residual values of the residual block of the pixel domain.

또한, 바람직하게는 무손실부호화부(240)는 제2 레지듀얼 블록을 그대로 엔트로피 부호화하지 아니하고, 소정의 제2 레지듀얼 블록을 소정의 전처리 과정을 거쳐 압축 부호화하기 좋은 형태로 변환하여 엔트로피 부호화할 수 있다. In addition, the lossless encoding unit 240 may entropy-encode the second residual block by converting the predetermined second residual block into a form suitable for compression encoding through a predetermined preprocessing process. have.

도 4는 본 발명의 일 실시예에 다른 무손실부호화부(240)를 도시한다.4 shows another lossless coding unit 240 according to an embodiment of the present invention.

도 4를 참조하면, 본 발명에 따른 무손실부호화부(240)는 전처리부(242) 및 엔트로피부호화부(244)를 포함한다. Referring to FIG. 4, the lossless encoding unit 240 according to the present invention includes a preprocessor 242 and an entropy encoding unit 244.

전처리부(242)는 레지듀얼블록생성부(230)에서 생성된 제2 레지듀얼 블록을 압축 부호화하기 쉬운 형태로 변환한다. 도 5 내지 6을 참조하여 상세히 설명한다. The preprocessor 242 converts the second residual block generated by the residual block generator 230 into a form that is easy to compression-code. This will be described in detail with reference to FIGS. 5 to 6.

(1) 블록 내 예측(1) intra-block prediction

도 5a 내지 5c는 본 발명의 일 실시예에 따른 블록 내 예측을 설명하기 위한 도면이다. 블록 내 예측은 제2 레지듀얼 블록에 포함된 잔차값들을 각각의 잔차값에 수직 또는 수평 방향으로 인접한 잔차값으로부터 예측하고, 예측 결과에 기초해 제3 레지듀얼 블록을 생성한다. 5A to 5C are diagrams for describing intra-block prediction according to an embodiment of the present invention. Intra-block prediction predicts residual values included in the second residual block from residual values adjacent to each residual value in a vertical or horizontal direction, and generates a third residual block based on the prediction result.

레지듀얼블록생성부(230)에서 생성된 제2 레지듀얼 블록이 4×4 블록인 경우를 예로 들어 설명한다. 도 5a는 제2 레지듀얼 블록을 도시하고, 도 5b는 수평 방향 블록 내 예측을 수행하여 생성된 제3 레지듀얼 블록을 도시하며, 도 5c는 수직 방향 블록 내 예측을 수행하여 생성된 제3 레지듀얼 블록을 도시한다. A case in which the second residual block generated by the residual block generation unit 230 is a 4x4 block will be described as an example. 5A illustrates a second residual block, FIG. 5B illustrates a third residual block generated by performing prediction in a horizontal block, and FIG. 5C illustrates a third residual generated by performing prediction in a vertical block. The dual block is shown.

수평 방향 블록 내 예측을 수행하는 방법을 먼저 설명한다. 도 5b 및 도 6a는 수평 방향 블록 내 예측을 수행하는 알고리즘에 대해 도시한다. 제2 레지듀얼 블록의 i 행, j 열의 잔차값이 r(i, j)이고, 제3 레지듀얼 블록의 i 행, j 열의 잔차값은 s(i, j)임을 가정한다.First, a method of performing prediction in a horizontal block will be described. 5B and 6A illustrate an algorithm for performing prediction in a horizontal block. It is assumed that the residual values of rows i and j of the second residual block are r (i, j), and the residual values of rows i and j of the third residual block are s (i, j).

도 6a를 참조하면, 도 5b의 s(1, 1)는 r(1, 1)과 동일하다. r(2, 1)은 r(1, 1)로부터 예측한다. 다시 말해, 제3 레지듀얼 블록의 s(2, 1) = r(2, 1) - r(1, 1)로 계산한다. 마찬가지로 1 열에 포함된 r(3, 1) 및 r(4, 1)을 예측하여 s(3, 1) = r(3, 1) - r(2, 1) 및 s(4, 1) = r(4, 1) - r(3, 1)을 계산한다. 그런 다음, 각각의 행에 포함된 2, 3 및 4열의 잔차값들을 수평 방향으로 예측한다. 1행을 예로 들어 설명하면Referring to FIG. 6A, s (1, 1) of FIG. 5B is the same as r (1, 1). r (2, 1) predicts from r (1, 1). In other words, it is calculated as s (2, 1) = r (2, 1)-r (1, 1) of the third residual block. Similarly, r (3, 1) and r (4, 1) in column 1 are predicted so that s (3, 1) = r (3, 1)-r (2, 1) and s (4, 1) = r (4, 1)-calculate r (3, 1) Then, the residual values of the 2, 3, and 4 columns included in each row are predicted in the horizontal direction. Using row 1 as an example

s(1, 2) = r(1, 2) - r(1, 1)s (1, 2) = r (1, 2)-r (1, 1)

s(1, 3) = r(1, 3) - r(1, 2)s (1, 3) = r (1, 3)-r (1, 2)

s(1, 4) = r(1, 4) - r(1, 3)s (1, 4) = r (1, 4)-r (1, 3)

과 같이 계산한다. 다른 행들에서도 1열의 잔차값들을 시작으로 다른 열의 잔차값들을 수평 방향으로 예측한다.Calculate as In other rows, the residual values of another column are predicted horizontally starting from the residual values of one column.

수직 방향 블록 내 예측을 수행하는 방법을 설명한다. 도 5c 및 도 6b는 수직 방향 블록 내 예측을 수행하는 알고리즘에 대해 도시한다.A method of performing prediction in a vertical block is described. 5C and 6B illustrate an algorithm for performing prediction in a vertical block.

도 6b를 참조하면, 도 5c의 s(1, 1)는 r(1, 1)과 동일하다. r(1, 2)은 r(1, 1)로부터 예측한다. 다시 말해, 제3 레지듀얼 블록의 s(1, 2) = r(1, 2) - r(1, 1)로 계산한다. 마찬가지로 1 행에 포함된 r(1, 3) 및 r(1, 4)을 예측하여 s(1, 3) = r(1, 3) - r(1, 2) 및 s(1, 4) = r(1, 4) - r(1, 3)을 계산한다. 그런 다음, 각각의 행에 포함된 2, 3 및 4행의 잔차값들을 수직 방향으로 예측한다. 1행을 예로 들어 설명하면Referring to FIG. 6B, s (1, 1) of FIG. 5C is the same as r (1, 1). r (1, 2) predicts from r (1, 1). In other words, it is calculated as s (1, 2) = r (1, 2)-r (1, 1) of the third residual block. Similarly, r (1, 3) and r (1, 4) contained in row 1 are predicted so that s (1, 3) = r (1, 3)-r (1, 2) and s (1, 4) = Calculate r (1, 4)-r (1, 3) Then, the residual values of rows 2, 3, and 4 included in each row are predicted in the vertical direction. Using row 1 as an example

s(2, 1) = r(2, 1) - r(1, 1)s (2, 1) = r (2, 1)-r (1, 1)

s(3, 1) = r(3, 1) - r(2, 1)s (3, 1) = r (3, 1)-r (2, 1)

s(4, 1) = r(4, 1) - r(3, 1)s (4, 1) = r (4, 1)-r (3, 1)

과 같이 계산한다. 다른 열들에서도 1행의 잔차값들을 시작으로 다른 행의 잔차값들을 수직 방향으로 예측한다.Calculate as In other columns, the residual values of one row are predicted in the vertical direction, starting with the residual values of one row.

(2) 최적화(2) optimization

전처리부(242)는 블록 내 예측뿐만 아니라 후술하는 최적화를 이용해 제2 레지듀얼 블록을 변형할 수 있다. 도 7 내지 8을 참조하여 상세히 설명한다. The preprocessor 242 may transform the second residual block using not only intra-block prediction but also optimization described below. This will be described in detail with reference to FIGS. 7 to 8.

도 7a는 감산부(220)에서 생성된 제1 레지듀얼 블록을 도시한다. 레지듀얼 블록생성부(230)에서 생성된 제2 레지듀얼 블록이 도 5a에 도시된 바와 같을 때 전처리부(242)는 제1 레지듀얼 블록과 제2 레지듀얼 블록을 조합하여 도 7b에 도시된 제4 레지듀얼 블록을 생성한다. 제1 레지듀얼 블록의 잔차값들과 제2 레지듀얼 블록의 잔차값을 비교하여 압축 부호화하기 쉬운 제4 레지듀얼 블록을 생성한다. 7A illustrates a first residual block generated by the subtraction unit 220. When the second residual block generated by the residual block generation unit 230 is as shown in FIG. 5A, the preprocessor 242 combines the first residual block and the second residual block as illustrated in FIG. 7B. Generate a fourth residual block. The residual values of the first residual block and the residual values of the second residual block are compared to generate a fourth residual block that is easy to compression-code.

도 8은 본 발명의 일 실시예에 따른 최적화의 알고리즘을 도시한다. 8 illustrates an algorithm of optimization in accordance with an embodiment of the present invention.

도 8을 참조하면, 도 7b의 제4 레지듀얼 블록은 제1 레지듀얼 블록의 잔차값들과 제2 레지듀얼 블록의 잔차값들을 1:1로 비교하여 생성된다. 제1 레지듀얼 블록의 잔차값인 r'(1, 1)과 제2 레지듀얼 블록의 잔차값인 r(1, 1)을 비교하여 절대값이 작은 잔차값을 선택한다. 레지듀얼 블록 내의 모든 잔차값을 1:1로 비교하여 절대값이 작은 잔차값들만을 선택한다. Referring to FIG. 8, the fourth residual block of FIG. 7B is generated by comparing the residual values of the first residual block and the residual values of the second residual block in a 1: 1 ratio. A residual value having a small absolute value is selected by comparing r '(1, 1), which is the residual value of the first residual block, with r (1, 1), which is the residual value of the second residual block. All residual values in the residual block are compared 1: 1 and only residual values having a small absolute value are selected.

도 7b에 도시된 제4 레지듀얼 블록에서는 1행 2열, 2행 1열, 2행 3열, 3행 2열, 3행 4열 및 4행 3열의 잔차값들은 제1 레지듀얼 블록의 잔차값들이고, 나머지 잔차값들은 제2 레지듀얼 블록의 잔차값들이다. In the fourth residual block illustrated in FIG. 7B, the residual values of 1 row 2 columns, 2 rows 1 columns, 2 rows 3 columns, 3 rows 2 columns, 3 rows 4 columns, and 4 rows 3 columns are residuals of the first residual block. Values, and the remaining residual values are residual values of the second residual block.

전처리부(242)는 전술한 블록 내 예측만을 수행하여 제2 레지듀얼 블록을 변형할 수도 있고, 최적화만을 수행하여 제2 레지듀얼 블록을 변형할 수도 있다. 또한, 블록 내 예측 및 최적화를 모두 이용하여 제2 레지듀얼 블록을 변형할 수도 있다. 다시 말해, 최적화를 먼저 수행하여 제4 레지듀얼 블록을 생성하고, 제4 레지듀얼 블록에 대하여 블록 내 예측을 수행하여 제3 레지듀얼 블록을 생성할 수 있다. The preprocessor 242 may transform the second residual block by performing only the prediction in the above-described block, or may transform the second residual block by performing optimization only. In addition, the second residual block may be modified using both intra-block prediction and optimization. In other words, optimization may be performed first to generate a fourth residual block, and intra-prediction may be performed on the fourth residual block to generate a third residual block.

엔트로피부호화부(244)는 전처리부(242)의 전처리 결과 생성된 제3 레지듀얼 블록 또는 제4 레지듀얼 블록을 엔트로피 부호화한다. 최적화만 수행한 경우에는 제4 레지듀얼 블록을 엔트로피 부호화하고, 블록 내 예측만 수행한 경우 및 최적화 이후에 블록 내 예측을 수행한 경우에는 제3 레지듀얼 블록을 엔트로피 부호화한다.The entropy encoding unit 244 entropy encodes the third residual block or the fourth residual block generated as a result of the preprocessing of the preprocessor 242. When only optimization is performed, entropy encoding is performed on the fourth residual block, and when only intra-block prediction is performed and when intra-block prediction is performed after optimization, the third residual block is entropy encoded.

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

도 9를 참조하면, 단계 910에서 본 발명에 따른 영상 부호화 장치는 인트라 예측 또는 인터 예측을 이용해 현재 블록의 제1 레지듀얼 블록을 생성한다. 인트라 예측 또는 인터 예측을 이용해 현재 블록의 예측 블록을 생성하고, 현재 블록에서 예측 블록을 감산하여 제1 레지듀얼 블록을 생성한다. 9, in operation 910, the apparatus for encoding an image generates a first residual block of a current block by using intra prediction or inter prediction. A prediction block of the current block is generated using intra prediction or inter prediction, and a first residual block is generated by subtracting the prediction block from the current block.

단계 920에서 영상 부호화 장치는 단계 910에서 생성된 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화한다. 제1 레지듀얼 블록을 이산 코사인 변환하여 이산 코사인 계수들을 생성하고, 생성된 이산 코사인 계수들을 양자화한다. In operation 920, the image encoding apparatus performs loss encoding on the first residual block generated in operation 910 in the frequency domain. Discrete cosine transforms the first residual block to generate discrete cosine coefficients and quantizes the generated discrete cosine coefficients.

단계 930에서 영상 부호화 장치는 양자화된 이산 코사인 계수들을 다시 역양자화, 역이산 코사인 변환하여 픽셀 도메인의 제2 레지듀얼 블록을 생성한다. 제2 레지듀얼 블록은 손실 부호화된 후에 다시 복호화된 블록이기 때문에 제1 레지듀얼 블록과는 상이한 손실을 포함하고 있는 블록이다. In operation 930, the image encoding apparatus inverse quantizes and inverse discrete cosine transforms the quantized discrete cosine coefficients to generate a second residual block of the pixel domain. The second residual block is a block that includes a loss different from that of the first residual block because the second residual block is a block decoded again after loss coding.

단계 940에서 영상 부호화 장치는 단계 930에서 복원된 제2 레지듀얼 블록을 엔트로피 부호화한다. 제2 레지듀얼 블록에 대해 소정의 전처리를 수행한 후에 엔 트로피 부호화할 수도 있다. 제2 레지듀얼 블록에 대하여 블록 내 예측을 수행하여 제3 레지듀얼 블록을 생성한 후에 제3 레지듀얼 블록을 엔트로피 부호화할 수도 있다. 또한, 제2 레지듀얼 블록을 도 7 내지 8에 도시된 알고리즘에 따라 최적화하여 제4 레지듀얼 블록을 생성하고, 제4 레지듀얼 블록을 엔트로피 부호화할 수도 있다. 최적화 및 블록 내 예측을 모두 수행하여 제2 레지듀얼 블록을 변형한 후에 엔트로피 부호화할 수도 있다.In operation 940, the image encoding apparatus entropy encodes the second residual block reconstructed in operation 930. Entropy encoding may be performed after the predetermined preprocessing is performed on the second residual block. After generating the third residual block by performing intra-block prediction on the second residual block, the third residual block may be entropy encoded. In addition, the second residual block may be optimized according to the algorithms shown in FIGS. 7 to 8 to generate a fourth residual block, and the fourth residual block may be entropy encoded. Entropy encoding may be performed after transforming the second residual block by performing both optimization and intra-block prediction.

도 10은 본 발명의 일 실시예에 따른 영상을 복호화하는 장치를 도시한다. 10 illustrates an apparatus for decoding an image according to an embodiment of the present invention.

도 10을 참조하면, 본 발명에 따른 영상 복호화 장치(1000)는 무손실복호화부(1010), 복원부(1020), 필터(1030), 프레임메모리(1040) 및 예측부(1050)를 포함한다. Referring to FIG. 10, the image decoding apparatus 1000 according to the present invention includes a lossless decoder 1010, a reconstructor 1020, a filter 1030, a frame memory 1040, and a predictor 1050.

무손실복호화부(1010)는 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 레지듀얼 블록을 복원한다. 도 2에 도시된 본 발명에 따른 영상 부호화 장치(200)에 의해 픽셀 도메인의 레지듀얼 블록을 엔트로피 부호화하여 생성된 데이터를 수신하고, 수신된 데이터를 엔트로피 복호화하여 레지듀얼 블록을 복원한다. The lossless decoding unit 1010 entropy-decodes the data of the residual block of the current block to restore the residual block. The image encoding apparatus 200 according to the present invention shown in FIG. 2 receives data generated by entropy encoding a residual block of a pixel domain, and entropy decodes the received data to restore the residual block.

도 11은 본 발명의 일 실시예에 따른 무손실복호화부(1010)를 도시한다. 11 shows a lossless decoding unit 1010 according to an embodiment of the present invention.

도 11을 참조하면, 본 발명에 따른 무손실 부호화부(1010)는 엔트로피복호화부(1012) 및 후처리부(1014)를 포함한다. 엔트로피복호화부(1012)는 현재 블록의 레지듀얼 블록에 대한 데이터를 수신하여 엔트로피 복호화한다. 엔트로피 복호화 결과 도 5b 및 5c와 관련하여 전술한 제3 레지듀얼 블록 또는 도 7b와 관련하여 전 술한 제4 레지듀얼 블록이 복원된다. Referring to FIG. 11, a lossless encoding unit 1010 according to the present invention includes an entropy decoding unit 1012 and a post processing unit 1014. The entropy decoding unit 1012 receives entropy decoding data for the residual block of the current block. As a result of entropy decoding, the third residual block described above with reference to FIGS. 5B and 5C or the fourth residual block described above with reference to FIG. 7B is restored.

도 7a 및 7b와 관련하여 전술한 최적화만 수행하여 생성된 제4 레지듀얼 블록의 경우에는 제4 레지듀얼 블록이 그대로 현재 블록의 레지듀얼 블록이 별다른 후처리를 수행할 필요가 없다. 그러나, 블록 내 예측을 수행하여 생성된 제3 레지듀얼 블록의 경우에는 별도의 후처리 과정을 거쳐야 한다. 도 12a 및 12b를 참조하여 상세히 설명한다. In the case of the fourth residual block generated by performing only the above-described optimization with reference to FIGS. 7A and 7B, the residual block of the current block does not need to perform post-processing. However, in the case of the third residual block generated by performing intra-block prediction, a separate post-processing process is required. This will be described in detail with reference to FIGS. 12A and 12B.

도 12a는 수평 방향의 블록 내 예측을 이용해 레지듀얼 블록을 복원하는 알고리즘을 도시한다. 엔트로피복호화부(1012)에서 복호화된 제3 레지듀얼 블록이 도 5b의 수평 방향의 블록 내 예측을 이용해 전처리된 블록이라면, 도 5b의 수평 방향의 블록 내 예측과 대칭되는 동일한 방법을 이용해 후처리하여 현재 블록의 레지듀얼 블록을 복원할 수 있다.12A illustrates an algorithm for reconstructing a residual block using intra-block prediction in the horizontal direction. If the third residual block decoded by the entropy decoding unit 1012 is a block preprocessed using the intra-block prediction in the horizontal direction of FIG. 5B, the third residual block is post-processed using the same method that is symmetric to the intra-block prediction in the horizontal direction of FIG. 5B. The residual block of the current block can be restored.

이를 위해 레지듀얼 블록의 i 행, j 열의 잔차값 r(i, j)는 제3 레지듀얼 블록의 잔차값 s(i, j)로부터 다음과 같이 계산된다. 먼저, r(1, 1) = s(1, 1)이다. 그런 다음 r(2, 1) = s(2, 1) + r(1, 1)에 의해 계산된다. 마찬가지로 r(3, 1) 및 r(4, 1)을 복원한다. 모든 행의 1열의 잔차값들이 복원되면, 나머지 잔차값들은 수평 방향의 블록 내 예측을 이용해 복원한다. 1행을 예로 들어 설명하면,To this end, the residual value r (i, j) of row i and column j of the residual block is calculated as follows from the residual value s (i, j) of the third residual block. First, r (1, 1) = s (1, 1). Then it is calculated by r (2, 1) = s (2, 1) + r (1, 1). Similarly, r (3, 1) and r (4, 1) are restored. When the residual values of the first column of every row are restored, the remaining residual values are restored using the intra-block prediction in the horizontal direction. Using line 1 as an example,

r(1, 2) = s(1, 2) + r(1, 1)r (1, 2) = s (1, 2) + r (1, 1)

r(1, 3) = s(1, 3) + r(1, 2)r (1, 3) = s (1, 3) + r (1, 2)

r(1, 4) = s(1, 4) + r(1, 4)r (1, 4) = s (1, 4) + r (1, 4)

에 의해 나머지 잔차값들을 복원할 수 있다.It is possible to restore the remaining residual values by.

도 12b는 수직 방향의 블록 내 예측을 이용해 레지듀얼 블록을 복원하는 알고리즘을 도시한다. 엔트로피복호화부(1012)에서 복호화된 제3 레지듀얼 블록이 도 5b의 수직 방향의 블록 내 예측을 이용해 전처리된 블록이라면, 도 5b의 수직 방향의 블록 내 예측과 대칭되는 동일한 방법을 이용해 후처리하여 현재 블록의 레지듀얼 블록을 복원할 수 있다.12B illustrates an algorithm for reconstructing a residual block using intra-block prediction in the vertical direction. If the third residual block decoded by the entropy decoding unit 1012 is a block preprocessed using the intra-block prediction in the vertical direction of FIG. 5B, postprocessing using the same method that is symmetric to the intra-block prediction in the vertical direction of FIG. 5B. The residual block of the current block can be restored.

이를 위해 레지듀얼 블록의 i 행, j 열의 잔차값 r(i, j)은 제3 레지듀얼 블록의 잔차값 s(i, j)로부터 다음과 같이 계산된다. 먼저, r(1, 1) = s(1, 1)이다. 그런 다음 r(1, 2) = s(1, 2) + r(1, 1)에 의해 계산된다. 마찬가지로 r(1, 3) 및 r(1, 4)을 복원한다. 모든 열의 1행의 잔차값들이 복원되면, 나머지 잔차값들은 수직 방향의 블록 내 예측을 이용해 복원한다. 1열을 예로 들어 설명하면,To this end, the residual value r (i, j) of row i and column j of the residual block is calculated as follows from the residual value s (i, j) of the third residual block. First, r (1, 1) = s (1, 1). Then it is calculated by r (1, 2) = s (1, 2) + r (1, 1). Similarly, r (1, 3) and r (1, 4) are restored. When the residual values of one row of all columns are restored, the remaining residual values are restored using intra-block prediction in the vertical direction. Using column 1 as an example,

r(2, 1) = s(2, 1) + r(1, 1)r (2, 1) = s (2, 1) + r (1, 1)

r(3, 1) = s(3, 1) + r(2, 1)r (3, 1) = s (3, 1) + r (2, 1)

r(4, 1) = s(4, 1) + r(3, 1)r (4, 1) = s (4, 1) + r (3, 1)

에 의해 나머지 잔차값들을 복원할 수 있다.It is possible to restore the remaining residual values by.

다시 도 10을 참조하면, 복원부(1020)는 무손실부호화부(1010)에서 엔트로피 부호화 및 후처리하여 생성한 현재 블록의 레지듀얼 블록에 기초해 현재 블록을 복원한다. 복원부(1020)는 예측부(1050)에서 인트라 예측 또는 인터 예측을 수행하여 생성한 현재 블록의 예측 블록을 레지듀얼 블록과 가산하여 현재 블록을 복원한다. Referring back to FIG. 10, the reconstructor 1020 reconstructs the current block based on the residual block of the current block generated by entropy encoding and post-processing by the lossless encoding unit 1010. The reconstructor 1020 reconstructs the current block by adding the prediction block of the current block generated by performing the intra prediction or the inter prediction by the prediction unit 1050 to the residual block.

복원된 현재 블록은 필터(1030)에서 디블록킹 필터링되고, 디블록킹 필터링 된 현재 블록은 다음 픽처 또는 다음 블록의 예측을 위해 프레임메모리(1040)에 저장된다.The reconstructed current block is deblocked filtered in the filter 1030, and the deblocking filtered current block is stored in the frame memory 1040 for prediction of the next picture or the next block.

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

도 13을 참조하면 단계 1310에서 본 발명에 따른 영상 복호화 장치는 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 레지듀얼 블록을 복원한다. 본 발명에 따른 영상 부호화 방법에 의해 픽셀 도메인의 레지듀얼 블록을 엔트로피 부호화하여 생성된 데이터를 수신하고, 수신된 데이터를 엔트로피 복호화하여 레지듀얼 블록을 복원한다. 블록 내 예측을 수행하여 생성된 제3 레지듀얼 블록의 경우에는 별도의 후처리 과정을 거쳐야 한다. 즉, 도 12a 및 12b와 관련하여 전술한 수평 방향의 블록 내 예측 또는 수직 방향의 블록 내 예측을 이용해 후처리하여야 한다. 후처리 결과 제3 레지듀얼 블록으로부터 현재 블록의 레지듀얼 블록이 복원된다.Referring to FIG. 13, in operation 1310, the image decoding apparatus according to the present invention entropy-decodes data for a residual block of a current block to reconstruct the residual block. The image encoding method according to the present invention receives data generated by entropy encoding a residual block of a pixel domain, and entropy decodes the received data to restore the residual block. In the case of the third residual block generated by performing intra-block prediction, a separate post-processing process is required. That is, it should be post-processed using the intra-block prediction in the horizontal direction or the intra-block prediction in the vertical direction described above with reference to FIGS. 12A and 12B. As a result of the post-processing, the residual block of the current block is restored from the third residual block.

단계 1320에서 영상 복호화 장치는 단계 1310에서 복원된 레지듀얼 블록에 기초해 현재 블록을 복원한다. 인트라 예측 또는 인터 예측을 수행하여 현재 블록의 예측 블록을 생성하고, 생성된 예측 블록을 단계 1310에서 복원된 레지듀얼 블록과 가산하여 현재 블록을 복원한다. In operation 1320, the image decoding apparatus restores the current block based on the residual block reconstructed in operation 1310. The prediction block of the current block is generated by performing intra prediction or inter prediction, and the generated prediction block is added to the residual block reconstructed in step 1310 to recover the current block.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다. 또한, 본 발명에 따른 시스템은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.As described above, although the present invention has been described by way of limited embodiments and drawings, the present invention is not limited to the above-described embodiments, which can be variously modified and modified by those skilled in the art to which the present invention pertains. Modifications are possible. Accordingly, the spirit of the invention should be understood only by the claims set forth below, and all equivalent or equivalent modifications will fall within the scope of the invention. In addition, the system according to the present invention can be embodied as computer readable codes on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of the recording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like, and also include a carrier wave (for example, transmission through the Internet). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

도 1은 종래 기술에 따른 영상을 부호화하는 장치를 도시한다.1 illustrates an apparatus for encoding an image according to the prior art.

도 2는 본 발명의 일 실시예에 따른 영상을 부호화하는 장치를 도시한다.2 illustrates an apparatus for encoding an image according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따른 레지듀얼 블록 생성부를 도시한다.3 illustrates a residual block generator according to an embodiment of the present invention.

도 4는 본 발명의 일 실시예에 다른 무손실 부호화부를 도시한다.4 shows a lossless coding unit according to an embodiment of the present invention.

도 5a 내지 5c는 본 발명의 일 실시예에 따른 블록 내 예측을 도시한다.5A through 5C illustrate intra-block prediction according to an embodiment of the present invention.

도 6a 내지 6b는 본 발명의 일 실시예에 따른 부호화 장치의 블록 내 예측의 알고리즘을 도시한다.6A to 6B illustrate an algorithm for intrablock prediction of an encoding apparatus according to an embodiment of the present invention.

도 7a 내지 7b는 본 발명의 일 실시예에 따른 최적화를 도시한다.7A-7B illustrate optimization in accordance with one embodiment of the present invention.

도 8은 본 발명의 일 실시예에 따른 최적화의 알고리즘을 도시한다.8 illustrates an algorithm of optimization in accordance with an embodiment of the present invention.

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

도 10은 본 발명의 일 실시예에 따른 영상을 복호화하는 장치를 도시한다. 10 illustrates an apparatus for decoding an image according to an embodiment of the present invention.

도 11은 본 발명의 일 실시예에 따른 무손실 복호화부를 도시한다. 11 illustrates a lossless decoder according to an embodiment of the present invention.

도 12a 내지 12b는 본 발명의 일 실시예에 따른 복호화 장치의 블록 내 예측의 알고리즘을 도시한다.12A to 12B illustrate algorithms for intra-block prediction of a decoding apparatus according to an embodiment of the present invention.

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

Claims (9)

영상 부호화 방법에 있어서,In the video encoding method, 인트라 예측 또는 인터 예측을 이용해 현재 블록의 제1 레지듀얼 블록을 생성하는 단계;Generating a first residual block of the current block using intra prediction or inter prediction; 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화하는 단계;Lossy coding the first residual block in the frequency domain; 상기 부호화된 제1 레지듀얼 블록을 복호화하여 픽셀 도메인의 제2 레지듀얼 블록을 복원하는 단계; 및Reconstructing the second residual block of the pixel domain by decoding the encoded first residual block; And 상기 복원된 제2 레지듀얼 블록을 엔트로피 부호화하는 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법.And entropy encoding the reconstructed second residual block. 제 1 항에 있어서, 상기 손실 부호화하는 단계는The method of claim 1, wherein the lossy coding is 상기 제1 레지듀얼 블록을 이산 코사인 변환(discrete cosine transform)하여 이산 코사인 계수들을 생성하는 단계; 및Generating discrete cosine coefficients by discrete cosine transforming the first residual block; And 상기 생성된 이산 코사인 계수들을 양자화하는 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법.And quantizing the generated discrete cosine coefficients. 제 2 항에 있어서, 상기 엔트로피 부호화하는 단계는The method of claim 2, wherein the entropy encoding is 상기 복원된 제2 레지듀얼 블록에 포함된 잔차값들을 각각 잔차값에 수직 또는 수평 방향으로 인접한 잔차값으로부터 예측하고, 예측 결과에 기초해 제3 레지 듀얼 블록을 생성하는 단계; 및Predicting residual values included in the reconstructed second residual block from residual values adjacent to the residual value in a vertical or horizontal direction, respectively, and generating a third residual block based on a prediction result; And 상기 생성된 제3 레지듀얼 블록을 엔트로피 부호화하는 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법.And entropy encoding the generated third residual block. 제 2 항에 있어서, 상기 엔트로피 부호화하는 단계는The method of claim 2, wherein the entropy encoding is 상기 제1 레지듀얼 블록의 잔차값들과 상기 제2 레지듀얼 블록의 잔차값들을 비교하여 절대값의 크기가 작은 잔차값들만을 포함하는 제4 레지듀얼 블록을 생성하는 단계;Comparing the residual values of the first residual block with the residual values of the second residual block to generate a fourth residual block including only residual values having a small absolute value; 상기 제4 레지듀얼 블록에 포함된 잔차값들을 각각의 잔차값에 수직 또는 수평 방향으로 인접한 잔차값으로부터 예측하고, 예측 결과에 기초해 제3 레지듀얼 블록을 생성하는 단계; 및Predicting residual values included in the fourth residual block from residual values adjacent to each residual value in a vertical or horizontal direction, and generating a third residual block based on a prediction result; And 상기 생성된 제3 레지듀얼 블록을 엔트로피 부호화하는 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법.And entropy encoding the generated third residual block. 영상 복호화 방법에 있어서,In the video decoding method, 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 상기 레지듀얼 블록을 복원하는 단계; 및Restoring the residual block by entropy decoding data of the residual block of the current block; And 상기 복원된 레지듀얼 블록에 기초하여 상기 현재 블록을 복원하는 단계를 포함하고,Restoring the current block based on the restored residual block; 상기 레지듀얼 블록에 대한 데이터는 상기 레지듀얼 블록의 부호화 시에 인 트라 예측 또는 인터 예측을 이용해 상기 현재 블록의 제1 레지듀얼 블록을 생성하고, 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화한 후에 상기 손실 부호화된 제1 레지듀얼 블록을 복호화하여 복원된 제2 레지듀얼 블록에 대한 데이터인 것을 특징으로 하는 영상 복호화 방법.Data for the residual block is generated by intra prediction or inter prediction at the time of encoding the residual block, generating a first residual block of the current block, and loss-coding the first residual block in the frequency domain. And data for the second residual block which is later decoded by decoding the lossy coded first residual block. 제 5 항에 있어서, 상기 복원하는 단계는The method of claim 5, wherein the restoring step 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 제3 레지듀얼 블록의 잔차값들을 복원하는 단계;Restoring residual values of the third residual block by entropy decoding data for the residual block of the current block; 상기 제3 레지듀얼 블록의 잔차값들 및 상기 제2 레지듀얼 블록에 포함된 잔차값들 각각에 수직 또는 수평 방향의 인접한 잔차값으로부터 예측된 예측 잔차값을 이용해 상기 제2 레지듀얼 블록에 포함된 잔차값들을 복원하는 단계를 포함하는 것을 특징으로 하는 영상 복호화 방법.The residual values of the third residual block and the residual values included in the second residual block are included in the second residual block using predicted residual values predicted from adjacent residual values in a vertical or horizontal direction. And restoring the residual values. 영상 부호화 장치에 있어서,In the video encoding apparatus, 인트라 예측 또는 인터 예측을 이용해 현재 블록의 예측 블록을 생성하는 예측부;A prediction unit generating a prediction block of the current block by using intra prediction or inter prediction; 상기 현재 블록에서 생성된 예측 블록을 감산해 제1 레지듀얼 블록을 생성하는 감산부;A subtraction unit configured to subtract the prediction block generated in the current block to generate a first residual block; 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화하고, 상기 부호화된 제1 레지듀얼 블록을 복호화하여 픽셀 도메인의 제2 레지듀얼 블록을 복원하는 레지듀얼블록생성부; 및A residual block generation unit for loss coding the first residual block in the frequency domain and reconstructing the second residual block of the pixel domain by decoding the encoded first residual block; And 상기 복원된 제2 레지듀얼 블록을 엔트로피 부호화하는 무손실부호화부를 포함하는 것을 특징으로 하는 영상 부호화 장치.And a lossless encoding unit for entropy encoding the reconstructed second residual block. 영상 복호화 장치에 있어서,In the video decoding apparatus, 현재 블록의 레지듀얼 블록에 대한 데이터를 엔트로피 복호화하여 상기 레지듀얼 블록을 복원하는 무손실복호화부; 및A lossless decoding unit entropy-decoding the data of the residual block of the current block to restore the residual block; And 상기 복원된 레지듀얼 블록에 기초하여 상기 현재 블록을 복원하는 복원부를 포함하고,A reconstruction unit reconstructing the current block based on the reconstructed residual block, 상기 레지듀얼 블록에 대한 데이터는 상기 레지듀얼 블록의 부호화 시에 인트라 예측 또는 인터 예측을 이용해 상기 현재 블록의 제1 레지듀얼 블록을 생성하고, 상기 제1 레지듀얼 블록을 주파수 도메인에서 손실 부호화한 후에 상기 손실 부호화된 제1 레지듀얼 블록을 복호화하여 복원된 제2 레지듀얼 블록에 대한 데이터인 것을 특징으로 하는 영상 복호화 장치.The data for the residual block is generated by intra prediction or inter prediction at the time of encoding the residual block, and generates a first residual block of the current block, and after loss coding the first residual block in the frequency domain. And data for a second residual block reconstructed by decoding the lossy coded first residual block. 제 1 항 내지 제 6 항 중 어느 한 항의 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program for executing the method of any one of claims 1 to 6.
KR1020080016061A 2007-03-13 2008-02-22 Method and apparatus for encoding and decoding image in pixel domain KR100939358B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2008/001115 WO2008111744A1 (en) 2007-03-13 2008-02-26 Method and apparatus for encoding and decoding image in pixel domain

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020070024266 2007-03-13
KR20070024266 2007-03-13

Publications (2)

Publication Number Publication Date
KR20080084589A true KR20080084589A (en) 2008-09-19
KR100939358B1 KR100939358B1 (en) 2010-01-29

Family

ID=40024867

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080016061A KR100939358B1 (en) 2007-03-13 2008-02-22 Method and apparatus for encoding and decoding image in pixel domain

Country Status (1)

Country Link
KR (1) KR100939358B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014107072A1 (en) * 2013-01-04 2014-07-10 삼성전자 주식회사 Lossless-coding-mode video encoding method and device, and decoding method and device
KR101431463B1 (en) * 2012-07-11 2014-08-22 세종대학교산학협력단 Apparatus for lossless video coding/decoding and method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8054882B2 (en) 2005-05-13 2011-11-08 Streaming Networks (Pvt.) Ltd. Method and system for providing bi-directionally predicted video coding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101431463B1 (en) * 2012-07-11 2014-08-22 세종대학교산학협력단 Apparatus for lossless video coding/decoding and method thereof
WO2014107072A1 (en) * 2013-01-04 2014-07-10 삼성전자 주식회사 Lossless-coding-mode video encoding method and device, and decoding method and device

Also Published As

Publication number Publication date
KR100939358B1 (en) 2010-01-29

Similar Documents

Publication Publication Date Title
US20220303583A1 (en) Video coding using constructed reference frames
KR101830352B1 (en) Method and Apparatus Video Encoding and Decoding using Skip Mode
KR101460608B1 (en) Method and apparatus for encoding and decoding image usging filtered prediction block
KR101418096B1 (en) Video Coding Method and Apparatus Using Weighted Prediction
KR20090095012A (en) Method and apparatus for encoding and decoding image using consecutive motion estimation
EP1571850A2 (en) Apparatus and method for encoding and decoding image containing grayscale alpha channel image
US9392280B1 (en) Apparatus and method for using an alternate reference frame to decode a video frame
KR20090034697A (en) Method and apparatus for inter prediction encoding/decoding using sub-pixel motion estimation
US8781004B1 (en) System and method for encoding video using variable loop filter
KR20080073157A (en) Method and apparatus for encoding and decoding based on inter prediction
KR20090097689A (en) Method and apparatus of encoding/decoding image based on intra prediction
KR20080090936A (en) Method and apparatus for encoding and decoding image using modification of residual block
KR101375667B1 (en) Method and apparatus for Video encoding and decoding
KR101375669B1 (en) Method and apparatus for encoding/decoding image base on inter prediction
KR101379190B1 (en) Adaptive Resolution Based Video Encoding/Decoding Method and Apparatus
KR20090098214A (en) Method and apparatus for video encoding and decoding
KR20120015495A (en) Method and apparatus for encoding/decoding of video data capable of skipping filtering mode
KR20090095011A (en) Method and apparatus for Video encoding and decoding
KR101449683B1 (en) Motion Vector Coding Method and Apparatus by Using Motion Vector Resolution Restriction and Video Coding Method and Apparatus Using Same
KR100928325B1 (en) Image encoding and decoding method and apparatus
KR20110090841A (en) Apparatus and method for encoding/decoding of video using weighted prediction
KR101377529B1 (en) Video Coding and Decoding Method and Apparatus Using Adaptive Motion Vector Coding/Encoding
KR101432779B1 (en) Video Coding Method and Apparatus by Using Motion Compensation Frame Selective Filtering and Inter Prediction Method and Apparatus Therefor
KR100939358B1 (en) Method and apparatus for encoding and decoding image in pixel domain
KR20100019088A (en) Inter prediction apparatus and video encoding/decoding apparatus and method using same

Legal Events

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

Payment date: 20121203

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20131205

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee