KR0165504B1 - Signal compression coding method - Google Patents

Signal compression coding method Download PDF

Info

Publication number
KR0165504B1
KR0165504B1 KR1019950004776A KR19950004776A KR0165504B1 KR 0165504 B1 KR0165504 B1 KR 0165504B1 KR 1019950004776 A KR1019950004776 A KR 1019950004776A KR 19950004776 A KR19950004776 A KR 19950004776A KR 0165504 B1 KR0165504 B1 KR 0165504B1
Authority
KR
South Korea
Prior art keywords
quantization
bits
bit
encoding
segment
Prior art date
Application number
KR1019950004776A
Other languages
Korean (ko)
Other versions
KR960036773A (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 KR1019950004776A priority Critical patent/KR0165504B1/en
Publication of KR960036773A publication Critical patent/KR960036773A/en
Application granted granted Critical
Publication of KR0165504B1 publication Critical patent/KR0165504B1/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

본 발명은 HD-Baseband 신호의 압축 부호화 방법에 관한 것으로서, 하나의 세그먼트의 총 논제로계수의 갯수를 계산하고, 총 논제로계수의 갯수를 소정의 갯수로 나누어 1차적으로 양자화번호를 결정하고, 이산여현변환블럭을 제1~제4클래스로 분류하고, 이산여현블록내를 제1~제8영역으로 분류하고, 하나의 세그먼트를 구성하는 모든 양자화된 값을 지그재그 스캔에 의해 가변장 부호화를 수행하고, 상기 제1 가변장 부호화단계에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 할당된 비트와 발생하는 비트 사이의 차이를 구하여 각 매크로 블록의 양자화번호 가감을 소정의 제1차 양자화번호 조정 테이블에 따라 조정하고, 제2 가변장 부호화를 수행하고, 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 할당된 비트와 발생하는 비트 사이의 차이를 구하여 각 매크로 블록의 양자화번호 가감을 소정의 제2차 양자화번호 조정 테이블에 따라 조정하는 단계를 포함한다. 따라서, 반복하여 양자화폭을 조정하므로써 신호압축에 있어 부호비트의 길이가 근접하도록 하여 주어진 고정 길이 비트를 가지고 가장 효율성있게 활용할 수 있도록 하는 방법을 제공하며, 이는 화질의 향상을 높이는 효과를 제공한다.The present invention relates to a compression coding method of an HD-Baseband signal, and calculates the total number of zero zero coefficients of one segment, divides the total number of zero zero coefficients by a predetermined number, and determines the quantization number primarily. Classify the discrete cosine transform blocks into the first to fourth classes, classify the discrete cosine blocks into the first to eighth regions, and perform variable length coding on all quantized values constituting one segment by zigzag scanning. A predetermined bit is assigned to each macroblock by bits generated by encoding in the first variable length encoding step, and a difference between the allocated bit and the generated bit is obtained to determine the quantization number of each macroblock. According to the first order quantization number adjustment table of N, performing a second variable length encoding, and encoding a predetermined bit for each macroblock by the generated bits. Allocating bits, and obtaining the difference between the generated bits and the bit allocation comprises a step of adjusting in accordance with the quantization number subtraction of each macroblock in the predetermined second number of quantization adjustment table. Accordingly, by repeatedly adjusting the quantization width, a method is provided in which the lengths of the code bits are close to each other in signal compression so that they can be most efficiently utilized with a given fixed length bit. This provides an effect of improving image quality.

Description

신호 압축 부호화 방법Signal compression coding method

제1도는 HD-Baseband 신호의 프레임 구조와 매크로 블록 구조를 보이는 도면이다.1 is a diagram showing a frame structure and a macro block structure of an HD-Baseband signal.

제2도는 매크로 블록 셔플링과 세그먼트의 구조를 보이는 도면이다.2 is a diagram showing the structure of macroblock shuffling and segments.

제3도는 본 발명에 따른 신호압축방법을 설명하기 위한 개요도이다.3 is a schematic diagram illustrating a signal compression method according to the present invention.

제4도는 본 발명의 일실시예에 따른 양자화표이다.4 is a quantization table according to an embodiment of the present invention.

제5도는 본 발명의 일실시예에 따른 클래스 구분을 설명하는 도면이다.5 is a diagram illustrating class division according to an embodiment of the present invention.

제6a도와 제6b도는 DCT 블록내의 영역(area)구분을 설명하는 도면이다.6A and 6B are views for explaining the area divisions in the DCT block.

본 발명은 HD-Baseband(High Definition-Baseband)신호의 압축부호화 방법에 관한 것으로서, 특히 양자화 단계에서 발생하는 비트량의 양자화폭 생성 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a compression encoding method of an HD-Baseband (High Definition-Baseband) signal, and more particularly, to a method for generating a quantization width of a bit amount generated in a quantization step.

HD-VCR(High Deinition Video Cassette Recorder)에 디지털 영상신호를 기록하기 위해서는 일정한 영역단위로 고정 압축하는 방식이 필수적이다. 현재 HD-Baseband 신호의 기록방식에 대한 국제 표준안이 결정되고 대부분의 사양이 협의하에 고정되어 있고 일부분에 있어서는 제작자의 사양에 따라 제작할 수 있도록 되어 있다. 따라서 이러한 제작자의 사양이 전체 시스템의 성능을 좌우하게 된다. 결국 복호화 과정만이 결정되어 있고 어떠한 방법으로 부호화한 신호라도 복호화가 가능한 호환성을 유지하면 된다.In order to record a digital video signal on a high-definition video cassette recorder (HD-VCR), a method of fixed compression in a predetermined area unit is essential. At present, the international standard for recording method of HD-Baseband signal is decided, and most specifications are fixed in consultation and some parts can be produced according to the manufacturer's specification. Therefore, the manufacturer's specifications dominate the overall system performance. As a result, only the decoding process is determined and it is only necessary to maintain compatibility that the signals encoded by any method can be decoded.

디지털 영상신호를 비디오 테이프에 기록하는데 있어, 매 프레임마다 일정한 트랙수를 점유하므로 출력이 일정하지 않은 가변장 부호화방법을 사용하면 압축된 영상신호를 기록할 때 문제점이 발생하게 된다. 즉, 출력이 일정하지 않으므로 주어진 영상에 따라 점유되어 발생하는 비트량이 가변되며, 압축되어 출력되는 영상신호는 고정된 목표길이보다 적거나 많아질 수 있다. 이러한 경우, 재생되는 화질에 크게 영향을 줄 수 있으므로 목표비트 길이에 가장 근접한 부호 길이 출력방법이 필수적으로 요구된다.In recording a digital video signal on a videotape, a variable number coding method with a constant output occurs because a certain number of tracks is occupied every frame, which causes a problem when recording a compressed video signal. That is, since the output is not constant, the amount of bits generated and occupied according to a given image is variable, and the compressed and output image signal may be smaller or larger than the fixed target length. In this case, the code length output method that is closest to the target bit length is required because it can greatly affect the image quality to be reproduced.

이러한 고정장 부호화를 실현하기 위하여 일정수의 메크로 블록으로 구성된 하나의 세그먼트 단위로 부호화 길이를 고정한다. 하나의 세그먼트 단위로 독립적인 복호화가 가능하도록 하는 방법에 있어서 그 성능을 크게 좌우하는 가장 중요한 부분은 양자화 과정이다. 결국, 양자화 과정은 가장 적절한 양자화 폭을 결정하는 것으로서 메크로 블록 단위로 복잡한 정도에 따라 발생하는 비트량이 다르지만 그 발생하는 정도를 목표 비트량에 가장 근접하도록 적절히 조정하여 양자화폭을 결정한다.In order to realize such fixed length encoding, the encoding length is fixed in one segment unit composed of a predetermined number of macroblocks. In the method of enabling independent decoding by one segment unit, the most important part which greatly influences the performance is the quantization process. As a result, the quantization process determines the most suitable quantization width, and the amount of bits generated according to the degree of complexity in units of macroblocks is different.

따라서, 본 발명의 목적은 상기의 제안을 충족시키기 위해 안출된 것으로서, 5개의 매크로 블록이 셔플링을 통하여 1개의 세그먼트를 이루고 DCT 변환된 AC계수들에 대해 양자화하는 과정에 있어서 발생하는 AC계수에 대하여 초기 양자화 폭을 결정하고 입력된 신호에 대하여 가변장 부호화 과정을 거쳐 발생된 부호 길이에 대하여 목표부호 길이에 근접하도록 발생하는 비트와 목표비트와의 차이를 이용하여 양자화폭을 반복 조정하여 가장 효율적인 양자화폭을 결정하는 방법을 제공하는데 있다.Accordingly, an object of the present invention was devised to satisfy the above-mentioned proposal, and the five macroblocks form one segment through shuffling, and the AC coefficient generated in the process of quantizing the DCT transformed AC coefficients. Determining the initial quantization width with respect to the input signal, and repeatedly adjusting the quantization width using the difference between the bit and the target bit generated close to the target code length for the code length generated through the variable length encoding process To provide a method for determining the quantization width.

상술한 바와 같은 목적을 달성하기 위한 효율적인 양자화폭을 결정하여 수행되는 신호압축방법은, 소정개의 DCT 블록으로 구성된 복수개의 매크로 블록을 하나의 세그멘트 단위로 하여 부호화를 수행하는 방법에 있어서,In the signal compression method performed by determining an efficient quantization width for achieving the above object, in a method of encoding a plurality of macro blocks composed of a predetermined DCT block by one segment unit,

상기 하나의 세그멘트를 이루는 DCT 블록의 휘도신호의 AC계수가 논제로인 것의 갯수를 계산하고, 상기 계산된 갯수를 소정값으로 나누어 양자화 번호를 결정하는 제1단계; 상기 AC계수들의 절대값의 합에 따라 하나의 세그멘트를 이루는 모든 DCT 블록을 복수개의 클래스로 분류하고, 상기 AC계수들의 주파수 성분에 따라 상기 각 DCT 블록을 복수개의 영역으로 분류하는 제2단계; 상기 제1단계에서 결정된 양자화번호와 상기 제2단계에서 분류된 클래스 및 영역에 따라 양자화폭을 설정하는 제3단계; 상기 제3단계에서 설정된 양자화폭으로 하나의 세그멘트를 구성하는 모든 이산여현변환 블록에 대해 각각의 AC계수들을 나눈 값을 가변장 부호화하는 제4단계; 상기 제4단계에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 상기 할당된 비트와 실제로 발생하는 비트 사이의 차이에 의해 상기 제2단계에서 결정된 양자화 번호를 조정하는 제5단계; 상기 제5단계에서 조정된 양자화번호와 상기 제2단계에서 분류된 클래스 및 영역에 따라 양자화폭을 설정하고, 상기 설정된 양자화폭으로 하나의 세그멘트를 구성하는 모든 이산여현변환 블록에 대해 각각의 AC계수들을 나눈 값을 가변장 부호화하는 제6단계; 및 상기 제6단계에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 상기 할당된 비트와 실제로 발생하는 비트 사이의 차이에 의해 상기 제6단계에서 조정된 양자화 번호를 재차 조정하는 제7단계를 포함함을 특징으로 한다.A first step of calculating the number of AC coefficients of the luminance signal of the DCT block constituting the one segment being non-zero and dividing the calculated number by a predetermined value to determine a quantization number; Classifying all DCT blocks forming one segment into a plurality of classes according to the sum of absolute values of the AC coefficients, and classifying each DCT block into a plurality of regions according to frequency components of the AC coefficients; A third step of setting a quantization width according to the quantization number determined in the first step and the classes and regions classified in the second step; A fourth step of variable length encoding the values obtained by dividing the respective AC coefficients for all the discrete cosine transform blocks constituting one segment by the quantization width set in the third step; Assigning a predetermined bit to each macroblock by the bit coded and generated in the fourth step, and adjusting the quantization number determined in the second step by the difference between the allocated bit and the bit actually generated. Step 5; The quantization width is set according to the quantization number adjusted in the fifth step and the class and region classified in the second step, and each AC coefficient is applied to all the discrete cosine transform blocks constituting one segment with the set quantization width. A sixth step of variable length encoding the value obtained by dividing the sound; And allocating predetermined bits for each macroblock by the bits generated by encoding in the sixth step, and re-adjusting the quantization number adjusted in the sixth step by the difference between the allocated bits and the bits that actually occur. And a seventh step of adjusting.

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

제1도는 HD-Baseband 신호의 프레임 구조와 매크로 블록 구조를 보이는 도면이다. 입력화상은 1008×1024이다. 샘플링 포맷은 12:4:0으로 1개의 매크로 블록은 휘도신호 6개에 대하여 색차성분 2개씩 구성된 8개의 DCT 블록으로 구성되며 블록 셔플링 양자화 스템결정의 기본 단위가 된다.1 is a diagram showing a frame structure and a macro block structure of an HD-Baseband signal. The input image is 1008 x 1024. The sampling format is 12: 4: 0, and one macro block is composed of eight DCT blocks each composed of two chrominance components with respect to six luminance signals, and becomes a basic unit of block shuffling quantization stem determination.

제2도는 매크로 블록 셔플링과 세그먼트의 구조를 보이는 도면이다.2 is a diagram showing the structure of macroblock shuffling and segments.

하나의 세그먼트는 화면의 여러 위치로부터 5개의 매크로 블록을 가져와서 구성된다. 5개의 매크로 블록으로 구성된 세그먼트는 그 구성블록의 정보량이 일정할수록 효율적인 부호량 고정이 가능하므로 프레임 전체에 대하여 매크로 블록 단위의 뒤섞임을 수행한다 따라서, 부호량 고정은 1세그먼트 단위로 이루어지며 1세그먼트는 셔플링을 통해 5개의 매크로 블록으로 이루어진다. 통상적으로, C는 MB1, B는 MB2, D는 MB3, A는 MB4, E는 MB5으로 셔플링이 이루어진다.One segment is constructed by taking five macro blocks from various locations on the screen. The segment consisting of five macroblocks can be efficiently fixed in the amount of information of the block as the information amount of the building block is constant. Therefore, the macroblock unit is mixed with respect to the entire frame. Therefore, the fixation of the code amount is performed in units of one segment. Shuffling consists of five macro blocks. Typically, C is shuffled to MB1, B to MB2, D to MB3, A to MB4, and E to MB5.

HD-Baseband의 표준안에서 DCT 변환은 그 신호의 특성에 따라서 다음과 같이 2개의 모드로 나뉘어진다. 2가지의 DCT 모드는 각각 프레임과 필드를 의미하는 것으로서 DCT 효율을 증가시키기 위한 것이다.In the HD-Baseband standard, DCT conversion is divided into two modes according to the characteristics of the signal. The two DCT modes refer to frames and fields, respectively, to increase DCT efficiency.

DCT 모드의 선택은 8×8 블록 단위로 결정된다. 따라서, 움직임이 많은 영상일 경우 필드 모드의 선택이 많아지게 된다. DCT 모드는 2개의 필드 사이의 값이 소정의 기준치보다 적을 경우에 8×8 DCT 모드가 선택되고, 클 경우에 2×4×8 DCT 모드가 선택된다.The selection of the DCT mode is determined in units of 8x8 blocks. Therefore, in the case of an image having a lot of motion, the selection of the field mode is increased. In the DCT mode, the 8x8 DCT mode is selected when the value between the two fields is less than the predetermined reference value, and the 2x4x8 DCT mode is selected when the DCT mode is large.

제3도는 본 발명에 따른 신호압축방법을 설명하기 위한 개요도이다.3 is a schematic diagram illustrating a signal compression method according to the present invention.

6개의 휘도신호(Y)의 이산여현변환(DCT) 블록과 2개의 색차신호(Cr,Cb)의 이산여현변환(DCT) 블록을 갖는 각각의 매크로 블록을 셔플링을 통해 5개의 미크로 블록으로써 하나의 세그먼트를 구성한다. 세그먼트 단위는 압축 부호화의 기본 단위가 된다. 세그먼트 단위의 총 논제로계수의 갯수계산단계(300)에서는 하나의 세그먼트를 이루는 6개의 휘도신호의 DCT 블록의 모든 AC계수에 있어 0(영)이 아닌 계수(논제로 계수)의 갯수를 계산한다. 여기서, 0(영)이 아닌 계수란 절대값 1 이상의 수를 의미한다. 즉, 제로계수란 절대값 1보다 작은 수를 의미한다. 제1 양자화번호 결정단계(302)에서는 상기 논제로계수 갯수 계산단계(300)에서 계산된 논제로계수의 갯수를 소정의 젯수로 나누어 양자화된 값을 양자화번호로 결정한다. 여기서, 소정의 젯수의 의미를 살펴보면 다음과 같다.Each macro block having a discrete cosine transform (DCT) block of six luminance signals (Y) and a discrete cosine transform (DCT) block of two color difference signals (Cr, Cb) is one as five micro blocks through shuffling. Constitute a segment of. The segment unit becomes a basic unit of compression encoding. In the step 300 of calculating the total number of nonzero coefficients in each segment, the number of nonzero coefficients (nonzero coefficients) is calculated for all AC coefficients of the DCT block of six luminance signals constituting one segment. . Here, a coefficient other than 0 (zero) means a number equal to or greater than absolute value 1. That is, the zero coefficient means a number smaller than the absolute value 1. In the first quantization number determination step 302, the number of nonzero coefficients calculated in the nonzero coefficient count calculation step 300 is divided by a predetermined jet number to determine the quantized value as the quantization number. Here, the meaning of the predetermined number of jets is as follows.

HD-Baseband에서는 신호의 압축부호화의 기본 단위인 세그먼트 단위는 5개의 매크로 블록으로 구성된다. 또한, 하나의 매크로 블록은 6개의 휘도신호 DCT 블록을 포함하며, 각각의 DCT 블록은 8×8로서 64개의 갯수로 구성된다. 상기 64개의 계수는 하나의 DC계수와 63개의 AC계수로 이루어진다. 상기 64개의 계수는 하나의 DC계수와 63개의 AC계수로 이루어진다. 그러면, 하나의 세그먼트 단위에서 총 AC계수의 갯수는 5×6×63=1890이 된다. 즉, 신호의 압축부호화에 있어 AC계수의 논제로계수의 갯수의 최대값은 1890개이다. 물론, AC계수의 논제로계수의 갯수의 최소값은 0(영)이다. 다시말하면, 세그먼트 단위에서 AC계수의 갯수는 0(영)에서 1890개의 범위로 한정된다. 한편, 각각 취할 수 있는 양자화번호(QNO)의 갯수(Q)가 지정된다. 그러면, 본 발명에 따른 제1양자화번호 결정단계(302)에서 초기 양자화번호(QNO)의 설정은 상기 하나의 세그먼트 단위에서 발생할 수 있는 모든 경우의 AC계수의 갯수를 포용할 수 있어야 한다. 즉, 세그먼트 단위에서 가능한 AC계수의 총 논제로계수의 갯수를 양자화번호(QNO)의 갯수(Q)로 나누어 나오는 값을 상기 소정의 젯수로 설정한다. 본 발명에서는 계산의 편의상 세그먼트 단위의 AC계수의 최대 논제로계수의 갯수를 5×6×64=1920으로 한다. 여기서, 64를 곱해준 것은 DC계수의 갯수도 포함된 수이다. 실제 신호의 압축부호화에 있어 AC계수와 DC계수는 별도로 수행되지만 어디까지나 계산의 편의상 64로 계산하였음을 밝혀 두는 바이다. 한편, 본 발명에서 양자화번호(QNO)의 갯수(Q)는 16개로 한다. 즉, 양자화번호(QNO)는 Q1,Q2....,Q16으로 설정한다. 그러면, 세그먼트 단위의 AC계수의 최대 논제로계수의 갯수 1920을 16으로 나누어 주면 본 발명의 제1양자화번호 결정단계(302)에서 초기 양자화번호(QNO)를 설정하는데 있어 하나의 세그먼트 단위에서 발생할 수 있는 모든 경우의 AC계수의 갯수를 포용할 수 있다. 그러면, 1920을 16으로 나누면 120이 된다. 즉, 본 발명의 일실시예로서 제1양자화번호 결정단계(302)에서 초기 양자화번호(QNO)를 설정하는데 있어 하나의 세그먼트 단위에서 발생할 수 있는 모든 경우의 AC계수의 갯수를 포용할 수 있다. 그러면, 1920을 16으로 나누면 120이 된다. 즉, 본 발명의 일실시예로서 제1차양자화번호 결정단계(302)에서는 상기 논제로계수 갯수 계산단계(300)에서 계산된 논제로계수의 갯수를 120으로 나누어 양자화된 값을 양자화번호로 결정한다.In HD-Baseband, a segment unit, which is a basic unit of compression encoding of a signal, is composed of five macro blocks. In addition, one macro block includes six luminance signal DCT blocks, and each DCT block is composed of 64 numbers as 8 × 8. The 64 coefficients consist of one DC coefficient and 63 AC coefficients. The 64 coefficients consist of one DC coefficient and 63 AC coefficients. Then, the total number of AC coefficients in one segment unit is 5 × 6 × 63 = 1890. That is, the maximum value of the number of nonzero coefficients of the AC coefficient in the compression encoding of the signal is 1890. Of course, the minimum value of the number of nonzero coefficients of the AC coefficient is 0 (zero). In other words, the number of AC coefficients in the segment unit is limited to the range of 0 (zero) to 1890. On the other hand, the number Q of quantization numbers QNO that can be taken respectively is specified. Then, the setting of the initial quantization number (QNO) in the first quantization number determination step 302 according to the present invention should be able to embrace the number of AC coefficients in all cases that can occur in the one segment unit. That is, a value obtained by dividing the total number of nonzero coefficients of the AC coefficients available in the segment unit by the number Q of the quantization number QNO is set to the predetermined jet number. In the present invention, for convenience of calculation, the number of maximum nonzero coefficients of the AC coefficient in segment units is set to 5x6x64 = 1920. Here, multiplying by 64 includes the number of DC coefficients. Although AC and DC coefficients are performed separately in the compression encoding of the actual signal, it is clear that the calculation is performed as 64 for convenience of calculation. In the present invention, the number Q of quantization numbers QNO is 16. That is, the quantization number QNO is set to Q1, Q2 ...., Q16. Then, dividing the maximum number of nonzero coefficients of the AC coefficient in units of segments by 16 may occur in one segment unit in setting an initial quantization number (QNO) in the first quantization number determination step 302 of the present invention. The number of AC coefficients in all cases can be embraced. Then, dividing 1920 by 16 gives 120. That is, as an embodiment of the present invention, in setting the initial quantization number QNO in the first quantization number determination step 302, the number of AC coefficients in all cases that may occur in one segment unit may be included. Then, dividing 1920 by 16 gives 120. That is, as an embodiment of the present invention, in the first quantization number determination step 302, the number of nonzero coefficients calculated in the number of nonzero coefficient counting step 300 is divided by 120 to determine a quantized value as a quantization number. do.

실제, 하나의 세그먼트 단위에서 모든 AC계수가 0(영)이 되는 경우도 거의 없거니와 설사 모든 AC계수가 0(영)이라 하더라도 반드시 120으로 나눈다는 것에 국한되지는 않는다. 다만, 가능하면 모든 AC계수의 갯수가 나올 수 있는 경우를 포용할 수 있도록 하는 소정의 젯수를 설정하여 초기 양자화번호(QNO)를 설정하고자 하는 것이다.In fact, almost no AC coefficient becomes zero in one segment unit, and even if all AC coefficients are zero, it is not necessarily limited to 120. However, if possible, the initial quantization number (QNO) is set by setting a predetermined number of jets to allow the case where all the AC coefficients can be obtained.

클래스 및 영역분류단계(304)에서는 DCT에 의해 변환된 각각의 DCT 블록에 있어 각각의 AC계수들의 절대값의 합에 따라 하나의 세그먼트를 이루는 모든 DCT 블록을 제1, 제2, 제3, 및 제4클래스(class)로 분류하고, 또한 각각의 DCT 블록내를 분류한다. 본 발명은 양자화 단계에 있어 양자화번호(QNO), 클래스(class), 및 영역(area)에 따라 양자화폭을 달리한다. 양자화폭은 양자화표를 이용하여 일목요연하게 찾아볼 수 있다. 양자화표의 일실시예를 도면을 참조하여 설명한다.In the class and region classification step 304, all DCT blocks constituting one segment according to the sum of the absolute values of the respective AC coefficients in each DCT block converted by the DCT are first, second, third, and Classify as a fourth class and classify in each DCT block. In the quantization step, the quantization width varies depending on the quantization number (QNO), the class, and the area. Quantization width can be found at a glance using a quantization table. An embodiment of the quantization table will be described with reference to the drawings.

제4도는 본 발명의 일실시예에 따른 양자화표이다. 제4도를 제5도와 제6a도 및 제6b도를 설명한 후에 설명한다.4 is a quantization table according to an embodiment of the present invention. 4 is described after explaining FIG. 5, FIG. 6A, and FIG. 6B.

제5도는 본 발명의 일실시예에 따른 클래스 구분을 설명하는 도면이다. 상술한 바와 같이 클래스는 DCT 블록에 있어 각각의 AC계수들의 절대값의 합에 따라 제1~제4클래스로 구분한다. 휘도신호중 소정의 DCT 블록의 AC계수들의 각각의 절대값의 합이 6이라면 이 DCT 블록은 클래스 0에 해당한다.5 is a diagram illustrating class division according to an embodiment of the present invention. As described above, classes are classified into first to fourth classes according to the sum of absolute values of respective AC coefficients in the DCT block. If the sum of the absolute values of the respective AC coefficients of the predetermined DCT block in the luminance signal is 6, the DCT block corresponds to class 0.

제6a도와 제6b도는 DCT 블록내의 영역(area) 구분을 설명하는 도면이다. 제6a도는 8×8 DCT 블록에 있어 AC계수를 주파수 성분에 따라 0~7영역으로 구분하였고, 제6b도 역시 2×4×8 DCT 블록에 있어서 AC계수를 주파수 성분에 따라 0~7영역으로 구분하였다.6A and 6B are diagrams illustrating the division of areas in a DCT block. FIG. 6a shows an AC coefficient divided into 0 to 7 areas according to frequency components in an 8 × 8 DCT block, and FIG. 6b also illustrates an AC coefficient into an area 0 through 7 according to frequency components in a 2 × 4 × 8 DCT block. Divided.

제4도에서 볼 수 있듯이 양자화번호 클래스, 및 영역에 따라 각각의 AC계수들을 나누어 주는 양자화폭은 달라진다. 제4도를 보면 클래스가 0, 1, 2, 및 3으로 구분되어 있고 0부터 15가지의 수는 양자화번호를 의미한다. 또한, 영역은 0부터 7까지의 구분되어 있고, 1,2,4,8 및 16의 수치는 양자화폭을 의미한다. 즉, AC계수의 값을 나누어주는 값이다. 일예로서, 소정의 DCT 블록내의 소정의 AC계수값이 8이라 하고, 해당 양자화번호(QNO)가 7(400)이고, 클래스(class)가 0(402)이고, 영역(area)이 3(404)이라 하면 양자화폭은 2(406)가 된다.As shown in FIG. 4, the quantization width for dividing the AC coefficients varies according to the quantization number class and the area. In FIG. 4, classes are divided into 0, 1, 2, and 3, and 0 to 15 numbers represent quantization numbers. In addition, the areas are divided from 0 to 7, and numerical values of 1,2,4,8 and 16 mean quantization widths. That is, it divides the value of AC coefficient. As an example, the predetermined AC coefficient value in a given DCT block is 8, the quantization number QNO is 7 (400), the class is 0 (402), and the area is 3 (404). ), The quantization width is 2 (406).

