KR20020008977A - Device for quantization of image conpression/restoration - Google Patents

Device for quantization of image conpression/restoration Download PDF

Info

Publication number
KR20020008977A
KR20020008977A KR1020000042046A KR20000042046A KR20020008977A KR 20020008977 A KR20020008977 A KR 20020008977A KR 1020000042046 A KR1020000042046 A KR 1020000042046A KR 20000042046 A KR20000042046 A KR 20000042046A KR 20020008977 A KR20020008977 A KR 20020008977A
Authority
KR
South Korea
Prior art keywords
quantization
value
multiplexer
error
multiplier
Prior art date
Application number
KR1020000042046A
Other languages
Korean (ko)
Other versions
KR100348210B1 (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 KR1020000042046A priority Critical patent/KR100348210B1/en
Publication of KR20020008977A publication Critical patent/KR20020008977A/en
Application granted granted Critical
Publication of KR100348210B1 publication Critical patent/KR100348210B1/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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation

Abstract

PURPOSE: A quantizer is provided to reduce quantization error and simplify a circuit configuration, by performing quantization/dequantization functions using one multiplier. CONSTITUTION: A comparison and detection part(20) converts a DCT or IDCT input value(10) into an absolute value and judges a data format of the input value. A ROM table(30) divides a QP value by an inverse number and stores result data. The second multiplexor receives and outputs an output value of the ROM table or the QP value. A multiplier(60) multiplies an output signal of the comparison and detection part(20) and data of the ROM table to quantize and dequantize data. The third multiplexor(70) clamps and encodes an output value of the multiplier when operated as a quantizer. The fourth multiplexor(80) clamps and encodes an output value of the multiplier when operated as a dequantizer. The fifth multiplexor(90) receives and outputs one of output signals of the third and fourth multiplexors.

Description

영상신호의 압축/복원용 양자화기{DEVICE FOR QUANTIZATION OF IMAGE CONPRESSION/RESTORATION}Quantizer for Compression / Restoration of Image Signals {DEVICE FOR QUANTIZATION OF IMAGE CONPRESSION / RESTORATION}

본 발명은 영상신호의 압축/복원용 양자화기에 관한 것으로, 더욱 자세하게는 한 개의 곱셈기를 통해 양자화와 역양자화기능을 수행하는 회로를 구현하는 양자화기에 관한 것이다.The present invention relates to a quantizer for compressing and restoring a video signal, and more particularly, to a quantizer for implementing a circuit for performing quantization and inverse quantization through a single multiplier.

일반적으로, 영상신호를 압축하는 방법으로 양자화방법이 많이 사용되고 있다.In general, a quantization method is widely used as a method of compressing a video signal.

여기서 양자화란 DCT변환계수전체를 어떤 값으로 나누어서 작은 값의 수로 표현함으로서 부호량을 줄이는 방법을 의미한다.In this case, quantization means a method of reducing a code amount by dividing the entire DCT transform coefficient by a certain value and expressing it as a small number of values.

QP를 나누기 위하여 나눗셈기를 쓰지 않고, 1/QP를 저장한 후 이 값을 곱하는 방법으로 정확한 양자화 값을 얻기 위해서는 비트수를 증가시켜야 한다.Rather than using a divider to divide the QP, store the 1 / QP and multiply this value to increase the number of bits to get the correct quantization value.

그러나 상기와 같이 비트수를 증가시키는 방법은 하드웨어측면에서 데이터의 크기도 더 크고 연산시간도 오래 걸리는 회로를 설계한다는 것을 의미하므로 비트수를 증가시키는 것은 바람직하지 않다.However, since the method of increasing the number of bits as described above means designing a circuit having a larger data size and a longer calculation time in terms of hardware, it is not desirable to increase the number of bits.

또한, 양자화기와 역양자화기가 따로 구성이 되야 하므로 경제적인 측면에서도 효율적이지 못하다.In addition, since the quantizer and the inverse quantizer must be configured separately, it is not efficient in terms of economics.

위와 같은 문제점을 해결하기 위하여 안출된 본 발명은 한개의 곱셈기를 사용하므로서 회로구성을 간단히 하고, 양자화에 의한 오차를 줄이는 데에 그 목적이 있다.The present invention devised to solve the above problems is to simplify the circuit configuration by using one multiplier and to reduce the error caused by quantization.

본 발명의 다른 목적은 양자화기와 역양자화기의 기능을 갖는 회로를 구성하는 데에 있다.Another object of the present invention is to construct a circuit having the functions of a quantizer and an inverse quantizer.

상기와 같은 목적을 달성하기 위한 본 발명은, 입력값을 절대값으로 변환하고 데이터의 형식을 판별하는 비교검출기와, 상기 비교검출기에서 출력된 값을 입력받아 출력하는 제 1 멀티플렉서와, QP의 값을 1/QP로 저장하여 출력하는 롬-테이블과, 상기 롬-테이블의 출력값을 입력받아 출력하는 제 2 멀티플렉서와, 상기 제 1멀티플렉서와 제 2멀티플렉서에서 출력된 값을 곱하여 양자화 또는 역양자화하는 곱셈기와, 양자화로 동작할 시 상기 곱셈기의 출력을 입력받아 클래핑하고 부호화하고 음수일 경우 2의 보수로 만들어 주는 제 3멀티플렉서와, 역양자화로 동작할 시 곱셈기의 출력을 받아 클래핑하고 음수의 경우 2의 보수로 만들어 주는 제 4멀티플렉서와, 상기 제 3 또는 제 4멀티플렉서의 출력값을 입력받아 출력하는 제 5멀티플렉서로 이루어진 것을 특징으로 한다.The present invention for achieving the above object, a comparison detector for converting the input value to an absolute value and determines the format of the data, a first multiplexer for receiving and outputting the value output from the comparison detector, and the value of the QP To multiply or dequantize by multiplying the ROM-table storing 1 / QP and outputting it, the second multiplexer receiving and outputting the output value of the ROM-table, and the value output from the first multiplexer and the second multiplexer. And a third multiplexer that receives, multiplies, and encodes the output of the multiplier when operating with quantization, and makes a two's complement when it is negative, and claps the output of the multiplier when operating with inverse quantization. A fourth multiplexer for making a two's complement and a fifth multiplexer for receiving and outputting an output value of the third or fourth multiplexer. It features.

본 발명은 또한, QP의 값이 1 또는 2이거나 INTRA-DC일 경우에는 별도의 DATA PATH를 더 포함하는 것을 특징으로 한다.The present invention is also characterized in that it further comprises a separate DATA PATH when the value of the QP is 1 or 2 or INTRA-DC.

본 발명은 또한, 상기 영상압축/복원용 양자화기는 양자화 또는 역양자화로 동작할 수 있으나, 상기 두 가지 기능으로 동시에 동작할 수는 없는 것을 특징으로 한다.The present invention is also characterized in that the image compression / restore quantizer can operate by quantization or inverse quantization, but cannot operate simultaneously with the two functions.

본 발명은 또한, 상기 곱셈기에서는 롬-테이블에 1/QP를 저장하여 이를 절대화된 값으로 처리된 입력값과 곱하는 것을 특징으로 한다.The present invention is also characterized in that the multiplier stores 1 / QP in a ROM-table and multiplies it by the input value treated as an absolute value.

본 발명은 또한, 1/QP를 저장시, QP가 3∼8일 경우에는 1/QP의 소수부분을,QP가 9∼16일 경우에는 1/(QPX4)의 소수부분을, QP가 17∼31의 경우에는 1/(QPX8)의 소수부분을 저장하여 연산의 오차를 줄이는 것을 특징으로 한다.In the present invention, when storing 1 / QP, when the QP is 3 to 8, the fractional part of 1 / QP is used; when the QP is 9 to 16, the fractional part of 1 / (QPX4) is used; In case of 31, the fractional part of 1 / (QPX8) is stored to reduce the error of operation.

본 발명은 또한, 상기 곱셈기를 통해 나온 값을 반올림하는 방법과, 1/QP값을 저장할 때 올림하여 저장하는 방법 중 양자화로 인한 데이터의 왜곡이 적은 방법을 선택적으로 적용할 수 있도록 하는 것을 특징으로 한다.The present invention is also characterized in that it is possible to selectively apply a method of rounding the value obtained through the multiplier and a method of reducing the distortion of data due to quantization among the method of rounding up and storing the 1 / QP value. do.

본 발명은 또한, 상기의 방법들을 선택함에 있어서, '최대양자화에러'가 최소가 되도록 함으로서 양자화로 인한 오차를 줄일 수 있는 것을 특징으로 한다.The present invention is also characterized in that the error due to quantization can be reduced by minimizing the 'maximum quantization error' in selecting the above methods.

본 발명은 또한, '최대양자화에러'는 양자화식에 의한 양자화 간격과 양자화기에 의한 양자화간격의 오차를 나타내는 '에러'가 양자화계수가 홀수일 때에는 에러가 양수일 경우 1을 감산하고, 음수일 경우는 그대로 값을 가지며, 양자화계수가 짝수일 때에는 에러가 음수인경우에는 1을 가산하고, 양수인 경우에는 그대로 값을 가지는 방법으로 구해지는 것을 특징으로 한다.In the present invention, the 'maximum quantization error' is an error that indicates the error between the quantization interval and the quantization interval by the quantization equation, and when the error is positive, 1 is subtracted when the error is positive, and negative. It has a value as it is, and when the quantization coefficient is even, the error is negative, and 1 is added.

도 1은 본 발명의 구성을 일실시예로 나타낸 것이다.Figure 1 shows the configuration of the present invention in one embodiment.

도 2는 본 발명에서의 양자화과정을 나타낸 흐름도이다.2 is a flowchart illustrating a quantization process according to the present invention.

도 3은 본 발명에서의 역양자화과정을 나타낸 흐름도이다.3 is a flowchart illustrating an inverse quantization process in the present invention.

도 4는 본 발명에서 양자화기와 양자화식에 의한 양자화간격을 그래프를 이용하여 비교한 것이다.Figure 4 compares the quantization interval by the quantizer and the quantization equation in the present invention using a graph.

도 5은 본 발명에서의 최대양자화에러(MAX QUANT ERROR)를 일실시예로 나타낸 것이다.Figure 5 shows the maximum quantization error (MAX QUANT ERROR) in one embodiment of the present invention.

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

10 : 입력신호 20 : 비교검출기(BIT-RATE ALLOCATION SIGNAL10: input signal 20: comparison detector (BIT-RATE ALLOCATION SIGNAL

30 : 롬-테이블(ROM-TABLE) 40 : 제 1멀티플렉서30: ROM-TABLE 40: First Multiplexer

50 : 제 2멀티플렉서 60 : 곱셈기(MULTILIER50: second multiplexer 60: multiplier (MULTILIER

70 : 제 3멀티플렉서 80 : 제 4멀티플렉서70: third multiplexer 80: fourth multiplexer

90 : 제 5멀티플렉서90: fifth multiplexer

이하 본 발명의 바람직한 실시예를 도면을 참조로 하여 설명하면 다음과 같다.Hereinafter, exemplary embodiments of the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명의 구성을 일실시예로 나타낸 것이다. 도시된 바와 같이, 실선으로 표시한 것은 양자화 회로의 데이터 처리경로를 나타낸 것이고, 점선으로 표시한 것은 역양자화회로의 데이터처리경로를 나타낸 것이다. 상기 두 과정은 다음의 도 2 및 도 3을 참조로 하여 설명하기로 한다.Figure 1 shows the configuration of the present invention in one embodiment. As shown, the solid line represents the data processing path of the quantization circuit, and the dotted line represents the data processing path of the inverse quantization circuit. The two processes will be described with reference to FIGS. 2 and 3.

DCT된 또는 IDCT될 입력값(10)을 받아 절대값으로 변환하고 입력된 값의 데이터형태를 판별하는 비교검출기(20)와, QP값을 역수로 나누어 그 데이터를 저장하여 출력하는 롬-테이블(ROM TABLE)(30)과, 상기 롬-테이블의 출력값을 입력받거나 또는 QP의 값을 입력받아 출력하는 제 2멀티플렉서와, 상기 비교검출기(20)에서 출력된 신호와 상기 롬테이블의 데이터를 입력신호로 받아 곱셈연산처리하여 데이터를 양자화나 역양자화하는 곱셈기(60)와, 양자화로 동작할 경우 상기 곱셈기의 출력값을 입력받아 그 데이터를 일정수준으로 클리핑하고 부호화하여 출력하는 제 3멀티플렉서(70)와, 역양자화로 동작할 경우 곱셈기(60)의 출력값을 입력받아 그 데이터를 일정수준으로 클리핑하고 부호화하여 출력하는 제 4멀티플렉서(80)와, 제 3멀티플렉서 또는 제 4멀티플렉서로부터 출력된 값을 입력으로 받아 출력하는 제 5멀티플렉서(90)로 이루어진다.A comparison detector 20 which receives the input value 10 to be DCT or IDCT, converts it into an absolute value and determines the data type of the input value, and a ROM table that stores and outputs the data by dividing the QP value by an inverse ( ROM table 30, a second multiplexer which receives an output value of the ROM table or receives a value of QP, and outputs a signal output from the comparison detector 20 and data of the ROM table. A multiplier 60 that multiplies and dequantizes the data by multiplying the received data, and a third multiplexer 70 that receives the output value of the multiplier when the quantization is performed, and clipping and encoding the data to a predetermined level. In case of operating by inverse quantization, the output of the multiplier 60 is input to the fourth multiplexer 80, and the third multiplexer or the fourth multiplexer to clip and encode the data to a predetermined level. It consists of a fifth multiplexer 90 to receive the output value from the output as an input.

도 2는 본 발명에서의 양자화과정을 나타낸 흐름도이다. 도시된 바와 같이, DCT된 입력값을 받아들여서(S10) 입력값이 인트라-디씨(INTRA-DC)인지 판별한 다음(S11) 입력값이 인트라-디씨가 아니면 비교검출기(20)로 입력되어 상기 비교검출기(20)에서는 데이터의 형태를 판별하고 그 값을 절대값으로 변환한다(S20). 상기의 데이터는 3가지로 그 형태가 구분되는데, 데이터가 인트라블럭(INTRA BLOCK)인 경우에는(S30) 상기 비교검출기에서 출력된 값에 Q/2를 감산해주고(S40), 그 값을 제 1 멀티플렉서에 입력되도록 한다(S50). 상기 제 1멀티플렉서(40)에서 출력된 데이터는 곱셈기(60)의 입력이 된다.2 is a flowchart illustrating a quantization process according to the present invention. As shown, the DCT input value is accepted (S10) to determine whether the input value is INTRA-DC (S11), and if the input value is not intra-DC, it is input to the comparison detector 20 and The comparison detector 20 determines the shape of the data and converts the value to an absolute value (S20). The data is classified into three types. When the data is an INTRA BLOCK (S30), Q / 2 is subtracted from the value output from the comparison detector (S40), and the value is first. It is input to the multiplexer (S50). The data output from the first multiplexer 40 becomes an input of the multiplier 60.

한편 데이터의 입력과 함께 QP(양자화계수)값도 롬-테이블로 입력이 된다. 롬-테이블에서는 이 QP값을 역수인 1/QP로 저장하고 이 값을 제 2멀티플렉서에서입력받아 출력한다.On the other hand, the QP (quantization coefficient) value is also input to the ROM-table together with the data input. In the ROM table, the QP value is stored as 1 / QP, which is the inverse, and the value is received from the second multiplexer and output.

곱셈기(60)에서 1/QP값과 제 1멀티플렉서의 출력값을 입력으로 받아 상기 두 값을 서로 곱하여 양자화된 데이터를 출력한다(S60).The multiplier 60 receives the 1 / QP value and the output value of the first multiplexer as inputs, multiplies the two values, and outputs quantized data (S60).

상기 곱셈기에서 출력된 값에 0.125의 값을 더하여 정수부분만을 취하게 되고(S70), 제 3멀티플렉서(70)로 입력된다. 제 3멀티플렉서에서는 정해진 기준으로 클리핑하고 부호화하여(S80) 제 5멀티플렉서 (90)로 입력하고, 제 5멀티플렉서에서 양자화신호가 출력되고(S90), 종료한다(S100).A value of 0.125 is added to the value output from the multiplier to take only an integer part (S70) and is input to the third multiplexer 70. The third multiplexer is clipped and encoded according to a predetermined reference (S80), inputted to the fifth multiplexer 90, and the quantized signal is output from the fifth multiplexer (S90), and ends (S100).

만약, 양자화계수가 1(S33) 또는 2(S31)인 경우에는 1/QP를 롬-테이블에 저장할 수 없으므로, 상기의 과정을 거치지 않고 별도의 DATA PATH구성이 요구되며, 제 3멀티플렉서로 입력되고, 일정수준으로 클래핑한 후 음수이면 2의 보수로 만든 후 제 5멀티플렉서로 전송하도록 한다. 또한, 입력데이터가 인트라-디씨이면 그 값을 8로 나누어서 제 3멀티플렉서로 입력되고, 일정수준으로 클래핑한 후 제 5멀티플렉서로 전송하도록 한다.If the quantization coefficient is 1 (S33) or 2 (S31), since 1 / QP cannot be stored in the ROM-table, a separate DATA PATH configuration is required without going through the above process, and is input to the third multiplexer. After clapping to a certain level, if it is negative, make it to 2's complement and send it to the fifth multiplexer. In addition, if the input data is intra-DC, the value is divided by 8 and input to the third multiplexer.

상기의 양자화과정에서 롬-테이블에서는 QP를 1/QP로 변환하여 10비트로 저장한다. 이 때 1/QP를 2진수로 포함하여 소수점이하를 그대로 저장하는 것이 아니라 보다 많은 유효숫자를 포함하기 위해서 QP가 3~8일 경우에는 1/QP의 소수부분을, QP가 9~16일 경우에는 1/QP*4의 소수부분을, QP가 17~31일 경우에는 1/QP*8의 소수부분을 저장하도록 하여 보다 정확한 나눗셈이 가능하도록 한다.In the quantization process, the ROM-table converts QP into 1 / QP and stores 10 bits. In this case, instead of storing 1 / QP as a binary number and storing more than the decimal point as it is, in order to include more significant digits, if the QP is 3-8, the fractional part of the 1 / QP is 9-16. The fractional part of 1 / QP * 4 and the fractional part of 1 / QP * 8 are stored when QP is 17 to 31 so that more accurate division is possible.

도 3은 본 발명에서의 역양자화과정을 나타낸 흐름도이다. 도시된 바와 같이, 데이터가 입력되면(T10), 데이터가 인트라-디씨(INTRA-DC)인지를 검사하고(T11), 인트라-디씨(INTRA-DC)가 아니면 비교검출기(20)에 입력된다. 비교검출기에서는 상기 데이터를 절대값으로 변환하여 출력하고(T20), 상기 출력된 데이터에 2를 곱한 후 다시 1을 더한 후(T30) 곱셈기(60)로 입력된다. 한편, 데이터의 입력과 함께 QP도 제 2멀티플렉서로 입력되어 그 출력값이 곱셈기로 입력되어서(T31), 곱셈기에서는 상기 두 값을 곱하여 역양자화한 후 출력한다(T40). 출력된 데이터가 짝수인지 홀수인지 판별하여(T50) 홀수이면 그대로 제 4멀티플렉서로 입력되고, 짝수이면 데이터에 1을 감하여 홀수로 변환한 다음(T60) 제 4멀티플렉서로 입력된다. 제 4멀티플렉서(80)에서는 상기 데이터를 일정기준으로 클래핑하고 복호화하여 출력하고(T70), 이를 제 5멀티플렉서에서 입력받아 출력하여(T80) 종료한다(T90).3 is a flowchart illustrating an inverse quantization process in the present invention. As shown, if data is input (T10), it is checked whether the data is INTRA-DC (T11), and if it is not intra-DC (INTRA-DC), it is input to the comparison detector 20. The comparison detector converts the data into an absolute value (T20), multiplies the output data by two, adds one again (T30), and then inputs the multiplier 60. On the other hand, the QP is also input to the second multiplexer together with the data input, and the output value is input to the multiplier (T31). The multiplier multiplies the two values to dequantize and output the result (T40). If the output data is even or odd (T50), an odd number is input to the fourth multiplexer as it is, and if it is even, it is converted to an odd number by subtracting 1 from the data (T60) and then input to the fourth multiplexer. In the fourth multiplexer 80, the data is clad, decoded on a predetermined basis, decoded and output (T70), and it is received by the fifth multiplexer and outputted (T80) to end (T90).

상기에서 입력신호가 인트라-디씨인 경우에는 별도의 DATA PATH의 구성이 요구되는데, 입력신호에 8을 곱한 후(T33) 제 4멀티플렉서에서 일정수준으로 클래핑하고 복호화하여 제 5멀티플렉서로 전송하도록 한다 (T70).If the input signal is an intra-DC, a separate DATA PATH is required. After multiplying the input signal by 8 (T33), the input signal is clad to a predetermined level in the fourth multiplexer, decoded, and transmitted to the fifth multiplexer. (T70).

상기의 양자화과정에서 곱셈기의 출력값을 반올림할 때 QP가 3~8일 경우에는 1/8을, QP가 9~16일 경우에는 1/32를, QP가 17~31일 경우에는 1/64를 더하여 정수부분을 취함으로서 구현하였다. 그러나, Q값에 따라서는 곱셈기에서 나온 값을 반올림하기 보다는 1/QP를 10비트로 저장할 때 올림을 하여 저장한 후 곱셈기를 통해 나온 값은 반올림하지 않는 것이 더 정확한 경우가 있을 수 있다. 따라서, 1/QP를 10비트에 저장할 때 내림으로 저장하고 곱셈기에서 나온 값을 반올림하는 방법과, 1/QP를 올림으로 저장하고 곱셈기에서 나온 값은 반올림하지 않는 방법중에서 선택할 필요가 있다.When rounding the output of the multiplier in the quantization process, 1/8 for QP 3-8, 1/32 for QP 9-16, 1/64 for QP 17-31. In addition, it is implemented by taking the integer part. However, depending on the Q value, it may be more accurate to round up the 1 / QP when storing 10 bits instead of rounding the value from the multiplier, and then not round the value from the multiplier. Therefore, when storing 1 / QP in 10 bits, it is necessary to select a method of storing in round down and rounding the value from the multiplier, and of storing 1 / QP in rounding and not rounding the value from the multiplier.

상기의 두 가지 방법중 한 가지를 선택하는 기준은 원래의 양자화식과 오차가 적은 값이 산출되는 값을 선택하는 것이다. 만약 두 방법 모두 양자화식과 똑같은 결과를 내지 못할 경우에는 양자화로 인한 데이터의 왜곡이 적은 방법을 선택해야 한다. 이를 위해 다음 도 4 및 도 5를 참조로 하여 상기 두 방법을 선택하는 과정을 알아보기로 한다.The criterion for selecting one of the above two methods is to select a value from which the original quantization equation and the value with less error are calculated. If both methods do not produce the same result as the quantization equation, a method with little distortion of data due to quantization should be selected. To this end, a process of selecting the two methods will be described with reference to FIGS. 4 and 5.

도 4는 본 발명에서 양자화기와 양자화식에 의한 양자화간격을 그래프를 이용하여 비교한 것이다. 도시된 바와 같이, 양자화식에 의한 양자화 간격과의 오차를 '에러'라고 설정한다. 그래프의 가로축은 양자화하려는 값이고, 세로축은 양자화된 값이다. 본 발명의 양자화기에 의한 결과가 위쪽 그래프이고, 양자화식에 따른 기준이 아래쪽 그래프이다. 그래프에 표시된 에러가 작은 방법을 찾는 것이 기본적인 선택기준이 된다.Figure 4 compares the quantization interval by the quantizer and the quantization equation in the present invention using a graph. As shown, the error with the quantization interval by the quantization equation is set as 'error'. The horizontal axis of the graph is a value to be quantized, and the vertical axis is a quantized value. The result of the quantizer of the present invention is the upper graph, and the criterion according to the quantization equation is the lower graph. Finding the way the error in the graph is small is the basic selection criterion.

도 5은 본 발명에서의 최대양자화에러(MAX QUANT ERROR)를 일실시예로 나타낸 것이다. 도시된 바와 같이, QP=3인 경우에 대하여 상기에서 설명한 에러가 -1, 0, 1, 2 일 때 1로 양자화되는 값들을 점으로 나타낸 것이다. 만약 양자화되어야 하는 값들이 같은 확률로 발생하다고 하면 양자화/역양자화로 인한 오차는 다음과 같다.Figure 5 shows the maximum quantization error (MAX QUANT ERROR) in one embodiment of the present invention. As shown, the values described above for the case where QP = 3 are quantized to 1 when the error described above is -1, 0, 1, or 2 are represented by dots. If the values to be quantized occur with the same probability, the error due to quantization / dequantization is as follows.

ERROR= -1이면, (4+3+2+1+0+1)/6 = 11/6If ERROR = -1, (4 + 3 + 2 + 1 + 0 + 1) / 6 = 11/6

ERROR= 0이면, (3+2+1+0+1+2)/6 = 9/6If ERROR = 0, then (3 + 2 + 1 + 0 + 1 + 2) / 6 = 9/6

ERROR = 1이면, (2+1+0+1+2+3)/6 = 9/6If ERROR = 1, then (2 + 1 + 0 + 1 + 2 + 3) / 6 = 9/6

ERROR = 2이면, (1+0+1+2+3+4)/6 = 11/6If ERROR = 2, (1 + 0 + 1 + 2 + 3 + 4) / 6 = 11/6

즉, 에러가 0과 1일 때가 최소의 오차를 내며 에러가 -1과 2일 때는 보다 큰 오차를 냄을 알 수 있다. 즉, 에러가 1인 경우는 비록 양자화식과는 정확히 일치하지 않으나, 양자화로 인한 오차의 측면에서는 양자화식을 따른 방법 즉, 에러가 0일 때와 동등하다는 것을 알 수있다. 따라서, 에러가 -1일 때보다는 1일 때가 더 좋은 방법이므로, Q가 홀수인 경우에는 에러가 양수인경우에 1을 감산하고, 음수일 경우에는 그대로 값을 갖는 것이 양자화에러를 보다 정확히 나타낼 수 있는 새로운 변수임을 알 수 있다. 이 변수를 최대양자화에러(MAX QUANT ERROR)라 설정한다. Q가 짝수인 경우에는 에러가 음수인 경우 1을 더하고, 양수인 경우에는 그대로 값을 갖게 하도록 하면 된다.That is, it can be seen that when the errors are 0 and 1, the minimum error is made and when the errors are -1 and 2, the error is larger. In other words, if the error is 1, it is not exactly the same as the quantization equation, but in terms of the error due to quantization, it can be seen that the method according to the quantization equation, that is, when the error is 0, is equivalent. Therefore, when error is -1, it is better to have error 1 than -1, so if Q is odd, subtract 1 if error is positive, and if it is negative, having a value as it is can represent quantization error more accurately. You can see that it is a new variable. Set this variable to the MAX QUANT ERROR. If Q is even, add 1 if the error is negative; if Q is positive, leave the value as it is.

양자화과정에서 1/QP를 곱한 후을 더해주는 반올림 방법과 1/QP자체를 반올림해서 저장하는 방법 중 하나를 선택할 때 이 최대양자화에러의 값을 고려한다.In the quantization process, multiply by 1 / QP The value of this quantization error is taken into account when choosing between a rounding method that adds and a rounding method to store 1 / QP itself.

본 발명은 한개의 곱셈기를 사용하여 양자화/역양자화 기능을 수행할 수 있도록 하여 회로의 구성을 간단하게 하는 효과가 있으며, 또한, 양자화로 인한 에러를 감소시키는 효과가 있다.The present invention has the effect of simplifying the configuration of the circuit by performing a quantization / dequantization function using a single multiplier, and also has the effect of reducing errors due to quantization.

Claims (5)

입력값을 절대값으로 변환하고 데이터의 형식을 판별하는 비교검출기와, 상기 비교검출기의 출력값을 입력받아 출력하는 제 1 멀티플렉서와, QP의 값을 1/QP로 저장하여 출력하는 롬-테이블과, 상기 롬-테이블의 출력값을 입력받아 출력하는 제 2 멀티플렉서와, 상기 제 1멀티플렉서와 제 2멀티플렉서에서 출력된 값을 곱하여 양자화 또는 역양자화하는 곱셈기와, 양자화로 동작할 시 상기 곱셈기의 출력을 입력받아 클래핑하고 부호화하는 제 3멀티플렉서와, 역양자화로 동작할 시 곱셈기의 출력을 받아 클래핑하는 제 4멀티플렉서와, 상기 제 3 또는 제 4멀티플렉서의 출력값을 입력받아 출력하는 제 5멀티플렉서로 이루어진 것을 특징으로 하는 영상압축/복원용 양자화기.A comparison detector for converting an input value to an absolute value and determining a format of the data, a first multiplexer for receiving and outputting an output value of the comparison detector, a ROM table for storing and outputting a value of QP as 1 / QP; A second multiplexer for receiving and outputting an output value of the ROM-table, a multiplier for quantizing or inverse quantizing by multiplying the values output from the first multiplexer and the second multiplexer, and receiving the output of the multiplier when operating with quantization A third multiplexer for clapping and encoding, a fourth multiplexer for receiving the output of the multiplier when the quantization is operated in inverse quantization, and a fifth multiplexer for receiving and outputting the output values of the third or fourth multiplexer. Image compression / restore quantizer. 제 1항에 있어서,The method of claim 1, 1/QP를 저장시, QP가 3∼8일 경우에는 1/QP의 소수부분을, QP가 9∼16일 경우에는 1/(QPX4)의 소수부분을, QP가 17∼31의 경우에는 1/(QPX8)의 소수부분을 저장하여 연산의 오차를 줄이는 것을 특징으로 하는 영상압축/복원용 양자화기.When storing 1 / QP, the fractional part of 1 / QP when QP is 3-8, the fractional part of 1 / (QPX4) when QP is 9-16, and 1 when QP is 17-31 A quantizer for image compression / restore, characterized in that it stores a fractional part of / (QPX8) to reduce the error of operation. 제 1항에 있어서,The method of claim 1, 상기 곱셈기를 통해 나온 값을 반올림하는 방법과, 1/QP값을 저장할 때 올림하여 저장하는 방법 중 양자화로 인한 데이터의 왜곡이 적은 방법을 선택적으로 적용할 수 있도록 하는 것을 특징으로 하는 영상압축/복원용 양자화기.Image compression / restore, characterized in that it is possible to selectively apply a method of rounding the value obtained through the multiplier and a method of rounding and storing 1 / QP values when the distortion of data due to quantization is small Quantizer. 제 3항에 있어서,The method of claim 3, wherein 상기의 방법들을 선택함에 있어서, '최대양자화에러'가 최소가 되도록 함으로서 양자화로 인한 오차를 줄일 수 있는 것을 특징으로 하는 영상압축/복원용 양자화기.In selecting the above methods, the error due to quantization can be reduced by minimizing the 'maximum quantization error'. 제 4항에 있어서,The method of claim 4, wherein '최대양자화에러'는 양자화식에 의한 양자화 간격과 양자화기에 의한 양자화간격의 오차를 나타내는 '에러'가 양자화계수가 홀수일 때에는 에러가 양수일 경우 1을 감산하고, 음수일 경우는 그대로 값을 가지며, 양자화계수가 짝수일 때에는 에러가 음수인경우에는 1을 가산하고, 양수인 경우에는 그대로 값을 가지는 방법으로 구해지는 것을 특징으로 하는 영상압축/복원용 양자화기.'Maximum quantization error' is an error that indicates the error between the quantization interval by the quantization formula and the quantization interval by the quantizer.If the quantization coefficient is odd, 1 is subtracted if the error is positive, and if it is negative, A quantizer for image compression / restore, characterized in that it is obtained by adding 1 when the error is negative when the quantization coefficient is even and having a value as it is when the positive quantization coefficient is positive.
KR1020000042046A 2000-07-21 2000-07-21 Device for quantization of image conpression/restoration KR100348210B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000042046A KR100348210B1 (en) 2000-07-21 2000-07-21 Device for quantization of image conpression/restoration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000042046A KR100348210B1 (en) 2000-07-21 2000-07-21 Device for quantization of image conpression/restoration

Publications (2)

Publication Number Publication Date
KR20020008977A true KR20020008977A (en) 2002-02-01
KR100348210B1 KR100348210B1 (en) 2002-08-09

Family

ID=19679288

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000042046A KR100348210B1 (en) 2000-07-21 2000-07-21 Device for quantization of image conpression/restoration

Country Status (1)

Country Link
KR (1) KR100348210B1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3131041B2 (en) * 1992-08-28 2001-01-31 三菱電機株式会社 Quantizer
JP3107676B2 (en) * 1993-03-23 2000-11-13 シャープ株式会社 Quantization circuit
KR0175974B1 (en) * 1995-07-04 1999-05-15 김은영 Processor for selectively performing multiplaying dividing operation s based on pipeline structure
KR0153173B1 (en) * 1995-11-13 1998-11-16 김은영 A processor for quantizing/inverse-quantizing
US5784011A (en) * 1996-06-14 1998-07-21 Lsi Logic Corporation Multiplier circuit for performing inverse quantization arithmetic
KR100289621B1 (en) * 1998-12-29 2001-05-02 이계철 Transform and inverse transform encoding apparatus of video encoder and method thereof

Also Published As

Publication number Publication date
KR100348210B1 (en) 2002-08-09

Similar Documents

Publication Publication Date Title
US10045034B2 (en) System and method for using pattern vectors for video and image coding and decoding
EP2282310B1 (en) Entropy coding by adapting coding between level and run-length/level modes
KR100624432B1 (en) Context adaptive binary arithmetic decoder method and apparatus
KR100552665B1 (en) Key data encoding/decoding method and apparatus
US20070168197A1 (en) Audio coding
US5034965A (en) Efficient coding method and its decoding method
JPH0313089A (en) Encoder
KR102400514B1 (en) Method and device for digital data compression
JPWO2007007672A1 (en) Signal encoding apparatus, decoding apparatus, method, program, recording medium, and signal codec method
US7155384B2 (en) Speech coding and decoding apparatus and method with number of bits determination
US20180205952A1 (en) Method and apparatus for performing arithmetic coding by limited carry operation
KR100348210B1 (en) Device for quantization of image conpression/restoration
WO2011162723A1 (en) Entropy encoder arrangement and entropy decoder arrangement
EP1470719A2 (en) Improved compression techniques
JPH04343576A (en) Highly efficient coding and decoding method
US20210029380A1 (en) Methods and apparatus for successive intra block prediction
WO2021058655A1 (en) Arithmetic encoders and decoders, video encoders and decoders, methods for encoding or decoding symbols, and methods for encoding or decoding video content
KR20160105848A (en) Method and apparatus for performing an arithmetic coding for data symbols
JPH0472870A (en) Picture encoding system
JPH05260310A (en) Inverse quantizing method and image data encoder and decoder

Legal Events

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

Payment date: 20130620

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20140701

Year of fee payment: 13

FPAY Annual fee payment

Payment date: 20150701

Year of fee payment: 14

FPAY Annual fee payment

Payment date: 20160701

Year of fee payment: 15

FPAY Annual fee payment

Payment date: 20170703

Year of fee payment: 16