KR20060120787A - Method of ultra-fine bit count control of video frame - Google Patents

Method of ultra-fine bit count control of video frame Download PDF

Info

Publication number
KR20060120787A
KR20060120787A KR1020050042956A KR20050042956A KR20060120787A KR 20060120787 A KR20060120787 A KR 20060120787A KR 1020050042956 A KR1020050042956 A KR 1020050042956A KR 20050042956 A KR20050042956 A KR 20050042956A KR 20060120787 A KR20060120787 A KR 20060120787A
Authority
KR
South Korea
Prior art keywords
bit amount
amount
macroblocks
quantization parameter
target bit
Prior art date
Application number
KR1020050042956A
Other languages
Korean (ko)
Other versions
KR100746589B1 (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 KR1020050042956A priority Critical patent/KR100746589B1/en
Publication of KR20060120787A publication Critical patent/KR20060120787A/en
Application granted granted Critical
Publication of KR100746589B1 publication Critical patent/KR100746589B1/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/48Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/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

Abstract

A method for precisely controlling a bit count of a moving picture frame is provided to adaptively select the positions and the number of macro-blocks and control a quantization parameter of the macro-blocks to rapidly and correctly make a generated bit count of a compressed frame correspond to a target bit count. A generated bit count of a compressed frame is compared to a target bit count. When the generated bit count is greater than the target bit count(S100), the quantization parameter of predetermined macro-blocks is increased to reduce the generated bit count such that the generated bit count approximates the target bit count(S200). When the generated bit count and the target bit count have not been changed even though the generated bit count is reduced, the number of macro-blocks is increased and the quantization parameter of the macro-blocks is increased to decrease the generated bit count such that the generated bit count approximates the target bit count. When the generated bit count is smaller than the target bit count, the quantization parameter of predetermined macro-blocks is reduced to increase the generated bit count such that the generated bit count approximates the target bit count(S300). When the generated bit count and the target bit count have not been changed even though the generated bit count is increased, the number of macro-blocks is increased and their quantization parameter is reduced to increase the generated bit count such that the generated bit count further approximates the target bit count.

Description

동영상 프레임의 초정밀 비트량 제어방법{METHOD OF ULTRA-FINE BIT COUNT CONTROL OF VIDEO FRAME}High precision bit rate control method of video frame {METHOD OF ULTRA-FINE BIT COUNT CONTROL OF VIDEO FRAME}

도 1은 일반적인 비트량 제어장치가 포함된 동영상 부호화 시스템의 블록 구성도.1 is a block diagram of a video encoding system including a general bit amount control apparatus.

도 2는 본 발명에 따른 동영상 프레임의 초정밀 비트량 제어방법의 개념도.2 is a conceptual diagram of a method for controlling a high precision bit rate of a video frame according to the present invention;

도 3은 도 2의 비트량 감소과정의 상세 흐름도.3 is a detailed flowchart of a bit amount reduction process of FIG.

도 4는 본 발명에서 조절될 매크로 블록의 순서에 대한 설명도.4 is an explanatory diagram of a sequence of macro blocks to be adjusted in the present invention.

도 5는 도 3의 비트량 제어종료 결정 과정의 상세 흐름도.5 is a detailed flowchart of the bit amount control termination determination process of FIG.

도 6은 도 2의 비트량 증가과정의 상세 흐름도.6 is a detailed flowchart of the bit amount increasing process of FIG.

도 7은 도 2의 비트량 안정화 과정의 상세 흐름도.7 is a detailed flowchart of the bit amount stabilization process of FIG.

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

110 : 감산기 120 : DCT부110: subtractor 120: DCT unit

130 : 양자화부 140 : 부호화부130: quantizer 140: encoder

150 : 역양자화부 160 : 역DCT부150: inverse quantization unit 160: inverse DCT unit

170 : 가산기 180 : 프레임 메모리170: adder 180: frame memory

190 : 움직임 추정부 200 : 비트량 제어부 190: motion estimation unit 200: bit amount control unit

본 발명은 동영상 프레임의 비트량 제어방법에 관한 것으로, 특히 동영상 압축시 각 압축된 프레임의 생성 비트량을 목표 비트량과 정확히 일치시킬 수 있도록 하는 동영상 프레임의 초정밀 비트량 제어방법에 관한 것이다.The present invention relates to a method for controlling a bit amount of a video frame, and more particularly, to a method for controlling an ultra-precise bit amount of a video frame so that the generated bit amount of each compressed frame can be exactly matched with a target bit amount during video compression.

디지털 동영상은 표현 정보량이 방대하기 때문에 영상 압축 기술이 필요하며, 최근의 저장 미디어 시스템, 통신 저장 방송 미디어 통합 시스템을 위한 동영상 압축 국제 표준인 MPEG(Moving Picture Experts Group)이나 저속 통신용 비디오 부호화 표준인 H.263등에서 제안된 DPCM(Differential Pulse Coded Modulation)/DCT(Discrete Cosine Transform) 복합 부호화기에서 부호화된 영상의 가변적인 데이터 발생량을 고정된 전송율로 전송할 때 사용되는 버퍼의 오버플로우(overflow)나 언더플로우(underflow) 없이 안정된 화질을 얻기 위한 비트량 제어는 영상 부호화기에서 매우 중요한 요소이다.Digital video requires image compression technology because of the large amount of expression information.Moving Picture Experts Group (MPEG), the international standard for moving picture compression for recent storage media systems, and integrated communication and storage media, or H, the video coding standard for low-speed communications, The overflow or underflow of the buffer used to transmit the variable data generation rate of coded images at the fixed bit rate in the Differential Pulse Coded Modulation (DPCM) / Discrete Cosine Transform (DCT) complex coder The bit rate control to obtain stable image quality without underflow is a very important factor in the image encoder.

도 1은 종래 동영상 부호화 시스템의 비트량 제어장치를 도시한 것으로, 감산기(110), DCT(Discrete Cosine Transform)부(120), 양자화(Quantization : Q)부(130), 부호화부(140), 역양자화(Inverse Quantization: IQ)부(150), 역DCT(Inverse Discrete Cosine Transform)부(160), 가산기(170), 프레임 메모리(180), 움직임 추정(Motion Estimation: ME)부(190) 및 비트량 제어부(200)를 포함 하여 구성된다.FIG. 1 illustrates a bit amount control apparatus of a conventional video encoding system, including a subtractor 110, a discrete cosine transform (DCT) unit 120, a quantization (Q) unit 130, an encoding unit 140, Inverse Quantization (IQ) unit 150, Inverse Discrete Cosine Transform (DCT) unit 160, adder 170, frame memory 180, Motion Estimation (ME) unit 190, and It is configured to include a bit amount control unit 200.

상기 감산기(110)는 입력 영상과 움직임 추정부(190)에서 움직임이 보상된 영상의 차분을 출력하게 되며, DCT부(120)는 8ㅧ8 화소 블록 단위로 입력되는 영상 비트 스트림에 대해 DCT 연산을 수행하고, 양자화부(130)는 DCT부(120)에서 얻어진 DCT 계수에 대해 양자화 매개변수(Quantization Parameter)를 이용하여 양자화를 수행하여 몇 개의 대표값으로 표현함으로써 고효율 손실압축을 수행한다. 상기 부호화부(140)는 가변길이 부호화(Variable Length Coding: VLC)부로서 입력된 비트 스트림에 대해 가변 길이 부호화를 수행하여 부호화된 비트 스트림을 버퍼로 전송한다.The subtractor 110 outputs the difference between the input image and the motion-compensated image by the motion estimator 190, and the DCT unit 120 performs a DCT operation on an image bit stream input in units of 8 × 8 pixel blocks. The quantization unit 130 performs high efficiency loss compression by performing quantization on the DCT coefficients obtained by the DCT unit 120 using quantization parameters and expressing them as some representative values. The encoder 140 performs variable length coding on the input bit stream as a variable length coding (VLC) unit and transmits the encoded bit stream to the buffer.

상기 역양자화부(150)는 양자화부(130)에서 양자화된 영상 데이터를 역양자화하며, 역DCT부(160)는 역양자화부(150)에서 역양자화된 영상 데이터에 대해 역DCT변환을 수행하며, 역DCT부(150)의 출력은 가산기(170)에서 움직임 추정부(190)를 통해 움직임 보상된 신호와 합산되며, 이는 프레임 메모리(180)에 프레임 단위로 저장된다. The inverse quantization unit 150 inverse quantizes the image data quantized by the quantization unit 130, and the inverse DCT unit 160 performs inverse DCT transformation on the inverse quantized image data in the inverse quantization unit 150. The output of the inverse DCT unit 150 is added to the motion-compensated signal through the motion estimator 190 in the adder 170, which is stored in the frame memory 180 in units of frames.

상기 움직임 추정부(190)는 프레임 메모리(180)로부터 입력되는 다음 부호화하고자 하는 영상의 움직임을 예측하게 되는데, 현재 영상과 움직임을 예측하고자하는 영상을 비교하여 움직임 벡터(MV)를 구한 후, 움직임 벡터값에 따라 움직임이 보상된 영상을 감산기(110) 및 상기 가산기(170)로 출력하게 된다.The motion estimator 190 predicts the motion of the next image to be encoded, which is input from the frame memory 180. The motion estimator 190 compares the current image with the image to predict motion and obtains a motion vector (MV). The motion-compensated image is output to the subtractor 110 and the adder 170 according to the vector value.

그리고 비트량 제어부(200)는 부호화부(140)의 출력 비트량에 따라 양자화부(130)의 양자화 매개변수를 조절하여 비트량을 제어하도록 되어 있다.The bit amount control unit 200 controls the bit amount by adjusting the quantization parameter of the quantization unit 130 according to the output bit amount of the encoder 140.

이와 같이 종래는 각 프레임의 비트량을 목표비트량에 맞추기 위해 양자화 매개변수와 비트량과의 관계를 다양한 방법으로 예측하여 양자화 매개변수를 조절함으로써 비트량을 제어하고 있다.As described above, the bit amount is controlled by adjusting the quantization parameter by predicting the relationship between the quantization parameter and the bit amount in various ways in order to match the bit amount of each frame to the target bit amount.

그러나 입력영상의 특성이 다양하고 예측이 어렵기 때문에 예측오류가 항상 발생하여 각 프레임의 생성 비트량을 목표 비트량에 100% 정확히 맞출 수가 없었다.However, because the characteristics of the input image are diverse and difficult to predict, prediction errors always occur and the amount of generated bits of each frame cannot be exactly 100% matched to the target amount of bits.

또한, 국내특허출원번호 제1998-15859호에는 목표 부호량에 근접시킨 영상신호 부호화방법 및 그에 따른 장치가 개시되어 있다.In addition, Korean Patent Application No. 1998-15859 discloses a video signal encoding method and apparatus according to the amount of target codes.

이는 초기 양자화 스텝사이즈에 의해 부호화된 영상데이터의 부호량을 목표부호량과 비교하여 목표 부호량에 근접하도록 양자화스텝사이즈를 결정하여 부호화하도록 되어 있다.The code amount of the video data encoded by the initial quantization step size is compared with the target code amount to determine and encode the quantization step size so as to be close to the target code amount.

일 예를 들어, 각 프레임의 목표 비트량이 1000 bit라고 할 경우, 첫 번째 프레임을 부호화 하니 생성 비트량이 900 bit가 나왔다면 그 다음 프레임의 목표 비트량은 1100 bit로 상향 조정된다. 이 두 번째 프레임을 부호화 하니 생성 비트량이 1170 bit가 나왔다면, 세 번째 프레임의 목표 비트량은 930 bit 하향 조정된다. 따라서 평균적으로 각 프레임의 생성 비트량은 1000 bit가 유지된다. 그러나 정확히 1000 bit가 되지는 않는다.For example, when the target bit amount of each frame is 1000 bits, if the first bit is encoded and the generation bit amount is 900 bits, the target bit amount of the next frame is adjusted upward to 1100 bits. When the second frame is encoded and the generation bit amount is 1170 bits, the target bit amount of the third frame is adjusted downward by 930 bits. Therefore, on average, the generation bit amount of each frame is maintained at 1000 bits. But not exactly 1000 bits.

즉, 부호화된 부호량과 목표 부호량을 비교하여 목표 부호량에 근접하도록 되어 있을 뿐, 부호화된 부호량을 목표 부호량에 정확히 일치시키기에는 어려움이 있었다.In other words, the coded code amount is compared with the target code amount so as to be close to the target code amount, and it is difficult to exactly match the coded code amount to the target code amount.

또한, "An accurate bit-rate control for real-time MPEG video encoder( 김태용, Signal Processing Image Communication, 2003년 3월)"는 코드워드(Codeword) 길이와 비트량과의 관계를 수학적으로 모델링하여 비트량을 제어하도록 되어 있다. 그러나 모델링 에러로 인해 생성 비트량을 100% 정확하게 제어하지 못한다.In addition, "An accurate bit-rate control for real-time MPEG video encoder (Tae Yong Kim, Signal Processing Image Communication, March 2003)" is a bit rate by mathematically modeling the relationship between the codeword length and the bit amount To control. However, due to modeling errors, the amount of generated bits cannot be controlled accurately.

본 발명은 이러한 점을 감안한 것으로, 본 발명의 목적은 매크로 블록의 위치와 개수를 적응적으로 선택후 그의 양자화 매개변수를 조절하여 각 압축된 프레임의 생성 비트량을 목표 비트량과 빠르고 정확하게 일치시킬 수 있도록 한 동영상 프레임의 초정밀 비트량 제어방법을 제공함에 있다.The present invention has been made in view of the above, and an object of the present invention is to adaptively select the position and number of macro blocks and adjust the quantization parameter thereof to quickly and accurately match the generated bit amount of each compressed frame with the target bit amount. To provide an ultra-precise bit rate control method of a video frame.

본 발명의 다른 목적은 입력 영상의 다양한 특성에 관계없이 적용 가능한 동영상 프레임의 초정밀 비트량 제어방법을 제공함에 있다.Another object of the present invention is to provide a method for controlling an ultra-precise bit amount of a video frame regardless of various characteristics of an input image.

상기 목적을 달성하기 위한 본 발명에 따른 동영상 프레임의 초정밀 비트량 제어방법은, 압축된 동영상 프레임의 비트량을 제어하는 방법에 있어서, 압축된 각 프레임의 생성 비트량과 목표 비트량을 비교하는 제1 과정; 상기 비교 결과 생성 비트량이 목표 비트량보다 크면 소정 매크로 블록들의 양자화 매개변수를 증가시켜서 생성 비트량을 감소시켜 목표 비트량에 생성 비트량을 근접시키며, 생성 비트량 을 감소시켜도 생성 비트량과 목표 비트량의 대소관계가 변하지 않으면 조절할 매크로 블록의 개수를 증가시키고 그의 양자화 매개변수를 증가시켜서 생성 비트량을 감소시켜 생성 비트량을 목표 비트량에 더욱 근접시키는 제2 과정; 및 상기 비교 결과 생성 비트량이 목표 비트량보다 작으면 소정 매크로 블록들의 양자화 매개변수를 감소시켜서 생성 비트량을 증가시켜 생성 비트량을 목표 비트량에 근접시키며, 생성 비트량을 증가시켜도 생성 비트량과 목표 비트량의 대소관계가 변하지 않으면 조절할 매크로 블록의 개수를 증가시키고 그의 양자화 매개변수를 감소시켜서 생성 비트량을 증가시켜 생성 비트량을 목표 비트량에 더욱 근접시키는 제3 과정;을 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method for controlling an ultra-precise bit amount of a video frame, the method for controlling the bit amount of a compressed video frame, the method comprising: comparing the generated bit amount of each compressed frame with a target bit amount; 1 course; As a result of the comparison, if the generation bit amount is larger than the target bit amount, the generation bit amount is decreased by increasing the quantization parameter of the predetermined macroblocks to bring the generation bit amount closer to the target bit amount, and the generation bit amount and the target bit even if the generation bit amount is decreased. A second step of increasing the number of macroblocks to be adjusted and increasing its quantization parameter to reduce the amount of generated bits if the magnitude relationship of the amount does not change to bring the generated bit amount closer to the target bit amount; And if the generation bit amount is smaller than the target bit amount as a result of the comparison, the generation bit amount is increased by decreasing the quantization parameter of the predetermined macroblocks to bring the generation bit amount closer to the target bit amount, and the generation bit amount is increased even if the generation bit amount is increased. And a third step of increasing the number of generated macroblocks by decreasing the number of macroblocks to be adjusted and decreasing the quantization parameter thereof to increase the amount of generated bits, thereby bringing the amount of generated bits closer to the target amount of bits if the magnitude of the target bit quantity does not change. It is done.

상기 제1 과정의 비교 결과 생성 비트량이 목표 비트량보다 클 경우, 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 초기화하는 제1 단계; 상기 개수의 매크로 블록의 양자화 매개변수를 증가시키는 제2 단계; 상기 양자화 매개변수를 증가시킨 매크로 블록들에 대해 양자화 및 가변길이 부호화하는 제3 단계; 상기 부호화된 프레임의 생성 비트량과 목표 비트량을 비교하는 제4 단계; 및 비교결과 생성 비트량과 목표 비트량이 동일하면 종료하고, 생성 비트량이 목표 비트량보다 크면 생성 비트량이 목표 비트량과 동일 또는 생성 비트량이 목표 비트량보다 작아질 때까지 상기 제2 단계 내지 제 4단계를 반복 수행하는 제5 단계;를 수행하도록 된 것을 특징으로 한다.A first step of initializing a number value of a macroblock to be adjusted at the same time with a quantization parameter when a comparison result generation bit amount of the first process is larger than a target bit amount; Increasing a quantization parameter of the number of macroblocks; A third step of quantizing and variable length coding the macroblocks having the quantization parameter increased; A fourth step of comparing a generation bit amount and a target bit amount of the encoded frame; And if the comparison bit amount and the target bit amount are the same, the operation is terminated. If the generation bit amount is larger than the target bit amount, the second to fourth steps are performed until the generation bit amount is equal to the target bit amount or the generation bit amount is smaller than the target bit amount. And a fifth step of repeating the steps.

또한, 본 발명은 생성 비트량이 목표 비트량보다 작을 경우나 상기 생성 비트량을 감소시키는 과정에서 생성 비트량이 목표 비트량보다 작아질 경우, 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 재조정하는 제 1단계; 감소불가집합에 포함되지 않은 상기 개수의 매크로 블록의 양자화 매개변수를 감소시키는 제2 단계; 상기 감소된 양자화 매개변수의 매크로 블록들에 대해 양자화 및 가변길이 부호화하는 제3 단계; 상기 부호화된 프레임의 생성 비트량과 목표 비트량을 비교하는 제4 단계; 및 비교결과 생성 비트량과 목표 비트량이 동일하면 종료하고, 생성 비트량이 목표 비트량보다 작으면 생성 비트량이 목표 비트량과 동일 또는 생성 비트량이 목표 비트량보다 커질 때까지 상기 제2 단계 내지 제 4단계를 반복 수행하는 제5 단계를 수행함을 특징으로 한다.In addition, the present invention re-adjusts the number of macroblocks to be adjusted simultaneously with the quantization parameter when the amount of generated bits is smaller than the target bit amount or when the amount of generated bits is smaller than the target bit amount in the process of reducing the amount of generated bits. The first step to do; Reducing a quantization parameter of the number of macroblocks not included in the non-reducible set; A third step of quantizing and variable length coding the macroblocks of the reduced quantization parameter; A fourth step of comparing a generation bit amount and a target bit amount of the encoded frame; And if the generation bit amount is equal to the target bit amount as a result of the comparison, and if the generation bit amount is less than the target bit amount, the second to fourth steps until the generation bit amount is equal to the target bit amount or the generation bit amount are larger than the target bit amount. A fifth step of repeating the steps may be performed.

또한, 본 발명은 생성 비트량이 목표 비트량보다 작아 비트량 증가를 행하다가 다시 생성 비트량이 목표 비트량보다 커질 경우, 상기 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값과 최소 임계치를 비교하는 제1 단계; 상기 비교결과 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값이 최소 임계치 이하이면 바로 이전에 감소시킨 양자화 매개변수들의 매크로 블록들을 감소불가집합에 추가하고, 바로 이전에 감소시킨 양자화 매개변수들을 이전 상태로 되돌린 후, 상기 제2 단계로 리턴하여 다시 비트량을 증가시키는 제2 단계; 상기 비교결과 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값이 최소 임계치보다 크면 바로 이전에 감소시킨 양자화 매개변수들을 이전 상태로 되돌리는 제3 단계; 상기 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 감소시키는 제4 단계; 감소불가집합에 포함되지 않은 소정 개수의 매크로 블록의 양자화 매개변수들을 감소시키고 감소된 양자화 매개변수의 매크로 블록들에 대해 양자화 및 가변길이 부호화하는 제5 단계; 상기 부호화된 프레임의 생성 비트량과 목표 비트량을 비교하는 제6 단계; 및 비교결과 생성 비트량과 목표 비트량이 동일하면 종료하며, 생성 비트량이 목표 비트량보다 크면 상기 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값과 최소 임계치를 비교하는 제1 단계로 리턴하고, 생성 비트량이 목표 비트량보다 작으면 생성 비트량이 목표 비트량과 동일해질 때까지 상기 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 감소시키는 제4 단계 이하를 반복 수행하는 제7 단계를 수행함을 특징으로 한다.In addition, the present invention compares the minimum value with the number of macroblocks to be adjusted simultaneously with the quantization parameter when the amount of generated bits is smaller than the target bit amount to increase the amount of bits and then the amount of generated bits is larger than the target bit amount. First step; As a result of the comparison, if the number of macroblocks to be adjusted simultaneously with the quantization parameter is less than or equal to the minimum threshold, the macroblocks of the previously reduced quantization parameters are added to the non-reduced set, and the previously reduced quantization parameters are transferred. A second step of returning to a state and then returning to the second step to increase the bit amount again; A third step of returning the previously reduced quantization parameters to a previous state if the number of macroblocks to be adjusted simultaneously with the quantization parameter as a result of the comparison is greater than the minimum threshold; A fourth step of reducing the number of macroblocks to be adjusted simultaneously with the quantization parameter; A fifth step of reducing the quantization parameters of the predetermined number of macroblocks not included in the non-reduced set and quantizing and variable length coding the macroblocks of the reduced quantization parameter; A sixth step of comparing a generation bit amount and a target bit amount of the encoded frame; And when the generation bit amount and the target bit amount are the same as the result of the comparison, return to the first step of comparing the minimum value with the number value of the macroblock to be adjusted simultaneously with the quantization parameter if the generation bit amount is larger than the target bit amount. If the generation bit amount is smaller than the target bit amount, a seventh step of repeating the fourth step or less is performed to reduce the number of macro blocks to be adjusted simultaneously with the quantization parameter until the generation bit amount is equal to the target bit amount. It is characterized by.

이하, 본 발명을 첨부된 도면을 참조로 하여 보다 상세하게 설명한다. 단, 하기 실시예는 본 발명을 예시하는 것일 뿐 본 발명의 내용이 하기 실시예에 한정되는 것은 아니다.Hereinafter, the present invention will be described in more detail with reference to the accompanying drawings. However, the following examples are merely to illustrate the present invention is not limited to the contents of the present invention.

본 발명은 도 1과 같은 종래 동영상 부호화 시스템의 비트량 제어장치에서 비트량 제어부(200)의 초정밀 비트량 제어 알고리즘을 매크로 블록의 위치와 개수를 적응적으로 선택하여 압축된 프레임의 비트량을 목표 비트량과 정확히 일치시킬 수 있도록 구현한다.The present invention targets the bit amount of a compressed frame by adaptively selecting the position and number of macro blocks in the bit precision controller of the conventional video encoding system as shown in FIG. Implement to match the bit amount exactly.

상기 비트량 제어부(200)의 초정밀 비트량 제어 알고리즘은 압축된 프레임의 비트량이 목표 비트량보다 크면 일부 매크로블럭들의 기존 양자화 매개변수들을 증가시켜 양자화와 가변길이 부호화를 다시 수행한 후, 부호화부(140) 후단의 버퍼에 저장된 데이터 중 재부호화된 매크로블럭들을 치환하고, 압축된 프레임의 비트량이 목표 비트량보다 작으면 기존의 양자화 매개변수들을 감소시켜 양자화와 가변길이 부호화를 다시 수행한 후, 상기 부호화부(140) 후단의 버퍼에 저장된 데이터중 재 부호화된 매크로블럭들을 치환하며, 이 과정에서 양자화 매개변수를 조절해도 여전히 압축된 프레임의 비트량과 목표 비트량의 대소관계가 이전과 같으면 조절하는 양자화 매개변수들의 개수를 증가시키고, 반대로 프레임의 비트량과 목표 비트량의 대소관계가 이전 대비 역전되면 조절하는 양자화 매개변수들의 개수를 줄여서 재부호화하며, 이 과정을 압축된 프레임의 비트량을 목표 비트량과 일치할 때까지 반복한다.The ultra-precision bit rate control algorithm of the bit rate control unit 200 performs quantization and variable length encoding again by increasing existing quantization parameters of some macroblocks when the bit rate of the compressed frame is larger than the target bit rate, and then, the encoder ( 140) Substituting the re-encoded macroblocks among the data stored in the buffer of the next stage, if the bit amount of the compressed frame is smaller than the target bit amount, the existing quantization parameters are reduced to perform quantization and variable length encoding again, and then The encoder 140 replaces the re-encoded macroblocks among the data stored in the buffer at the end of the encoder 140. Even if the quantization parameter is adjusted in this process, if the magnitude relationship between the bit amount of the compressed frame and the target bit amount is the same as before, Increasing the number of quantization parameters, on the contrary, the magnitude of the frame and the target bit Re-encoding by reducing the number of quantized parameters to control when compared to before reversing and is repeated until matching the bit rate of the compressed frame, the process and the target bit rate.

이와 같은 본 발명의 비트량 제어부(200)의 초정밀 비트량 제어 알고리즘에 대하여 도 2 내지 도 7과 함께 보다 상세히 살펴본다.The ultra-precision bit amount control algorithm of the bit amount control unit 200 according to the present invention will be described in more detail with reference to FIGS. 2 to 7.

먼저, 비트량 제어부(200)에 의한 초정밀 비트량 제어 과정은 1차 동영상 압축이 이루어진 후처리과정으로써 수행되며, 도 2의 흐름도에 도시한 바와 같이, 초기의 생성 비트량과 목표 비트량을 비교하여(S100) 생성 비트량이 목표 비트량보다 크면 DEC_START 링크를 통해 비트량 감소과정(S200)으로 이동하여 비트량을 감소시키고, 생성 비트량이 목표 비트량보다 작으면 INC_START 링크를 통해 비트량 증가과정(S300)으로 이동하여 비트량을 증가시키게 된다.First, the ultra-precision bit amount control process by the bit amount control unit 200 is performed as a post-processing process in which primary video compression is performed. As shown in the flowchart of FIG. 2, an initial generation bit amount and a target bit amount are compared. (S100) If the generated bit amount is greater than the target bit amount, go to the bit amount reduction process (S200) through the DEC_START link to reduce the bit amount, and if the generated bit amount is smaller than the target bit amount, increase the bit amount through the INC_START link ( In step S300, the bit amount is increased.

비트량 감소과정(S200)은 도 3의 흐름도와 같이, 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수(이하, N이라 칭함)값을 초기화 한 후(S210), 압축된 프레임의 생성 비트량을 감소시키기 위해 매크로 블록 압축 순서의 반대 Bit reduction process (S200), as shown in the flow chart of Figure 3, after initializing the number of macro blocks (hereinafter referred to as N) to be adjusted simultaneously with the quantization parameter (S210), the generation bit amount of the compressed frame The opposite of the macroblock compression order to reduce

방향으로 소정 개수의 매크로 블록의 양자화 매개변수를 증가시킨다(S220). 여기서, 조절되는 매크로 블록의 순서는 도 4에 도시한 바와 같이, 매크로 블록 압축 순서의 반대이다.In step S220, the quantization parameter of the predetermined number of macroblocks is increased. Here, the order of the macro blocks to be adjusted is the reverse of the macro block compression order, as shown in FIG.

일반적으로 목표 비트량과 생성 비트량을 일치시키기 위한 과정 중에는 N값의 증가와 감소를 반복하며, 과정시작단계에서는 이 값을 정해주어야 한다. 보통 N값을 최소 임계치로 두고 과정을 시작하나, 구현목적에 따라 N값을 꼭 1로 할 필요가 없고 최소 임계치 이상 한 프레임 내의 총 매크로 블록 개수 이하 임의의 정수값으로 지정할 수 있다.In general, the value of N is repeatedly increased and decreased during the process of matching the target bit quantity with the generated bit quantity, and this value should be determined at the beginning of the process. Normally, the process starts with the N value as the minimum threshold, but it is not necessary to set the N value to 1 depending on the purpose of implementation, and may be set to any integer value that is greater than or equal to the total number of macroblocks in one frame above the minimum threshold.

그리고 양자화 매개변수의 증가량은 매크로 블록마다 동일하게 작은 값으로 하는 것이 바람직하나 구현목적에 따라 가변할 수 있음은 물론이다.The amount of increase in the quantization parameter is preferably equally small for each macroblock, but may vary depending on the purpose of implementation.

상기 증가된 양자화 매개변수들의 매크로 블록들에 대해 양자화를 수행한 후, 해당 매크로 블록들과 부호화 의존성을 갖는 다른 매크로 블록들에 대해 가변길이 부호화를 수행한다(S230,S240).After quantization is performed on the macroblocks of the increased quantization parameters, variable length coding is performed on the macroblocks and other macroblocks having encoding dependencies (S230 and S240).

상기 부호화 의존성에 대해 간략히 살펴보면, 부호화시 압축율을 높이기 위해 현재 부호화되는 매크로 블록은 이전에 부호화된 매크로 블록과 차이값만을 부호화 하며, 예를 들어 현재 매크로 블록의 양자화 파라미터가 10이고 이전 블록의 양자화 파라미터가 12이면, 현재 매크로 블록의 양자화 파라미터는 -2로 부호화 된다. 따라서 이전 블록의 양자화 파라미터가 12에서 15로 바뀌면 현재 매크로 블록의 양자화 파라미터가 여전히 10일 지라도 부호화 의존성에 의해 부호화될 때는 -2에서 -5로 바뀌어야 한다. 한 개의 매크로 블록에는 양자화 파라미터 외에 다른 값들도 많으며, 이런값들도 역시 부호화 의존성을 갖고 있다.Briefly, the encoding dependence of the present invention is that a macroblock currently encoded in order to increase the compression rate in encoding encodes only a difference value from a previously encoded macroblock, for example, the quantization parameter of the current macroblock is 10 and the quantization parameter of the previous block. Is 12, the quantization parameter of the current macroblock is encoded as -2. Therefore, if the quantization parameter of the previous block is changed from 12 to 15, even if the quantization parameter of the current macroblock is still 10, it should be changed from -2 to -5 when encoded by the encoding dependency. In addition to the quantization parameter, one macro block has many other values, which also have encoding dependencies.

상기 단계(S240) 이후, 후술될 비트량 제어종료 결정 과정(S250)을 수행하 며, 비트량 제어종료 결정 과정(S250)에서 생성 비트량과 목표 비트량이 동일할 경우 전체 과정을 종료하게 되며, 생성 비트량이 목표 비트량보다 작으면 DEC_TO_INC 링크를 통해 비트량 증가과정(S300)으로 이동하고, 생성 비트량이 목표 비트량보다 크면 상기 재부호화된 양자화 매개변수를 갖는 매크로 블록의 개수보다 더 많은 개수의 다음 순서의 양자화 매개변수를 갖는 매크로 블록의 양자화 매개변수를 동시에 증가시켜 재부호화 한다(S260,S270,S220).After the step S240, the bit amount control termination determination process (S250) to be described later is performed, and if the generated bit amount and the target bit amount are the same in the bit amount control termination determination process (S250), the entire process is terminated. If the amount of generated bits is smaller than the target bit amount, the process proceeds to bit increase process S300 through the DEC_TO_INC link. If the amount of generated bits is larger than the target bit amount, the number of bits is greater than the number of macroblocks having the re-coded quantization parameter. The quantization parameters of the macroblock having the quantization parameters in the following order are simultaneously increased and recoded (S260, S270, and S220).

이 과정이 반복되다가 모든 매크로 블록들이 재부호화되면 다시 처음 매크로 블록으로 돌아온다. 또한, 이 과정이 반복되다가 생성 비트량이 목표 비트량과 같아지면 비트량 제어를 종료하고 생성 비트량이 목표 비트량보다 작아지면 DEC_TO_INC 링크를 통해 비트량 증가과정(S300)으로 이동한다.This process is repeated and when all macro blocks are re-encoded, they return to the first macro block. If the generated bit amount is equal to the target bit amount after the process is repeated, the bit amount control is terminated. If the generated bit amount is smaller than the target bit amount, the process proceeds to the bit amount increasing process S300 through the DEC_TO_INC link.

도 5는 상기 비트량 제어종료 결정 과정(S250)의 상세 흐름도로, 생성 비트량과 목표 비트량이 같거나 모든 매크로 블록들이 감소불가집합에 포함될 경우 전체 과정을 종료하고(S251), 그렇지 않을 경우 비트량 제어종료 결정 과정(S250)을 빠져 나가 다음 단계(S260)로 진행한다.5 is a detailed flowchart of the bit amount control termination determination process (S250). When the generated bit amount and the target bit amount are the same or all the macroblocks are included in the non-reduced set, the entire process is terminated (S251). Exit the amount control end determination process (S250) and proceeds to the next step (S260).

도 6은 상기 비트량 증가과정(S300)의 상세 흐름도이다.6 is a detailed flowchart of the bit amount increasing process S300.

비트량 증가과정(S300)은 우선 INC_START 링크로부터 과정이 시작되면 상기 N값을 초기화하고(S310), DEC_TO_INC 링크로부터 과정이 시작되면 상기 비트량 감소과정(S200)에서 설정되었던 N값을 감소시키고(S320), STB_T0_INC 링크로부터 과정이 시작되면 N값을 변화시키지 않는다. 그러나 구현목적에 따라 N값을 임의의 원하는 값으로 변경할 수 있음은 물론이다.The bit increase process S300 first initializes the N value when the process starts from the INC_START link (S310), and decreases the N value set in the bit decrease process S200 when the process starts from the DEC_TO_INC link ( S320), if the process starts from the STB_T0_INC link, N value is not changed. However, of course, the N value can be changed to any desired value according to the implementation purpose.

이후, 생성 비트량을 증가시키기 위해 매크로 블록 압축 순서의 반대방향으로 감소불가집합에 포함되지 않는 소정 개수의 매크로 블록들의 양자화 매개변수를 감소시킨 후(S330), 그 양자화 매개변수들의 매크로 블록들에 대해 양자화 과정을 수행한다(S340). 여기서, 감소불가집합이란 양자화 매개변수를 더 이상 감소시키면 안되는 매크로 블록들의 집합을 의미한다.Then, in order to increase the amount of generated bits, the quantization parameter of the predetermined number of macroblocks not included in the non-reduced set in the opposite direction of the macroblock compression order is decreased (S330), and then the macroblocks of the quantization parameters are reduced. A quantization process is performed at step S340. Here, the non-reducible set means a set of macro blocks to which the quantization parameter should not be further reduced.

이러한 양자화 매개변수 감소불가 매크로 블록들은 후술될 비트량 안정화 과정(S400)에서 판별되어 감소불가집합에 원소로서 추가되게 된다.These quantization parameter non-decreasable macroblocks are determined in the bit amount stabilization process (S400) to be described later and added as elements to the non-decreasable set.

상기 양자화 후, 감소된 양자화 매개변수들의 매크로 블록들과 그의 부호화 의존성을 갖는 다른 매크로 블록들에 대해 가변길이 부호화를 수행한 후(S350), 상기 도 5의 비트량 제어종료 결정 과정(S250)과 동일한 비트량 제어종료 결정 과정(S360)에서 종료가 결정되면 전체 과정을 종료한다. 종료가 아니면 생성 비트량과 목표 비트량을 비교하여(S370) 생성 비트량이 크면 INC_TO_STB 링크를 통해 비트량 안정화 과정(S400)으로 이동하고, 생성 비트량이 작으면 더 많은 개수의 다음 순서의 양자화 매개변수를 갖는 매크로 블록의 양자화 매개변수들을 감소시키며(S380,S330), 이러한 과정을 생성 비트량과 목표 비트량이 같아지거나 또는 INC_TO_STB 링크를 통해 비트량 증가과정(S300)을 빠져나갈 때까지 반복한다.After the quantization, after performing variable length coding on the macroblocks of the reduced quantization parameters and other macroblocks having coding dependence thereof (S350), the bit rate control termination decision process (S250) of FIG. When the end is determined in the same bit amount control end determination process (S360), the entire process ends. If not, the generation bit amount is compared with the target bit amount (S370). If the generation bit amount is large, the process proceeds to the bit rate stabilization process (S400) through the INC_TO_STB link. If the generation bit amount is small, the next larger number of quantization parameters Reducing the quantization parameters of the macro block with (S380, S330), and repeats this process until the generated bit amount and the target bit amount is the same or exit the bit amount increase process (S300) through the INC_TO_STB link.

도 7은 상기 비트량 안정화 과정(S400)의 상세 흐름도이다.7 is a detailed flowchart of the bit amount stabilization process (S400).

비트량 안정화 과정(S400)은 먼저, N이 기 설정되어 있는 최소 임계치 이하이면 바로 이전에 감소시킨 양자화 매개변수들의 매크로 블록들을 감소불가집합에 추가하고(S420a), 바로 이전에 감소시킨 양자화 매개변수들을 이전 상태로 되돌린 후, STB_TO_INC 링크를 통해 비트량 증가과정(S300)으로 이동한다(S420b).The bit rate stabilization process S400 firstly adds macroblocks of the quantization parameters that have been previously reduced to the non-decrementable set if N is less than or equal to a predetermined minimum threshold (S420a), and immediately reduces the quantization parameter that has been previously reduced. After returning them to the previous state, the process moves to the bit amount increasing process S300 through the STB_TO_INC link (S420b).

그리고 N이 최소 임계치보다 크면 감소불가집합을 변경하지 않고 그냥 바로 전에 감소시킨 양자화 매개변수들과 조절되었던 매크로 블록 순서를 이전상태로 되돌린다(S430). 여기서, 상기 최소 임계치(N의 최소값 또는 동시에 조절될 최소 매크로 블록의 개수)는 구현 목적에 따라 가변 가능하다.If N is greater than the minimum threshold, the quantization parameters and the macroblock order that have been reduced just before are not returned to the previous state without changing the non-decrementable set (S430). Here, the minimum threshold value (the minimum value of N or the number of minimum macro blocks to be adjusted at the same time) may vary depending on the implementation purpose.

그리고 상기 N을 감소시킨 후, 감소불가집합에 포함되지 않은 소정 개수의 매크로 블록의 양자화 매개변수들을 감소시키고 감소된 양자화 매개변수의 매크로 블럭들에 대해 양자화를 수행하며(S440-S460), 감소된 양자화 매개변수들의 매크로 블록들과 그의 부호화 의존성을 갖는 매크로 블록들에 대해 가변길이 부호화를 수행한다(S470).After reducing N, the quantization parameters of the predetermined number of macroblocks not included in the non-decrement set are reduced and quantization is performed on the macroblocks of the reduced quantization parameter (S440-S460). Variable length coding is performed on macroblocks of the quantization parameters and macroblocks having encoding dependencies thereof (S470).

여기서, 상기 N값의 감소에 대하여 살펴보면, 이는 상기 비트량 감소과정(S200)에서의 N값 증가(S270), 비트량 증가과정(S300)에서의 N값 증가(S380)와는 그 의도하는 바가 상이하다. Here, the decrease of the N value is different from the N value increase (S270) in the bit amount reduction process (S200) and the N value increase (S380) in the bit amount increase process (S300). Do.

상기 단계(S270),(S380)의 N값 증가는 최대한 빠르게 생성 비트량을 목표 비트량에 접근시키기 위한 목적이고(N값을 늘릴수록 생성비트량의 변화량이 커짐), 여기서의 N값 감소는 이미 목표 비트량에 어느정도 접근된 생성 비트량을 목표 비트량에 정확히 일치시키기 위해 점점 세밀하게 생성 비트량을 조절하기 위함이다.The increase of the N value in steps S270 and S380 is for the purpose of bringing the generated bit amount to the target bit amount as quickly as possible (the higher the N value, the larger the change amount of the generated bit amount is). This is to adjust the generation bit amount more and more finely to exactly match the generation bit amount already approached to the target bit amount to the target bit amount.

따라서 N값을 점점 줄이는 것이며(N값을 줄일수록 생성 비트량의 변화량이 작아짐), 이에 따라 도 7의 과정을 안정기라 한 것이다.Therefore, the N value is gradually reduced (the smaller the value of N, the smaller the amount of change in the generation bit amount), and accordingly, the process of FIG.

한편, 상기 단계(S470)를 통해 부호화 수행후, 도 5의 비트량 제어종료 결정 과정(S250)과 동일한 과정을 수행하는 비트량 제어종료 결정 과정(S480)에서 종료가 결정되면 전체 과정을 종료하고, 종료가 아니면 목표 비트량과 생성 비트량을 비교하여(S490) 생성 비트량이 목표 비트량 보다 작으면 상기 단계(S440)로 리턴한다.On the other hand, after the encoding through the step (S470), if the end is determined in the bit amount control end determination process (S480) performing the same process as the bit amount control end determination process (S250) of FIG. If not, the target bit amount is compared with the generation bit amount (S490). If the generation bit amount is smaller than the target bit amount, the process returns to step S440.

만일, 생성 비트량이 목표 비트량보다 크면 비트량 안정화 과정(S400)의 처음으로 리턴하여 생성 비트량과 목표 비트량이 동일해지거나 또는 STB_TO_INC 링크를 통해 비트량 안정화 과정(S400)을 빠져나갈 때까지 반복한다.If the generated bit amount is larger than the target bit amount, the process returns to the beginning of the bit amount stabilization process S400 and repeats until the generated bit amount and the target bit amount become the same or exit the bit amount stabilization process S400 through the STB_TO_INC link. do.

상기와 같은 본 발명은 예를들어, 각 프레임의 목표 비트량이 1000 bit일 경우, 첫 번째 프레임을 부호화 하니 생성 비트량이 900 bit가 나왔다면, 종래(국내특허출원번호 제1998-15859호) 기술에서 처럼 다음 프레임으로 넘어가지 않고, 양자화 매개변수를 다시 조절하여 1000 bit가 될 때까지 재부호화를 반복 수행한다. 따라서 종래의 방법들에 비해 계산량이 늘어날 수 밖에 없으나, 이 늘어나는 계산량을 최소화 하기위한 노력이 본 발명의 과정인 것이다.In the present invention as described above, for example, when the target bit amount of each frame is 1000 bits, if the first bit is encoded and the generation bit amount is 900 bits, the present invention (Korean Patent Application No. 1998-15859) Instead of moving to the next frame as described above, the quantization parameter is adjusted again and re-encoding is performed until 1000 bits are obtained. Therefore, the amount of calculation is inevitably increased compared to the conventional methods, but an effort to minimize the increase of the amount of calculation is a process of the present invention.

상술한 바와 같이, 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 또는 변경하여 실시할 수 있다. As described above, although described with reference to a preferred embodiment of the present invention, those skilled in the art various modifications of the present invention without departing from the spirit and scope of the invention described in the claims below Or it can be changed.

이상에서 살펴본 바와 같이, 본 발명에 따른 동영상 프레임의 초정밀 비트량 제어방법은, 매크로 블록의 위치와 개수를 적응적으로 선택하여 각 압축된 프레임의 생성 비트량을 목표 비트량과 정확하게 일치시킴으로써 입력 영상의 다양한 특성에 관계없이 적용가능하며, 종래와 같이 코드워드 길이와 비트량과의 관계를 수학적으로 모델링하여 비트량을 제어하지 않으므로 모델링 에러가 발생하지 않음으로 인해 생성 비트량을 목표 비트량에 정확하게 일치키시는 것이 가능하게 된다.As described above, in the method for controlling the ultra-precision bit rate of a video frame according to the present invention, an input image is obtained by adaptively selecting a location and number of macro blocks to exactly match the generated bit amount of each compressed frame with a target bit amount. It can be applied regardless of various characteristics of, and since the relationship between the codeword length and the bit amount is not mathematically modeled and the bit amount is not controlled, the generation bit amount is precisely matched to the target bit amount because no modeling error occurs. Matching can be done.

또한, 본 발명은 생성 비트량을 목표 비트량에 1바이트의 오차없이 정확하게 일치시킬 수 있음에 따라 압축된 프레임의 비트량이 스트라입크기(Stripe Size)와 싱크된 RAID 저장 서버나 압축된 프레임의 비트량이 일정해야 하는 포워드 에러 정정 코딩(Forward Error Correction Coding) 등과 같이 생성 비트량을 정밀하게 제어해야하는 응용분야에 이용가능하게 된다.In addition, the present invention can accurately match the generated bit amount to the target bit amount without an error of 1 byte, so that the bit amount of the compressed frame and the bit of the RAID storage server or compressed frame synchronized with the stripe size It becomes available for applications that need to precisely control the amount of generated bits, such as forward error correction coding where the amount must be constant.

Claims (11)

압축된 동영상 프레임의 비트량을 제어하는 방법에 있어서,In the method for controlling the bit rate of a compressed video frame, 압축된 각 프레임의 생성 비트량과 목표 비트량을 비교하는 제1 과정;A first step of comparing a generated bit amount and a target bit amount of each compressed frame; 상기 비교 결과 생성 비트량이 목표 비트량보다 크면 소정 매크로 블록들의 양자화 매개변수를 증가시켜서 생성 비트량을 감소시켜 목표 비트량에 생성 비트량을 근접시키며, 생성 비트량을 감소시켜도 생성 비트량과 목표 비트량의 대소관계가 변하지 않으면 조절할 매크로 블록의 개수를 증가시키고 그의 양자화 매개변수를 증가시켜서 생성 비트량을 감소시켜 생성 비트량을 목표 비트량에 더욱 근접시키는 제2 과정; 및 As a result of the comparison, if the generation bit amount is larger than the target bit amount, the generation bit amount is increased by increasing the quantization parameter of the predetermined macroblocks to bring the generation bit amount closer to the target bit amount. A second step of increasing the number of macroblocks to be adjusted and increasing its quantization parameter to reduce the amount of generated bits if the magnitude relationship of the amount does not change to bring the generated bit amount closer to the target bit amount; And 상기 비교 결과 생성 비트량이 목표 비트량보다 작으면 소정 매크로 블록들의 양자화 매개변수를 감소시켜서 생성 비트량을 증가시켜 생성 비트량을 목표 비트량에 근접시키며, 생성 비트량을 증가시켜도 생성 비트량과 목표 비트량의 대소관계가 변하지 않으면 조절할 매크로 블록의 개수를 증가시키고 그의 양자화 매개변수를 감소시켜서 생성 비트량을 증가시켜 생성 비트량을 목표 비트량에 더욱 근접시키는 제3 과정;As a result of the comparison, if the amount of generated bits is smaller than the target bit amount, the amount of generated bits is increased by decreasing the quantization parameter of the predetermined macroblocks to bring the generated bit amount closer to the target bit amount. A third step of increasing the number of generated macroblocks by decreasing the number of macroblocks to be adjusted and decreasing the quantization parameter thereof to increase the amount of generated bits to bring the generated bit amount closer to the target bit amount if the magnitude of the bit amount does not change; 을 포함하는 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.Ultra-precision bit rate control method for a video frame comprising a. 제 1 항에 있어서, 상기 제1 과정의 비교 결과 생성 비트량이 목표 비트량보 다 클 경우The method of claim 1, wherein the comparison result generation bit amount of the first process is larger than a target bit amount. 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 초기화하는 제1 단계;A first step of initializing a number value of a macroblock to be adjusted simultaneously with the quantization parameter; 상기 초기화에 따른 매크로 블록의 양자화 매개변수를 증가시키는 제2 단계;Increasing a quantization parameter of the macro block according to the initialization; 상기 양자화 매개변수를 증가시킨 매크로 블록들과 에 대해 양자화 및 가변길이 부호화하는 제3 단계;A third step of quantizing and variable length coding the macroblocks with the quantization parameter increased; 상기 부호화된 프레임의 생성 비트량과 목표 비트량을 비교하는 제4 단계; 및A fourth step of comparing a generation bit amount and a target bit amount of the encoded frame; And 비교결과 생성 비트량과 목표 비트량이 동일하면 종료하고, 생성 비트량이 목표 비트량보다 크면 생성 비트량이 목표 비트량과 동일 또는 생성 비트량이 목표 비트량보다 작아질 때까지 상기 제2 단계 내지 제 4단계를 반복 수행하는 제5 단계;As a result of the comparison, if the generation bit amount and the target bit amount are the same, the operation is terminated. Repeating a fifth step; 를 수행하도록 된 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.Ultra precision bit amount control method of a video frame, characterized in that to perform. 제 2 항에 있어서, 상기 양자화 매개변수를 증가시키게 되는 매크로 블록의 순서는 동영상 압축시 압축되는 매크로 블록의 순서와 반대 방향인 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.The method of claim 2, wherein the order of the macroblocks to increase the quantization parameter is in a direction opposite to the order of the macroblocks to be compressed during video compression. 제 2 항에 있어서, 상기 제4 단계의 비교 결과 생성 비트량이 목표 비트량보다 작을 경우 소정 매크로 블록들의 양자화 매개변수를 감소시켜서 생성 비트량을 증가시켜 생성 비트량과 목표 비트량을 일치시키도록 된 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.The method according to claim 2, wherein when the resultant bit amount is smaller than the target bit amount as a result of the comparison in the fourth step, the generated bit amount is increased by decreasing the quantization parameter of the predetermined macroblocks to match the generated bit amount with the target bit amount. Ultra precision bit rate control method for a video frame, characterized in that. 제 2 항에 있어서, 상기 제5 단계에서 생성 비트량이 목표 비트량보다 클 경우 상기 제2 단계에서 양자화 매개변수가 증가된 매크로 블록의 개수보다 더 많은 개수의 다음 순서의 양자화 매개변수를 갖는 매크로 블록들의 양자화 매개변수를 동시에 증가시키도록 된 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.3. The macroblock of claim 2, wherein when the amount of generated bits is greater than a target bit amount in the fifth step, the macroblock has a greater number of next order quantization parameters than the number of macroblocks in which the quantization parameter is increased in the second step. Ultra-fine bit rate control method for a video frame, characterized in that to increase the quantization parameters of the video at the same time. 제 1 항에 있어서, 상기 제1 과정의 비교 결과 생성 비트량이 목표 비트량보다 작을 경우The method of claim 1, wherein the comparison result generation bit amount of the first process is smaller than a target bit amount. 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 재조정하는 제 1단계; A first step of readjusting the number of macroblocks to be adjusted simultaneously with the quantization parameter; 감소불가집합에 포함되지 않은 상기 개수의 매크로 블록의 양자화 매개변수를 감소시키는 제2 단계;Reducing a quantization parameter of the number of macroblocks not included in the non-reducible set; 상기 감소된 양자화 매개변수의 매크로 블록들에 대해 양자화 및 가변길이 부호화하는 제3 단계;A third step of quantizing and variable length coding the macroblocks of the reduced quantization parameter; 상기 부호화된 프레임의 생성 비트량과 목표 비트량을 비교하는 제4 단계; 및A fourth step of comparing a generation bit amount and a target bit amount of the encoded frame; And 비교결과 생성 비트량과 목표 비트량이 동일하면 종료하고, 생성 비트량이 목표 비트량보다 작으면 생성 비트량이 목표 비트량과 동일 또는 생성 비트량이 목표 비트량보다 커질 때까지 상기 제2 단계 내지 제 4단계를 반복 수행하는 제5 단계;As a result of the comparison, if the generation bit amount and the target bit amount are the same, the operation is terminated. Repeating a fifth step; 를 수행하도록 된 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.Ultra precision bit amount control method of a video frame, characterized in that to perform. 제 6 항에 있어서, 상기 양자화 매개변수를 감소시키게 되는 매크로 블록의 순서는 동영상 압축시 압축되는 매크로 블록의 순서와 반대 방향인 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.7. The method of claim 6, wherein the order of the macroblocks to reduce the quantization parameter is in the opposite direction to the order of the macroblocks to be compressed during video compression. 제 6 항에 있어서, 상기 제5 단계에서 생성 비트량이 목표 비트량보다 작을 경우 상기 제2 단계에서 양자화 매개변수가 감소된 매크로 블록의 개수보다 더 많은 개수의 다음 순서의 양자화 매개변수를 갖는 매크로 블록들의 양자화 매개변수 를 동시에 감소시키도록 된 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.7. The macroblock according to claim 6, wherein when the amount of generated bits is less than a target bit amount in the fifth step, the macroblock has a next number of quantization parameters in a higher order than the number of macroblocks in which the quantization parameter is reduced in the second step. A method of controlling high bit rate of a video frame, characterized in that to simultaneously reduce the quantization parameter of the video frame. 제 2 항 또는 제 6 항에 있어서, 상기 양자화 매개변수의 증가 또는 감소량은 가변 가능함을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.7. The method of claim 2 or 6, wherein the amount of increase or decrease of the quantization parameter is variable. 제 6 항에 있어서, 생성 비트량이 목표 비트량보다 작아 비트량 증가를 행하다가 다시 생성 비트량이 목표 비트량보다 커질 경우The method according to claim 6, wherein when the generated bit amount is smaller than the target bit amount and the bit amount is increased, the generated bit amount is larger than the target bit amount. 상기 바로 이전에 감소시킨 양자화 매개변수의 매크로 블록의 개수와 최소 임계치를 비교하는 제1 단계;A first step of comparing the minimum threshold with the number of macroblocks of the quantization parameter that was previously reduced; 상기 비교결과 바로 이전에 감소시킨 양자화 매개변수의 매크로 블록의 개수가 최소 임계치 이하이면 바로 이전에 감소시킨 양자화 매개변수들의 매크로 블록들을 감소불가집합에 추가하고, 바로 이전에 감소시킨 양자화 매개변수들을 이전 상태로 되돌린 후, 상기 제2 단계로 리턴하여 다시 비트량을 증가시키는 제2 단계;As a result of the comparison, if the number of the macroblocks of the quantization parameter reduced immediately before is less than the minimum threshold, the macroblocks of the quantization parameters immediately reduced are added to the non-decrement set, and the previously reduced quantization parameters are transferred. A second step of returning to a state and then returning to the second step to increase the bit amount again; 상기 비교결과 바로 이전에 감소시킨 양자화 매개변수의 매크로 블록의 개수가 최소 임계치보다 크면 바로 이전에 감소시킨 양자화 매개변수들을 이전 상태로 되돌리는 제3 단계;A third step of returning the previously reduced quantization parameters to the previous state if the number of macroblocks of the quantization parameters reduced immediately before the comparison result is greater than the minimum threshold; 상기 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 감소시 키는 제4 단계;Reducing a number of macroblocks to be adjusted simultaneously with the quantization parameter; 감소불가집합에 포함되지 않은 상기 개수의 매크로 블록의 양자화 매개변수들을 감소시키고 감소된 양자화 매개변수의 매크로 블록들에 대해 양자화 및 가변길이 부호화하는 제5 단계;A fifth step of reducing quantization parameters of the number of macroblocks not included in the non-reduced set and quantizing and variable length encoding on the macroblocks of the reduced quantization parameter; 상기 부호화된 프레임의 생성 비트량과 목표 비트량을 비교하는 제6 단계; 및A sixth step of comparing a generation bit amount and a target bit amount of the encoded frame; And 비교결과 생성 비트량과 목표 비트량이 동일하면 종료하며, 생성 비트량이 목표 비트량보다 크면 바로 이전에 감소시킨 양자화 매개변수의 매크로 블록의 개수값과 최소 임계치를 비교하는 상기 제1 단계로 리턴하고, 생성 비트량이 목표 비트량보다 작으면 생성 비트량이 목표 비트량과 동일해질 때까지 양자화 매개변수를 갖고 동시에 조절될 매크로 블록의 개수값을 감소시키는 제4 단계 이하를 반복 수행하는 제7 단계;If the comparison bit amount is equal to the target bit amount, the operation is terminated. If the generation bit amount is larger than the target bit amount, the process returns to the first step of comparing the minimum value with the number of macroblocks of the quantization parameter immediately reduced. A seventh step of repeating, if the amount of generated bits is less than the target bit amount, a fourth step of reducing the number of macroblocks to be adjusted simultaneously with the quantization parameter until the amount of generated bits is equal to the target bit amount; 를 포함하는 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.Ultra-precision bit rate control method of a video frame comprising a. 제 2 항 또는 제 6 항 또는 제 10 항에 있어서, 상기 가변길이 부호화는 상기 증가 또는 감소된 양자화 매개변수의 매크로 블록에 대해 부호화 의존성을 갖는 다른 매크로 블록에 대해서도 행하는 것을 특징으로 하는 동영상 프레임의 초정밀 비트량 제어방법.The ultra-precision of a video frame according to claim 2, 6 or 10, wherein the variable length coding is performed on another macro block having encoding dependency on the macro block of the increased or decreased quantization parameter. Bit quantity control method.
KR1020050042956A 2005-05-23 2005-05-23 Method of ultra-fine bit count control of video frame KR100746589B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050042956A KR100746589B1 (en) 2005-05-23 2005-05-23 Method of ultra-fine bit count control of video frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050042956A KR100746589B1 (en) 2005-05-23 2005-05-23 Method of ultra-fine bit count control of video frame

Publications (2)

Publication Number Publication Date
KR20060120787A true KR20060120787A (en) 2006-11-28
KR100746589B1 KR100746589B1 (en) 2007-08-08

Family

ID=37706773

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050042956A KR100746589B1 (en) 2005-05-23 2005-05-23 Method of ultra-fine bit count control of video frame

Country Status (1)

Country Link
KR (1) KR100746589B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040047010A (en) * 2002-11-28 2004-06-05 엘지전자 주식회사 Bit rate control method based on gob of video telephony system
KR20040047009A (en) * 2002-11-28 2004-06-05 엘지전자 주식회사 Bit rate control method of video telephony system

Also Published As

Publication number Publication date
KR100746589B1 (en) 2007-08-08

Similar Documents

Publication Publication Date Title
JP5257215B2 (en) Image coding apparatus and image coding method
CN100456835C (en) Methods and systems for rate control in video encoder
JP5045950B2 (en) Video encoding method, video encoding apparatus, and video encoding program
KR100484148B1 (en) Advanced method for rate control and apparatus thereof
US6282243B1 (en) Apparatus and method for interframe predictive video coding and decoding with capabilities to avoid rounding error accumulation
US20090225829A2 (en) Method and apparatus for operational frame-layerrate control in video encoder
US8311095B2 (en) Method and apparatus for transcoding between hybrid video codec bitstreams
US5986710A (en) Image encoding method and apparatus for controlling the number of bits generated using quantization activities
Merritt et al. x264: A high performance H. 264/AVC encoder
KR101017770B1 (en) Multipass video rate control to match sliding window channel constraints
WO2009157577A1 (en) Image processing device, and image processing method
WO2009157579A1 (en) Image processing device and image processing method
US20050254576A1 (en) Method and apparatus for compressing video data
US7428339B2 (en) Pseudo-frames for MPEG-2 encoding
CN113473136B (en) Video encoder and code rate control device thereof
KR20040007818A (en) Method for controlling DCT computational quantity for encoding motion image and apparatus thereof
KR100713400B1 (en) H.263/mpeg video encoder for controlling using average histogram difference formula and its control method
US20010053182A1 (en) Picture encoding format converting apparatus
KR100746589B1 (en) Method of ultra-fine bit count control of video frame
JP4788653B2 (en) Image data transcoding apparatus and transcoding method
KR20110024574A (en) Integrated video encoding method and apparatus
KR19990065775A (en) Adaptive Bitrate Control Method for Video Stream Coding
KR100778473B1 (en) Bit rate control method
KR100918499B1 (en) Apparatus and method for multi-pass encoding
US20050141608A1 (en) Pipeline-type operation method for a video processing apparatus and bit rate control method using the same

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
G170 Publication of correction
FPAY Annual fee payment

Payment date: 20110711

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee