KR20140104404A - Method and apparatus for encoding and decoding image data - Google Patents

Method and apparatus for encoding and decoding image data Download PDF

Info

Publication number
KR20140104404A
KR20140104404A KR1020140101796A KR20140101796A KR20140104404A KR 20140104404 A KR20140104404 A KR 20140104404A KR 1020140101796 A KR1020140101796 A KR 1020140101796A KR 20140101796 A KR20140101796 A KR 20140101796A KR 20140104404 A KR20140104404 A KR 20140104404A
Authority
KR
South Korea
Prior art keywords
binarized
binarization
inverse
coefficient
coefficients
Prior art date
Application number
KR1020140101796A
Other languages
Korean (ko)
Other versions
KR101573334B1 (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 KR1020140101796A priority Critical patent/KR101573334B1/en
Publication of KR20140104404A publication Critical patent/KR20140104404A/en
Application granted granted Critical
Publication of KR101573334B1 publication Critical patent/KR101573334B1/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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]

Landscapes

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

Abstract

The present invention relates to a method and an apparatus for encoding entropy of image data. The entropy encoding method according to the present invention binarizes coefficients of frequency areas generated by converting a residual block of a current block into frequency areas by applying different binarization methods, and adaptively binarizes coefficients according to the magnitudes of the frequencies of the coefficients by binary arithmetic encoding the binarized coefficients, thereby improving the compression rate of image data compression.

Description

영상 데이터의 엔트로피 부호화, 복호화 방법 및 장치{Method and apparatus for encoding and decoding image data}TECHNICAL FIELD [0001] The present invention relates to a method and apparatus for entropy encoding and decoding image data,

본 발명은 영상 데이터의 엔트로피 부호화, 복호화 방법 및 장치에 관한 것으로, 보다 상세히는 현재 블록의 레지듀얼 블록의 이산 코사인 변환 계수들을 보다 효율적으로 이진화하여 엔트로피 부호화, 복호화하기 위한 방법 및 장치에 관한 것이다. The present invention relates to a method and apparatus for entropy encoding and decoding image data, and more particularly, to a method and apparatus for efficiently binarizing discrete cosine transform coefficients of a residual block of a current block for entropy encoding and decoding.

MPEG-1, MPEG-2, MPEG-4 H.264/MPEG-4 AVC(Advanced Video coding)와 같은 영상 압축 방식에서는 영상을 부호화하기 위해서 하나의 픽처(picture)를 소정의 영상 처리 단위 예를 들어, 매크로 블록으로 나눈다. 그리고, 인터 예측(inter prediction) 및 인트라 예측(intra prediction)을 이용해 각각의 매크로 블록을 부호화한다. 그런 다음, 부호화된 매크로 블록의 데이터 크기 및 원본 매크로 블록의 왜곡 정도를 고려하여 최적의 부호화 모드를 선택하고 매크로 블록을 부호화한다. 도 1을 참조하여 상세히 설명한다. In an image compression method such as MPEG-1, MPEG-2, and MPEG-4 H.264 / MPEG-4 Advanced Video coding (AVC), a picture is encoded into a predetermined image processing unit , And macroblocks. Then, each macroblock is encoded using inter prediction and intra prediction. Then, the optimal encoding mode is selected in consideration of the data size of the encoded macroblock and the degree of distortion of the original macroblock, and the macroblock is encoded. Will be described in detail with reference to Fig.

도 1은 종래 기술에 따른 영상 부호화 장치를 도시한다.1 illustrates a conventional image encoding apparatus.