그러면, AC계수의 값 8을 양자화폭 2로 나눈다. 결국, 4라는 값으로 AC계수값은 양자화가 된다.Then, the value 8 of the AC coefficient is divided by the quantization width 2. Eventually, the value of 4 is the AC coefficient value is quantized.

제3도에 있어서, 제1가변장 부호화 단계(306)에서는 상기 제1양자화번호 결정단계(302)에서 결정되고, 상기 클래스(class) 및 영역(area) 분류단계에서 분류된 양자화번호(QNO)와 클래스(class) 및 영역(area)에 따라 소정의 양자화표에 설정된 양자화폭으로 하나의 세그먼트를 구성하는 모든 이산여현변환(DCT) 세그먼트를 구성하는 모든 이산여현변환(DCT) 블록에 대해 각각의 AC계수들을 나눈 값을 지그재그 스캔에 의해 가변장 부호화를 수행한다.In FIG. 3, in the first variable length coding step 306, the quantization number QNO determined in the first quantization number determination step 302 and classified in the class and area classification step is classified. And for each of the discrete cosine transform (DCT) blocks constituting all the discrete cosine transform (DCT) segments constituting a segment with the quantization width set in a predetermined quantization table according to the class and the area. Variable length coding is performed by a zigzag scan by dividing the AC coefficients.

