KR0176505B1 - Method and apparatus for encoding the image with a fixed amount of encoding - Google Patents

Method and apparatus for encoding the image with a fixed amount of encoding Download PDF

Info

Publication number
KR0176505B1
KR0176505B1 KR1019950003544A KR19950003544A KR0176505B1 KR 0176505 B1 KR0176505 B1 KR 0176505B1 KR 1019950003544 A KR1019950003544 A KR 1019950003544A KR 19950003544 A KR19950003544 A KR 19950003544A KR 0176505 B1 KR0176505 B1 KR 0176505B1
Authority
KR
South Korea
Prior art keywords
quantization step
step size
discrete cosine
code amount
transform coefficients
Prior art date
Application number
KR1019950003544A
Other languages
Korean (ko)
Other versions
KR960032437A (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 KR1019950003544A priority Critical patent/KR0176505B1/en
Publication of KR960032437A publication Critical patent/KR960032437A/en
Application granted granted Critical
Publication of KR0176505B1 publication Critical patent/KR0176505B1/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/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
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • 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 apparatus for fixed coded image compression, comprising: a transforming process for discrete cosine transforming an image input in units of blocks, a weighting process for multiplying weights by the discrete cosine transform coefficients generated in the converting process, and a weighting process A quantization step size determination process for determining a final quantization step size that satisfies the allocated fixed code amount by using class information of the input image determined from the generated discrete cosine transform coefficients and a reference quantization step size, and the quantization step size determination process A quantization step of quantizing the discrete cosine transform coefficients using the quantization step size, and an encoding process of variable length coding the quantized discrete cosine transform coefficients in the quantization process. Therefore, by determining the final quantization interval satisfying the allocated fixed code amount from the code amount calculated by the class information and the reference quantization step size, the code amount can be adjusted while reducing the deterioration of image quality, and the circuit can be simplified in hardware implementation. have.

Description

고정부호량 영상부호화방법 및 장치Fixed Coded Image Coding Method and Apparatus

제1도는 본 발명의 의한 고정부호량 영상압축장치를 나타낸 블럭도.1 is a block diagram showing a fixed coded video compression apparatus according to the present invention.

제2도는 제1도에 도시된 양자화 스텝사이즈(Qno) 결정부에서 양자화 스텝사이즈(Qno)를 결정하는 과정을 도시한 플로우챠트.2 a flowchart illustrating a process of turning determines the quantization step size (Q no) in the first quantization step size (Q no) decision unit shown in Figure 1.

제3도는 부호량과 반복횟수와의 관계를 나타낸 그래프.3 is a graph showing the relationship between the amount of code and the number of iterations.

제4도는 클래스 정보를 이용하여 반복횟수를 결정하는 방법을 나타낸 도면.4 is a diagram illustrating a method of determining the number of repetitions using class information.

제5도는 클래스정보와 부호량을 이용한 신경회로망에 의해 반복횟수를 결정하는 방법을 나타낸 도면.5 is a diagram illustrating a method of determining the number of repetitions by a neural network using class information and a code amount.

본 발명은 고정부호량 영상압축방법 및 장치에 관한 것으로서, 특히 각 블럭별로 주어지는 클래스정보의 기준 양자화 스텝사이즈에서 발생하는 부호량을 이용하여 최종 양자화 스텝사이즈를 결정하여 이산여현변환 계수값을 양자화하기 위한 고정부호량 영상압축방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for fixed coded image compression, and more particularly, to quantize a discrete cosine transform coefficient value by determining a final quantization step size using a code amount generated from a reference quantization step size of class information given for each block. The present invention relates to a fixed coded image compression method and apparatus.

디지탈 비디오 카세트 레코더(이하 DVCR이라 칭함) 등에 사용되는 영상부호화 방법에서는 다기능(trick play)을 위하여 발생하는 부호량 혹은 부호의 비트수를 일정한 단위마다 고정된 값으로 할당해야 할 필요가 있다. 그러나 이러한 부호량의 고정은 화질의 열화를 가져온다. 따라서 시각적으로 화질의 열화를 최소화하면서 부호량을 고정하기 위해서는 부호량이 할당된 단위내에서 각 블럭에 적절한 압축율을 할당해야 한다.In a video encoding method used for a digital video cassette recorder (hereinafter referred to as DVCR) or the like, it is necessary to allocate a fixed value for each fixed unit of the amount of code or the number of bits of code generated for a trick play. However, the fixed amount of code results in deterioration of image quality. Therefore, in order to fix the code amount while visually minimizing the deterioration of image quality, an appropriate compression rate should be allocated to each block within the unit to which the code amount is allocated.

따라서 본 발명의 목적은 각 블럭별로 주어지는 클래스정보와 기준 양자화 스텝사이즈에서 발생하는 부호량을 이용하여 최종 양자화 스텝사이즈를 결정하여 이산여현변환 계수값을 양자화하기 위한 고정부호량 영상압축방법을 제공하는데 있다.Accordingly, an object of the present invention is to provide a fixed coded image compression method for quantizing a discrete cosine transform coefficient value by determining a final quantization step size using class information given for each block and a code amount generated in a reference quantization step size. have.

본 발명의 다른 목적은 상기 고정부호량 영상압축방법을 실현하는데 가장 적합한 장치를 제공하는데 있다.Another object of the present invention is to provide an apparatus most suitable for realizing the fixed coded image compression method.

상기 목적을 달성하기 위하여 본 발명에 의한 고정부호량 영상압축방법은 블럭단위로 입력된 영상을 이산여현변환하는 변환과정; 상기 변환과정에서 생성되는 이산여현변환 계수를 주파수 평면상의 위치에 따라 가중치를 곱하는 웨이팅과정; 상기 웨이팅과정에서 생성되는 이산여현변환 계수로부터 결정된 상기 입력영상의 클래스정보와 기준 양자화 스텝사이즈를 이용하여 복수의 매크로블럭 단위로 할당된 고정부호량을 만족시키기 위한 최종 양자화 스텝사이즈를 결정하는 양자화 스텝사이즈 결정과정; 상기 양자화 스텝사이즈 결정과정에서 결정된 양자화 스텝사이즈를 이용한 상기 이산여현변환 계수를 양자화하는 양자화과정; 및 상기 양자화과정에서 양자화된 이산여현변환 계수를 가변길이 부호화하는 부호화과정을 포함하는 것을 특징으로 한다.In order to achieve the above object, the fixed coded image compression method according to the present invention comprises: a conversion process of performing discrete cosine transforming of an input image in block units; A weighting process of multiplying the discrete cosine transform coefficients generated in the transformation process according to positions on the frequency plane; A quantization step of determining a final quantization step size for satisfying a fixed code amount allocated to a plurality of macroblock units using class information of the input image determined from the discrete cosine transform coefficients generated in the weighting process and a reference quantization step size. Sizing process; A quantization process of quantizing the discrete cosine transform coefficients using the quantization step size determined in the quantization step size determination process; And an encoding process of variable length encoding the quantized discrete cosine transform coefficients in the quantization process.

상기 다른 목적을 달성하기 위하여 본 발명에 의한 고정부호량 영상압축장치는 블럭단위로 입력된 영상을 이산여현변환하는 이산여현변환부; 상기 이산여현변환에서 출력되는 이산여현변환 계수를 주파수 평면상의 위치에 따라 가중치를 곱하는 웨이팅부; 상기 웨이팅부에서 출력되는 이산여현변환 계수로부터 상기 입력영상의 클래스를 블럭단위로 결정하는 클래스 결정부; 상기 클래스 결정부에서 결정된 클래스정보와 기준 양자화 스텝사이즈로부터 계산된 부호량을 이용하여 할당된 고정부호량을 만족시키는 위한 최종 양자화 스텝사이즈를 매크로블럭 단위로 결정하는 양자화 스텝사이즈 결정부; 상기 양자화 스텝사이즈 결정부에서 결정된 양자화 스텝사이즈를 이용하여 상기 이산여현변환 계수를 양자화하는 양자화부; 및 상기 양자화부에서 양자화된 이산여현변환 계수를 가변길이 부호화하는 가변길이 부호화부를 포함하는 것을 특징으로 한다.In order to achieve the above object, the fixed coded image compression device according to the present invention comprises: a discrete cosine transform unit for discrete cosine transforming an image input in units of blocks; A weighting unit to multiply the discrete cosine transform coefficients output from the discrete cosine transform coefficients according to positions on a frequency plane; A class determination unit which determines a class of the input image in units of blocks from the discrete cosine transform coefficients output from the weighting unit; A quantization step size determination unit for determining a final quantization step size for satisfying the allocated fixed code amount in units of macroblocks by using the code amount calculated from the class information determined by the class determination unit and a reference quantization step size; A quantizer for quantizing the discrete cosine transform coefficients using the quantization step size determined by the quantization step size determiner; And a variable length encoding unit for variable length encoding the discrete cosine transform coefficients quantized by the quantization unit.

여기서, 상기 n 및 m은 상기 기준 양자화 스텝사이즈에 의해 상기 입력영상을 양자화시 발생되는 부호량으로부터 통계적으로 계산하거나, 부호량이 고정된 단위내에서 발생한 각 클래스값의 갯수와 상기 기준 양자화 스텝사이즈에 의해 상기 입력영상을 양자화시 발생되는 부호량의 선형결합으로부터 계산하거나, 상기 기준 양자화 스텝사이즈에 의해 상기 입력영상을 양자화시 발생되는 부호량과 각 블럭에 대하여 주어진 복수의 클래스값을 입력으로 하고, n 또는 m을 출력으로 하는 신경회로망에 의해 구해진다.Here, n and m are calculated statistically from the code amount generated when the input image is quantized by the reference quantization step size, or the number of each class value generated within a fixed unit of code amount and the reference quantization step size. By calculating the linear combination of the code amount generated when the input image is quantized, or by inputting the code amount generated when the input image is quantized by the reference quantization step size and a plurality of class values given for each block, It is obtained by the neural network which outputs n or m.

이하, 첨부한 도면을 참조하여 본 발명을 보다 상세하게 설명하고자 한다.Hereinafter, with reference to the accompanying drawings will be described in more detail the present invention.

제1도는 본 발명에 의한 고정부호량 영상압축장치를 나타낸 블럭도이다.1 is a block diagram showing a fixed coded video compression apparatus according to the present invention.

제1도에 도시된 고정부호량 영상압축장치의 구성은, 블럭단위로 입력된 영상에 대하여 이산여현변환하는 이산여현변환부(DCT:1)와, 이산여현변환부(1)에서 출력되는 DCT 블럭에 대하여 주파수 평면상의 위치에 따라 가중치를 곱하는 웨이팅부(WEIGHTING;2)와, 웨이팅부(2)에서 가중치가 곱해진 DCT 블럭내의 AC 계수의 최대값으로부터 클래스를 결정하는 클래스 결정부(3)와, 클래스 결정부(3)에서 결정된 클래스 정보와 기준 양자화 스텝사이즈를 이용하여 최종 양자화 스텝사이즈(Qno)를 결정하는 양자화 스텝사이즈(Qno) 결정부(4)와, 클래스정보와 양자화 스텝사이즈(Qno) 결정부(4)에서 결정된 최종 양자화 스텝사이즈(Qno)에 의해 클래스 결정부(3)에서 클래스가 결정된 DCT 블럭을 양자화하는 양자화기(5)와, 양자화기(5)에서 양자화된 DCT 블럭을 가변길이부호화하는 가변길이부호화기(VLC; 6)로 이루어진다.The structure of the fixed coded video compression apparatus shown in FIG. 1 includes a discrete cosine transforming unit (DCT: 1) for performing discrete cosine transform on an image input in units of blocks, and a DCT output from the discrete cosine converting unit (1). Weighting unit WEIGHTING 2 for multiplying weights according to positions on the frequency plane with respect to the block, and class determining unit 3 for determining a class from the maximum value of AC coefficients in the DCT block multiplied by weights in weighting unit 2. And a quantization step size Q no determining unit 4 for determining the final quantization step size Q no using the class information determined by the class determination unit 3 and the reference quantization step size, and the class information and quantization step. size (Q no) in the decision unit (4) final quantization step size (Q no), the quantizer (5), and a quantizer 5 for class quantizing the determined DCT blocks from the class determination unit 3 by the determined at Variable length code of quantized DCT block It made of; (6 VLC) for variable-length encoder.

제2도는 제1도에 도시된 양자화 스텝사이즈(Qno) 결정부(4)에서 최종 양자화 스텝사이즈(Qno)를 결정하는 과정을 도시한 플로우챠트로서, 제21,22단계는 클래스정보와 기준 양자화 스텝사이즈로부터 발생가능한 부호량을 계산하는 단계이고, 제23단계는 부호량 계산단계에서 계산된 부호량과 상기 할당된 고정부호량을 비교하는 단계이고, 제24,26,28단계는 비교단계에서 계산된 부호량이 할당된 고정부호량보다 많을 경우 입력영상의 각 매크로블럭에 대해서 계산된 감소율의 n배를 기준 양자화 스텝사이즈로부터 감산한 값을 최종 양자화 스텝사이즈로 결정하는 단계이고, 제25,27,28단계는 비교단계에서 계산된 부호량이 할당된 고정부호량보다 작을 경우 입력영상의 각 매크로블럭에 대해서 계산된 증가율의 m배를 기준 양자화 스텝사이즈로부터 가산한 값을 최종 양자화 스텝사이즈로 결정하는 단계이다.A first flowchart illustrating a process of determining a final quantization step size (Q no) in the second turn of the first quantization step size (Q no) determining unit 4 shown in FIG, 21, 22 and the step information class Computing a code amount that can be generated from the reference quantization step size, step 23 is a step of comparing the code amount calculated in the code amount calculation step and the allocated fixed code amount, steps 24, 26, 28 are compared If the amount of code calculated in the step is larger than the allocated fixed code amount, determining the final quantization step size by subtracting n times the reduction rate calculated for each macroblock of the input image from the reference quantization step size. Steps 27 and 28 add m times the increase rate calculated for each macroblock of the input image from the reference quantization step size when the code amount calculated in the comparison step is smaller than the allocated fixed code amount. This step determines the final quantization step size.

그러면 본 발명의 동작을 제1도 내지 제5도를 참조하여 설명하면 다음과 같다.Next, the operation of the present invention will be described with reference to FIGS. 1 to 5.

몇 개의 블럭을 하나의 단위로 하여 이를 매크로블럭이라고 하는데 본 발명에서는 6개 블럭을 하나의 매크로블럭으로 둔다. 또한, 5개의 매크로블럭 단위를 세그먼트라 한다. 따라서 하나의 세그먼트는 30개의 블럭으로 이루어지며 모든 세그먼트의 부호량은 일정하게 주어진다. 즉, 세그먼트 단위로 부호량이 고정된다. 본 발명의 부호화방법에 사용되는 변수로서, 클래스(class)와 기준 양자화 스텝사이즈(Qno)가 있는데, 여기서 class는 30개의 블럭 모두에 대해서 결정되고, 기준 양자화 스텝사이즈(Qno)는 5개의 매크로블럭마다 각각 설정된다.This is called a macroblock with several blocks as one unit. In the present invention, six blocks are set as one macroblock. In addition, five macroblock units are called segments. Therefore, one segment is composed of 30 blocks, and the code amount of all segments is given constantly. That is, the code amount is fixed in units of segments. Variables used in the encoding method of the present invention include a class and a reference quantization step size (Q no ), where the class is determined for all 30 blocks, and the reference quantization step size (Q no ) is 5 It is set for each macro block.

제1도에 있어서, 이산여현변환부(1)에서는 블럭단위로 입력된 영상에 대하여 이산여현변환하여 웨이팅부(2)로 출력한다. 웨이팅부(2)에서는 이산여현변환부(1)에서 출력되는 DCT 블럭에 대하여 주파수 평면상의 위치에 따라 가중치를 곱하여 클래스 결정부(3)로 출력한다. 이때 가중치는 인간의 시각특성에 따라 결정된다.In FIG. 1, the discrete cosine transforming unit 1 performs discrete cosine transform on an image input in units of blocks and outputs it to the weighting unit 2. The weighting unit 2 multiplies the DCT block output from the discrete cosine transforming unit 1 according to the position on the frequency plane and outputs the weight to the class determination unit 3. At this time, the weight is determined according to the human visual characteristics.

클래스 결정부(3)에서 웨이팅부(2)에서 가중치가 곱해진 DCT 블럭내의 AC 계수의 최대값으로부터 각 블럭의 클래스를 결정하여 양자화 스텝사이즈(Qno) 결정부(4)로 출력한다.The class determining unit 3 determines the class of each block from the maximum value of the AC coefficients in the DCT block multiplied by the weighting unit 2 and outputs the class of each block to the quantization step size Q no determination unit 4.

양자화 스텝사이즈(Qno) 결정부(4)에서는 클래스 결정부(3)에서 결정된 클래스 정보와 기준 양자화 스텝사이즈를 이용하여 초기 양자화를 수행한 후 발생된 부호량을 이용하여 최종 양자화 스텝사이즈(Qno)를 결정하여 양자화기(5)로 출력한다. 블럭 단위로 클래스가 결정된 상태에서 세그먼트 단위로 부호량을 고정하기 위해서는 각 매크로블럭에 대해서 양자화 스텝사이즈(Qno)가 적절하게 선택되어야 한다.The quantization step size Q no determiner 4 performs initial quantization using the class information determined by the class determiner 3 and the reference quantization step size, and then uses the generated code amount to determine the final quantization step size Q. no ) is determined and output to the quantizer 5. In order to fix the code amount in the segment unit in a state where the class is determined in the block unit, the quantization step size Q no must be appropriately selected for each macroblock.

