KR100247966B1 - Compression coding apparatus and method - Google Patents

Compression coding apparatus and method Download PDF

Info

Publication number
KR100247966B1
KR100247966B1 KR1019970030661A KR19970030661A KR100247966B1 KR 100247966 B1 KR100247966 B1 KR 100247966B1 KR 1019970030661 A KR1019970030661 A KR 1019970030661A KR 19970030661 A KR19970030661 A KR 19970030661A KR 100247966 B1 KR100247966 B1 KR 100247966B1
Authority
KR
South Korea
Prior art keywords
quantization
step size
complexity
zero
quantization step
Prior art date
Application number
KR1019970030661A
Other languages
Korean (ko)
Other versions
KR19990008621A (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 KR1019970030661A priority Critical patent/KR100247966B1/en
Publication of KR19990008621A publication Critical patent/KR19990008621A/en
Application granted granted Critical
Publication of KR100247966B1 publication Critical patent/KR100247966B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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/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/172Methods 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 picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • 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 Or Coding Systems Of Tv Signals (AREA)

Abstract

본 발명은 MPEG-2의 인트라(Intra) 부호화에 있어서 양자화 스텝사이즈 설정 장치 및 방법에 관한 것이다. 본 발명의 목적을 위하여 입력되는 영상 데이터를 이산 여현 변환하는 이산 여현 변환수단, 한프레임의 매크로블럭 개수에 대한 전체 복잡도인 제1양자화스텝사이즈(MQUANT)에 의해 양자화하는 제1양자화 수단, 상기 복잡도에 따라 매크로 블록 단위로 목표 비트를 계산하는 목표비트계산수단, 상기 제1양자화 수단에서 양자화된 이산여현변환의 논-제로 계수를 카운트하여 정규화하는 논-제로 계수 정규화 수단, 상기 논-제로 계수 정규화 수단의 논-제로 계수의 정규화값과 상기 제1양자화 스텝사이즈의 연산에 의해 발생된 제2양자화스텝사이즈와 잉여비트에 따라 가감된 양자화스텝사이즈가 더해진 양자화스텝사이즈에 따라 상기 이산 여현 변환된 영상 데이터를 양자화하는 제2양자화수단을 포함하며, 본 발명에 의하면, 인트라 프레임 코딩을 함으로서 인터 프레임을 위한 장치가 필요하지 않아 하드웨어 사이즈를 감소시키며 인트라 프레임 코딩에 의한 프레임 단위의 편집이 용이한 이점이 있다.The present invention relates to an apparatus and method for setting quantization step size in intra coding of MPEG-2. Discrete cosine converting means for discrete cosine transforming the input image data for the purpose of the present invention, first quantization means for quantizing by the first quantization step size (MQUANT) which is the total complexity for the number of macroblocks of one frame, the complexity A target bit calculation means for calculating a target bit in macroblock units according to the non-zero coefficient normalization means for counting and normalizing a non-zero coefficient of a discrete cosine transform quantized by the first quantization means, and the non-zero coefficient normalization. The discrete cosine-converted image according to the normalized value of the non-zero coefficient of the means and the quantization step size, which is added to the second quantization step size generated by the operation of the first quantization step size and the quantization step size subtracted or subtracted according to the surplus bits. A second quantization means for quantizing the data, and according to the present invention, Does not require a device for reducing the hardware size interframe sikimyeo has the advantage easy editing on a frame basis according to the intraframe coding.

Description

압축 부호화 장치 및 방법Compression coding apparatus and method

본 발명은 압축 부호화 장치 및 방법에 관한 것으로서, 특히 MPEG-2의 인트라(Intra) 부호화에 있어서 양자화 스텝사이즈 설정 장치 및 방법에 관한 것이다. 일반적으로 MPEG-2는 비트율 4 - 10 Mbits/sec의 데이터량으로서 NTSC, PAL, SECAM등의 기존 방송 화질 또는 CCIR601의 디지털 텔레비젼 화질을 기본 목표로하고 있다.The present invention relates to a compression encoding apparatus and method, and more particularly, to an apparatus and method for setting a quantization step size in intra encoding of MPEG-2. In general, MPEG-2 has a data rate of 4-10 Mbits / sec, and aims at existing broadcast picture quality of NTSC, PAL, SECAM, or digital TV picture quality of CCIR601.

도 1은 일반적인 MPEG-2의 압축 부호화 장치의 블록도이며, 입력되는 영상 신호를 필터링하는 전처리기(112), 영상간 예측을 위한 이동 추정기(ME)(114), 프레임 단위로 저장하는 프레임 메모리(124), 추정된 움직임 벡터를 이용해 움직임을 보상하는 움직임 보상기(MC)(126), 공간 중보성을 얻기 위해 8 × 8 블록에 대해 DCT(Discrete Cosine Transform) 변환하는 DCT기(116), 공간 중복성을 제거하는 양자화기(Q)(118), 역양자화하는 역양자화기(120), 역 DCT하는 IDCT(122), 통계적 중복성을 제거하기 위한 VLC(Variable Length Coding)(128), 전송률 조정을 위한 순방향 분석기(132), 데이터를 전송하기 위한 버퍼(130)로 구성된다.1 is a block diagram of a typical MPEG-2 compression encoding apparatus, a preprocessor 112 for filtering an input video signal, a motion estimator (ME) 114 for inter-image prediction, and a frame memory stored in units of frames 124, a motion compensator (MC) 126 that compensates for motion using the estimated motion vector, a DCT device 116 that transforms a DCT (Discrete Cosine Transform) for 8 × 8 blocks to obtain spatial interpolation, space Quantizer (Q) 118 to remove redundancy, inverse quantizer 120 to dequantize, IDCT 122 to inverse DCT, variable length coding (VLC) 128 to remove statistical redundancy, rate adjustment Forward analyzer 132, a buffer for transmitting data 130 is configured.

도 1에 도시된 바와 같이 MPEG-2의 압축 부호화는 인트라(Intra), 인터(Inter) 프레임 코딩을 채택하고 있다. 인트라 프레임 코딩은 예측 부호화를 행하지 않고 DCT기(116)에서 DCT를 행한 후 양자화기(118), VLC기(128)를 통해 부호화된다. 인터 프레임 코딩은 예측 부호화를 행하며, P(Predictive) 프레임 코딩과 B(Bidirectional) 코딩을 포함하고 있다. 예측 부호화는 이동 추정기(ME)(114), 프레임 메모리(124), 움직임 보상기(MC)(126)를 통해 화상간의 움직임을 검출하여 움직임 벡터를 부호화한다. 따라서 P 프레임은 I 프레임을 기본으로 움직임 벡터를 검출하고, B 프레임은 P 프레임 및 I 프레임을 기본으로 움직임 벡터를 검출한다. 또한 버퍼(130)에서 발생하는 데이터량은 입력되는 영상의 특성에 따라 프레임간 및 프레임내의 매크로 블록별로 불규칙하게 발생한다. 이와 같이 불규칙하게 발생되는 데이터를 고화질을 유지하며 일정한 전송 속도를 갖는 전송로를 통해서 전송하기 위해서는 순방향 분석기(132)에서 전송률 조정이 필요하며, 피드백 루프를 구성하여 양자화 스케일 벡터인 MQUANT(Modified quantizer) 값을 조정한다. 이 MQUANT는 화질을 결정하는 중요한 요소중의 하나인 양자화 스텝 사이즈이다. MPEG-2에서는 양자화 스텝 사이즈를 결정하기 위해 다음의 3단계를 거친다. 제1단계는 글로벌 복잡도(Activity) 측정에 의하여 전체 복잡도를 구하게 되고 각각의 I,B,P 픽쳐에 대하여 이전에 발생한 비트량과 현재의 목표 비트율, 및 1개의 GOP(Group Of Picture)내에 남아있는 각각의 픽쳐수에 대하여 비트할당이 이루어진다. 제2단계는 현재 버퍼(130)의 내용(Fullness)에 따라서 매크로 블록 단위의 기준 MQUANT값이 결정된다. 제3단계는 현재 매크로 블록의 복잡도가 계산되고 정규화되어 기준 MQUANT값과 곱해져 실제 매크로 블록에 적용되는 MQUANT값을 계산하여 양자화에 적용된다. 이와 같이 MPEG-2의 부호화 과정은 인터 프레임 코딩을 수행하고, I,B,P 픽쳐의 발생 비트로 인한 피드백 루프 때문에 프레임 단위의 편집이 불가능하고 하드웨어도 복잡해지는 단점이 있다.As shown in FIG. 1, compression coding of MPEG-2 employs intra frame and inter frame coding. Intra-frame coding is performed through the quantizer 118 and the VLC machine 128 after performing DCT in the DCT apparatus 116 without performing predictive encoding. Inter-frame coding performs predictive coding and includes P (Predictive) frame coding and Bidirectional (B) coding. The predictive encoding encodes a motion vector by detecting a motion between images through a motion estimator (ME) 114, a frame memory 124, and a motion compensator (MC) 126. Therefore, the P frame detects a motion vector based on the I frame, and the B frame detects a motion vector based on the P frame and the I frame. In addition, the amount of data generated in the buffer 130 is irregularly generated between frames and macroblocks within the frame according to the characteristics of the input image. In order to transmit the irregularly generated data through a transmission line having a constant transmission speed while maintaining high quality, a rate adjustment is required in the forward analyzer 132, and a feedback loop is formed to form a quantized scale vector, MQUANT (Modified quantizer). Adjust the value. This MQUANT is a quantization step size, which is one of the important factors for determining image quality. In MPEG-2, three steps are used to determine the quantization step size. In the first step, the overall complexity is obtained by measuring the global complexity, and the bit rate previously generated for each I, B, and P picture, the current target bit rate, and remaining in one group of picture (GOP) are obtained. Bit allocation is made for each picture number. In the second step, a reference MQUANT value in macroblock units is determined according to the fullness of the current buffer 130. In the third step, the complexity of the current macroblock is calculated, normalized, multiplied by a reference MQUANT value, and applied to quantization by calculating an MQUANT value applied to the actual macroblock. As described above, the encoding process of MPEG-2 performs inter-frame coding, and it is impossible to edit frame by frame due to a feedback loop due to generated bits of I, B, and P pictures, and hardware has a disadvantage.

본 발명이 이루고자하는 기술적과제는 인트라 프레임 부호화 장치로서 한 프레임 단위의 복잡도에 의해 계산된 MQUANT와 DCT를 취하여 발생되는 특정 계수를 카운트한 정규화값을 곱하여 양자화 스텝 사이즈를 결정하는 압축 부호화 장치를 제공하는 데 있다.The technical problem to be achieved by the present invention is to provide a compression coding apparatus for determining an quantization step size by multiplying a normalized value of a specific coefficient generated by taking a MQUANT and a DCT calculated by the complexity of one frame unit as an intra frame coding apparatus There is.

본 발명이 이루고자하는 다른 기술적과제는 인트라 프레임 부호화 방법으로서 한 프레임 단위의 복잡도에 의해 계산된 MQUANT와 DCT를 취하여 발생되는 특정 계수를 카운트한 정규화값을 곱하여 양자화 스텝 사이즈를 결정하는 압축 부호화 방법을 제공하는 데 있다.Another technical problem to be achieved by the present invention is an intra frame encoding method, which provides a compression encoding method for determining a quantization step size by multiplying a normalized value by counting specific coefficients generated by taking MQUANT and DCT calculated by the complexity of one frame unit. There is.

도 1은 일반적인 MPEG-2의 압축 부호화 장치의 블록도이다.1 is a block diagram of a general compression encoding apparatus of MPEG-2.

도 2는 본 발명에 따른 압축 부호화 장치를 보이는 블록도이다.2 is a block diagram showing a compression encoding apparatus according to the present invention.

도 3은 통상적인 1개의 매크로 블록(Macro Block)에 대한 4:2:0 영상 포맷도이다.3 is a 4: 2: 0 video format diagram of a conventional macro block.

도 4는 통상적인 4:2:0 영상 포맷도이다.4 is a typical 4: 2: 0 image format diagram.

도 5는 본 발명에 따른 압축 부호화 방법의 흐름도이다.5 is a flowchart of a compression encoding method according to the present invention.

상기의 기술적 과제를 해결하기 위하여 본 발명은 MPEG-2의 부호화 장치에 있어서, 입력되는 영상 데이터를 이산 여현 변환하는 이산 여현 변환수단; 한프레임의 매크로블럭 개수에 대한 전체 복잡도인 제1양자화스텝사이즈(MQUANT)에 의해 양자화하는 제1양자화 수단; 상기 복잡도에 따라 매크로 블록 단위로 목표 비트를 계산하는 목표비트계산수단; 상기 제1양자화 수단에서 양자화된 이산여현변환의 논-제로 계수를 카운트하여 정규화하는 논-제로 계수 정규화 수단; 상기 논-제로 계수 정규화 수단의 논-제로 계수의 정규화값과 상기 제1양자화 스텝사이즈의 연산에 의해 발생된 제2양자화스텝사이즈와 잉여비트에 따라 가감된 양자화스텝사이즈가 더해진 양자화스텝사이즈에 따라 상기 이산 여현 변환된 영상 데이터를 양자화하는 제2양자화수단을 포함하는 것을 특징으로 하는 압축 부호화 장치이다.In order to solve the above technical problem, the present invention provides a coding apparatus of MPEG-2, comprising: discrete cosine transform means for performing discrete cosine transform on input video data; First quantization means for quantizing by a first quantization step size (MQUANT), which is an overall complexity for the number of macroblocks in one frame; Target bit calculating means for calculating a target bit in units of macro blocks according to the complexity; Non-zero coefficient normalization means for counting and normalizing non-zero coefficients of the discrete cosine transform quantized by the first quantization means; The normalization value of the non-zero coefficient of the non-zero coefficient normalization means and the second quantization step size generated by the operation of the first quantization step size and the quantization step size added or subtracted according to the surplus bits are added. And second quantization means for quantizing the discrete cosine transformed image data.

상기의 다른 기술적 과제를 해결하기 위하여 본 발명은 MPEG-2의 부호화 방법에 있어서, 입력 영상에 따른 복잡도를 계산하여 제1양자화스텝사이즈(MQUANT)를 생성하는 제1과정; 상기 제1과정의 제1양자화스텝사이즈에 의해 양자화하는 제2과정; 상기 제1과정에서 계산된 복잡도에 따라 매크로 블록 단위로 목표 비트를 계산하는 제3과정; 상기 제2과정으로부터 양자화된 이산여현변환의 논-제로 계수를 카운트하여 정규화하는 제4과정; 제2과정에서 양자화하여 발생된 비트와 제3과정에서 계산된 목표 비트의 차인 잉여비트에 따라 가감된 양자화 스텝사이즈(MQUANT)를 구하는 제5과정; 상기 제4과정에서의 정규화값과 복잡도의 승산에 따른 양자화스텝사이즈를 기준으로 하여 제5과정에서 가감된 양자화 스텝사이즈(MQUANT)를 가하여 양자화를 수행하는 제6과정을 포함하는 것을 특징으로 하는 압축 부호화 방법이다.According to another aspect of the present invention, there is provided a method of encoding an MPEG-2, comprising: a first step of generating a first quantization step size (MQUANT) by calculating a complexity according to an input image; A second process of quantizing by the first quantization step size of the first process; A third step of calculating a target bit in macro block units according to the complexity calculated in the first step; A fourth step of counting and normalizing non-zero coefficients of the quantized discrete cosine transforms from the second step; A fifth step of obtaining a quantization step size (MQUANT) added or subtracted according to an excess bit, which is a difference between a bit generated by quantization in a second step and a target bit calculated in a third step; And a sixth process of performing quantization by adding or subtracting the quantization step size MQUANT in the fifth process based on the quantization step size according to the multiplication of the normalization value and the complexity in the fourth process. Encoding method.

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

도 2는 본 발명에 따른 압축 부호화 장치를 보이는 블록도이며, 전처리기(210), 복잡도 계산기(212), DCT기(214), 제1양자화기(216), 논-제로 카운트기(218), 목표 비트 계산기(220), 제2양자화기(224), 논-제로 계수 정규화기(226), VLC(228), MQUANT 가감기(230)로 구성된다.2 is a block diagram illustrating a compression encoding apparatus according to the present invention, and includes a preprocessor 210, a complexity calculator 212, a DCT unit 214, a first quantizer 216, and a non-zero count unit 218. , A target bit calculator 220, a second quantizer 224, a non-zero coefficient normalizer 226, a VLC 228, and a MQUANT adder 230.

도 3은 통상적인 1개의 매크로 블록(Macro Block)에 대한 4:2:0 영상 포맷도이며, 4개의 휘도 성분(Y1,Y2,Y3,Y4)과 2개의 색차 성분(Cb,Cr)으로 구성된다.3 is a 4: 2: 0 image format diagram of a conventional macro block, and is composed of four luminance components (Y1, Y2, Y3, and Y4) and two color difference components (Cb and Cr). do.

도 4는 통상적인 4:2:0 영상 포맷도이다.4 is a typical 4: 2: 0 image format diagram.

도 2에 도시된 바와 같이 먼저, 전처리기(210)는 아날로그-디지탈 변환된 4:2:2의 영상 데이터를 도 4에 도시된 바와 같이 4:2:0의 영상 데이터로 다운 샘플링(Down sampling)된다. 이때의 영상 데이터는 수직 방향에 대해 다운 샘플링된다. 복잡도(Activity) 계산부(212)는 전처리기(210)로부터 입력되는 한 프레임의 영상 데이터를 각각의 도 3에 도시된 매크로 블록 단위로 복잡도를 계산한다. 여기서 계산된 복잡도는 전체 영상 데이터에 적용될 초기 양자화스텝사이즈인 제1MQUANT를 구하는 데 이용된다. 즉, α× (mean_act) + β = 초기 MQUANT로 구해지며, 여기서 (mean_act)는 한 프레임에 대한 전체 복잡도 / 한프레임에 대한 매크로 블록 개수이며, α,β는 제1MQUANT값의 최적값을 위한 실험치로서 α=0.02,β=2.5이다. 또한 이때의 복잡도는 공간 영역상의 데이터에 대해 단순한 픽셀 차(pixel difference)로 정의된다. 다음 DCT기(214)는 MPEG-2의 TM5의 수식을 적용하며, 전처리기(210)로부터 입력되는 영상 데이터를 이산 여현 변환한다. 즉 DCT는 공간 영역의 영상 데이터를 주파수 영역으로 변환하고 TM5에서 제안하고 있는 지그재그(zig-zag) 방법을 사용한다.First, as shown in FIG. 2, the preprocessor 210 down-samples analog-digital converted 4: 2: 2 image data into 4: 2: 0 image data as shown in FIG. 4. )do. The video data at this time is down sampled in the vertical direction. The complexity calculator 212 calculates the complexity of the image data of one frame input from the preprocessor 210 in units of macro blocks shown in FIG. 3. The complexity calculated here is used to find the first MQUANT, which is the initial quantization step size to be applied to the entire image data. That is, α × (mean_act) + β = initial MQUANT, where (mean_act) is the total complexity for one frame / the number of macroblocks for one frame, and α, β are experimental values for the optimal value of the first MQUANT value. Α = 0.02, β = 2.5. In addition, the complexity at this time is defined as a simple pixel difference with respect to the data in the spatial domain. Next, the DCT device 214 applies the formula of TM5 of MPEG-2, and performs discrete cosine conversion on the image data input from the preprocessor 210. In other words, the DCT converts the image data in the spatial domain into the frequency domain and uses the zig-zag method proposed by TM5.

제1양자화기(216)는 DCT기(214)로부터 DCT된 영상 데이터를 복잡도 계산부(212)에 구해진 제1MQUANT에 따라 양자화를 수행한다. 이때의 양자화기도 TM5에서 제안하고 있으며 전체 영상 데이터에 대하여 동일한 MQUANT에 의해 양자화를 수행한다. 논-제로(Non_zero) 카운트기(218)는 제1양자화기(216)의 출력에 대한 계수들에 대하여 제로("0")가 아닌 계수를 카운트한다. 이때 1개의 매크로 블록에 대하여 발생한 논-제로 계수를 도 3과 같은 매크로 블록 단위로 저장하게 된다. 목표 비트 계산기(220)는 복잡도 계산부(212)에서 구해진 복잡도에 따라 목표 비트를 할당하게 되는 데 각 매크로 블록 단위의 복잡도와 전체 한프레임의 복잡도의 비율에 따라 한프레임당 주어진 비트 레이트에 대하여 목표 비트를 할당한다. 즉, 목표 비트 = 매크로 블록당 복잡도(activity) / 프레임당 복잡도(mean_act) × (비트율(bit_rate)/30)로 계산되어지며, 이때 할당되어진 비트는 매크로 블록 단위로 양자화되고 가변장 부호화(VLC:Variable Length Coding)되어 발생하는 목표 비트(Target Bit)이다.The first quantizer 216 quantizes the image data DCT obtained from the DCT unit 214 according to the first MQUANT obtained from the complexity calculator 212. The quantizer at this time is also proposed by TM5, and quantization is performed by the same MQUANT for all image data. Non-zero counter 218 counts a coefficient other than zero ("0") for the coefficients for the output of first quantizer 216. In this case, the non-zero coefficient generated for one macroblock is stored in a macroblock unit as shown in FIG. 3. The target bit calculator 220 allocates a target bit according to the complexity obtained by the complexity calculator 212. The target bit calculator 220 targets a given bit rate per frame according to the ratio of the complexity of each macroblock unit and the complexity of the entire frame. Allocates bits. That is, the target bit = complexity per macroblock (activity) / complexity per frame (mean_act) × (bit_rate / 30) is calculated, wherein the allocated bits are quantized in units of macroblocks and variable length coding (VLC: Target Bit generated by Variable Length Coding).

