KR20040014047A - Discrete cosine transform method and image compression method - Google Patents

Discrete cosine transform method and image compression method Download PDF

Info

Publication number
KR20040014047A
KR20040014047A KR1020020047215A KR20020047215A KR20040014047A KR 20040014047 A KR20040014047 A KR 20040014047A KR 1020020047215 A KR1020020047215 A KR 1020020047215A KR 20020047215 A KR20020047215 A KR 20020047215A KR 20040014047 A KR20040014047 A KR 20040014047A
Authority
KR
South Korea
Prior art keywords
dct
dimensional
coefficients
row
zero
Prior art date
Application number
KR1020020047215A
Other languages
Korean (ko)
Inventor
이기택
Original Assignee
(주)씨앤에스 테크놀로지
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)씨앤에스 테크놀로지 filed Critical (주)씨앤에스 테크놀로지
Priority to KR1020020047215A priority Critical patent/KR20040014047A/en
Publication of KR20040014047A publication Critical patent/KR20040014047A/en

Links

Classifications

    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/48Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data
    • 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/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

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)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE: A discrete cosine transform method, and a method for compressing video using the same are provided to increase correlation and reduce miss detection while reducing power consumption and calculation hours. CONSTITUTION: 8x8 matrix is decomposed into one-dimensional rows and columns to execute the first one-dimensional DCT(Discrete Cosine Transform)(120a). An 8x1 vector all zero detector judges whether all coefficients of each row or column are zero. If all coefficients of each row or column are zero, calculation amounts of the second one-dimensional DCT, quantization, inverse quantization, and the first one-dimensional DCT are reduced by using the information related to the coefficients.

Description

이산여현변환 방법과 이를 이용한 영상압축방법 {Discrete cosine transform method and image compression method}Discrete cosine transform method and image compression method using the same {Discrete cosine transform method and image compression method}

본 발명은 이산여현변환(DCT) 방법과 이를 이용한 영상압축방법에 관한 것으로서, 더 상세하게는 2차원 DCT를 하는 경우에 첫번째 행(열)방향 1차원 DCT 이후에 각 열(행)이 다음 열(행)방향 1차원 DCT 이후 양자화를 거치면 0이 되는지 예측하여 만약 0으로 예측될 경우 다음 단계를 생략하여 전력소모와 계산시간을 줄일 수 있는 이산여현변환 방법과 이를 이용한 영상압축방법에 관한 것이다.The present invention relates to a discrete cosine transform (DCT) method and an image compression method using the same. More specifically, in the case of two-dimensional DCT, each column (row) is the next column after the first row (column) direction one-dimensional DCT. The present invention relates to a discrete cosine transform method that can reduce power consumption and computation time by skipping the next step if predicted to 0 by quantization after the (row) direction one-dimensional DCT.

이산여현변환(Discrete cosine transform(DCT))과 역이산여현변환(Inverse Discrete Cosine Transform(IDCT))이란 휘도와 색차로 표현되는 영상신호를 공간상의 주파수 영역으로 변환하고 이를 역변환시키는 방법으로 MPEG, H.263등의 국제표준규격에서 영상 압축, 복원을 위해 채택하고 있는 방법이다.Discrete cosine transform (DCT) and Inverse Discrete Cosine Transform (IDCT) are methods of converting video signals represented by luminance and color difference into the frequency domain in space and inverting them. This method is adopted for image compression and reconstruction in international standard such as .263.

DCT 연산은 블록(block)이라고 불리우는 64개의 픽셀(pixel)을 하나의 단위로 해서 이루어진다.The DCT operation is performed using one unit of 64 pixels called blocks.

즉 하나의 화면을 여러 개의 블록으로 쪼개고 각각의 블록에 대해 DCT 연산을 반복 수행하여 DCT계수를 얻게 된다.In other words, DCT coefficients are obtained by splitting a screen into several blocks and repeating DCT operations for each block.

디코더(Decoder, 복호기)의 IDCT에서는 인코더(Encorder, 부호기)로부터 받은 DCT계수를 원래의 픽셀값으로 복원한다.In the IDCT of the decoder, the DCT coefficient received from the encoder is restored to the original pixel value.

도 1에 도시한 바와 같이 영상압축시스템의 일반적인 구성은 움직임예측(ME: Motion Estimation), 움직임보상-(MC-: Motion Compensation -,(1)), DCT(3), 양자화(Q: Quantization,(2)), AC&DC 예측(4), 가변장부호화(VLC: Variable Length Coding,(5)), 역양자화(IQ: Inverse Quantization,(6)), IDCT(7) 움직임보상+(MC+,(8))로 이루어진다.As shown in FIG. 1, the general configuration of an image compression system includes motion estimation (ME), motion compensation (MC), motion compensation ((1)), DCT (3), quantization (Q: quantization, (2)), AC & DC Prediction (4), Variable Length Coding (VLC) (5), Inverse Quantization (IQ: Inverse Quantization, (6)), IDCT (7) Motion Compensation + (MC +, ( 8)).

여기서 미도시된 움직임예측(ME)을 제외한 나머지는 8x8 pixel의 한 블록을 계산 단위로 한다.Here, except for the motion prediction ME, not shown, one block of 8x8 pixels is used as a calculation unit.

움직임예측은 현재 프레임이 과거 프레임의 어느 부분과 가장 유사한지를 계산하고, 움직임보상-(1)에서 그 차를 계산한다.The motion prediction calculates which part of the past frame is most similar to the previous frame, and calculates the difference in motion compensation- (1).

이 결과가 DCT(2)를 거쳐 양자화(3)를 하게 되고, 이를 가변장부호화(5)를 하게 된다.The result is the quantization (3) via the DCT (2), and the variable length encoding (5).

그리고, 다음 프레임에서 움직임예측을 위해서 양자화된 것을 역양자화(6)를 거치고, IDCT(7)를 거쳐서 움직임보상+(8)를 하여 현재 프레임의 복원된 영상을 만든다.Then, in the next frame, the quantized for motion prediction is subjected to inverse quantization (6), and motion compensation + (8) is performed through IDCT (7) to generate a reconstructed image of the current frame.