양자화 스텝사이즈(Qno) 결정부(4)에서의 양자화 스텝사이즈(Qno) 결정과정을 제2도를 참조하여 좀 더 상세히 설명하면 다음과 같다. 먼저, 기준 Qno값을 예를 들어, 8로 설정한 후(제21단계), 세그먼트당 발생하는 부호량을 계산한다(제22단계). 이때 계산된 부호량과 세그먼트당 할당된 부호량을 비교하여(제23단계), 계산된 세그먼트 부호량이 할당부호량보다 많을 경우에는 각 매크로블럭의 Qno(Qno[MB])를 다음 제1식에 의해 전체적으로 감소시킨다(제24단계).The process of determining the quantization step size Q no in the quantization step size Q no determination unit 4 will be described in more detail with reference to FIG. First, the reference Q no value is set to, for example, 8 (step 21), and then the amount of codes generated per segment is calculated (step 22). In this case, the calculated code amount and the allocated code amount per segment are compared (step 23), and if the calculated segment code amount is larger than the allocated code amount, Q no (Q no [MB]) of each macro block is determined as the first first. Reduce overall by the formula (step 24).

Qno[MB]=Qno[MB]-DR[MB]………………(1)Q no [MB] = Q no [MB] -DR [MB]... … … … … … (One)

한편, 계산된 세그먼트 부호량이 할당부호량보다 적을 경우에는 각 매크로블럭의 Qno(Qno[MB])를 다음 제2식에 의해 전체적으로 증가시킨다(제25단계).On the other hand, if the calculated segment code amount is less than the allocated code amount, Q no (Q no [MB]) of each macro block is increased by the following second equation as a whole (step 25).

Qno[MB]=Qno[MB]+IR[MB]……………(2)Q no [MB] = Q no [MB] + IR [MB]... … … … … (2)

상기 제1식과 제2식에 있어서 DR은 Qno의 감소율이고, IR은 Qno의 증가율을 각각 나타내며, 각 매크로블럭마다 해당 화상의 특성에 따라 주어진다.In Equations 1 and 2, DR denotes a decrease rate of Q no , IR denotes a rate of increase of Q no , and each macro block is given according to a characteristic of a corresponding picture.

제26단계에서는 제24단계에서 결정된 Qno를 이용하여 세그먼트당 발생하는 부호량을 계산한 후, 계산된 부호량과 세그먼트당 할당된 부호량을 비교하여, 계산된 세그먼트 부호량이 할당부호량과 다를 경우에는 제24단계로 복귀하고, 계산된 세그먼트 부호량이 할당부호량과 같을 경우에는 이때의 Qno를 매크로블럭의 최종 양자화 스텝사이즈로 결정한다(제28단계).In step 26, the amount of code generated per segment is calculated using the Q no determined in step 24, and then the calculated code amount is different from the allocated code amount by comparing the code amount allocated to the segment. case, if the amount returned to the step 24, the calculated code segment equal to the assigned code amount is to determine the case of no Q in the final quantization step size of a macroblock (step 28).