논-제로계수 정규화기(226)는 논-제로 카운트기(218)에서 구해진 논-제로 계수에 대하여 정규화(Nomalize)를 수행한다. 이때 정규화될 수식은The non-zero coefficient normalizer 226 normalizes the non-zero coefficients obtained by the non-zero counter 218. The formula to be normalized

Z_act = (2*Non_zero) + Non_zero_mean) / (Non_zero) + 2*Non_zero_mean)여기서, Z_act 는 매크로 블록 단위의 논_제로 계수의 정규화 값이며, Non_zero는 매크로 블록 단위의 논_제로 계수의 개수이며, Non_zero_mean는 전체 한 프레임에 대한 논_제로 계수 개수의 평균값이다. 수학 식1에 의하면 정규화된 값은 0 ∼ 2까지의 값으로 정규화된다.Z_act = (2 * Non_zero) + Non_zero_mean) / (Non_zero) + 2 * Non_zero_mean) where Z_act is the normalized value of the nonzero coefficient in macroblock units, and Non_zero is the number of nonzero coefficients in macroblock units, Non_zero_mean is the average of the number of non-zero coefficients for a whole frame. According to Equation 1, the normalized value is normalized to a value from 0 to 2.

논-제로계수 정규화기(226)에서 구해진 Z_act와 복잡도 계산기(212)에서 구해진 제1MQUANT 값은 곱셈기(225)를 통해 곱해져 기준되는 MQUANT를 발생한다. 제2양자화기(224)는 곱셈기(225)에서 계산된 값을 MQUANT로하여 DCT(214)기에서 출력되는 DCT된 영상 데이터를 양자화한다. 이때 사용되는 양자화기는 TM5에서 정의된다. VLC기(228)는 제2양자화기(224)를 통하여 양자화된 계수에 대하여 가변장 부호화를 수행하여 비트스트림을 출력하며, 직류(DC)에 대해서는 DPCM을 거치고나서 가변장 부호화를 수행한다. VLC기(228)에서 출력되는 비트스트림이 부호화기의 실제 비트의 발생량이다. 이때 발생한 비트는 매크로 블록 단위로 발생하는 비트와 다르다. 뺄셈기(227)는 VLC기(228)에서 출력되는 비트와 목표 비트 계산기(220)의 매크로 블럭단위의 목표 비트를 뺄셈하여 잉여 비트를 발생한다. 이 잉여 비트는 목표비트계산기(220)에 가해져 다음 매크로블럭의 목표 비트에 부가된다. MQUANT 가감기(230)는 뺄셈기(227)에서 발생되는 잉여 비트에 따라서 MQUANT값을 가감한다. 표 1은 가감하게 되는 MQUANT의 가감값에 대한 일예를 나타낸다.The Z_act obtained from the non-zero coefficient normalizer 226 and the first MQUANT value obtained from the complexity calculator 212 are multiplied by the multiplier 225 to generate a reference MQUANT. The second quantizer 224 quantizes the DCT image data output from the DCT 214 using the value calculated by the multiplier 225 as MQUANT. The quantizer used here is defined in TM5. The VLC device 228 performs variable length coding on the quantized coefficients through the second quantizer 224 to output a bitstream, and performs variable length coding on a direct current (DC) after passing through the DPCM. The bitstream output from the VLC 228 is an amount of actual bits generated by the encoder. Bits generated at this time are different from bits generated in macroblock units. The subtractor 227 subtracts the bit output from the VLC machine 228 and the target bit in the macroblock unit of the target bit calculator 220 to generate a surplus bit. This excess bit is added to the target bit calculator 220 and added to the target bit of the next macroblock. The MQUANT adder 230 adds or subtracts the MQUANT value according to the surplus bits generated by the subtractor 227. Table 1 shows an example of the added and subtracted values of MQUANT.

잉여비트Surplus bits MQUANT의 가감값Acceleration value of MQUANT 잉여비트 〈 0Surplus bits 〈0 -1-One 0〈잉여비트〈500 <surplus bit <50 +1+1 50〈잉여비트〈10050 <surplus bit <100 +2+2 100〈잉여비트〈200100 <surplus bit <200 +3+3

또한 MQUANT 가감기(230)에서 발생된 표 1의 MQUANT의 가감값과 곱셈기(225)에서 발생하는 MQUANT는 덧셈기(227)에서 더해져 제2양자화기(224)에서 실제로 사용될 양자화 스텝 사이즈인 MQUANT로 사용된다.In addition, the MQUANT decrement value of Table 1 generated by the MQUANT decelerator 230 and the MQUANT generated by the multiplier 225 are added to the adder 227 to be used as the MQUANT which is the quantization step size actually used by the second quantizer 224. do.

도 5는 본 발명에 따른 압축 부호화 방법의 흐름도이다.5 is a flowchart of a compression encoding method according to the present invention.

510과정은 입력되는 영상 데이터를 다운 샘플링(Down sampling)하는 전처리 과정이다. 521과정은 입력 영상에 따른 복잡도를 계산하는 과정이다. 514과정은 입력 영상에 따른 복잡도를 계산하여 제1양자화스텝사이즈(MQUANT)를 계산하는 과정이다. 516과정은 514과정에서 계산된 제1MQUANT에 의해 영상 데이터를 제1양자화하는 과정이다. 518과정은 양자화된 이산여현변환의 논-제로 계수를 카운트하는 과정이다. 522은 512과정에서 계산된 복잡도에 따라 매크로 블록 단위로 목표 비트를 계산하는 과정이다. 520과정은 518과정으로부터 카운트된 논-제로 계수를 정규화하는 과정이다. 524과정은 514과정에서 계산된 제1MQUANT와 520과정에서 구한 정규화값을 승산하여 제2MQUANT를 계산하는 과정이다. 526과정은 524과정에서 구한 제2MQUANT에의해 영상 데이터를 제1양자화하는 과정이다. 528과정은 부호화 장치에서 발생되는 비트와 522과정에서 계산된 목표 비트의 차를 구하는 과정이다. 530과정은 520과정에서의 정규화값에 따른 제1MQUANT를 기준으로 하여 528과정에서 구해진 잉여비트에 따른 MQUANT의 가감값과 더하여 다음 양자화 과정의 제2MQUANT를 구하는 과정이다.The process 510 is a preprocessing process of down sampling the input image data. Step 521 is a process of calculating the complexity according to the input image. In operation 514, the first quantization step size MQUANT is calculated by calculating a complexity according to the input image. Operation 516 is a process of first quantizing the image data by the first MQUANT calculated in operation 514. Step 518 is a process of counting non-zero coefficients of the quantized discrete cosine transform. 522 is a process of calculating a target bit in macroblock units according to the complexity calculated in step 512. Step 520 is to normalize the non-zero coefficient counted from step 518. In step 524, the second MQUANT is calculated by multiplying the first MQUANT calculated in step 514 and the normalization value obtained in step 520. Operation 526 is a process of first quantizing the image data by the second MQUANT obtained in operation 524. In operation 528, a difference between a bit generated in the encoding apparatus and a target bit calculated in operation 522 may be obtained. Step 530 is a process of obtaining a second MQUANT of the next quantization process in addition to the MQUANT decrement value according to the surplus bits obtained in step 528 based on the first MQUANT according to the normalization value in step 520.