가변장 부호화는 지그재그 스캔된 '0'이 연속하는 런(RUN)과 AC계수의 크기에 따라 가변장 부호화 테이블에서 적절한 코드를 선택하고, 매크로 블록 버퍼는 각각의 블록에 대해 할당된 비트를 채우지 못한 곳에 넣게 되며, 세그먼트 버퍼는 각각의 매크로 블록에 대해 할당된만큼의 코드를 취하게 되고 버퍼를 넘을 경우 매크로 블록에 할당된 비트를 채우지 못한 곳에 넣게 된다.Variable length coding selects an appropriate code from the variable length coding table according to the RUN and AC coefficients of zigzag-scanned '0', and the macroblock buffer cannot fill the allocated bits for each block. The segment buffer takes as much code as is allocated for each macro block, and if it exceeds the buffer, it puts the bits allocated to the macro block where it cannot fill.

제1차 양자화번호 조정단계(308)에서는 상기 제1가변장 부호화단계(306)에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 할당된 비트와 발생하는 비트 사이의 차이를 구하여 각 매크로 블록의 양자화번호 가감을 소정의 제1차 양자화번호 조정 테이블에 따라 조정한다.In the first quantization number adjustment step 308, a predetermined bit is assigned to each macroblock by bits generated by encoding in the first variable length encoding step 306, and between the allocated bits and the generated bits. The difference is calculated and adjusted according to a predetermined first quantization number adjustment table.