이때 DCT(2) 및 IDCT(7)는 블록 단위의 처리기 중에서 연산량이 가장 많다.At this time, DCT (2) and IDCT (7) has the largest amount of computation among the processor in the block unit.

따라서 압축 시스템의 성능은 DCT/IDCT의 성능과 직접적인 관계를 가지고 있고 소비전력이 적은 DCT/IDCT가 필수적이다.Therefore, the performance of the compression system is directly related to the performance of DCT / IDCT, and DCT / IDCT with low power consumption is essential.

도 1에서 8*8 64 픽셀(pixel) 단위로 움직임보상-(1), DCT(2), 양자화(3), AC&DC 예측((4),MPEG-4의 경우) 가변장부호화(5)를 거쳐서 코딩된 스트림이 생성된다.In FIG. 1, motion compensation (1), DCT (2), quantization (3), AC & DC prediction (4, and MPEG-4) variable length coding (5) is performed in units of 8 * 8 64 pixels. The coded stream is then generated.

또한 양자화된 블록은 다시 다음 프레임에서 움직임예측에 사용되기 위해 복원장치에서와 같이 복원되어야 하는 바, 역양자화(6)와 IDCT(7) 그리고 움직임보상+(8)를 거쳐서 복원된다.In addition, the quantized block needs to be restored as in the restoring apparatus in order to be used for the motion prediction in the next frame, and is restored through the inverse quantization 6, the IDCT 7, and the motion compensation + 8.

보통의 영상은 프레임간에 차이가 별로 없고, 움직임예측을 하기 때문에 움직임보상-(1)를 거치고 나면 계수가 거의 0에 가깝게 된다.Normal images have little difference between frames, and since the motion prediction is performed, the coefficient becomes almost zero after the motion compensation- (1).

이를 DCT(2)를 거치고 양자화(3)를 거치면 계수 모두가 0인 블록이 많이 생긴다.After passing through the DCT (2) and the quantization (3), a large number of blocks having all coefficients of 0 are generated.

이렇게 하여 100:1에 가까운 압축율을 보이게 된다.In this way, the compression ratio is close to 100: 1.

도 2를 참고로 해서 각 연산 블록을 거친 다음의 계수들을 다음과 같이 정의 한다.Referring to FIG. 2, the following coefficients after each operation block are defined as follows.

: 움직임보상-(1)의 결과, : As a result of motion compensation (1),

: DCT(2)의 결과 : Result of DCT (2)

: 양자화(3)의 결과 : Result of quantization (3)

: 역양자화(6)의 결과 : Result of inverse quantization (6)

: IDCT(7)의 결과 : Result of IDCT (7)

움직임보상-(1) 결과의 블록값에 대하여 8*8 2D(2차원) DCT(2) 결과는 수학식 1로 정의된다.Motion compensation-block value of (1) result For 8 * 8 2D (two-dimensional) DCT (2) results are defined by Equation 1.

이 이후 DCT 결과를 양자화(3)하게 되는 데 이는 수학식 2로 연산된다.After this, the DCT result is quantized (3), which is calculated by Equation 2.

여기서는 양자화 파라미터이고,는 가장 가까운 정수로 반올림 하는 것을 의미한다.here Is the quantization parameter, Means round to the nearest whole number.

다음에서부터가 0이 되는 조건을 설명한다.next From The condition that becomes 0 is demonstrated.

상기 수학식 2에서가 0인 것과 0이 아닌 것은 수학식 3의 조건을 만족하면 된다.In Equation 2 Is 0 and not 0, the condition of the equation (3) is satisfied.

상기 수학식 1에서함수는 -1∼1의 범위를 가지고,는 가장 큰 값인 1로 가정을 하면 수학식 4의 조건이 만족된다.In Equation 1 Function has a range of -1 to 1, Assuming that 1 is the largest value, the condition of Equation 4 is satisfied.

상기 수학식 3과 수학식 4를 결합하면 양자화 결과인가 0이 되는의 관계는 수학식 5가 된다.When Equation 3 and Equation 4 are combined, quantization results are obtained. Becomes 0 The relationship of becomes (5).

상기 수학식 5는 DCT 입력의 모든 계수의 절대값 합이 4*Q보다 적으면 그 블록은 양자화(3) 후에 모두 0이 된다는 의미이다.Equation (5) means that if the sum of the absolute values of all coefficients of the DCT input is less than 4 * Q, the blocks are all zero after the quantization (3).

한 블록의 절대값의 합을 구하는 것은 비교적 쉬운 연산이며, 움직임보상-(1)의 결과를 절대값을 취하고 합을 구하면 되므로 시간적인 낭비는 없고, 단지 하드웨어가 더 들어가서 소모전력의 증가를 가져온다.The sum of the absolute values of a block is a relatively easy operation, and since the absolute value of the motion compensation- (1) is taken and summed, there is no waste of time, only hardware is added to increase the power consumption.

그러나 DCT(2)와 양자화(3)는 많은 하드웨어가 사용되며 계산시간도 상당히 길기 때문에. 미리 0인 경우를 예측한다면 DCT(2)와 양자화(3)를 할 필요가 없게 되어 결과적으로 소모전력과 연산시간을 상당히 줄일 수 있다.However, because DCT (2) and quantization (3) use a lot of hardware and computation time is quite long. Predicting the case of zero in advance eliminates the need for DCT (2) and quantization (3), resulting in a significant reduction in power consumption and computation time.

또한 이렇게 모든 계수가 0인 경우에는 역양자화(6)와 IDCT(7) 마저도 할 필요가 없게 되므로 소모전력 및 연산시간을 더울 많이 줄일 수 있게 된다.In addition, when all the coefficients are 0, even the inverse quantization (6) and IDCT (7) do not need to be performed, thereby reducing power consumption and computation time much more.