제27단계에서는 제24단계에서 결정된 Qno를 이용하여 세그먼트당 발생하는 부호량을 계산한 후, 계산된 부호량과 세그먼트당 할당된 부호량을 비교하여, 계산된 세그먼트 부호량이 할당부호량과 다를 경우에는 제25단계로 복귀하고, 계산된 세그먼트 부호량이 할당부호량과 같은 경우에는 이때의 Qno를 매크로블럭의 최종 양자화 스텝사이즈로 결정한다(제28단계).In the twenty-seventh step, the code amount generated per segment is calculated using Q no determined in the twenty-fourth step, and then the calculated code amount and the allocated code amount per segment are compared, and the calculated segment code amount is different from the allocated code amount. case, if the amount returned to the step 25, the calculated code segments such as code amount allocation is to determine the case of no Q in the final quantization step size of a macroblock (step 28).

그러나, 제2도에 도시된 양자화 스텝사이즈(Qno) 결정과정은 최종 양자화 스텝사이즈(Qno)를 결정할 때까지 반복적으로 수행되므로 하드웨어로 구현하기가 어려운 문제가 있다. 따라서 반복 계산이 없이 바로 계산하는 방법이 필요하다. 한편, 기준 양자화 스텝사이즈(Qno)를 사용할 경우 발생하는 부호량과 이를 다시 할당된 부호량에 맞추기 위하여 제24,26단계의 반복과정과, 제25,27단계의 반복과정을 몇번 거쳐야 하는지, 즉 반복(iteration) 횟수가 얼마나 필요한지를 나타낸 것이 제3도이다. 제3도에 있어서, X축은 기준 양자화 스텝사이즈(Qno)가 8일 경우의 계산된 세그먼트 부호량을 나타내고, Y축은 반복횟수를 나타내며, 대상은 임의의 화상으로서, 기준 양자화 스텝사이즈(Qno)에 대해서 발생하는 부호량과 반복횟수 사이의 관계를 선형적으로 근사화시킬 수 있음을 알 수 있다. 기준 양자화 스텝사이즈(Qno)에 대해서 발생하는 부호량과 반복횟수 사이의 관계를 나타내는 근사식(f)을 계산해 내면 이 근사식으로부터 실제 부호화시 제2도와 같은 반복과정없이 바로 필요한 반복횟수(iteration)를 알 수 있고, 따라서 양자화 스텝사이즈(Qno)를 신속하게 계산할 수 있다. 이런 경우 상기 제1식과 제2식은 각각 다음 제3식과 제4식으로 나타낼 수 있다.However, the second quantization step size (Q no) decision-making process is shown in Fig so repeatedly performed until determine the final quantization step size (Q no) there is a difficult problem to implement in hardware. Therefore, there is a need for a method of calculating immediately without repeating calculations. On the other hand, in order to match the code amount generated when the reference quantization step size Q no is used and the allocated code amount, how many repetitions of steps 24 and 26 and 25 and 27 steps are required, That is, FIG. 3 shows how many times iteration is required. In FIG. 3, the X axis represents the calculated segment code amount when the reference quantization step size Q no is 8, the Y axis represents the repetition number, and the object is an arbitrary image, and the reference quantization step size Q no We can see that we can linearly approximate the relationship between the amount of code that occurs and By calculating an approximation equation (f) representing the relationship between the code amount and the repetition frequency generated for the reference quantization step size (Q no ), iterations are immediately necessary without the repetition process as shown in FIG. ), So that the quantization step size Q no can be quickly calculated. In this case, the first and second equations may be represented by the following third and fourth equations, respectively.

Qno[MB]=기준 Qno[MB]-DR[MB]*iteration……………(3)Q no [MB] = Based Q no [MB] -DR [MB] * iteration… … … … … (3)

Qno[MB]=기준 Qno[MB]+IR[MB]*iteration……………(4)Q no [MB] = Based Q no [MB] + IR [MB] * iteration… … … … … (4)

그러나, 제3도를 살펴보면 근사식을 사용할 경우 오차가 발생하는 것을 알 수 있는데, 이 오차는 계산된 반복횟수의 정확도를 떨어뜨리고, 따라서 잘못 선택된 최종 양자화 스텝사이즈로 인하여 화질의 열화를 초래한다. 이러한 문제를 해결하기 위하여 반복횟수를 결정하는데 각 블럭의 클래스 정보를 이용한다. 클래스 정보를 이용하여 반복횟수를 결정하는 방법이 제4도에 도시되어 있다.However, looking at FIG. 3, it can be seen that an error occurs when using an approximation equation, which degrades the accuracy of the calculated repetition number, thus causing deterioration of image quality due to the incorrectly selected final quantization step size. To solve this problem, the class information of each block is used to determine the number of iterations. A method of determining the number of repetitions using class information is shown in FIG.

제4도를 참조하면, 반복횟수를 클래스 정보와 기준 양자화 스텝사이즈(Qno)에 의해 발생되는 비트수의 선형결합으로 계산한다. 이를 식으로 나타내면 다음 제5식과 같다.Referring to FIG. 4, the repetition count is calculated as a linear combination of the number of bits generated by the class information and the reference quantization step size Q no . This is expressed by the following equation.

iteration=W0*CLAS[0]+W1*CLASS[1]+W2*CLASS[2]iteration = W 0 * CLAS [0] + W 1 * CLASS [1] + W 2 * CLASS [2]

+W3*CLASS[3]+W4*비트수……………(5)+ W 3 * CLASS [3] + W 4 * Number of bits... … … … … (5)

제5식에서, CLASS[n]은 해당 세그먼트내에서 클래스가 n인 블럭의 갯수이다. 선형결합을 위한 계수 W0,W1,W2,W3,W4는 임의로 선정한 여러가지 화상데이타에 대해 제4도에 의한 값과 제2도에 의한 값의 차이를 오차라고 했을 때 평균자승오차(Mean Square Error)를 최소로 하는 값을 사용한다.In the fifth equation, CLASS [n] is the number of blocks of class n in the segment. The coefficients W 0 , W 1 , W 2 , W 3 , and W 4 for the linear combination are the mean square error when the difference between the values in FIG. 4 and the values in FIG. 2 is an error for various randomly selected image data. Use a value that minimizes (Mean Square Error).

한편 보다 정밀한 반복횟수를 계산하기 위해서 제5도에 도시된 바와같이 다수의 클래스값을 직접 사용할 수 있다. 이러한 경우에는 평균자승오차를 최소로 하는 값을 구하기 위해 신경회로망을 사용한다. 즉, 다층 퍼셉션(perception) 신경회로망의 학습효과를 이용하여 임의로 선택된 화상에서 클래스와 비트수를 구하고, 이들을 학습데이타로 신경회로망을 학습시킨 후 학습에 의해 조정된 계수를 이용하여 반복횟수를 구할 수 있다.On the other hand, as shown in FIG. 5, a plurality of class values may be directly used to calculate a more accurate number of repetitions. In this case, the neural network is used to find a value that minimizes the mean square error. That is, the class and the number of bits are obtained from a randomly selected image by using the learning effect of the multi-layer perception neural network, the neural network is trained using the learning data, and the number of repetitions is obtained using the coefficient adjusted by the learning. Can be.

제5도에 도시된 신경회로망의 다른 실시예로서, 클래스정보 대신에 각 블럭에서 웨이팅과정을 거친 DCT 계수의 AC 값들 중에서 그 절대값이 가장 큰 값을 신경회로망의 입력으로 사용할 수 있고, 혹은 각 블럭의 활성도(activity)를 공지의 방법으로 계산한 후 이를 신경회로망의 입력으로 사용할 수 있다.As another embodiment of the neural network shown in FIG. 5, instead of class information, among the AC values of the DCT coefficients weighted in each block, the absolute value thereof may be used as the input of the neural network. The activity of a block can be calculated using a known method and then used as an input of a neural network.

양자화기(5)에서는 클래스 결정부(3)에서 결정된 클래스정보와 상술한 양자화 스텝사이즈(Qno) 결정부(4)에서 결정된 최종 양자화 스텝사이즈(Qno)를 이용하여 클래스 결정부(3)에서 클래스가 결정된 DCT 블럭을 양자화하여 가변길이부호화기(6)로 출력한다.A quantizer (5) In the class determined by the class determining unit (3) information as the class determined using the final quantization step size (Q no) is determined in the above-described quantization step size (Q no) decision unit 4, part 3, Quantizes the DCT block whose class is determined and outputs the result to the variable length coder 6.

가변길이부호화기(6)에서는 양자화기(5)에서 양자화된 DCT 블럭을 가변길이 부호화한다.In the variable length encoder 6, variable length coding is performed on the DCT block quantized by the quantizer 5.

상술한 바와 같이 본 발명에 의한 고정부호량 영상압축방법 및 장치에서는 클래스 정보와 기준 양자화 스텝사이즈에 의해 계산된 부호량으로부터 할당된 고정부호량을 만족하는 최종 양자화간격을 결정함으로써 화질의 열화를 줄이면서 부호량을 조절할 수 있고, 하드웨어 구현시 회로를 간략화시킬 수 있다.As described above, the fixed coded video compression method and apparatus according to the present invention reduce deterioration in image quality by determining a final quantization interval that satisfies the allocated fixed coded amount from the coded amount calculated by the class information and the reference quantization step size. The amount of code can be adjusted and the circuit can be simplified in hardware implementation.

Claims (8)

블럭단위로 입력된 영상을 이산여현변환하는 변환과정; 상기 변환과정에서 생성되는 이산여현변환 계수를 주파수 평면상의 위치에 따라 가중치를 곱하는 웨이팅과정; 상기 웨이팅과정에서 생성되는 이산여현변환 계수로부터 결정된 상기 입력영상의 클래스정보와 기준 양자화 스텝사이즈를 이용하여 복수의 매크로블럭 단위로 할당된 고정부호량을 만족시키기 위한 최종 양자화 스텝사이즈를 결정하는 양자화 스텝사이즈 결정과정; 상기 양자화 스텝사이즈 결정과정에서 결정된 양자화 스텝사이즈를 이용한 상기 이산여현변환 계수를 양자화하는 양자화과정; 및 상기 양자화과정에서 양자화된 이산여현변환 계수를 가변길이 부호화하는 부호화과정을 포함하는 것을 특징으로 하는 고정부호량 영상압축방법.A conversion process of discrete cosine transforming the inputted image in block units; A weighting process of multiplying the discrete cosine transform coefficients generated in the transformation process according to positions on the frequency plane; A quantization step of determining a final quantization step size for satisfying a fixed code amount allocated to a plurality of macroblock units using class information of the input image determined from the discrete cosine transform coefficients generated in the weighting process and a reference quantization step size. Sizing process; A quantization process of quantizing the discrete cosine transform coefficients using the quantization step size determined in the quantization step size determination process; And an encoding process of variable length encoding the quantized discrete cosine transform coefficients in the quantization process. 제1항에 있어서, 상기 양자화 스텝사이즈 결정과정은 상기 웨이팅과정에서 생성되는 이산여현변환 계수로부터 상기 입력영상의 클래스를 블럭단위로 결정하는 클래스 결정단계; 상기 클래스 결정단계에서 결정된 클래스정보와 상기 기준 양자화 스텝사이즈로부터 발생가능한 부호량을 계산하는 부호량 계산단계; 상기 부호량 계산단계에서 계산된 부호량과 상기 할당된 고정부호량을 비교하는 비교단계; 상기 비교단계에서 상기 계산된 부호량이 할당된 고정부호량보다 많을 경우 상기 입력영상의 각 매크로블럭에 대해서 계산된 감소율의 n배를 상기 기준 양자화 스텝사이즈로부터 감산한 값을 최종 양자화 스텝사이즈로 결정하는 제1결정단계이고; 및 상기 비교단계에서 계산된 부호량이 할당된 고정부호량보다 작을 경우 상기 입력영상의 각 매크로블럭에 대해서 상기 계산된 증가율의 m배를 기준 양자화 스텝사이즈로부터 가산한 값을 최종 양자화 스텝사이즈로 결정하는 제2결정단계로 이루어지는 것을 특징으로 하는 고정부호량 영상압축방법.The method of claim 1, wherein the quantization step size determination step comprises: a class determination step of determining the class of the input image in units of blocks from the discrete cosine transform coefficients generated in the weighting process; A code amount calculation step of calculating a code amount that can be generated from the class information determined in the class determining step and the reference quantization step size; A comparison step of comparing the code amount calculated in the code amount calculation step with the allocated fixed code amount; In the comparing step, when the calculated amount of code is larger than the allocated fixed code amount, a value obtained by subtracting n times the reduction rate calculated for each macroblock of the input image from the reference quantization step size is determined as the final quantization step size. A first determination step; And when the amount of code calculated in the comparing step is smaller than the allocated fixed code amount, determining the final quantization step size by adding m times the calculated increase rate for each macroblock of the input image from the reference quantization step size. A fixed amount video compression method characterized by comprising a second determination step. 제2항에 있어서, 상기 n 및 m은 상기 기준 양자화 스텝사이즈에 의해 상기 입력영상을 양자화시 발생되는 부호량으로부터 통계적으로 계산되는 것을 특징으로 하는 고정부호량 영상압축방법.The method according to claim 2, wherein n and m are calculated statistically from a code amount generated when the input image is quantized by the reference quantization step size. 제2항에 있어서, 상기 n 및 m은 부호량이 고정된 단위내에서 발생한 각 클래스값의 갯수와 상기 기준 양자화 스텝사이즈에 의해 상기 입력영상을 양자화시 발생되는 부호량의 선형결합으로부터 계산되는 것을 특징으로 하는 고정부호량 영상압축방법.3. The method of claim 2, wherein n and m are calculated from a linear combination of code amounts generated when the input image is quantized based on the number of each class value generated within a fixed unit of code amount and the reference quantization step size. Fixed coded video compression method. 제2항에 있어서, 상기 n 및 m은 상기 기준 양자화 스텝사이즈에 의해 상기 입력영상을 양자화시 발생되는 부호량과 각 블럭에 대하여 주어진 복수의 클래스값을 입력으로 하고, n 또는 m을 출력으로 하는 신경회로망에 의해 구해지는 것을 특징으로 하는 고정부호량 영상압축방법.The method according to claim 2, wherein n and m are inputs of a code amount generated when the input image is quantized by the reference quantization step size and a plurality of class values given for each block, and n or m are output. Fixed coded video compression method characterized by the neural network. 제5항에 있어서, 상기 신경회로망은 각 블럭 단위에서 이산여현변환 계수중 AC 계수의 절대값 중 최대값을 입력으로 하는 것을 특징으로 하는 고정부호량 영상압축방법.The method according to claim 5, wherein the neural network inputs the maximum value of absolute values of AC coefficients among discrete cosine transform coefficients in each block unit. 제5항에 있어서, 상기 신경회로망은 각 블럭의 활성도를 입력으로 하는 것을 특징으로 하는 고정부호량 영상압축방법.6. The method according to claim 5, wherein the neural network inputs the activity of each block. 블럭단위로 입력된 영상을 이산여현변환하는 이산여현변환부; 상기 이산여현변환에서 출력되는 이산여현변환 계수를 주파수 평면상의 위치에 따라 가중치를 곱하는 웨이팅부; 상기 웨이팅부서 출력되는 이산여현변환 계수로부터 상기 입력영상의 클래스를 블럭단위로 결정하는 클래스 결정부; 상기 클래스 결정부에서 결정된 클래스정보와 기준 양자화 스텝사이즈로부터 계산된 부호량을 이용하여 할당된 고정부호량을 만족시키는 위한 최종 양자화 스텝사이즈를 매크로블럭 단위로 결정하는 양자화 스텝사이즈 결정부; 상기 양자화 스텝사이즈 결정부에서 결정된 양자화 스텝사이즈를 이용하여 상기 이산여현변환 계수를 양자화하는 양자화부; 및 상기 양자화부에서 양자화된 이산여현변환 계수를 가변길이 부호화하는 가변길이 부호화부를 포함하는 것을 특징으로 하는 고정부호량 영상압축장치.A discrete cosine transforming unit for discrete cosine transforming the inputted image in block units; A weighting unit to multiply the discrete cosine transform coefficients output from the discrete cosine transform coefficients according to positions on a frequency plane; A class determination unit determining a class of the input image in units of blocks from the discrete cosine transform coefficients output from the weighting unit; A quantization step size determination unit for determining a final quantization step size for satisfying the allocated fixed code amount in units of macroblocks by using the code amount calculated from the class information determined by the class determination unit and a reference quantization step size; A quantizer for quantizing the discrete cosine transform coefficients using the quantization step size determined by the quantization step size determiner; And a variable length encoder for variable length coding the discrete cosine transform coefficients quantized by the quantization unit.
KR1019950003544A 1995-02-23 1995-02-23 Method and apparatus for encoding the image with a fixed amount of encoding KR0176505B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019950003544A KR0176505B1 (en) 1995-02-23 1995-02-23 Method and apparatus for encoding the image with a fixed amount of encoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019950003544A KR0176505B1 (en) 1995-02-23 1995-02-23 Method and apparatus for encoding the image with a fixed amount of encoding

Publications (2)

Publication Number Publication Date
KR960032437A KR960032437A (en) 1996-09-17
KR0176505B1 true KR0176505B1 (en) 1999-04-15

Family

ID=19408649

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019950003544A KR0176505B1 (en) 1995-02-23 1995-02-23 Method and apparatus for encoding the image with a fixed amount of encoding

Country Status (1)

Country Link
KR (1) KR0176505B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102036077B1 (en) * 2019-08-23 2019-10-25 주식회사 에스트렐라노바 Method for processing images into which visible watermark is embedded, and image processing apparatus thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102036077B1 (en) * 2019-08-23 2019-10-25 주식회사 에스트렐라노바 Method for processing images into which visible watermark is embedded, and image processing apparatus thereof

Also Published As

Publication number Publication date
KR960032437A (en) 1996-09-17

Similar Documents

Publication Publication Date Title
KR930009872B1 (en) Changing coding apparatus
EP0857394B1 (en) Apparatus and method for optimizing the rate control in a coding system
Engan et al. Frame based signal compression using method of optimal directions (MOD)
EP0717567A2 (en) Video coder with data rate control
JPH1013834A (en) Adaptive encoding method, encoder and decoder for consecutive picture
JPH05276501A (en) Method for variable-length-compressing adaptive video and device therefor
US5594554A (en) Image compression coder having improved scale factor control
KR100224801B1 (en) Scale factor control circuit
US5822000A (en) Video encoding using rearrangement of transform coefficients and inter-block correlation
KR0176505B1 (en) Method and apparatus for encoding the image with a fixed amount of encoding
JP2830855B2 (en) Adaptive quantization controller
US5724096A (en) Video signal encoding method and apparatus employing inter-block redundancies
KR100239300B1 (en) Method and apparatus for encoding a video signal based on inter-block redundancies
JP2735001B2 (en) Image coding device
KR0165405B1 (en) Bit control device of variable length code using nerve circuit
US5534930A (en) Method for constructing a quantization pattern codebook
KR100232307B1 (en) Method for determining segment unit quantization number of digital image
JPH0310486A (en) Moving picture encoder
KR0141297B1 (en) Method for nonlinearly quantizing a video signal
KR100351045B1 (en) Apparatus for decoding ac factor of inverse quantizer in motion picture decoding system
Hammer et al. Hierarchical encoding of image sequences using multistage vector quantization
JP2887842B2 (en) Image data restoration method and apparatus
JPH09504146A (en) Method and apparatus for evaluating bit budget for encoder with variable word length
KR100207405B1 (en) Variable length encoding method by using discriminator
KR100209432B1 (en) Method and apparatus for coding using corelation between blocks

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: 20091029

Year of fee payment: 12

LAPS Lapse due to unpaid annual fee