상술한 바와 같이 본 발명에 의하면, 인트라 프레임 코딩을 함으로서 인터 프레임을 위한 장치가 필요하지 않아 하드웨어 사이즈를 감소시키며 인트라 프레임 코딩에 의한 프레임 단위의 편집이 용이한 이점이 있다.As described above, according to the present invention, since intra frame coding does not require an apparatus for inter frames, hardware size is reduced, and frame-by-frame editing is easily performed by intra frame coding.

Claims (12)

부호화 장치에 있어서,In the encoding device, 입력되는 영상 데이터를 이산 여현 변환하는 이산 여현 변환수단;Discrete cosine converting means for converting the input video data into discrete cosine; 한프레임의 전체 복잡도로 산출되는 제1양자화스텝사이즈에 의해 양자화하는 제1양자화 수단;First quantization means for quantizing by a first quantization step size calculated at an overall complexity of one frame; 상기 복잡도에 따라 매크로 블록 단위로 목표 비트를 계산하는 목표비트계산수단;Target bit calculating means for calculating a target bit in units of macro blocks according to the complexity; 상기 제1양자화 수단에서 양자화된 이산여현변환의 논-제로 계수를 카운트하여 정규화하는 논-제로 계수 정규화 수단;Non-zero coefficient normalization means for counting and normalizing non-zero coefficients of the discrete cosine transform quantized by the first quantization means; 상기 논-제로 계수 정규화 수단의 논-제로 계수의 정규화값과 상기 제1양자화 스텝사이즈의 연산에 의해 발생된 제2양자화스텝사이즈와 잉여비트에 따라 가감된 양자화스텝사이즈가 더해진 양자화스텝사이즈에 따라 상기 이산 여현 변환된 영상 데이터를 양자화하는 제2양자화수단을 포함하는 것을 특징으로 하는 압축 부호화 장치.The normalization value of the non-zero coefficient of the non-zero coefficient normalization means and the second quantization step size generated by the operation of the first quantization step size and the quantization step size added or subtracted according to the surplus bits are added. And second quantization means for quantizing the discrete cosine transformed image data. 제1항에 있어서, 상기 제2양자화 수단의 잉여비트는 전체 발생 비트와 상기 목표비트계산수단의 목표 비트의 차인 것을 특징으로 하는 압축 부호화 장치.The compression encoding apparatus according to claim 1, wherein a surplus bit of said second quantization means is a difference between all generated bits and a target bit of said target bit calculating means. 제2항에 있어서, 잉여 비트는 다음 매크로 블록의 목표비트로 사용되는 것임을 특징으로 하는 압축 부호화 장치.The compression encoding apparatus of claim 2, wherein the surplus bits are used as target bits of a next macro block. 제1항에 있어서, 상기 제1양자화 수단의 복잡도는 픽셀과 픽셀간의 차이인 것을 특징으로 압축 부호화 장치.The compression coding apparatus of claim 1, wherein the complexity of the first quantization means is a difference between pixels. 제1항에 있어서, 상기 제1양자화 수단의 제1양자화스텝사이즈(MQUANT)는 α × (mean_act) + β5( mean_act는 한 프레임에 대한 전체 복잡도 / 한프레임에 대한 매크로 블록 개수, α,β는 상수)임을 특징으로 하는 압축 부호화 장치.The method of claim 1, wherein the first quantization step size (MQUANT) of the first quantization means is α × (mean_act) + β5 (mean_act is the total complexity for one frame / macroblock number for one frame, α, β is Compression encoding). 제1항에 있어서, 목표비트계산수단의 목표비트는 매크로 블록당 복잡도(activity) / 프레임당 복잡도(mean_act) × (비트율(bit_rate)/30)로 계산되는 것임을 특징으로 하는 압축 부호화 장치.The compression encoding apparatus according to claim 1, wherein the target bit of the target bit calculating means is calculated by the complexity per macroblock / the complexity per frame (mean_act) x (bit_rate / 30). 제1항에 있어서, 상기 정규화 수단의 정규화는 Z_act = (2*Non_zero) + Non_zero_mean) / (Non_zero) + 2*Non_zero_mean)여기서, Z_act 는 매크로 블록 단위의 논_제로 계수의 정규화 값, Non_zero는 매크로 블록 단위의 논_제로 계수의 개수이며, Non_zero_mean는 전체 한 프레임에 대한 논_제로 계수 개수의 평균값으로 계산되는 것임을 특징으로 하는 압축 부호화 장치.The method of claim 1, wherein the normalization of the normalization means is Z_act = (2 * Non_zero) + Non_zero_mean) / (Non_zero) + 2 * Non_zero_mean), where Z_act is a normalization value of a non_zero coefficient in units of macroblocks, and Non_zero is a macro. The number of non-zero coefficients in units of blocks, and Non_zero_mean is calculated as the average value of the number of non-zero coefficients for a whole frame. 제7항에 있어서, 상기 정규화된 값은 0 ∼ 2까지의 값으로 한정되는 것임을 특징으로 하는 압축 부호화 장치.8. The compression coding apparatus of claim 7, wherein the normalized value is limited to a value from 0 to 2. 제1항에 있어서, 상기 제2양자화 수단의 연산은 곱셈 연산인 것을 특징으로 하는 압축 부호화 장치.The compression encoding apparatus according to claim 1, wherein the operation of the second quantization means is a multiplication operation. 제1항에 있어서, 상기 제2양자화 수단의 양자화스텝사이즈 가감값은 잉여비트의 발생 개수에 따라 설정되는 파라메타에 의해 결정되는 것을 특징으로 하는 부호화 장치.The encoding device according to claim 1, wherein the quantization step size addition value of the second quantization means is determined by a parameter set according to the number of occurrences of surplus bits. 부호화 방법에 있어서,In the encoding method, 입력 영상에 따른 복잡도를 계산하여 양자화스텝사이즈(MQUANT)를 생성하는 제1과정;Generating a quantization step size (MQUANT) by calculating a complexity according to an input image; 상기 제1과정의 양자화스텝사이즈에 의해 제1양자화하는 제2과정;A second step of first quantization by the quantization step size of the first step; 상기 제1과정에서 계산된 복잡도에 따라 매크로 블록 단위로 목표 비트를 계산하는 제3과정;A third step of calculating a target bit in macro block units according to the complexity calculated in the first step; 상기 제2과정으로부터 제1양자화된 이산여현변환의 논-제로 계수를 카운트하여 정규화하는 제4과정;A fourth step of counting and normalizing a non-zero coefficient of the first quantized discrete cosine transform from the second step; 제2과정에서 양자화하여 발생된 비트와 제3과정에서 계산된 목표 비트의 차인 잉여비트에 따라 가감된 양자화 스텝사이즈(MQUANT)를 구하는 제5과정;A fifth step of obtaining a quantization step size (MQUANT) added or subtracted according to an excess bit, which is a difference between a bit generated by quantization in a second step and a target bit calculated in a third step; 상기 제4과정에서의 정규화값과 복잡도의 승산에 따른 양자화스텝사이즈를 기준으로 하여 제5과정에서 가감된 양자화 스텝사이즈(MQUANT)를 가하여 제2양자화를 수행하는 제6과정A sixth process of performing a second quantization by adding or subtracting the quantization step size MQUANT in the fifth process based on the quantization step size according to the multiplication of the normalization value and the complexity in the fourth process; 제11항에 있어서, 상기 제6과정에서 발생한 비트와 목표비트와의 가감을 행하여 다음 양자화 과정의 목표 비트를 재설정하는 과정을 더 포함하는 것을 특징으로 하는 압축 부호화 방법.12. The compression encoding method of claim 11, further comprising resetting the target bit of the next quantization process by performing the subtraction of the bit generated in the sixth step and the target bit.
KR1019970030661A 1997-07-02 1997-07-02 Compression coding apparatus and method KR100247966B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970030661A KR100247966B1 (en) 1997-07-02 1997-07-02 Compression coding apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970030661A KR100247966B1 (en) 1997-07-02 1997-07-02 Compression coding apparatus and method

Publications (2)

Publication Number Publication Date
KR19990008621A KR19990008621A (en) 1999-02-05
KR100247966B1 true KR100247966B1 (en) 2000-03-15

Family

ID=19513197

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970030661A KR100247966B1 (en) 1997-07-02 1997-07-02 Compression coding apparatus and method

Country Status (1)

Country Link
KR (1) KR100247966B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100961760B1 (en) * 2002-08-13 2010-06-07 퀄컴 인코포레이티드 Motion Estimation Method and Apparatus Which Refer to Discret Cosine Transform Coefficients
KR100793781B1 (en) * 2005-01-14 2008-01-11 엘지전자 주식회사 Apparatus and method for encoding of real-time moving image

Also Published As

Publication number Publication date
KR19990008621A (en) 1999-02-05

Similar Documents

Publication Publication Date Title
JP3748717B2 (en) Video encoding device
KR0183688B1 (en) Image encoding method and device
JP3954656B2 (en) Image coding apparatus and method
US5461422A (en) Quantizer with automatic pre-threshold
EP1992169B1 (en) Method and apparatus for bit rate control in scalable video signal encoding using a rate-distortion optimisation
KR19980018698A (en) Image data compression apparatus and method thereof
KR20000068515A (en) Video data encoder, video data encoding method, video data transmitter, and video data recording medium
KR20000023276A (en) Method for controlling frame-level rate
JPH1070738A (en) Visual error processing method and image encoding device using the same method
EP0982951A1 (en) Picture compression process
KR100247966B1 (en) Compression coding apparatus and method
KR100269113B1 (en) Compression coding apparatus and method
KR101336445B1 (en) Method for rate control in video encoding
KR100394014B1 (en) Apparatus for transcoding video
US20060146932A1 (en) Method and apparatus for providing motion estimation with weight prediction
US20060209951A1 (en) Method and system for quantization in a video encoder
JP3858520B2 (en) Video encoding apparatus and method
JP3963296B2 (en) Video transmission rate conversion device
KR100809013B1 (en) Apparatus for coding complexity-scalable moving image and method thereof
JP3918208B2 (en) Video data compression apparatus and method
JP3765129B2 (en) Encoding apparatus and encoding method
KR100774455B1 (en) Bit rate operation apparatus for realtime video transmit application
KR100778473B1 (en) Bit rate control method
KR100584366B1 (en) Encoding system for compressing moving picture
KR950005653B1 (en) Data quantization rate control method and apparatus

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

Year of fee payment: 12

LAPS Lapse due to unpaid annual fee