양자화번호 조정 테이블은 상기 차이 비트의 값의 정도에 따라 양자화번호(QNO)의 가감을 달리한다.The quantization number adjustment table changes the quantization number QNO according to the degree of the value of the difference bit.

a = b × c ÷ da = b × c ÷ d

f = c - af = c-a

a는 매크로 블록 단위로 원하는 비트량에 대해 할당한 비트이고, b는 AC계수에 대한 목표부호길이이다. HD-Baseband에서는 2560비트가 AC계수의 목표부호길이이다. c는 각 매크로 블록 단위의 가변장 부호화를 거쳐 발생된 비트이다. d는 하나의 세그먼트 단위의 가변장 부호화를 거쳐 발생된 비트이다. F는 실제 발생하는 비트와 할당된 비트와의 차이비트이다. 1차적으로 가변장 부호화를 거쳐 발생하는 비트는 하나의 세그먼트 단위에서 최대한 활용할 수 있는 비트를 적절히 활용하지 못한다.a is a bit allocated for a desired bit amount in macroblock units, and b is a target code length for an AC coefficient. In HD-Baseband, 2560 bits is the target code length of the AC coefficient. c is a bit generated through variable length coding of each macroblock unit. d is a bit generated through variable length coding of one segment unit. F is the difference bit between the bit that actually occurs and the assigned bit. Firstly, bits generated through variable length coding do not properly utilize bits that can be utilized to the maximum in one segment unit.