이를 구현한 것이 도 2로써 절대값의 합을 구하고 4*Q(threshold)와 비교하여 모든 계수가 0이 되는지를 예측하는 올 제로 디텍터(All zero detector,(9)) 블록이 들어가게 된다.The implementation of this is shown in FIG. 2, where an all-zero detector block (9) is added to calculate the sum of absolute values and compare all coefficients to zero by comparing with 4 * Q (threshold).

도 3은 올 제로 디텍터의 상세도이다.3 is a detailed view of an all zero detector.

절대값을 취해서(9a) 전체 합을 구하여(9b) 저장하는(9c) 부분과 이 전체 합을 문턱값(Threshold)과 비교하여 모두 0(All zero)인지 아닌지를 판별하는 부분(9d)으로 구성되어 있다.It consists of a part (9c) that takes an absolute value (9a), obtains the total sum (9b), and stores it (9c), and a part (9d) that compares the total sum with a threshold and determines whether or not it is all zero. It is.

도 4는 일반적인 영상압축의 흐름도이고, 도 5는 종래기술이 적용되었을 때의 흐름도이다.4 is a flowchart of a general image compression, and FIG. 5 is a flowchart when the prior art is applied.

비교기(9d)에서 모두 0(All zero)이라고 예측되었을 때에는 다음 단계의 연산 부분을 할 필요가 없기 때문에 수행시간을 상당히 줄일 수 있다.When all 0s are predicted in the comparator 9d, the execution time of the next step is not required, and thus the execution time can be considerably reduced.

수학식 5는 충분 조건으로서, 수학식 5를 만족시키면 양자화(3) 결과는 언제나 모든 계수가 0이 된다.Equation 5 is a sufficient condition. If Equation 5 is satisfied, the result of the quantization (3) is always 0 for all coefficients.

하지만 충분 조건이므로 수학식 5를 만족시키지 않더라도 양자화 결과가 0이될 수도 있다.However, since the condition is sufficient, the quantization result may be zero even if Equation 5 is not satisfied.

이런 경우를 예측실패(miss detection)라 하고, 비교적 많이 발생한다.This is called miss detection and occurs relatively often.

이렇게 많이 발생되는 이유는 8*8의 64 픽셀을 모두 사용하여 너무 포괄적이며, 또한 예측에 사용되는 데이터는 공간 영역인데 반해 실제 양자화 계산에 사용되는 데이터는 주파수 영역의 것이어서 상관 관계가 비교적 적기 때문이다.The reason for this is that it is so comprehensive that all 64 pixels of 8 * 8 are used, and the data used for prediction is spatial domain, whereas the data used for the actual quantization calculation is from the frequency domain, so the correlation is relatively small. .

이런 상황에서 예측실패(miss detection) 양을 줄이기 위해 4*Q인 문턱값(threshold)을 늘이는 방법이 있는데, 이렇게 하면 예측실패(miss detection) 양은 줄어들지만, 충분조건을 넘어서는 것이기 때문에 실제로 모두 0이 아닌데도 불구하고 모두 0으로 예측하는 예측과실(fault detection)이 늘어나게 된다.In this situation, there is a way to increase the threshold of 4 * Q to reduce the amount of miss detection, which reduces the amount of miss detection, but actually exceeds zero because it is beyond sufficient conditions. Even if it is not, there is an increase in fault detection that predicts all zeros.

이렇게 예측과실(fault detection)이 늘어날 경우 화질의 열화가 생기는 문제점이 있다.When fault detection increases, there is a problem in that image quality deteriorates.

본 발명은 상술한 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은 DCT를 행-열 분해법으로 수행하는 과정을 이용하여 1차원 DCT가 끝난 결과를 가지고 각 열이 모두 0이 되는지를 예측함으로써 각 열의 8 픽셀의 값을 이용하기에 예측범위가 좁아지고, 비록 2차원 DCT가 끝난 것은 아니지만 1차원에 대해서는 공간 영역에서 주파수영역으로 변환된 것을 사용하기에 상관관계도 높아지게 되어 예측과실(fault detection)을 늘이지 않으면서 예측실패(miss detection)를 줄일 수 있는 이산여현변환 방법과 이를 이용한 영상압축방법을 제공하는데 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to predict whether each column becomes zero with the result of one-dimensional DCT using a process of performing DCT by row-column decomposition. The prediction range is narrowed by using 8 pixel values of each column, and even though the two-dimensional DCT is not over, the correlation is increased due to the use of transformed from the spatial domain to the frequency domain for the first dimension, and thus, fault detection is performed. The present invention provides a discrete cosine transform method and an image compression method using the same, which can reduce miss detection without increasing the value of?).

상술한 목적을 달성하기 위하여 본 발명은, 영상을 압축하기 위해 블록을 형성하고 8*8행열 64 픽셀의 블록 단위로 2차원 DCT를 행하는 방법에 있어서;In order to achieve the above object, the present invention provides a method for forming a block for compressing an image and performing a two-dimensional DCT in units of blocks of 8 * 8 matrix 64 pixels;

상기 8*8행열을 일차원의 행과 열로 분해하여 첫번째 일차원 DCT를 수행한 후, 각 행 또는 열의 모든 계수가 0인지를 예측하여 두번째 일차원 DCT를 수행함을 특징으로 하는 이산여현변환 방법을 제공하고자 한다.After the first one-dimensional DCT is performed by decomposing the 8 * 8 columns into one-dimensional rows and columns, a method of discrete cosine transforming is performed by predicting whether all coefficients of each row or column are zero. .

상술한 목적을 달성하기 위하여 본 발명은, 8*8행열 64 픽셀 단위로 움직임보상-, DCT, 양자화, AC&DC 예측(MPEG-4의 경우), 가변장부호화를 거쳐서 코딩된 스트림이 생성되고, 상기 양자화 후에 움직임예측에 사용되기 위해 역양자화, IDCT, 움직임보상+를 거쳐서 복원되는 영상압축방법에 있어서;In order to achieve the above object, according to the present invention, a stream coded through motion compensation, DCT, quantization, AC & DC prediction (for MPEG-4), variable length coding is generated in units of 64 pixels by 8 * 8 matrix. An image compression method which is reconstructed through inverse quantization, IDCT, motion compensation + for use in motion prediction after quantization;

상기 8*8행열을 일차원의 행과 열로 분해하여 첫번째 일차원 DCT를 수행한 후, 행 또는 열의 모든 계수가 0인지를 예측하여 상기 각 행 또는 열의 모든 계수가 0인지 아닌지의 정보를 다음 단계의 연산에 이용하여 두번째 일차원 DCT, 양자화, 역양자화, 첫번째 일차원 IDCT의 연산량을 줄임을 특징으로 하는 영상압축방법을 제공하고자 한다.The first one-dimensional DCT is performed by decomposing the 8 * 8 columns into one-dimensional rows and columns, and then predicting whether all coefficients of the row or column are zero, and calculating information of whether all coefficients of each row or column are zero or not in the next step. The present invention provides an image compression method characterized by reducing the amount of computation of the second one-dimensional DCT, quantization, inverse quantization, and the first one-dimensional IDCT.

도 1은 일반적인 영상압축장치의 블록도이다.1 is a block diagram of a general video compression apparatus.

도 2는 MPEG4의 경우 종래기술이 적용된 영상압축장치의 블록도이다.2 is a block diagram of a video compression apparatus to which the prior art is applied in the case of MPEG4.

도 3은 도 2에 나타낸 올 제로 디텍터의 블록도이다.3 is a block diagram of an all zero detector shown in FIG. 2.

도 4는 일반적인 8*8 블록에 대한 영상압축의 흐름도이다.4 is a flowchart of image compression for a typical 8 * 8 block.

도 5는 종래기술이 적용된 8*8 블록에 대한 영상압축의 흐름도이다.5 is a flowchart of image compression for 8 * 8 blocks to which the prior art is applied.

도 6은 본 발명에 따른 영상압축장치의 블록도이다.6 is a block diagram of an image compression apparatus according to the present invention.

도 7은 본 발명에서 사용하는 2차원 DCT/IDCT를 행-열 분해법으로 수행하는 방법을 보여주는 도면이다.7 is a view showing a method of performing a two-dimensional DCT / IDCT used in the present invention by the row-column decomposition method.

도 8은 도 7에 나타낸 행-열 분해법의 연산영역과 방향을 나타내는 도면이다.FIG. 8 is a diagram illustrating an operation area and a direction of the row-column decomposition method illustrated in FIG. 7.

도 9는 행-열 분해법에 의한 DCT의 파이프라인을 보여주는 일예시도이다.9 is an exemplary view showing a pipeline of DCT by row-column decomposition.

도 10은 8*1 벡터 올 제로 디텍터의 구조도이다.10 is a structural diagram of an 8 * 1 vector all zero detector.

도 11은 첫번째 1차원 행방향 DCT의 연산방향과 절대값의 합을 구하는 방향을 나타내는 도면이다.11 is a diagram showing a direction for obtaining the sum of the calculation direction and the absolute value of the first one-dimensional row direction DCT.

도 12는 본 발명이 적용된 영상압축방법의 흐름도이다.12 is a flowchart of an image compression method to which the present invention is applied.

도 13은 제로 벡터의 정보를 이용한 DCT/IDCT의 연산 파이프라인을 보여주는 도면이다.FIG. 13 is a diagram illustrating a computation pipeline of DCT / IDCT using zero vector information.

<도면의 주요부분에 대한 부호의 설명><Description of the symbols for the main parts of the drawings>

1 : 움직임보상-(MC-)2 : DCT1: Motion compensation- (MC-) 2: DCT

3 : 양자화(Q)4 : AC&DC 예측3: quantization (Q) 4: AC & DC prediction

5 : 가변장부호화(VLC)6 : 역양자화(IQ)5: variable length coding (VLC) 6: inverse quantization (IQ)

7 : IDCT8 : 움직임보상+(MC+)7: IDCT8: Motion Compensation + (MC +)

9 : 올 제로 디텍터110 : 움직임보상-(MC-)9: All Zero Detector 110: Motion Compensation- (MC-)

120a,120b : 일차원 DCT125 : 치환 메모리120a, 120b: one-dimensional DCT125: replacement memory

130 : 양자화140 : AC&DC 예측130: quantization 140: AC & DC prediction

150 : 가변장 부호화160 : 역양자화150 variable length coding 160 inverse quantization

170a,170b : 일차원 IDCT170a, 170b: one-dimensional IDCT

175 : 치환 메모리180 : 움직임보상+175: replacement memory 180: motion compensation +

190 : 올 제로 디텍터190a : 8*1 벡터 올 제로 디텍터190: all zero detector 190a: 8 * 1 vector all zero detector

이하 본 발명의 실시예를 첨부된 도면을 참고로 그 구성 및 작용에 대해 설명하기로 한다.Hereinafter, the configuration and operation of the embodiments of the present invention will be described with reference to the accompanying drawings.

종래기술에서는 DCT 이전에 블록의 모든 계수가 0인지를 예측하였으나 예측실패(miss detection)가 많이 발생하여 나머지 연산을 수행하게 된다.In the prior art, it is predicted that all coefficients of a block are zero before the DCT, but a large number of miss detections occur to perform the remaining operations.

본 발명에서는 DCT 연산을 행-열 분해법으로 할 경우, 일차원(1D) DCT(120a) 이후에 다시 한번 모든 계수가 0인지를 예측한다.In the present invention, when the DCT operation is a row-column decomposition method, it is predicted once again that all coefficients are zero after the one-dimensional (1D) DCT 120a.

도 6에서 첫번째 1D DCT(120a) 이후 두번째 1D DCT(120b) 하기 전 첫번째 1D DCT(120a)의 값을 이용하여 8*1 벡터 올 제로 디텍터(vector all zero detector,(190a))에서 모든 계수가 0인지를 판별한다.In FIG. 6, all coefficients in the 8 * 1 vector all zero detector 190a are determined using the value of the first 1D DCT 120a after the first 1D DCT 120a and before the second 1D DCT 120b. Determine if it is zero.

여기서 모두 0으로 예측되면 다음 연산들을 생략하게 된다.If all zeros are predicted, the following operations are omitted.

도 7은 행-열 분해법(Row-Column Decomposition)을 이용해 2D DCT/IDCT를 계산하는 방법을 보여준다.7 shows a method of calculating 2D DCT / IDCT using row-column decomposition.

첫번째 DCT/IDCT(120a/170a)에서 행(열) 방향으로 계산을 먼저 하고 두 번째 DCT/IDCT(120b,170b)에서 열(행) 방향으로 계산한다.The first DCT / IDCT 120a / 170a performs the calculation in the row (column) direction and the second DCT / IDCT 120b, 170b performs the calculation in the column (row) direction.

중간의 치환(Transpose,125(175)) 연산은 개념적인 것으로 실제 연산에서는 메모리의 주소를 행방향, 열방향으로 하여 치환(transpose) 효과를 낸다,The intermediate substitution (Transpose, 125 (175)) operation is conceptual, and in actual operation, the memory address is transposed in the row direction and the column direction.

행을 먼저 하든지 열을 먼저 할 수도 있다.You can either row first or column first.

도 8은 첫번째 1차원 행방향 DCT를 먼저 수행하고 다음 두번째 1차원 열방향 DCT를 수행하는 데이터 영역을 도시한 것이다.FIG. 8 illustrates a data area for performing a first one-dimensional row DCT first and a second one-dimensional column DCT.

도 9는 행-열 분해법에서 행방향을 먼저 계산할 때의 파이프라인의 예를 나타내었다.9 shows an example of a pipeline when the row direction is first calculated in the row-column decomposition method.

행방향으로 각 행의 8 픽셀에 대해 DCT를 수행하고 이를 8 행에 대해서 수행하면 행방향 1차원 DCT(120a)가 끝나게 된다.If the DCT is performed on 8 pixels of each row in the row direction and the 8th row is performed, the row 1-dimensional DCT 120a ends.

다음 열방향으로 각 열의 8pixel 에 대해 DCT를 수행하고 이를 8열에 대해서 수행하면 2차원 DCT 가 끝나게 된다.If you perform DCT on 8 pixels of each column in the next column direction and perform it on 8 columns, 2D DCT ends.

여기서 1차원 행방향 DCT(120a)가 끝난 데이터는 수학식 6과 같이표현된다.Where the one-dimensional row direction DCT 120a is finished Is expressed as in Equation 6.

이때는 공간영역에서의 각 행의 인덱스가 되고는 주파수영역에서 각 행에서 열의 인덱스가 된다.At this time Is the index of each row in the space area Is the index of the column in each row in the frequency domain.

수학식 6에 대한 연산을의 값을 0서 7까지 변화시키면서 8번 수행함으로써 행방향의 1차원 DCT를 끝내게 된다.The operation on equation (6) By changing the value of from 0 to 7, 8 times to complete the one-dimensional DCT in the row direction.

다음 각 열(y 인덱스)방향으로 1차원 DCT(102b)를 수행하면 수학식 7과 같이 2차원 DCT 결과인를 얻게 된다.Next, when the one-dimensional DCT 102b is performed in each column (y index) direction, a two-dimensional DCT result as shown in Equation 7 is obtained. You get

수학식 7을 이용하여 DCT 후에 양자화(130)를 끝낸 각 행이 모두 0인지 아닌지를 예측할 수 있다.Equation (7) can be used to predict whether each row that has finished quantization 130 after DCT is all zero or not.

즉, 수학식 2의 양자화 연산식과 수학식 3의 양자화 결과가 0 이 되는 조건을 이용하면 된다.In other words, the condition that the quantization expression of Equation 2 and the quantization result of Equation 3 becomes 0 may be used.

수학식 7에서는 가장 큰 값으로 하고,은 -1~1의 범위를 가지므로 수학식 8을 유도할 수 있다.In equation (7) Is the largest value, Since E has a range of -1 to 1, Equation 8 can be derived.

상기 수학식 8과 수학식 3을 이용하면 각 열의 모든 계수가 0이 되는 충분조건은 수학식 9와 같이 된다.Using Equation 8 and Equation 3, the sufficient condition that all coefficients of each column become zero is as shown in Equation 9.

수학식 9에서 부등호 왼쪽 항은 1차원 행방향 DCT(120a) 결과의 열방향으로의 절대값의 합임을 알 수 있다.In Equation 9, it can be seen that the left term of the inequality sign is the sum of absolute values in the column direction of the result of the one-dimensional row direction DCT 120a.

따라서 1차원 행방향 DCT 연산후 각 열방향 절대값의 합을 구하여 각 열이 양자화 후 모두 0이 되는지를 알 수 있다.Therefore, it is possible to determine whether each column becomes zero after quantization by calculating the sum of absolute values in each column direction after the one-dimensional row direction DCT operation.

이를 수행하는 것이 도 6에서의 8*1 벡터 올 제로 디텍터(190a)로서 그 구성은 도 10에 나타난 바와 같이, 절대값을 구하는 ABS(190aa), 합을 구하는 애더(adder,(190ab)), 각 열의 합을 저장하기 위한 레지스터(S1~S8) 그리고, 각 열이 모두 0인지를 판별하는 비교기(190ac)로 구성된다.This is performed by the 8 * 1 vector all zero detector 190a of FIG. 6, which has an ABS 190aa for obtaining an absolute value, an adder 190ab for a sum, as shown in FIG. Registers S1 to S8 for storing the sum of each column, and a comparator 190ac for determining whether each column is zero.

비교기(190ac)의 출력은 수학식 9의 조건을 만족하여 열의 모든 계수가 0이 된다면 0 , 만족하지 않아서 0이 되지 않는다면 1이 되어 8개의 열에 해당하는 8비트 제로 벡터(bit zero_vector,(190ad))에 저장된다.The output of the comparator 190ac satisfies the condition of Equation 9 so that if all the coefficients of the column become 0, 0 becomes unsatisfactory and becomes 1, so that the output of the comparator 190ac corresponds to 8 columns. )

도 10의 예로 제로 벡터(zero_vector)는 00110100인데 이의 의미는 3,4,6번째 열은 0이 아닌 계수가 존재하며, 나머지 열은 모두 0이라는 의미이다.In the example of FIG. 10, the zero vector (zero_vector) is 00110100, which means that the 3rd, 4th, and 6th columns have non-zero coefficients, and all other columns are 0.

도 11에서 첫번째 행방향 1차원 DCT가 수행되는 동안의 연산방향과 절대값의 합을 구하는 방향을 나타내었다.In FIG. 11, the sum of the calculation direction and the absolute value during the first row direction one-dimensional DCT is shown.

가로 방향의 실선이 실제 8*1 한 행의 1D DCT(120a) 가 수행되는 것이고 세로 방향 점선이 다음 1D DCT(120b)를 수행될 방향이며, 예측에 사용하기 위해서 덧셈을 하는 방향이 된다.The solid line in the horizontal direction is the 1D DCT 120a of the actual 8 * 1 row, and the vertical dashed line is the direction in which the next 1D DCT 120b is to be performed, which is the direction of addition for prediction.

이렇게 구성된 영상압축 시스템의 동작을 살펴보면 먼저 1차원 행방향 DCT를 수행하기 전에 각 열의 합이 저장되어 있는 레지스터(S1~S8)는 0으로 초기화되고, 비교기(190ac) 출력이 저장되는 제로 벡터(190ad)도 초기화된다.Referring to the operation of the image compression system configured as described above, before performing the one-dimensional row DCT, the registers S1 to S8 in which the sum of each column is stored are initialized to zero, and the zero vector 190ad in which the output of the comparator 190ac is stored. ) Is also initialized.

그 다음 첫번째 행에 대해서 수학식 5가 계산되는 데 이때는 0이 된다.Equation 5 is then calculated for the first row. Becomes zero.

이렇게 계산된에서는 열의 인덱스가 되며 8*1 벡터 올 제로 디텍터(190a)의 레지스터(S1~S8)에 각각 저장된다.So calculated in Are the column indices and are stored in registers S1 to S8 of the 8 * 1 vector all zero detector 190a, respectively.

다음 행도 마찬가지로 DCT가 계산되어이 계산되고 이전 레지스터(S1~S8)의 값과 더해져서 다시 저장된다.The next row is likewise calculated with DCT Is calculated and added to the values of the previous registers S1 to S8 and stored again.

이렇게 7번째 행까지 마치고, 마지막 행을 계산할 때에는 이전까지의 절대값의 합과 현재 절대값이 더해져서 비교기(190ac)로 입력되어 각 열의 모든 계수가 0인지 아닌지를 판별하여 제로 벡터(190ad)에 저장된다.After finishing the 7th row, when calculating the last row, the sum of the previous absolute value and the current absolute value is added to the comparator 190ac to determine whether all coefficients of each column are 0 or not, and to the zero vector 190ad. Stored.

이렇게 첫번째 행방향 1D DCT(120a)가 끝난 다음에 제로 벡터(190ad)에 저장된 값이 00000000 이라면 모든 계수가 0인 블록으로 다음 연산순서를 생략하게 된다.If the value stored in the zero vector 190ad after the end of the first row direction 1D DCT 120a is 00000000, the next operation sequence is omitted as a block in which all coefficients are zero.

도 12는 본 발명이 적용되었을 때의 연산 순서도이다.12 is a flowchart illustrating operations when the present invention is applied.

또한 제로 벡터(190ad)에 저장된 값이 00000000이 아닌 경우에는 모든 계수가 0이 아닌 열(행)이 존재하게 된다.In addition, when the value stored in the zero vector 190ad is not 00000000, there are columns (rows) in which all coefficients are not zero.

이럴 경우에도 제로 벡터의 정보를 이용하여 다음 연산에서의 계산량을 줄일 수 있다.Even in this case, the amount of calculation in the next operation can be reduced by using the information of the zero vector.

일 실시예로 제로 벡터가 10010000일 경우 0이 아닌 열(행)은 첫번째와 네번째 뿐이므로 이 두 열(행)만 계산하고, 나머지는 0이므로 계산할 필요가 없다.In an embodiment, when the zero vector is 10010000, only the first and fourth non-zero columns (rows) are calculated, and only the two columns (rows) are calculated, and the remaining zeros do not need to be calculated.

도 13은 제로 벡터의 정보를 이용하였을 때 DCT 및 IDCT의 계산량 감소를 보여주고 있다.FIG. 13 shows a decrease in the amount of computation of DCT and IDCT when using zero vector information.

여기서 DCT는 열방향을 먼저 계산하고 다음 행방향으로 계산한 경우이다.Where DCT is calculated first in the column direction and then in the next row direction.

IDCT는 반대로 행방향을 먼저 계산하고 열방향을 계산하며, 제로 벡터는 첫번째 열방향 1D DCT 이후 10010000으로 예측되었을 때이다.IDCT, on the contrary, calculates the row direction first and then the column direction, with the zero vector predicted 10010000 after the first column direction 1D DCT.

두번째 행방향 1D DCT에서는 제로 벡터의 정보를 이용하여 계산이 필요한 1,4 번째 행만 계산하고, 따라서 양자화도 마찬가지로 1,4 행만 계산된다.In the second row direction 1D DCT, only the first and fourth rows that need to be calculated are calculated using the information of the zero vector, and therefore, only the first and fourth rows are also calculated.

영상복원을 위한 과정에서도 제로 벡터의 정보를 이용하여 첫번째 1D IDCT 와 역양자화에서 1,4 행만 계산하여 연산량을 줄인다.In the process of restoring the image, the amount of computation is reduced by calculating only 1,4 rows in the first 1D IDCT and inverse quantization using the zero vector information.

이렇게 제로 벡터의 정보를 이용하여 DCT/IDCT 에서 계산량을 줄이기 위해서는 두번째 DCT와 첫번째 IDCT의 방향이 같게 연산한다.In order to reduce the amount of computation in DCT / IDCT using the zero vector information, the directions of the second DCT and the first IDCT are calculated the same.

이상에서와 같이 본 발명에 의하면, 1차원 DCT가 끝난 결과를 가지고 각 열이 모두 0이 되는지를 예측하여 1차원에 대해서 공간 영역에서 주파수 영역으로 변화된 것을 사용하기에 상관관계가 높아지고 예측과실을 늘이지 않으면서 에측실패를 줄일 수 있게 된다.As described above, according to the present invention, the correlation between the spatial domain and the frequency domain is increased by predicting whether each column becomes 0 with the result of the one-dimensional DCT, and the prediction error increases. It is possible to reduce side failures without doing so.

또한, H.263이나 MPEG4와 같은 DCT 기반의 저전력 이동 영상 통화 단말기에 적용할 수 있고, 화질의 열화없이 영상압축 장치의 계산시간과 전력소모를 줄일 수 있으며, 계산 시간을 단축 할 수 있으므로 처리 가능한 프레임율(frame rate)을 높일 수 있다.Also, it can be applied to DCT-based low power mobile video telephony terminals such as H.263 and MPEG4, and it is possible to reduce the computation time and power consumption of the video compression device without degrading the image quality and to reduce the computation time. The frame rate can be increased.

Claims (9)

영상을 압축하기 위해 블록을 형성하고 8*8행열 64 픽셀의 블록 단위로 2차원 DCT를 행하는 방법에 있어서;A method for forming a block for compressing an image and performing two-dimensional DCT in blocks of 8 * 8 matrix 64 pixels; 상기 8*8행열을 일차원의 행과 열로 분해하여 첫번째 일차원 DCT를 수행한 후, 각 행 또는 열의 모든 계수가 0인지를 예측하여 두번째 일차원 DCT를 수행함을 특징으로 하는 이산여현변환 방법.And performing a first one-dimensional DCT by decomposing the 8 * 8 columns into one-dimensional rows and columns, and then predicting whether all coefficients of each row or column are zero to perform a second one-dimensional DCT. 청구항 1에 있어서, 상기 행방향에 대해 먼저 DCT를 수행한 후 모든 계수가 0으로 예측되면, 이후에 열방향에 대해 DCT를 수행하지 않음을 특징으로 하는 이산여현변환 방법.The method of claim 1, wherein if all coefficients are predicted as 0 after performing DCT in the row direction first, DCT is not performed in the column direction. 청구항 1에 있어서, 상기 열방향에 대해 먼저 DCT를 수행한 후 모든 계수가 0으로 예측되면, 이후에 행방향에 대해 DCT를 수행하지 않음을 특징으로 하는 이산여현변환 방법.The method of claim 1, wherein if all coefficients are predicted to 0 after DCT is performed in the column direction first, DCT is not performed in the row direction. 8*8행열 64 픽셀 단위로 움직임보상-, DCT, 양자화, AC&DC 예측(MPEG-4의 경우), 가변장부호화를 거쳐서 코딩된 스트림이 생성되고, 상기 양자화 후에 움직임예측에 사용되기 위해 역양자화, IDCT, 움직임보상+를 거쳐서 복원되는 영상압축방법에 있어서;A stream encoded by 8 * 8 matrix 64 pixel motion-compensation, DCT, quantization, AC & DC prediction (MPEG-4), variable length encoding is generated, and dequantized for use in motion prediction after the quantization. An image compression method restored through IDCT, motion compensation +; 상기 8*8행열을 일차원의 행과 열로 분해하여 첫번째 일차원 DCT를 수행한 후, 행 또는 열의 모든 계수가 0인지를 예측하여 상기 각 행 또는 열의 모든 계수가 0인지 아닌지의 정보를 다음 단계의 연산에 이용하여 두번째 일차원 DCT, 양자화, 역양자화, 첫번째 일차원 IDCT의 연산량을 줄임을 특징으로 하는 영상압축방법.The first one-dimensional DCT is performed by decomposing the 8 * 8 columns into one-dimensional rows and columns, and then predicting whether all coefficients of the row or column are zero, and calculating information of whether all coefficients of each row or column are zero or not in the next step. And a second one-dimensional DCT, quantization, inverse quantization, and an operation amount of the first one-dimensional IDCT. 청구항 4에 있어서, 상기 행 또는 열의 계수가 모두 0으로 예측될 경우, 이후 두번째 일차원 DCT, 양자화, 역양자화, 첫번째 일차원 IDCT의 연산을 생략함을 특징으로 하는 영상압축방법.The image compression method according to claim 4, wherein when the coefficients of the row or the column are all predicted as 0, the operation of the second one-dimensional DCT, quantization, inverse quantization, and the first one-dimensional IDCT is omitted. 청구항 4에 있어서, 상기 행 또는 열의 계수중 어느 하나의 비트라도 1로 예측될 경우, 이후 두번째 일차원 DCT, 양자화, 역양자화, 첫번째 일차원 IDCT의 연산에서 1인 비트의 행 또는 열의 계수만 계산함을 특징으로 하는 영상압축방법.The method of claim 4, wherein when any one of the coefficients of the row or column is predicted to be 1, only the coefficient of the row or column of the bit of 1 is calculated in the operation of the second one-dimensional DCT, quantization, inverse quantization, and the first one-dimensional IDCT. An image compression method characterized by the above. 청구항 4 내지 청구항 6중 어느 한 항에 있어서, 상기 행 또는 열의 계수가 모두 0인지 예측하는 방법은,The method according to any one of claims 4 to 6, wherein the method for predicting whether the coefficients of all the rows or columns are all zero is: 두번째 일차원 DCT 연산방향의 절대값을 구하는 단계,Obtaining the absolute value of the second one-dimensional DCT operation direction, 상기 절대값의 합을 구하는 단계,Obtaining a sum of the absolute values, 상기 절대값의 합을 비트별로 저장하는 단계,Storing the sum of the absolute values bit by bit, 상기 절대값의 합이 모두 0인지를 판별하는 단계,Determining whether the sum of the absolute values is all zero; 상기 판별 단계 후에 0 또는 1로 8비트의 제로 벡터에 저장하는 단계로 구성됨을 특징으로 하는 영상압축방법.And storing the 8-bit zero vector as 0 or 1 after the determining step. 청구항 7에 있어서, 상기 판별 단계에서,The method according to claim 7, wherein in the determining step, 수학식 10의 조건을 만족하여 모든 계수가 0이 된다면 0, 만족하지 않아서 0이 되지 않는다면 1이 되어 제로 벡터에 저장됨을 특징으로 하는 영상압축방법.And 0 if all coefficients are 0 because the condition of Equation 10 is satisfied, and if the coefficients are not satisfied, 0 is 1 and stored in a zero vector. 여기서는 첫번째 일차원 DCT의 결과치이고,는 양자화 파라미터이다.here Is the result of the first one-dimensional DCT, Is a quantization parameter. 청구항 8에 있어서, 상기 두번째 일차원 DCT와, 첫번째 일차원 IDCT의 계산방향을 같이 하여 상기 DCT와 IDCT 연산 단계에서 제로 벡터에 저장된 정보를 이용함을 특징으로 하는 영상압축방법.The image compression method according to claim 8, wherein the information stored in the zero vector is used in the DCT and IDCT calculation steps in the same direction as the second one-dimensional DCT and the first one-dimensional IDCT.
KR1020020047215A 2002-08-09 2002-08-09 Discrete cosine transform method and image compression method KR20040014047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020020047215A KR20040014047A (en) 2002-08-09 2002-08-09 Discrete cosine transform method and image compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020020047215A KR20040014047A (en) 2002-08-09 2002-08-09 Discrete cosine transform method and image compression method

Publications (1)

Publication Number Publication Date
KR20040014047A true KR20040014047A (en) 2004-02-14

Family

ID=37321291

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020020047215A KR20040014047A (en) 2002-08-09 2002-08-09 Discrete cosine transform method and image compression method

Country Status (1)

Country Link
KR (1) KR20040014047A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040031867A (en) * 2002-10-07 2004-04-14 엘지전자 주식회사 Moving picture encoder and method for coding using the same
KR100682912B1 (en) * 2005-01-05 2007-02-15 삼성전자주식회사 Method and apparatus for encoding and decoding image data
KR101395143B1 (en) * 2013-06-13 2014-05-21 이노뎁 주식회사 Integer transform method for image processing and device threof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19980050961A (en) * 1996-12-21 1998-09-15 양승택 2D Discrete Cosine Converter for Low Bit Rate Compression / Restore
KR19990024516A (en) * 1997-09-03 1999-04-06 정선종 2D Discrete Cosine Converter
KR20010083718A (en) * 2000-02-21 2001-09-01 송문섭 Method and apparatus for transformation and inverse transformation of image for image compression coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19980050961A (en) * 1996-12-21 1998-09-15 양승택 2D Discrete Cosine Converter for Low Bit Rate Compression / Restore
KR19990024516A (en) * 1997-09-03 1999-04-06 정선종 2D Discrete Cosine Converter
KR20010083718A (en) * 2000-02-21 2001-09-01 송문섭 Method and apparatus for transformation and inverse transformation of image for image compression coding

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040031867A (en) * 2002-10-07 2004-04-14 엘지전자 주식회사 Moving picture encoder and method for coding using the same
KR100682912B1 (en) * 2005-01-05 2007-02-15 삼성전자주식회사 Method and apparatus for encoding and decoding image data
KR101395143B1 (en) * 2013-06-13 2014-05-21 이노뎁 주식회사 Integer transform method for image processing and device threof

Similar Documents

Publication Publication Date Title
KR0174452B1 (en) Digital image decoder
JP2618083B2 (en) Image recovery method and apparatus
EP2323407A1 (en) Video image encoding method, video image decoding method, video image encoding apparatus, video image decoding apparatus, program and integrated circuit
KR101153105B1 (en) Fast video codec transform implementations
US20070071096A1 (en) Transcoder and transcoding method operating in a transform domain for video coding schemes possessing different transform kernels
US20070081589A1 (en) Adaptive quantization controller and methods thereof
US9877025B2 (en) Video encoding and decoding with prediction at higher precision
US8594189B1 (en) Apparatus and method for coding video using consistent regions and resolution scaling
US20060164543A1 (en) Video encoding with skipping motion estimation for selected macroblocks
JP2004032718A (en) System and method for processing video frame by fading estimation/compensation
KR0128881B1 (en) Digital image decoder
JP2005503695A (en) Video transcoding method and apparatus
KR20070088334A (en) Video transcoding method and apparatus thereof
KR19980017213A (en) Image Decoding System with Compensation Function for Degraded Image
KR20050085730A (en) Elastic storage
KR101345294B1 (en) Method and apparatus for quantizing image
KR0129573B1 (en) Method for compensating error of dc coefficient in digital image decoding technique
KR100198986B1 (en) Motion compensation apparatus for improving a blocking effect
KR20040014047A (en) Discrete cosine transform method and image compression method
US8249151B2 (en) SIMD-processor-friendly MPEG-2 intra-quantizer
KR100599935B1 (en) Fast Half-Pel searching Method on the base of SAD values according to integer-pel search and random variable corresponding each macro block
KR20100082700A (en) Wyner-ziv coding and decoding system and method
US8249150B2 (en) SIMD-processor-friendly MPEG-2 inter-quantizer
JP4089025B2 (en) Image encoding apparatus, image encoding method, image transmission system, and image transmission method
Kossentini et al. Rate-distortion-constrained subband video coding

Legal Events

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