도 1을 참조하면, 움직임보상부(104) 또는 인트라예측부(106)는 블록 단위로 인터 예측 또는 인트라 예측을 수행한다. 움직임보상부(104)는 움직임추정부(102)가 프레임메모리(120)에 저장되어 있는 참조 픽처를 검색하여 추정한 현재 블록의 움직임 벡터에 기초하여 현재 블록을 인터 예측한다. 인트라예측부(106)는 현재 픽처의 이전에 부호화된 영역에 포함되어 있는 픽셀들을 이용하여 현재 블록을 인트라 예측한다. Referring to FIG. 1, the motion compensation unit 104 or the intra prediction unit 106 performs inter prediction or intra prediction on a block-by-block basis. The motion compensation unit 104 inter predicts the current block based on the motion vector of the current block estimated by the motion estimation unit 102 by searching for the reference picture stored in the frame memory 120. [ The intra prediction unit 106 intra-predicts the current block using pixels included in the previously encoded region of the current picture.

예측의 결과 생성된 현재 블록의 예측 값인 예측 블록을 원본 블록에서 감산하여 레지듀얼 블록을 생성한다. 생성된 레지듀얼 블록는 변환부(108)에서 주파수 영역으로 변환된다. 이산 코사인 변환(discrete cosine transform)을 수행하여 레지듀얼 블록에 대한 주파수 영역의 계수들 즉, 이산 코사인 변환 계수들을 생성한다. 양자화부(110)는 이산 코사인 변환 계수들을 양자화한다. 양자화된 계수들은 엔트로피코딩부(112)에서 엔트로피 부호화되어 비트스트림에 삽입된다.A prediction block, which is a prediction value of the current block generated as a result of prediction, is subtracted from the original block to generate a residual block. The generated residual block is transformed into the frequency domain in the transforming unit 108. [ And performs a discrete cosine transform to generate frequency domain coefficients for the residual block, i.e., discrete cosine transform coefficients. The quantization unit 110 quantizes the discrete cosine transform coefficients. The quantized coefficients are entropy-encoded in the entropy coding unit 112 and inserted into the bitstream.

양자화부(110)에서 양자화된 계수들은 역양자화부(114)에서 역양자화되고, 역양자화된 계수들은 역변환부(116)에서 역이산 코사인 변환된다. 역이산 코사인 변환이 결과 복원된 레지듀얼 블록은 예측 블록에 가산되어 원본 블록으로 복원된다.The coefficients quantized by the quantization unit 110 are dequantized by the dequantization unit 114 and the dequantized coefficients are dequantized by the inverse transform unit 116. [ The residual block whose reconstructed inverse discrete cosine transform is added to the prediction block is restored to the original block.

복원된 원본 블록은 필터(118)에서 디블록킹 필터링된 후에 프레임메모리(120)에 저장되어 다른 블록의 인터 또는 인트라 예측에 이용된다.The restored original block is deblock-filtered in the filter 118 and then stored in the frame memory 120 and used for inter or intra prediction of another block.

H.264/AVC 부호화 방식에서 엔트로피 부호화는 문맥 기반 적응적 가변 길이 부호화(Context-Adaptive Variable Length Coding : CAVLC) 또는 문맥 기반 적응적 이진 산술 부호화(Context-Adaptive Binary Arithmetic Coding)에 의해 수행된다. 구문 요소(syntax element)마다 다른 엔트로피 부호화 방법을 적용하여 엔트로피 부호화를 수행한다. In H.264 / AVC coding, entropy coding is performed by context-based adaptive variable length coding (CAVLC) or context-based adaptive binary arithmetic coding. Entropy encoding is performed by applying different entropy encoding methods to each syntax element.

여러 가지 구문 요소들 중 이산 코사인 변환 계수들은 런-레벨 부호화를 통해 문맥 기반 이진 산술 부호화한다. 이산 코사인 변환 계수의 계수 값이 '0'인 경우 런이라 하고, 이산 코사인 변환 계수의 계수 값이 '0'이 아닌 경우 레벨이라 한다. 이산 코사인 계수들을 런과 레벨로 구분하여 이진화하고, 이진화 결과 생성된 이진열(bin string)을 컨텍스트 모델을 이용하여 산술 부호화한다. Among the various syntax elements, the discrete cosine transform coefficients are subjected to context-based binary arithmetic coding via run-level encoding. A run when the coefficient value of the discrete cosine transform coefficient is '0', and a level when the coefficient value of the discrete cosine transform coefficient is not '0'. Discrete cosine coefficients are binarized by dividing them into run and level, and arithmetic coding is performed on the bin string generated by the binarization using the context model.

이 때 '0'이 아닌 이산 코사인 변환 계수들 즉, 레벨들은 단항/지수 골롬 결합형 이진화(concatenated Unary/k-th Order Exponential Golomb binarization) 방법을 이용해 우선 가변 길이 부호로 이진화하고, 이진화 결과 생성된 이진열이 산술 부호화된다. 도 2를 참조하여 상세히 설명한다. In this case, non-zero discrete cosine transform coefficients, i.e., levels are first binarized into a variable length code using a concatenated Unary / k-th Order Exponential Golomb binarization method, The binary string is arithmetically encoded. Will be described in detail with reference to FIG.

도 2를 참조하면, 레벨들은 '14'의 최대 부호 값(Maximum code Value : cMax)을 가지는 절삭형 단항 이진화(truncated unary binarizition) 및 '0'차의 지수 골롬 이진화(0-th oder exponential golomb binarizition)를 결합한 이진화 방법에 의해 이진화된다. Referring to FIG. 2, the levels are divided into a truncated unary binarization having a maximum code value cMax of '14' and a 0-th oder exponential golomb binarization ). ≪ / RTI >

레벨 값(abs_level)이 14 보다 작거나 같으면 오직 절삭형 단항 이진화를 이용하여 이진화하고, 레벨 값이 14 보다 크면 절삭형 단항 이진화와 지수 골롬 이진화를 결합하여 이진화한다.If the level value (abs_level) is less than or equal to 14, binarization is performed using only the cutting type unary binarization. If the level value is greater than 14, the cutting type unary binarization is combined with the exponential Golomb binarization to binarize.

그러나, 이산 코사인 변환 계수들의 확률 분포를 살펴보면, 레벨들은 저주파 성분의 계수들에 편중하여 분포하고, 런들은 고주파 성분의 계수들에 편중하여 분포하는 현상이 나타난다. 다시 말해, 레지듀얼 블록을 이산 코사인 변환한 결과 생성되는 이산 코사인 변환 계수 블록의 좌측 상부에 레벨들이 편중하여 분포하고, 우측 하부로 갈수록 런들이 편중하여 분포하는 현상이 나타난다. 따라서, 이산 코사인 계수들 모두에 대하여 도 2에 도시된 바와 같은 동일한 이진화 방법을 적용하여 이진화를 수행하는 것은 런-레벨의 확률 분포를 고려하지 아니하고 이진화하는 것이 되어 비효율적이다. However, when looking at the probability distribution of the discrete cosine transform coefficients, the levels are distributed in a biased manner to the coefficients of the low frequency components, and the phenomena that the runs are distributed in a concentrated manner to the coefficients of the high frequency components appear. In other words, there is a phenomenon that the levels are distributed in the left upper part of the discrete cosine transform coefficient block generated as a result of the discrete cosine transform of the residual blocks, and the run is distributed in a concentrated manner toward the right lower part. Therefore, performing the binarization by applying the same binarization method as shown in FIG. 2 to all the discrete cosine coefficients is inefficient because binarization is performed without considering the run-level probability distribution.

본 발명이 이루고자 하는 기술적 과제는 이산 코사인 계수들의 확률 분포를 고려하여 영상 데이터를 보다 효율적으로 엔트로피 부호화, 복호화할 수 있는 방법 및 장치를 제공하는데 있고, 상기 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는데 있다. SUMMARY OF THE INVENTION The present invention provides a method and apparatus for efficiently performing entropy encoding and decoding of image data considering a probability distribution of discrete cosine coefficients, and a computer readable medium storing a program for executing the method And a recording medium.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 영상 데이터의 엔트로피 부호화 방법은 현재 블록의 레지듀얼 블록을 주파수 영역으로 변환한 결과 생성된 주파수 영역의 계수들을 각각 서로 다른 이진화 방법을 적용하여 이진화하는 단계; 및 상기 이진화된 계수들을 이진 산술 부호화(binary arithmetic coding)하는 단계를 포함한다.According to another aspect of the present invention, there is provided a method of entropy encoding image data, the method comprising: binarizing coefficients of a frequency domain generated by transforming a residual block of a current block into a frequency domain using a different binarization method; And performing binary arithmetic coding on the binarized coefficients.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 주파수 영역의 계수들은 상기 레지듀얼 블록을 이산 코사인 변환(discrete cosine transform)한 결과 생성된 이산 코사인 변환 계수들인 것을 특징으로 한다.According to a further preferred embodiment of the present invention, the coefficients in the frequency domain are discrete cosine transform coefficients generated as a result of performing a discrete cosine transform of the residual block.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 이진화하는 단계는 상기 변환 결과 생성된 이산 코사인 변환 계수들을 주파수의 고저에 기초하여 복수의 그룹으로 나누는 단계; 및 상기 복수의 그룹 각각에 대하여 서로 다른 이진화 방법을 적용하여 이진화하는 단계를 포함한다.According to a more preferred embodiment of the present invention, the binarizing step includes dividing the discrete cosine transform coefficients generated as a result of the transforming into a plurality of groups based on the frequency of the frequency; And binarizing each of the plurality of groups by applying different binarization methods.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 이진화하는 단계는 상기 이산 코사인 변환 계수들을 주파수의 고저에 기초하여 서로 다른 단항/지수 골룸 결합형 이진화(concatenated Unary/k-th Order Exponential Golomb binarization) 방법에 따라 이진화하는 단계를 포함한다.According to a more preferred embodiment of the present invention, the binarizing step may be a step of binarizing the discrete cosine transform coefficients by using a different concatenated unary / k-th order exponential Golomb binarization method As shown in FIG.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 영상의 부호화 방법은 현재 블록의 예측 값인 예측 블록을 생성하고, 상기 현재 블록에서 상기 생성된 예측 블록을 감산하여 상기 현재 블록의 레지듀얼 블록을 생성하는 단계; 상기 생성된 레지듀얼 블록을 이산 코사인 변환하여 상기 레지듀얼 블록에 대한 이산 코사인 변환 계수들을 생성하고, 상기 생성된 이산 코사인 변환 계수들을 양자화하는 단계; 및 상기 변환 결과 생성된 이산 코사인 변환 계수들을 주파수의 고저에 기초하여 복수의 그룹으로 나누어 상기 복수의 그룹 각각에 대하여 서로 다른 이진화 방법을 적용하여 이진화하고, 상기 이진화된 계수들을 이진 산술 부호화하는 단계를 포함한다.According to another aspect of the present invention, there is provided a method of encoding an image, the method including generating a prediction block, which is a prediction value of a current block, and generating a residual block of the current block by subtracting the generated prediction block from the current block ; Performing discrete cosine transform of the generated residual block to generate discrete cosine transform coefficients for the residual block, and quantizing the generated discrete cosine transform coefficients; And performing binary arithmetic coding on the binarized coefficients by dividing the discrete cosine transform coefficients generated as a result of the transform into a plurality of groups based on the frequency of the frequency, applying different binarization methods to each of the plurality of groups, .

상기 기술적 과제를 해결하기 위한 본 발명에 따른 엔트로피 부호화 장치는 현재 블록의 레지듀얼 블록을 주파수 영역으로 변환한 결과 생성된 주파수 영역의 계수들을 서로 다른 이진 부호화 방법을 적용하여 이진화하는 이진화부; 및 상기 이진화된 계수들을 이진 산술 부호화(binary arithmetic coding)하는 산술부호화부를 포함한다.According to an aspect of the present invention, there is provided an entropy encoding apparatus comprising: a binarization unit for binarizing coefficients of a frequency domain generated by transforming a residual block of a current block into a frequency domain by applying different binary encoding methods; And an arithmetic coding unit for performing binary arithmetic coding on the binarized coefficients.

상기 기술적 과제를 해결하기 위한 영상의 부호화 장치는 현재 블록의 예측 값인 예측 블록을 생성하고, 상기 현재 블록에서 상기 생성된 예측 블록을 감산하여 상기 현재 블록의 레지듀얼 블록을 생성하는 레지듀생성부; 상기 생성된 레지듀얼 블록을 이산 코사인 변환하여 상기 레지듀얼 블록에 대한 이산 코사인 변환 계수들을 생성하는 변환부; 상기 생성된 이산 코사인 변환 계수들을 양자화하는 양자화부; 및 상기 변환 결과 생성된 이산 코사인 변환 계수들을 주파수의 고저에 기초하여 복수의 그룹으로 나누어 상기 복수의 그룹 각각에 대하여 서로 다른 이진화 방법을 적용하여 이진화하고, 상기 이진화된 계수들을 이진 산술 부호화하는 엔트로피부호화부를 포함한다.According to an aspect of the present invention, there is provided an apparatus for encoding an image, the apparatus including: a residue generation unit generating a prediction block, which is a predicted value of a current block, and generating a residual block of the current block by subtracting the generated prediction block from the current block; A transform unit for performing discrete cosine transform of the generated residual block to generate discrete cosine transform coefficients for the residual block; A quantizer for quantizing the generated discrete cosine transform coefficients; And transforming the discrete cosine transform coefficients generated as a result of the transform into a plurality of groups based on the frequency of the frequency, applying a different binarization method to each of the plurality of groups, and performing entropy encoding for binary arithmetic coding of the binarized coefficients .

상기 기술적 과제를 해결하기 위한 본 발명에 따른 엔트로피 복호화 방법은 현재 블록의 레지듀얼 블록을 주파수 영역으로 변환한 결과 생성된 주파수 영역의 계수들을 서로 다른 이진화 방법을 적용하여 이진화한 후에 상기 이진화된 계수들을 이진 산술 부호화(binary arithmetic coding)하여 생성된 상기 레지듀얼 블록에 대한 데이터를 수신하고, 상기 수신된 데이터를 이진 산술 복호화(binary arithmetic decoding)하여 상기 이진화된 계수들을 생성하는 단계; 및 상기 이진화된 계수들을 각각 서로 다른 역이진화 방법을 적용하여 역이진화하는 단계를 포함하는 것을 특징으로 하는 엔트로피 복호화 방법.According to another aspect of the present invention, there is provided an entropy decoding method comprising: binarizing coefficients of a frequency domain generated by transforming a residual block of a current block into a frequency domain using a different binarization method, Receiving data for the residual block generated by binary arithmetic coding, and generating the binary coefficients by performing binary arithmetic decoding on the received data; And inversely binarizing the binarized coefficients by applying different inverse binarization methods to the entropy decoding method.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 영상의 복호화 방법은 현재 블록의 레지듀얼 블록을 이산 코사인 변환한 결과 생성된 이산 코사인 변환 계수들을 엔트로피 부호화하여 생성된 상기 레지듀얼 블록에 대한 데이터를 이진 산술 복호화(binary arithmetic decoding)하여 이진화된 이산 코사인 변환 계수들을 생성하고, 상기 이진화된 이산 코사인 변환 계수들을 주파수의 고저에 기초하여 복수의 그룹으로 나누어 상기 복수의 그룹 각각에 대하여 서로 다른 역이진화 방법을 적용하여 역이진화하는 단계; 상기 역이진화된 이산 코사인 변환 계수들을 역양자화하고, 역이산 코사인 변환하여 상기 레지듀얼 블록을 복원하는 단계; 및 상기 현재 블록의 예측 값인 예측 블록을 생성하고, 상기 생성된 예측 블록을 상기 복원된 레지듀얼 블록에 가산하여 상기 현재 블록을 복원하는 단계를 포함한다.According to another aspect of the present invention, there is provided a method of decoding an image, the method comprising: subjecting data of the residual block generated by entropy encoding the discrete cosine transform coefficients generated as a result of discrete cosine transform of a residual block of a current block, And generates binary binarized discrete cosine transform coefficients by dividing the binarized discrete cosine transform coefficients into a plurality of groups based on the high and low frequencies and applying a different inverse binarization method to each of the plurality of groups Inverse binarization; Dequantizing the inversely binarized discrete cosine transform coefficients and performing inverse discrete cosine transform on the inverse discrete cosine transform coefficients to reconstruct the residual block; And generating a prediction block, which is a prediction value of the current block, and adding the generated prediction block to the restored residual block to restore the current block.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 엔트로피 복호화 장치는 현재 블록의 레지듀얼 블록을 주파수 영역으로 변환한 결과 생성된 주파수 영역의 계수들을 서로 다른 이진화 방법을 적용하여 이진화한 후에 상기 이진화된 계수들을 이진 산술 부호화(binary arithmetic coding)하여 생성된 상기 레지듀얼 블록에 대한 데이터를 수신하고, 상기 수신된 데이터를 이진 산술 복호화(binary arithmetic decoding)하여 상기 이진화된 계수들을 생성하는 산술복호화부; 및 상기 이진화된 계수들을 각각 서로 다른 역이진화 방법을 적용하여 역이진화하는 역이진화부를 포함한다.According to an aspect of the present invention, there is provided an entropy decoding apparatus for binarizing coefficients of a frequency domain generated by transforming a residual block of a current block into a frequency domain using a different binarization method, An arithmetic decoding unit that receives data for the residual block generated by binary arithmetic coding and generates binary coefficients by performing binary arithmetic decoding on the received data; And an inverse binarization unit for inversely binarizing the binarized coefficients by applying different inverse binarization methods.

상기 기술적 과제를 해결하기 위한 본 발명에 따른 영상의 복호화 장치는 현재 블록의 레지듀얼 블록을 이산 코사인 변환한 결과 생성된 이산 코사인 변환 계수들을 엔트로피 부호화하여 생성된 상기 레지듀얼 블록에 대한 데이터를 이진 산술 복호화(binary arithmetic decoding)하여 이진화된 이산 코사인 변환 계수들을 생성하고, 상기 이진화된 이산 코사인 변환 계수들을 주파수의 고저에 기초하여 복수의 그룹으로 나누어 상기 복수의 그룹 각각에 대하여 서로 다른 역이진화 방법을 적용하여 역이진화하는 엔트로피복호화부; 상기 역이진화된 이산 코사인 변환 계수들을 역양자화하는 역양자화부; 상기 역양자화된 이산 코사인 변환 계수들을 역이산 코사인 변환하여 상기 레지듀얼 블록을 복원하는 역변환부; 및 상기 현재 블록의 예측 값인 예측 블록을 생성하고, 상기 생성된 예측 블록을 상기 복원된 레지듀얼 블록에 가산하여 상기 현재 블록을 복원하는 복원부를 포함한다.According to another aspect of the present invention, there is provided an apparatus and method for decoding an image, the apparatus comprising: a decoding unit for subjecting a residual block generated by performing discrete cosine transform on a residual block of a current block to entropy- And generates binary binarized discrete cosine transform coefficients by dividing the binarized discrete cosine transform coefficients into a plurality of groups based on the high and low frequencies and applying a different inverse binarization method to each of the plurality of groups An entropy decoding unit for performing inverse binarization; A dequantizer for dequantizing the inversely binarized discrete cosine transform coefficients; An inverse transform unit for inverse discrete cosine transforming the inversely quantized discrete cosine transform coefficients to reconstruct the residual block; And a reconstruction unit that generates a prediction block that is a predicted value of the current block and adds the generated prediction block to the reconstructed residual block to reconstruct the current block.

상기 기술적 과제를 해결하기 위한 본 발명은 상기된 엔트로피 부호화, 복호화 방법 및 영상 부호화, 복호화 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다. According to an aspect of the present invention, there is provided a computer-readable recording medium storing a program for executing the entropy encoding, decoding, and image encoding and decoding methods.

본 발명에 따르면, 엔트로피 부호화를 수행함에 있어 이산 코사인 변환 계수들을 주파수의 고저에 따라 적응적으로 가변 길이로 이진화하고, 이진화된 이산 코사인 변환 계수를 이진 산술 부호화할 수 있어 영상 데이터의 압축 효율이 향상된다. According to the present invention, in performing entropy encoding, the discrete cosine transform coefficients are adaptively changed to a variable length according to the frequency of the frequency, and the binary discrete cosine transform coefficients can be binary arithmetic-coded, do.

도 1은 종래 기술에 따른 영상 부호화 장치를 도시한다.
도 2는 종래 기술에 따른 주파수 영역의 계수를 이진화하는 방법을 도시한 표이다.
도 3은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다.
도 4는 본 발명의 일 실시예에 따른 엔트로피 부호화부를 도시한다.
도 5는 본 발명의 일 실시예에 따른 이산 코사인 변환 계수들을 그룹화하는 방법을 도시한다.
도 6은 본 발명의 일 실시예에 따른 이산 코사인 변환 계수들을 이진화하는 방법을 도시한 표이다.
도 7은 본 발명의 또 다른 실시예에 따른 이산 코사인 변환 계수들을 이진화하는 방법을 도시한 표이다.
도 8은 본 발명의 일 실시예에 따른 엔트로피 부호화 방법을 설명하기 위한 흐름도이다.
도 9는 본 발명의 일 실시예에 다른 영상 복호화 장치를 도시한다.
도 10은 본 발명의 일 실시예에 따른 엔트로피 복호화부를 도시한다.
도 11은 본 발명의 일 실시예에 다른 엔트로피 복호화 방법을 설명하기 위한 흐름도이다.
1 illustrates a conventional image encoding apparatus.
2 is a table showing a method of binarizing coefficients in the frequency domain according to the prior art.
FIG. 3 illustrates an image encoding apparatus according to an embodiment of the present invention.
FIG. 4 illustrates an entropy encoding unit according to an embodiment of the present invention.
5 illustrates a method of grouping discrete cosine transform coefficients according to an embodiment of the present invention.
6 is a table illustrating a method of binarizing discrete cosine transform coefficients according to an embodiment of the present invention.
7 is a table illustrating a method of binarizing discrete cosine transform coefficients according to another embodiment of the present invention.
8 is a flowchart illustrating an entropy encoding method according to an embodiment of the present invention.
9 illustrates an image decoding apparatus according to an embodiment of the present invention.
10 illustrates an entropy decoding unit according to an embodiment of the present invention.
11 is a flowchart illustrating an entropy decoding method according to an embodiment of the present invention.

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

도 3은 본 발명이 일 실시예에 따른 영상 부호화 장치(300)를 도시한다. FIG. 3 illustrates an image encoding apparatus 300 according to an embodiment of the present invention.

도 3을 참조하면, 본 발명에 따른 영상 부호화 장치(300)는 레지듀생성부(310), 변환부(320), 양자화부(330) 및 엔트로피부호화부(340)을 포함한다.3, the image encoding apparatus 300 includes a residue generation unit 310, a transformation unit 320, a quantization unit 330, and an entropy encoding unit 340.

레지듀생성부(310)는 현재 블록의 레지듀얼 블록을 생성한다. 현재 블록의 예측 값인 예측 블록을 인터 예측 또는 인트라 예측을 수행하여 예측하고, 현재 블록에서 예측 블록을 감산함으로써 레지듀얼 블록을 생성한다. The residue generator 310 generates a residual block of the current block. A prediction block, which is a predicted value of a current block, is predicted by performing inter prediction or intra prediction, and a residual block is generated by subtracting the prediction block from the current block.

변환부(320)는 레지듀생성부(310)에서 생성된 레지듀얼 블록을 주파수 영역으로 변환하여 레지듀얼 블록에 대한 주파수 영역의 계수들을 생성한다. 바람직하게는 레지듀얼 블록을 이산 코사인 변환하여 이산 코사인 변환 계수들을 생성한다. 이하에서는 설명의 편의를 위하여 주파수 영역의 계수의 예로 이산 코사인 변환 계수를 예로 들어 설명한다. 그러나, 이산 코사인 변환 계수는 주파수 영역의 계수의 예일 뿐이며, 레지듀얼 블록을 주파수 영역으로 변환한 모든 계수들이 본 발명의 범위에 포함됨은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 쉽게 이해할 수 있다.The transform unit 320 transforms the residual block generated by the residual generating unit 310 into a frequency domain to generate frequency domain coefficients for the residual block. Preferably, the residual block is discrete cosine transformed to generate discrete cosine transform coefficients. Hereinafter, the discrete cosine transform coefficients will be described as an example of coefficients in the frequency domain for convenience of explanation. However, the discrete cosine transform coefficients are merely examples of coefficients in the frequency domain, and all the coefficients obtained by converting the residual blocks into the frequency domain are included in the scope of the present invention, so that those skilled in the art can easily understand have.

양자화부(330)는 변환부(320)에서 생성된 이산 코사인 변환 계수들을 양자화한다. 변환부(320)에서 생성된 이산 코사인 변환 계수들을 소정의 양자화 파라미터(QP)에 의해 양자화한다.The quantization unit 330 quantizes the discrete cosine transform coefficients generated by the transform unit 320. And quantizes the discrete cosine transform coefficients generated by the transforming unit 320 according to a predetermined quantization parameter QP.

엔트로피부호화부(340)는 양자화부(330)에서 양자화된 이산 코사인 변환 계수들을 엔트로피 부호화한다. 양자화부(330)에서 이산 코사인 변환 계수들을 스캐닝하여 1차원으로 재배치한 후에 런-레벨 부호화를 이용해 런과 레벨을 독립적으로 엔트로피 부호화한다. 특히, 본 발명에 따른 엔트로피부호화부(340)는 주파수 영역의 계수들 중 계수 값이 '0'이 아닌 계수들 즉, 레벨들을 각각 서로 다른 이진화 방법을 적용하여 이진화하고, 이진화된 계수들을 이진 산술 부호화한다. 도 4를 참조하여 상세히 설명한다. The entropy encoding unit 340 entropy-codes the quantized discrete cosine transform coefficients in the quantization unit 330. The quantization unit 330 scans the discrete cosine transform coefficients and rearranges them in one dimension, and then entropy-codes the run and the level independently using run-level encoding. In particular, the entropy encoding unit 340 according to the present invention binarizes coefficients, i.e., levels, whose coefficients are not '0' among coefficients in the frequency domain, using different binarization methods, and outputs the binarized coefficients to binary arithmetic . Will be described in detail with reference to FIG.

도 4는 본 발명의 일 실시예에 따른 엔트로피부호화부(340)을 도시한다. FIG. 4 illustrates an entropy encoding unit 340 according to an embodiment of the present invention.

도 4를 참조하면, 본 발명에 따른 엔트로피부호화부(340)는 이진화부(410) 및 산술부호화부(420)을 포함한다.Referring to FIG. 4, the entropy encoding unit 340 includes a binarization unit 410 and an arithmetic encoding unit 420.

이진화부(410)는 양자화부(330)로부터 양자화된 이산 코사인 변환 계수들을 입력받아, 입력받은 계수들 중 계수값이 '0'이 아닌 계수들을 각각 서로 다른 이진화 방법을 적용하여 이진화한다. The binarization unit 410 receives the quantized discrete cosine transform coefficients from the quantization unit 330 and binarizes the non-zero coefficient among the input coefficients by applying different binarization methods.

바람직하게는 본 발명에 따른 이진화부(410)는 그룹화부(412) 및 이진화수행부(414)를 포함한다. Preferably, the binarization unit 410 according to the present invention includes a grouping unit 412 and a binarization unit 414.

그룹화부(412)는 양자화부(330)로부터 입력받은 이산 코사인 변환 계수들을 주파수에 고저에 따라 복수의 그룹으로 나눈다. 도 5를 참조하여 상세히 설명한다.The grouping unit 412 divides the discrete cosine transform coefficients received from the quantization unit 330 into a plurality of groups according to their frequencies. Will be described in detail with reference to FIG.

도 5는 본 발명의 일 실시예에 따른 이산 코사인 변환 계수들을 그룹화하는 방법을 도시한다. 도 5는 4×4 블록을 이산 코사인 변환한 경우에 대하여 도시한다.5 illustrates a method of grouping discrete cosine transform coefficients according to an embodiment of the present invention. Fig. 5 shows a case in which 4x4 blocks are discrete cosine transformed.

양자화부(330)에서 양자화된 변환 계수 블록을 살펴보면, 도 5에 도시된 블록의 좌측 상부에 위치한 계수들이 저주파수 코사인에 대한 계수이고 우측 하부에 위치한 계수들이 고주파수 코사인에 대한 계수이다. 종래 기술과 관련하여 전술한 바와 같이 레벨들은 변환 계수 블록의 좌측 상부에 주로 분포한다. 좌측 상부에 분포하는 레벨들은 우측 하부에 분포하는 레벨들에 비해 더 큰 값을 가질 확률이 높다. Referring to the transform coefficient block quantized by the quantization unit 330, the coefficients located at the upper left of the block shown in FIG. 5 are coefficients for the low frequency cosine and the coefficients located at the lower right are coefficients for the high frequency cosine. As described above in connection with the prior art, the levels are mainly distributed in the upper left of the transform coefficient block. The levels distributed at the upper left are more likely to have larger values than those distributed at the lower right.

따라서, 본 발명에 따른 이진화부(340)는 주파수의 고저에 따라 이산 코사인 변환 계수들을 복수의 그룹으로 그룹화하여 서로 다른 이진화 방법을 이용해 이진화한다. 도 5에 도시된 바와 같이 A, B, C 및 D 그룹으로 이산 계수를 그룹화할 수 있다. 도 5에 도시된 실시예는 복수의 그룹으로 이산 코사인 변환 계수를 그룹화하는 일 실시예일 뿐이며, 도 5에 도시된 실시예 이외에 방법으로 이산 코사인 변환 계수를 그룹화할 수 있음은 본 발명에 속하는 기술 분야에서 통상의 지식을 가진 자는 쉽게 이해할 수 있다.Therefore, the binarization unit 340 according to the present invention groups the discrete cosine transform coefficients into a plurality of groups according to the frequency of the frequency, and binarizes the discrete cosine transform coefficients using different binarization methods. The discrete coefficients can be grouped into A, B, C, and D groups as shown in FIG. The embodiment shown in FIG. 5 is only an embodiment for grouping the discrete cosine transform coefficients into a plurality of groups, and it is possible to group the discrete cosine transform coefficients by a method other than the embodiment shown in FIG. 5, Those skilled in the art will readily understand.

다시 도 4를 참조하면, 그룹화부(412)에서 이산 코사인 변환 계수들을 복수의 그룹으로 나누면, 이진화수행부(414)는 복수의 그룹에 대하여 각각 서로 다른 이진화 방법을 이용하여 이진화를 수행한다. 도 6을 참조하여 상세히 설명한다. Referring again to FIG. 4, when the grouping unit 412 divides the discrete cosine transform coefficients into a plurality of groups, the binarization unit 414 binarizes the plurality of groups using different binarization methods. Will be described in detail with reference to FIG.

도 6은 본 발명의 일 실시예에 따른 이산 코사인 변환 계수를 이진화하는 방법을 도시한 표이다. 6 is a table illustrating a method of binarizing the discrete cosine transform coefficients according to an embodiment of the present invention.

도 6을 참조하면 도 5의 A 그룹에 포함되어 있는 이산 코사인 변환 계수들 중에서 레벨들은 '7'의 최대 부호 값(Maximum code Value : cMax)을 가지는 절삭형 단항 이진화(truncated unary binarizition) 및 '2'차의 지수 골롬 이진화(0-th oder exponential golomb binarizition)를 결합한 이진화 방법에 의해 이진화된다. Referring to FIG. 6, among the discrete cosine transform coefficients included in the group A of FIG. 5, the levels include a truncated unary binarization having a maximum code value (cMax) of '7' The binomial is binarized by the binary exponential golomb binarization.

레벨의 절대값(abs_level)(이하 '레벨 값'이라 함)이 '1'에서 '7' 사이인 레벨들은 절삭형 단항 이진화를 이용하여 이진화하고, 레벨 값이 '7' 보다 크면 절삭형 단항 이진화와 지수 골롬 이진화를 결합하여 이진화한다.Levels in which the absolute value of the level (ab_level) (hereinafter referred to as a 'level value') is between 1 and 7 are binarized using a cutting type unary binarization, and if the level value is greater than 7, the cutting type unary binarization And exponential Golomb binarization.

B 그룹에 포함되어 있는 이산 코사인 변환 계수들 중에서 레벨들은 '8'의 최대 부호 값을 가지는 절삭형 단항 이진화 및 '1'차의 지수 골롬 이진화를 결합한 이진화 방법에 의해 이진화된다. Among the discrete cosine transform coefficients included in the B group, the levels are binarized by a binarization method combining a cut type unary binarization having a maximum code value of '8' and an exponential Golomb binarization of a '1' order.

레벨 값이 '1'에서 '8' 사이인 레벨들은 절삭형 단항 이진화를 이용하여 이진화하고, 레벨 값이 '8' 보다 크면 절삭형 단항 이진화와 지수 골롬 이진화를 결합하여 이진화한다.Levels whose level values are between '1' and '8' are binarized using the cutting type unary binarization, and if the level value is greater than '8', the cutting type unary binarization is combined with the exponential Golomb binarization to binarize.

C 그룹에 포함되어 있는 이산 코사인 변환 계수들 중 레벨들은 '10'의 최대 부호 값을 가지는 절삭형 단항 이진화 및 '1'차의 지수 골롬 이진화를 결합한 이진화 방법에 의해 이진화된다. Among the discrete cosine transform coefficients included in the C group, the levels are binarized by a binarization method that combines a cut type unary binarization having a maximum code value of '10' and an exponential Golomb binarization of a '1' order.

레벨 값이 '1'에서 '10' 사이인 레벨들은 절삭형 단항 이진화를 이용하여 이진화하고, 레벨 값이 '10' 보다 크면 절삭형 단항 이진화와 지수 골롬 이진화를 결합하여 이진화한다.Levels whose level values are between '1' and '10' are binarized using the cutting type unary binarization, and if the level value is greater than '10', the cutting type unary binarization is combined with the exponential Golomb binarization to binarize.

D 그룹에 포함되어 있는 이산 코사인 변환 계수들 중 레벨들은 종래 기술과 같이 '14'의 최대 부호 값을 가지는 절삭형 단항 이진화 및 '0'차의 지수 골롬 이진화를 결합한 이진화 방법에 의해 이진화된다. Among the discrete cosine transform coefficients included in the D group, the levels are binarized by a binarization method combining a cut type unary binarization having a maximum code value of '14' and an exponential Golomb binarization of '0' as in the prior art.

레벨 값이 '1'에서 '14' 사이인 레벨들 절삭형 단항 이진화를 이용하여 이진화하고, 레벨 값이 '14' 보다 크면 절삭형 단항 이진화와 지수 골롬 이진화를 결합하여 이진화한다.Levels whose values are between '1' and '14' are binarized using a cut type unary binarization, and if the level value is greater than '14', the cutting type unary binarization is combined with exponential Golomb binarization to binarize.

도 6에 도시된 바와 같이 이산 코사인 변환 계수들을 각각 서로 다른 이진화 방법을 이용해 이진화하면, A 영역의 큰 레벨 값을 보다 적은 이진열로 표현할 수 있고, D 영역의 작은 레벨 값을 보다 적은 이진열로 표현할 수 있게 된다. 6, if the discrete cosine transform coefficients are binarized using different binarization methods, a large level value of the A region can be represented by a smaller number of binary rows, and a smaller level value of the D region can be represented by a smaller number of binary rows .

예를 들어, 레벨의 절대 값이 '19'인 경우를 예로 들어 살펴본다. A 영역으로 구분된 이전 코사인 변환 계수의 절대 값이 '19'인 경우 도 2에 도시된 종래 기술에 따르면, 총 19개의 이진열로 표현되지만, 본 발명에 따르면, 13개의 이진열로 표현된다. 레벨 값이 다른 영역에 비해 클 확률이 높은 A 영역의 계수들이 보다 짧은 이진열로 표현 가능해지는 것이다.For example, consider the case where the absolute value of the level is '19'. In the case where the absolute value of the previous cosine transform coefficients divided into the A region is '19', according to the prior art shown in FIG. 2, it is represented by a total of 19 binary rows, but according to the present invention, it is represented by 13 binary rows. The coefficients of region A, which have a higher probability of being higher than those of other regions, can be represented by a shorter binary sequence.

도 6에 도시된 바와 같이 단항 이진화의 최대 부호 값 및 지수 골룸 부호의 차수를 동시에 변경함으로써 이진화 방법을 변경할 수도 있지만, 최대 부호 값과 지수 골림 부호의 차수 중 하나만을 변경하여 이진화 방법을 변경할 수도 있다.As shown in FIG. 6, the binarization method may be changed by simultaneously changing the maximum code value of the unary binarization and the order of the exponential gradation code, but the binarization method may be changed by changing only one of the maximum code value and the degree of the exponent- .

도 7은 본 발명의 또 다른 실시예에 따른 이산 코사인 변환 계수를 이진화하는 방법을 도시한 표이다. 7 is a table showing a method of binarizing a discrete cosine transform coefficient according to another embodiment of the present invention.

변환 계수 들 중에서 레벨 값의 크기 및 확률 분포는 양자화 파라미터(QP)에 따라서도 변경될 수 있다. 양자화 파라미터가 변경됨에 따라, 도 5에 도시된 A 영역의 레벨 값의 확률 분포가 변경됨이 실험적으로 증명되어 있다. 따라서, 양자화 파라미터(QP)도 고려하여 이산 코사인 변환 계수의 이진화 방법을 달리할 필요가 있다.The magnitude and probability distribution of the level value among the transform coefficients can also be changed according to the quantization parameter QP. It has been experimentally proven that as the quantization parameter is changed, the probability distribution of the level value of the area A shown in Fig. 5 is changed. Therefore, the method of binarizing the discrete cosine transform coefficients needs to be different in consideration of the quantization parameter (QP).

도 7을 참조하면, 양자화 파라미터에 따라 도 5에 도시된 A, B 및 C 영역에 포함된 이산 코사인 변환 계수의 이진화 방법을 달리한다. 'T'는 단항 이진화의 최대 부호 값을 의미하고, 'k'는 지수 골룸 부호의 차수를 의미한다. Referring to FIG. 7, a method of binarizing the discrete cosine transform coefficients included in the areas A, B, and C shown in FIG. 5 according to quantization parameters is different. 'T' denotes the maximum code value of the unary binarization, and 'k' denotes the degree of the exponentiation code.

D 영역에 포함된 이진 코사인 변환 계수들 중 레벨들은 모두 종래 기술과 같이 '14'의 최대 부호 값을 가지는 절삭형 단항 이진화 및 '0'차의 지수 골롬 이진화를 결합한 이진화 방법에 의해 이진화된다.The levels of the binary cosine transform coefficients included in the D region are all binarized by a binarization method combining a cutting type unary binarization having a maximum code value of '14' and an exponential Golomb binarization of '0' as in the prior art.

다시 도 4를 참조하면, 이진화수행부(414)에서 이진화된 이산 코사인 변환 계수는 산술부호화부(420)로 전달된다. 산술부호화부(420)는 이진화된 이산 코사인 변환 계수를 문맥 기반 적응적 이진 산술 부호화함으로써 엔트로피 부호화를 마친다.4, the binarized discrete cosine transform coefficients in the binarization unit 414 are transferred to the arithmetic coding unit 420. The arithmetic coding unit 420 completes entropy encoding by performing context-based adaptive binary arithmetic coding on the binarized discrete cosine transform coefficients.

도 8은 본 발명의 일 실시예에 따른 엔트로피 부호화 방법을 설명하기 위한 흐름도이다. 8 is a flowchart illustrating an entropy encoding method according to an embodiment of the present invention.

도 8을 참조하면, 단계 810에서 본 발명에 따른 엔트로피부호화부(340)은 현재 블록의 레지듀얼 블록을 이산 코사인 변환한 결과 생성된 이산 코사인 변환 계수들을 각각 서로 다른 이진화 방법을 적용하여 이진화한다. 이산 코사인 변환 계수들을 주파수의 고저에 따라 복수의 그룹으로 나누고 각각의 그룹마다 서로 다른 이진화 방법을 적용하여 이진화할 수도 있다. 이진화의 대상이 되는 이산 코사인 변환 계수들은 이산 코사인 변환된 후에 소정의 양자화 파라미터에 따라 양자화된 이산 코사인 변환 계수들이다.Referring to FIG. 8, in step 810, the entropy encoding unit 340 according to the present invention binarizes discrete cosine transform coefficients generated by performing discrete cosine transform on the residual block of the current block, using different binarization methods. The discrete cosine transform coefficients may be divided into a plurality of groups according to the frequency of the frequency and binarized by applying different binarization methods to each group. The discrete cosine transform coefficients to be binarized are discrete cosine transform coefficients quantized according to a predetermined quantization parameter after being subjected to the discrete cosine transform.

단계 820에서 엔트로피부호화부(340)는 단계 810에서 이진화된 이산 코사인 변환 계수들을 이진 산술 부호화한다. 바람직하게는 문맥 기반 적응적 이진 산술 부호화(CABAC)한다. 이진 산술 부호화 결과 생성된 이진열은 비트스트림에 삽입된다.In step 820, the entropy encoding unit 340 performs binary arithmetic coding on the binarized discrete cosine transform coefficients in step 810. Preferably context-based adaptive binary arithmetic coding (CABAC). The binary sequence generated as a result of the binary arithmetic coding is inserted into the bitstream.

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

도 9를 참조하면, 본 발명에 따른 영상 복호화 장치(900)는 엔트로피복호화부(910), 역변환부(920) 및 복원부(930)를 포함한다. 9, an image decoding apparatus 900 according to the present invention includes an entropy decoding unit 910, an inverse transform unit 920, and a decompression unit 930.

엔트로피복호화부(910)는 현재 블록의 레지듀얼 블록에 대한 데이터를 포함하고 있는 비트스트림을 수신하고, 비트스트림에 포함되어 있는 레지듀얼 블록에 대한 데이터를 엔트로피 복호화한다. The entropy decoding unit 910 receives the bitstream including the data of the current block's residual block, and entropy decodes the data of the residual block included in the bitstream.

레지듀얼 블록에 대한 데이터에는 본 발명에 따른 엔트로피 부호화 방법에 의해 엔트로피 부호화된 이산 코사인 변환 계수들을 포함되어 있다. 다시 말해, 레지듀얼 블록을 이산 코사인 변환한 결과 생성된 변환 계수들을 서로 다른 이진화 방법을 적용하여 이진화한 후에 이진 산술 부호화함으로써 엔트로피 부호화된 주파수 영역의 계수들에 대한 데이터를 포함한다. The data for the residual block includes discrete cosine transform coefficients entropy encoded by the entropy encoding method according to the present invention. In other words, the transform coefficients generated as a result of the discrete cosine transform of the residual block are binarized by applying different binarization methods, and then subjected to binary arithmetic coding to include entropy-encoded coefficients of frequency domain coefficients.

도 10은 본 발명의 일 실시예에 따른 엔트로피복호화부(910)을 도시한다. FIG. 10 shows an entropy decoding unit 910 according to an embodiment of the present invention.

도 10을 참조하면 본 발명에 따른 엔트로피복호화부(910)는 산술복호화부(1010) 및 역이진화부(1020)을 포함한다. Referring to FIG. 10, the entropy decoding unit 910 according to the present invention includes an arithmetic decoding unit 1010 and an inverse binarization unit 1020.

산술복호화부(1010)는 비트스트림에 포함되어 있는 레지듀얼 블록에 대한 데이터를 이진 산술 복호화한다. 바람직하게는 문맥 기반 적응적 이진 산술 복호화를 수행한다. The arithmetic decoding unit 1010 performs binary arithmetic decoding on the data of the residual block included in the bitstream. Preferably, context-based adaptive binary arithmetic decoding is performed.

이진 산술 복호화를 수행 결과, 이진화된 이산 코사인 변환 계수들이 생성되며, 이진화된 이산 코사인 변환 계수들은 역이진화부(1020)으로 전달된다.As a result of the binary arithmetic decoding, binary discrete cosine transform coefficients are generated, and the binarized discrete cosine transform coefficients are transferred to the inverse binarization unit 1020.

역이진화부(1020)는 이진화된 이산 코사인 변환 계수들을 각각 서로 다른 역이진화 방법을 적용하여 역이진화한다. 도 6 및 7과 관련하여 전술한 이진화 방법에 대응되는 역이진화 방법을 적용하여 역이진화를 수행한다. 이산 코사인 변환 계수들의 주파수의 고저 및 양자화 파라미터(QP)를 고려하여 각각 다른 역이진화 방법을 적용하여 역이진화를 수행한다. The inverse binarization unit 1020 inversely binarizes the binarized discrete cosine transform coefficients by applying different inverse binarization methods. Inverse binarization is performed by applying an inverse binarization method corresponding to the binarization method described above with reference to Figs. Inverse binarization is performed by applying different inverse binarization methods to each of the discrete cosine transform coefficients in consideration of the frequency of the frequency of the discrete cosine transform coefficients and the quantization parameter (QP).

바람직하게는 본 발명에 따른 역이진화부(1020)는 그룹화부(1022) 및 역이진화수행부(1024)를 포함한다. Preferably, the inverse binarization unit 1020 according to the present invention includes a grouping unit 1022 and an inverse binarization unit 1024.

그룹화부(1022)는 산술복호화부(1010)에서 이진 산술 복호화된 이진화된 이산 코사인 변환 계수들을 주파수의 고저에 따라 복수의 그룹으로 나눈다. 도 5에 도시된 바와 같이 이산 코사인 변환 계수들을 4개의 그룹으로 그룹화할 수도 있다. The grouping unit 1022 divides the binary discrete cosine transform coefficients binarized and decoded by the arithmetic decoding unit 1010 into a plurality of groups according to the frequency of the frequency. The discrete cosine transform coefficients may be grouped into four groups as shown in FIG.

역이진화수행부(1024)는 그룹화부(1022)에서 나누어진 복수의 그룹을 각각 서로 다른 역이진화 방법을 적용하여 역이진화한다. 각각의 그룹에 대하여 서로 다른 단항/지수 골룸 결합형 이진화 방법을 적용하여 역이진화를 수행한다. 이진화된 이산 코사인 변환 계수들 중에서 '0'이 아닌 레벨 값을 가지는 계수들 즉, 레벨들을 역이진화한다. 각각의 레벨들이 속해 있는 그룹에 따라 다른 역이진화 방법이 적용된다. The inverse binarization performing unit 1024 inversely binarizes a plurality of groups divided in the grouping unit 1022 by applying different inverse binarization methods. For each group, inverse binarization is performed by applying different unary / exponential Gomun combination binarization methods. Among the binarized discrete cosine transform coefficients, coefficients having a level value other than '0', that is, levels are inversely binarized. Different inverse binarization methods are applied depending on the group to which each level belongs.

단항 이진화의 최대 부호 값 및 지수 굴롬 부호의 차수 중 적어도 하나를 변경하여 서로 다른 이진화 방법을 적용한다. 부호화하는 측에서 이산 코사인 변환 계수들을 이진화할 때에 적용한 이진화 방법에 대응되는 역이진화 방법을 각각의 그룹에 적용하여 역이진화를 수행한다. At least one of the maximum code value of the unary binarization and the order of the exponential code is changed and different binarization methods are applied. The inverse binarization method corresponding to the binarization method applied when binarizing the discrete cosine transform coefficients on the encoding side is applied to each group to perform inverse binarization.

다시 도 9를 참조하면, 역이진화부(1020)에서 역이진화되어 엔트로피 복호화를 모두 마친 이산 코사인 변환 계수들은 역양자화부(920)에서 역양자화된다. 역양자화부(920)에서 역양자화된 이산 코사인 변환 계수들은 역변환부(930)에서 역이산 코사인 변환되어 레지듀얼 블록으로 복원된다.Referring back to FIG. 9, the discrete cosine transform coefficients that have been inversely binarized in the inverse binarization unit 1020 and have completed the entropy decoding are dequantized in the inverse quantization unit 920. The inversely quantized discrete cosine transform coefficients in the inverse quantization unit 920 are inverse discrete cosine transformed by the inverse transform unit 930 and restored into a residual block.

복원부(940)는 현재 블록의 예측 값인 예측 블록을 인터 예측 또는 인트 예측하여 생성하고, 생성된 예측 블록을 역변환부(930)에서 복원된 레지듀얼 블록에 가산하여 현재 블록을 복원한다. The reconstructing unit 940 reconstructs a current block by inter-prediction or inter-prediction prediction, which is a prediction value of the current block, and adds the generated prediction block to the reconstructed residual block in the inverse transform unit 930.

도 10은 본 발명의 일 실시예에 따른 엔트로피 복호화 방법을 설명하기 위한 흐름도이다.10 is a flowchart illustrating an entropy decoding method according to an embodiment of the present invention.

도 10을 참조하면, 단계 1010에서 본 발명에 따른 엔트로피 복호화 장치(910)는 레지듀얼 블록에 대한 데이터를 이진 산술 복호화한다. 바람직하게는 문맥 기반적응적 이진 산술 복호화를 수행함은 전술하였다. 이진 산술 복호화한 결과 레지듀얼 블록의 이진화된 이산 코사인 변환 계수들이 생성된다.Referring to FIG. 10, in step 1010, an entropy decoding apparatus 910 according to the present invention performs binary arithmetic decoding on data for a residual block. Preferably, context-based adaptive binary arithmetic decoding is performed as described above. As a result of binary arithmetic decoding, binary discrete cosine transform coefficients of the residual block are generated.

단계 1020에서 엔트로피 복호화 장치(910)는 단계 1010에서 생성된 이진화된 이진화된 이산 코사인 변환 계수들을 각각 서로 다른 이진화 방법을 적용하여 역이진화한다. 이진화된 이산 코사인 변환 계수들을 각각 서로 다른 역이진화 방법을 적용하여 역이진화한다. In step 1020, the entropy decoding apparatus 910 inversely binarizes the binarized binary discrete cosine transform coefficients generated in step 1010 by applying different binarization methods. The binarized discrete cosine transform coefficients are inversely binarized by applying different inverse binarization methods.

이진화된 이산 코사인 변환 계수들을 주파수의 고저에 따라 복수의 그룹으로 나누고 각각의 그룹에 대하여 서로 다른 역이진화 방법을 적용하여 역이진화를 수행할 수도 있다. 이산 코사인 변환 계수들 중에서 '0'이 아닌 레벨 값을 가지는 계수들 즉, 레벨들이 역이진화된다. Inverse binarization may be performed by dividing the binarized discrete cosine transform coefficients into a plurality of groups according to the frequency of the frequency and applying a different inverse binarization method to each group. Among the discrete cosine transform coefficients, coefficients having levels other than '0', that is, levels are inversely binarized.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다. 또한, 본 발명에 따른 시스템은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, Modification is possible. Accordingly, the spirit of the present invention should be understood only in accordance with the following claims, and all of the equivalent or equivalent variations will fall within the scope of the present invention. In addition, the system according to the present invention can be embodied as computer-readable codes on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses 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 a carrier wave (for example, transmission via the Internet). The computer-readable recording medium may also be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner.

Claims (15)

엔트로피 복호화 방법에 있어서,
레지 듀얼 블록에 관한 계수를 포함하는 비트스트림을 수신하는 단계;
이진화된 계수를 생성하기 위해 상기 수신된 계수를 컨텍스트-기반 산술 복호화(context-based arithmetic decoding)하는 단계; 및
상기 이진화된 계수가 최대 부호 값(Maximum Code Value)과 관련된 프리픽스(prefix)를 절삭형(truncated) 역이진화 방법을 사용하여 역이진화하는 단계;
상기 이진화된 계수가 프리픽스를 제외한 서픽스(suffix)를 더 포함하는 경우, 상기 서픽스를 지수 골룸(Exponential Golomb) 역이진화 방법을 사용하여 역이진화하는 단계; 및
상기 최대 부호 값(Maximum Code Value)은 상기 레지듀얼 블록에서의 상기 계수의 위치에 따라 변화하고,
상기 절삭형 역이진화를 위한 상기 최대 부호 값이 변화함에 따라 지수 골룸 역이진화를 위한 차수(k-th order)가 변화하는 것을 특징으로 하는 엔트로피 복호화 방법.
In the entropy decoding method,
The method comprising: receiving a bitstream including a coefficient relating to a residual block;
Performing context-based arithmetic decoding on the received coefficients to generate a binarized coefficient; And
Inverse binarization of a prefix associated with a maximum code value of the binarized coefficients using a truncated inverse binarization method;
And inversely binarizing the suffix using an Exponential Golomb inverse binarization method if the binarized coefficient further includes a suffix other than the prefix; And
Wherein the maximum code value changes according to a position of the coefficient in the residual block,
Wherein a k-th order for exponential-node room binarization changes as the maximum code value for the inverse-type inverse-binarization is changed.
제 1 항에 있어서,
상기 계수의 주파수 성분들은 상기 계수의 위치에 따라서 결정되는 것을 특징으로 하는 엔트로피 복호화 방법.
The method according to claim 1,
And the frequency components of the coefficients are determined according to the positions of the coefficients.
제 2 항에 있어서,
상기 역이진화된 프리픽스 및 상기 역이진화된 서픽스를 결합하여 상기 계수가 복원되는 것을 특징으로 하는 엔트로피 복호화 방법.
3. The method of claim 2,
And the coefficients are restored by combining the inverse-binarized prefix and the inverse-binarized suffix.
제 2 항에 있어서,
상기 역이진화된 프리픽스는 최대 부호 값(Maximum Code Value)인 것을 특징을 하는 엔트로피 복호화 방법.
3. The method of claim 2,
Wherein the inverse binarized prefix is a maximum code value.
제 2 항에 있어서,
상기 이진화된 계수의 위치에 인접한 적어도 하나의 이진화된 계수 및 상기 이진화된 계수를 포함하는 그룹을 생성하는 단계를 더 포함하고,
상기 이진화된 계수의 지수 골룸 역이진화의 차수는 상기 적어도 하나의 이진화된 계수의 지수 골룸 역이진화의 차수와 동일한 것을 특징으로 하는 엔트로피 복호화 방법.
3. The method of claim 2,
Generating a group including at least one binarized coefficient adjacent to a position of the binarized coefficients and the binarized coefficients,
Wherein the degree of exponential decomposition of the binarized coefficients is equal to the degree of exponential decomposition of the at least one binarized coefficient.
제 5 항에 있어서,
상기 그룹의 주파수 성분이 다른 그룹의 주파수 성분보다 큰 경우, 상기 다른 그룹의 지수 골룸 역이진화의 차수가 상기 그룹의 지수 골룸 역이진화의 차수보다 큰 것을 특징으로 하는 엔트로피 복호화 방법.
6. The method of claim 5,
Wherein when the frequency component of the group is greater than the frequency component of the other group, the order of exponential Golomb de-binarization of the other group is larger than the order of exponential Golomb de-binarization of the group.
제 1 항에 있어서,
상기 계수는 상기 계수의 절대값인 것을 특징으로 하는 엔트로피 복호화 방법.
The method according to claim 1,
Wherein the coefficient is an absolute value of the coefficient.
엔트로피 복호화 장치에 있어서,
레지 듀얼 블록에 관한 계수를 포함하는 비트스트림을 수신하고, 이진화된 계수를 생성하기 위해 상기 수신된 계수를 컨택스트-기반 산술 부호화(context-based arithmetic coding)하는 산술복호화부; 및
상기 계수를 복원하기 위해 상기 최대 부호 값과 관련된 프리픽스(prefix)를 절삭형(truncated) 역이진화 방법을 사용하여 역이진화하고, 상기 계수가 상기 프리픽스를 제외한 서픽스(suffix)를 포함하는 경우, 상기 서픽스를 지수 골룸(Exponential Golomb) 역이진화 방법을 사용하여 역이진화하는 역이진화부를 포함하며,
상기 최대 부호 값(Maximum Code Value)은 상기 레지듀얼 블록에서의 상기 계수의 위치에 따라 변화하고,
상기 절삭형 역이진화를 위한 상기 최대 부호 값이 변화함에 따라 상기 지수 골룸 역이진화를 위한 차수(k-th order)가 변화하는 것을 특징으로 하는 엔트로피 복호화 장치.
In an entropy decoding apparatus,
An arithmetic decoding unit for receiving a bitstream including coefficients related to a residual block and performing context-based arithmetic coding on the received coefficients to generate a binarized coefficient; And
Inverse binarization using a truncated inverse binarization method to restore a coefficient associated with the maximum code value and if the coefficient includes a suffix other than the prefix, And an inverse binarization unit that inversely binarizes the suffix using an exponential Golomb inverse binarization method,
Wherein the maximum code value changes according to a position of the coefficient in the residual block,
Wherein the k-th order for the exponential decimal binarization changes as the maximum code value for the inverse-type inverse binarization changes.
제 8 항에 있어서,
상기 계수의 주파수 성분들은 상기 계수의 위치에 따라서 결정되는 것을 특징으로 하는 엔트로피 복호화 장치.
9. The method of claim 8,
And the frequency components of the coefficient are determined according to the position of the coefficient.
제 9 항에 있어서,
상기 역이진화부는,
상기 역이진화된 프리픽스 및 상기 역이진화된 서픽스를 결합하여 상기 계수를 복원하는 것을 특징으로 하는 엔트로피 복호화 장치.
10. The method of claim 9,
Wherein the inverse-
And combines the inverse-binarized prefix and the inverse-binarized suffix to recover the coefficient.
제 9 항에 있어서,
상기 역이진화된 프리픽스는 최대 부호 값인 것을 특징을 하는 엔트로피 복호화 장치.
10. The method of claim 9,
Wherein the inverse binarized prefix is a maximum code value.
제 9 항에 있어서,
상기 역이진화부는
상기 이진화된 계수의 위치에 인접한 적어도 하나의 이진화된 계수 및 상기 이진화된 계수를 포함하는 그룹을 생성하는 그룹화부를 포함하고,
상기 이진화된 계수의 지수 골룸 역이진화의 차수는 상기 적어도 하나의 이진화된 계수의 지수 골룸 역이진화의 차수와 동일한 것을 특징으로 하는 엔트로피 복호화 장치.
10. The method of claim 9,
The inverse binarization unit
And a grouping unit for generating a group including at least one binarized coefficient adjacent to the position of the binarized coefficient and the binarized coefficient,
Wherein the degree of the exponential decimation of the binarized coefficients is equal to the degree of the exponential decimation of the at least one binarized coefficient.
제 12 항에 있어서,
상기 그룹의 주파수 성분이 다른 그룹의 주파수 성분보다 큰 경우, 상기 다른 그룹의 지수 골룸 역이진화의 차수가 상기 그룹의 지수 골룸 역이진화의 차수보다 큰 것을 특징으로 하는 엔트로피 복호화 장치.
13. The method of claim 12,
Wherein when the frequency component of the group is larger than the frequency component of the other group, the order of the exponential Golomb inverse binarization of the other group is larger than the order of the exponential Golomb inverse binarization of the group.
제 8 항에 있어서,
상기 계수는 상기 계수의 절대값인 것을 특징으로 하는 엔트로피 복호화 장치.
9. The method of claim 8,
Wherein the coefficient is an absolute value of the coefficient.
제 1 항 내지 제 7 항 중 어느 한 항의 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium on which a program for executing the method of any one of claims 1 to 7 is recorded.
KR1020140101796A 2014-08-07 2014-08-07 Method and apparatus for encoding and decoding image data KR101573334B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140101796A KR101573334B1 (en) 2014-08-07 2014-08-07 Method and apparatus for encoding and decoding image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140101796A KR101573334B1 (en) 2014-08-07 2014-08-07 Method and apparatus for encoding and decoding image data

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020070058579A Division KR101539240B1 (en) 2007-06-14 2007-06-14 Method and apparatus for encoding and decoding image data

Related Child Applications (2)

Application Number Title Priority Date Filing Date
KR1020140169973A Division KR101540563B1 (en) 2014-12-01 2014-12-01 Method and apparatus for encoding and decoding image data
KR1020150165578A Division KR101731431B1 (en) 2015-11-25 2015-11-25 Method and apparatus for encoding and decoding image data

Publications (2)

Publication Number Publication Date
KR20140104404A true KR20140104404A (en) 2014-08-28
KR101573334B1 KR101573334B1 (en) 2015-12-01

Family

ID=51748261

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140101796A KR101573334B1 (en) 2014-08-07 2014-08-07 Method and apparatus for encoding and decoding image data

Country Status (1)

Country Link
KR (1) KR101573334B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020141831A2 (en) * 2018-12-31 2020-07-09 엘지전자 주식회사 Image coding method and apparatus using intra block copy prediction

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1445955A4 (en) 2001-11-16 2009-10-28 Ntt Docomo Inc Image encoding method, image decoding method, image encoder, image decode, program, computer data signal, and image transmission system
US6744387B2 (en) 2002-07-10 2004-06-01 Lsi Logic Corporation Method and system for symbol binarization
JP4540585B2 (en) 2005-10-20 2010-09-08 パナソニック株式会社 Encoding device and decoding device

Also Published As

Publication number Publication date
KR101573334B1 (en) 2015-12-01

Similar Documents

Publication Publication Date Title
KR101539240B1 (en) Method and apparatus for encoding and decoding image data
US9866829B2 (en) Coding of syntax elements that correspond to coefficients of a coefficient block in video coding
EP3020187B1 (en) Rice parameter initialization for coefficient level coding in video coding process
US9313498B2 (en) Sign hiding techniques for quantized transform coefficients in video coding
US9479780B2 (en) Simplification of significance map coding
US8958472B2 (en) Methods and apparatus for quantization and dequantization of a rectangular block of coefficients
US20130016789A1 (en) Context modeling techniques for transform coefficient level coding
US20130083856A1 (en) Contexts for coefficient level coding in video compression
WO2013158566A1 (en) Coefficient groups and coefficient coding for coefficient scans
US20140010278A1 (en) Method and apparatus for coding adaptive-loop filter coefficients
US20140003530A1 (en) Sign hiding techniques for quantized transform coefficients in video coding
Tu et al. Adaptive runlength coding
KR101573334B1 (en) Method and apparatus for encoding and decoding image data
KR101731431B1 (en) Method and apparatus for encoding and decoding image data
KR101573340B1 (en) Method and apparatus for encoding and decoding image data
KR101540563B1 (en) Method and apparatus for encoding and decoding image data
KR101573684B1 (en) Method and apparatus for encoding and decoding image data

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
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
A107 Divisional application of patent
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20181030

Year of fee payment: 4