이의 조정을 위해서 표 1에 양자화폭의 1차 조정 테이블을 제시한다.Table 1 presents the first adjustment table of the quantization width for this adjustment.

상기 표 1에서 E는 상술한 바와 같이 각 매크로 블록 단위의 발생된 비트와 할당된 비트와의 차이 비트를 말하고, A,B,C,D,E는 제2도에서 보이듯 세그먼트를 이루는 매크로 블록이다. 즉, 상기 표 1에서 하나의 예를 들어 보면, F값이 200이고, D 매크로 블록에 해당하면 양자화번호(QNO)의 증감분은 +1이 된다.In Table 1, E denotes a difference bit between the generated bit and the allocated bit of each macroblock unit as described above, and A, B, C, D, and E are macroblocks that form a segment as shown in FIG. . That is, in one example of Table 1, if the F value is 200 and the D macroblock corresponds to the D value, the increment of the quantization number QNO is +1.

즉, 1차 조정된 양자화번호는 제1양자화번호 결정단계(302)에서 결정된 양자화번호에 양자화번호의 증감분을 더해 1차적으로 양자화번호를 조정한다.That is, the first adjusted quantization number is first adjusted by adding the increment of the quantization number to the quantization number determined in the first quantization number determination step 302.

제2 가변장 부호화 단계(310)에서는 상기 제1차 양자화번호 조정단계(308)에서 조정된 양자화번호와 상기 클래스 및 영역분류단계(304)에서 분류된 클래스와 영역에 따라 상기 제1 가변장 부호화 단계와 동일한 과정을 수행한다.In the second variable length encoding step 310, the first variable length encoding is performed according to the quantization number adjusted in the first quantization number adjusting step 308 and the classes and regions classified in the class and region classification step 304. Follow the same process as the steps.

제2차 양자화번호 조정단계(312)에서는 상기 제2 가변장 부호화단계(310)에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록단 소정의 비트를 할당하고, 할당된 비트와 발생하는 비트 사이의 차이를 구하여 각 매크로 블록의 양자화 번호 가감을 소정의 제2차 양자화번호 조정 테이블에 따라 조정한다. 상기 제1차 양자화번호 조정단계(308)와 동일한 원리이다.In the second quantization number adjustment step 312, predetermined bits of each macroblock are allocated by bits generated by encoding in the second variable length encoding step 310, and the predetermined bits are allocated between the allocated bits and the generated bits. The difference is obtained and adjusted according to a predetermined second quantization number adjustment table. It is the same principle as the first quantization number adjustment step 308.

이의 조정을 위해서 표 2에 양자화폭의 2차 조정 테이블을 제시한다.For this adjustment, Table 2 presents the secondary adjustment table of quantization width.

예를 들어, F가 -20이고, D 매크로 블록이라면 2차 양자화번호(QNO) 증감분은 0이 된다. 이 경우, 제1차 양자화번호 조정단계에서 조정된 양자화번호(QNO)와 동일한 번호를 가지고 양자화표에 의해 양자화폭을 갖는다. 상기 표 2에 의해 2차 조정된 양자화번호와 클래스 및 영역을 가지고 양자화폭을 결정하여 제3가변장 부호화 단계(도면에 제시되지 않음)를 거친다. 반복해서 양자화번호를 조정함으로써 세밀하게 양자화폭을 설정할 수 있다.For example, if F is -20 and the D macroblock is, the quadratic quantization number (QNO) increment is zero. In this case, it has the same number as the quantization number QNO adjusted in the first quantization number adjustment step and has a quantization width by the quantization table. The quantization width is determined using the quantization number, the class, and the region, which are second-adjusted according to Table 2, and is subjected to a third variable length encoding step (not shown). By repeatedly adjusting the quantization number, the quantization width can be set finely.

상술한 바와 같이 구성한 신호 압축방법은 반복하여 양자화폭을 조정하므로써 신호압축에 있어 부호비트의 길이가 목표부호 길이에 근접하도록 하여 주어진 고정 길이 비트를 가지고 가장 효율성있게 활용할 수 있도록 하는 방법을 제공하며, 이는 화질의 향상을 높이는 효과를 제공한다.The signal compression method configured as described above provides a method of making the most efficient use with a given fixed length bit by repeatedly adjusting the quantization width so that the length of the code bit approaches the target code length in signal compression. This provides the effect of improving the image quality.

Claims (5)

소정개의 DCT 블록으로 구성된 복수개의 매크로 블록을 하나의 세그멘트 단위로 하여 부호화를 수행하는 방법에 있어서, 상기 하나의 세그멘트를 이루는 DCT 블록의 휘도신호의 AC계수가 논제로인 것의 갯수를 계산하고, 상기 계산된 갯수를 소정값으로 나누어 양자화 번호를 결정하는 제1단계; 상기 AC계수들의 절대값의 합에 따라 하나의 세그멘트를 이루는 모든 DCT 블록을 복수개의 클래스로 분류하고, 상기 AC계수들의 주파수 성분에 따라 상기 각 DCT 블록을 복수개의 영역으로 분류하는 제2단계; 상기 제1단계에서 결정된 양자화번호와 상기 제2단계에서 분류된 클래스 및 영역에 따라 양자화폭을 설정하는 제3단계; 상기 제3단계에서 설정된 양자화폭으로 하나의 세그멘트를 구성하는 모든 이산여현변환 블록에 대해 각각의 AC계수들을 나눈 값을 가변장 부호화하는 제4단계; 상기 제4단계에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 상기 할당된 비트와 실제로 발생하는 비트 사이의 차이에 의해 상기 제2단계에서 결정된 양자화 번호를 조정하는 제5단계; 상기 제5단계에서 조정된 양자화번호와 상기 제2단계에서 분류된 클래스 및 영역에 따라 양자화폭을 설정하고, 상기 설정된 양자화폭으로 하나의 세그멘트를 구성하는 모든 이산여현변환 블록에 대해 각각의 AC계수들을 나눈 값을 가변장 부호화하는 제6단계; 및 상기 제6단계에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트를 할당하고, 상기 할당된 비트와 실제로 발생하는 비트 사이의 차이에 의해 상기 제6단계에서 조정된 양자화 번호를 재차 조정하는 제7단계를 포함함을 특징으로 하는 신호압축 부호화 방법.In a method of encoding a plurality of macro blocks consisting of a predetermined DCT block in units of segments, calculating the number of non-zero AC coefficients of luminance signals of the DCT blocks forming one segment, and Determining a quantization number by dividing the calculated number by a predetermined value; Classifying all DCT blocks forming one segment into a plurality of classes according to the sum of absolute values of the AC coefficients, and classifying each DCT block into a plurality of regions according to frequency components of the AC coefficients; A third step of setting a quantization width according to the quantization number determined in the first step and the classes and regions classified in the second step; A fourth step of variable length encoding the values obtained by dividing the respective AC coefficients for all the discrete cosine transform blocks constituting one segment by the quantization width set in the third step; Assigning a predetermined bit to each macroblock by the bit coded and generated in the fourth step, and adjusting the quantization number determined in the second step by the difference between the allocated bit and the bit actually generated. Step 5; The quantization width is set according to the quantization number adjusted in the fifth step and the class and region classified in the second step, and each AC coefficient is applied to all the discrete cosine transform blocks constituting one segment with the set quantization width. A sixth step of variable length encoding the value obtained by dividing the sound; And allocating predetermined bits for each macroblock by the bits generated by encoding in the sixth step, and re-adjusting the quantization number adjusted in the sixth step by the difference between the allocated bits and the bits that actually occur. And a seventh step of adjusting. 제1항에 있어서, 상기 제1단계는 이산여현변환(DCT) 블록내의 AC계수의 절대값이 1보다 작은 경우에 제로 계수로 하고, 그렇지 않은 경우에 논제로 계수로 함을 특징으로 하는 신호압축 부호화 방법.The signal compression method according to claim 1, wherein the first step comprises a zero coefficient when the absolute value of the AC coefficient in the discrete cosine transform (DCT) block is less than one, and a nonzero coefficient otherwise. Coding method. 제1항에 있어서, 상기 제1단계는 계산된 총 논제로 계수의 갯수를 120으로 나누어 1차적으로 양자화번호를 결정하는 것을 특징으로 하는 신호압축 부호화 방법.The signal compression encoding method of claim 1, wherein the first step determines a quantization number primarily by dividing the calculated total zero coefficient by 120. 제1항에 있어서, 상기 제4 및 제7단계는 제5 및 제6단계에서 부호화되어 발생하는 비트에 의해 각각의 매크로 블록당 소정의 비트의 할당은 각 매크로 블록 단위의 발생 비트수와 하나의 세그먼트 단위의 AC계수의 목표부호길이의 비트를 곱하고 하나의 세그먼트 단위의 현재 발생 비트수를 나누어 각각의 메크로 블록당 비트를 할당함을 특징으로 하는 신호압축 부호화 방법.The method of claim 1, wherein the fourth and seventh steps are based on the bits generated by encoding the fifth and sixth steps. And multiplying the bits of the target code length of the AC coefficient in the segment unit and dividing the number of bits currently generated in one segment unit to allocate the bits per macro block. 제1항에 있어서, 제4단계 내지 제7단계와 동일한 원리를 갖는 단계를 반복 수행하는 제n 가변장 부호화 단계와 제n 양자화 번호 조정단계를 더 구비함을 특징으로 하는 신호압축 부호화 방법.The signal compression encoding method according to claim 1, further comprising an n-th variable-length encoding step and an n-th quantization number adjustment step of repeatedly performing the steps having the same principle as the fourth to seventh steps.
KR1019950004776A 1995-03-09 1995-03-09 Signal compression coding method KR0165504B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019950004776A KR0165504B1 (en) 1995-03-09 1995-03-09 Signal compression coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019950004776A KR0165504B1 (en) 1995-03-09 1995-03-09 Signal compression coding method

Publications (2)

Publication Number Publication Date
KR960036773A KR960036773A (en) 1996-10-28
KR0165504B1 true KR0165504B1 (en) 1999-03-20

Family

ID=19409449

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019950004776A KR0165504B1 (en) 1995-03-09 1995-03-09 Signal compression coding method

Country Status (1)

Country Link
KR (1) KR0165504B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100555419B1 (en) * 2003-05-23 2006-02-24 엘지전자 주식회사 Moving picture coding method

Also Published As

Publication number Publication date
KR960036773A (en) 1996-10-28

Similar Documents

Publication Publication Date Title
EP1834487B1 (en) Method for improved entropy coding
CN101502123B (en) Coder
EP0677969B1 (en) Moving picture coding method and an apparatus therefor
CN100355289C (en) Adaptive variable-length coding methods for image data
CN101222644B (en) Moving image encoding/decoding device and moving image encoding/decoding method
JP3074211B2 (en) Video signal encoding device
US5539468A (en) Coding device and decoding device adaptive to local characteristics of an image signal
US20050008075A1 (en) Rate control method with region of interesting support
JPH07222154A (en) Method and apparatus for image coding
CA2533885A1 (en) Method and apparatus for selection of scanning mode in dual pass encoding
KR0165504B1 (en) Signal compression coding method
US6449310B1 (en) Video signal coding apparatus
KR0135807B1 (en) Signal compression and encoding method
JP4100317B2 (en) Image coding apparatus and quantization control method thereof
DE602004011213T2 (en) INTRAFRAME COMPRESSION AND DECOMPRIMATION OF VIDEO SIGNALS WITH A FIXED BITRATE
EP1892965A2 (en) Fixed bit rate, intraframe compression and decompression of video
US5825422A (en) Method and apparatus for encoding a video signal based on inter-block redundancies
JPH05207286A (en) Picture coding system
JP3190164B2 (en) Code amount estimation device
JP3262114B2 (en) Video signal encoding device and video signal encoding method
JPH07107481A (en) Method and device for encoding picture signal
KR100234311B1 (en) Video data encoding method and circuit thereof
KR100231591B1 (en) The quantizing number decision method and device of the digital video signal
KR20040067239A (en) Method of bit allocation in quantizer, and apparatus thereof
JPH0457490A (en) Orthogonal transform encoding device

Legal Events

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

Payment date: 20070830

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee