KR100283980B1 - Variable output video bit rate control method - Google Patents

Variable output video bit rate control method Download PDF

Info

Publication number
KR100283980B1
KR100283980B1 KR1019980012810A KR19980012810A KR100283980B1 KR 100283980 B1 KR100283980 B1 KR 100283980B1 KR 1019980012810 A KR1019980012810 A KR 1019980012810A KR 19980012810 A KR19980012810 A KR 19980012810A KR 100283980 B1 KR100283980 B1 KR 100283980B1
Authority
KR
South Korea
Prior art keywords
quantization step
bit amount
encoding
step size
amount
Prior art date
Application number
KR1019980012810A
Other languages
Korean (ko)
Other versions
KR19990079917A (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 KR1019980012810A priority Critical patent/KR100283980B1/en
Publication of KR19990079917A publication Critical patent/KR19990079917A/en
Application granted granted Critical
Publication of KR100283980B1 publication Critical patent/KR100283980B1/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

1. 청구범위에 기재된 발명이 속한 기술 분야1. TECHNICAL FIELD OF THE INVENTION

본 발명은 가변출력 동영상 비트율 제어방법에 관한 것임.The present invention relates to a variable output video bit rate control method.

2. 발명이 해결하고자 하는 기술적 과제2. Technical problem to be solved by the invention

본 발명은 동영상 부호화 및 전송시 가변적인 목표 출력 비트율을 만족시키면서 부호화기 내에 있는 버퍼의 넘침 또는 결핍을 최소화함과 동시에 연속된 영상 사이의 화질을 최대한 균일하게 함.The present invention minimizes overflow or deficiency of a buffer in an encoder while satisfying a variable target output bit rate during video encoding and transmission, and at the same time, makes image quality between consecutive images as uniform as possible.

3. 발명의 해결방법의 요지3. Summary of Solution to Invention

다음 영상의 부호화에 할당되는 비트량과, 양자화스텝크기의 허용 범위를 계산하는 단계와, 상기 계산된 할당비트량보다 큰 비트량을 발생시키는 양자화스텝크기들 중 최소 비트량을 발생시키는 양자화스텝크기 및 비트량과, 상기 계산된 할당 비트량보다 작은 비트량을 발생시키는 양자화스텝크기 중 최대 비트량을 발생시키는 양자화스텝크기 및 비트량을 선택하는 단계와, 상기 각각의 양자화스텝크기 및 대응되는 비트량 중 이전영상의 부호화에 사용된 양자화스텝 크기에 가까운 양자화스텝 크기를 선택하는 단계를 포함하여 이루어진다.Calculating the bit amount allocated to the encoding of the next image, the allowable range of the quantization step size, and the quantization step size for generating the minimum bit amount among the quantization step sizes for generating a bit amount larger than the calculated allocated bit amount. Selecting a bit amount and a quantization step size and a bit amount for generating a maximum bit amount among the quantization step sizes for generating a bit amount smaller than the calculated allocated bit amount, wherein the respective quantization step sizes and corresponding bits are selected. And selecting a quantization step size close to the quantization step size used for encoding the previous image.

4. 발명의 중요한 용도4. Important uses of the invention

비트율 제어장치에 적용될 수 있음.Applicable to the bit rate controller.

Description

가변출력 동영상 비트율 제어 방법Variable output video bit rate control method

본 발명은 동영상 부호화에 있어서의 출력 비트율 제어 방법에 관한 것으로, 특히 가변출력 동영상 비트율 제어 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an output bit rate control method in video encoding, and more particularly to a variable output video bit rate control method.

일반적으로 비트율 제어장치(도1 참조)는 본원 출원인이 미국특허청으로부터 허여받은 미국 특허제5,617,150호(1997.4.1)에 소개된 바와 같이 비디오 프레임 입력부(1)로부터 비디오 프레임이 입력되면 부호화부(2)는 입력된 프레임을 부호화하고, 상기 부호화부(2)에서 부호화된 부호화 결과값을 버퍼부(3)에 저장하였다가 일정한 전송 비트율에 맞추어 외부로 전송하게 된다. 이 때 부호화부(2)로부터 출력되는 비트율을 조절하기위해 비트율제어부(4)는 버퍼부(3)의 버퍼 충만도에 따라 버퍼 넘침이나 버퍼 모자람이 없도록 부호화부(2)를 조절하게 된다.In general, the bit rate control apparatus (see FIG. 1) is characterized in that when a video frame is input from the video frame input unit 1 as described in US Patent No. 5,617,150 (1997.4.1), which is granted by the US Patent Office, the encoder 2 ) Encodes the input frame, stores the encoding result encoded by the encoder 2 in the buffer unit 3, and transmits the encoded result value to the outside at a constant transmission bit rate. At this time, in order to adjust the bit rate output from the encoder 2, the bit rate controller 4 adjusts the encoder 2 so that there is no buffer overflow or buffer shortage according to the buffer fullness of the buffer 3.

종래에는 상기한 비트율 제어장치를 이용하여 다음 영상의 부호화에 할당되는 비트율을 계산할 때 부호화기 내의 버퍼의 상태를 충분히 고려하지 않았기 때문에 버퍼의 넘침(overflow) 또는 결핍(underflow)의 가능성이 매우 크며, 또한 다음 영상의 부호화시에 단순히 계산된 목표 출력 비트율에 가장 가까운 예측 비트율에 대응되는 양자화 스텝 크기를 사용함으로써 부호화된 연속된 영상 사이의 화질의 변화가 크다는 문제점이 있었다.In the related art, since the state of the buffer in the encoder has not been sufficiently considered when calculating the bit rate allocated to the encoding of the next video using the above-described bit rate controller, the possibility of overflow or underflow of the buffer is very high. When encoding the next image, there is a problem in that the change in image quality between encoded consecutive images is large by using a quantization step size corresponding to the predicted bit rate that is closest to the target output bit rate calculated.

따라서, 영상 부호화 및 전송에 있어 전송로 상의 문제로 인해 야기될 수 있는 가변적인 목표 출력 비트율을 만족시키면서 부호화기 내에 있는 버퍼의 넘침(overflow) 또는 결핍(underflow)을 최소화하기 위해서는 다음 영상의 부호화를 위해 할당되는 목표 비트량을 계산할 때 현재 버퍼 상태의 충분한 고려가 필요하며, 연속된 영상 사이의 화질을 최대한 균일하게 유지시키기 위해서는 이전 영상의 부호화에 사용된 양자화 스텝 크기와 최대한 가까운 양자화 스텝 크기를 사용하여 다음 영상을 부호화할 필요가 있다.Therefore, in order to minimize the overflow or underflow of the buffer in the encoder while satisfying the variable target output bit rate that may be caused by problems in the transmission path in image encoding and transmission, When calculating the target bit amount to be allocated, sufficient consideration of the current buffer state is necessary, and in order to keep the image quality between consecutive images as uniform as possible, use the quantization step size as close as possible to the quantization step size used for encoding the previous image. It is necessary to encode the next image.

본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 동영상 부호화 및 전송에 있어 전송로 상의 문제로 인해 야기될 수 있는 가변적인 목표 출력 비트율을 만족시키면서 부호화기 내에 있는 버퍼의 넘침(overflow) 또는 결핍(underflow)을 최소화 하는 동시에 연속된 영상 사이의 화질을 최대한 균일하게 유지시키는 가변출력 동영상 비트율 제어방법을 제공하는 것을 그 목적으로 한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and overflows or deficiency of a buffer in an encoder while satisfying a variable target output bit rate that may be caused by a problem in a transmission path in video encoding and transmission. It is an object of the present invention to provide a variable output video bit rate control method that minimizes (underflow) and maintains the image quality between consecutive images as uniformly as possible.

도 1 은 본 발명이 적용되는 비트율 제어장치의 블록 구성도.1 is a block diagram of a bit rate control apparatus to which the present invention is applied.

도 2 는 본 발명에 따른 영상 부호화 처리에 대한 전체 흐름도.2 is an overall flowchart of an image encoding process according to the present invention;

도 3 은 도 2의 양자화 스텝 크기 계산 처리에 대한 상세 흐름도.3 is a detailed flowchart of the quantization step size calculation process of FIG. 2;

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

1 : 비디오 프레임 입력부 2 : 부호화부1: video frame input unit 2: encoder

3 : 버퍼부 4 : 비트율제어부3: buffer section 4: bit rate control section

상기 목적을 달성하기 위한 본 발명은, 가변 출력 동영상 비트율 제어 방법에 있어서, 이전 영상의 부호화 결과중 발생된 비트수, 현재 전송로의 상태, 및 현재 버퍼의 상태를 이용하여 다음 영상의 부호화에 할당되는 비트량을 계산하는 제 1 단계; 이전 영상의 부호화 결과중 양자화 스텝 크기에 따른 다음 영상 부호화시 사용 가능한 양자화 스텝 크기의 허용 범위를 계산하는 제 2 단계; 상기 양자화 스텝 크기의 허용 범위 내에서 상기 계산된 할당 비트량보다 큰 비트량을 발생시키는 양자화 스텝 크기들 중 최소 비트량을 발생시키는 양자화 스텝 크기 및 그에 대응되는 비트량과, 상기 계산된 할당 비트량보다 작은 비트량을 발생시키는 양자화 스텝 크기 중 최대 비트량을 발생시키는 양자화 스텝 크기 및 그에 대응되는 비트량을 선택하는 제 3 단계; 및 상기 각각의 양자화 스텝 크기 및 대응되는 비트량 중 상기 계산된 할당 비트량과의 오차가 어느정도 크더라도 이전 영상의 부호화에 사용된 양자화 스텝 크기에 가까운 양자화 스텝 크기를 선택하는 제 4 단계를 포함하여 이루어진다.According to the present invention for achieving the above object, in the variable output video bit rate control method, the allocation of the next video by using the number of bits generated in the encoding result of the previous video, the current transmission path state, and the current buffer state. A first step of calculating the amount of bits to be made; A second step of calculating an allowable range of the quantization step sizes usable in the next image encoding according to the quantization step sizes among the encoding results of the previous image; A quantization step size and a corresponding bit amount for generating a minimum bit amount among quantization step sizes for generating a bit amount larger than the calculated allocation bit amount within an allowable range of the quantization step size, and the calculated allocation bit amount A third step of selecting a quantization step size for generating a maximum bit amount among the quantization step sizes for generating a smaller bit amount and a corresponding bit amount; And a fourth step of selecting a quantization step size close to the quantization step size used for encoding a previous image, even if the error between the calculated quantization step size and the corresponding bit amount is large to some extent. Is done.

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

도2는 본 발명에 따른 동영상 부호화의 전체 처리 흐름도이다.2 is a flowchart of the entire process of video encoding according to the present invention.

먼저, 초기화에 의해 설정된 목표 출력 비트율(Rt) 및 목표 프레임율(Nf)이 정해진 뒤(21), 최초의 영상을 부호화하기 위해 할당되는 비트량 및 양자화 스텝 크기가 계산된다(22). 상기 비트량 및 양자화 스텝 크기 계산과정(22)에서 얻어진 양자화 스텝 크기를 이용하여 영상을 부호화한 뒤, 다음 영상의 부호화를 위해 할당되는 비트량을 계산하기 위해 상기 과정(22)로 돌아가 최종적으로 모든 영상의 부호화가 끝날 때까지(24) 상기 양자화 스텝크기 계산과정(22) 및 다음 영상 부호화 과정(23)을 반복 수행한다.First, after the target output bit rate Rt and the target frame rate Nf set by initialization are determined (21), the bit amount and quantization step size allocated for encoding the first image are calculated (22). After encoding the image using the quantization step size obtained in the bit quantity and quantization step size calculation process 22, and then returning to the process 22 to calculate the bit amount allocated for encoding of the next image, The quantization step size calculation process 22 and the next video encoding process 23 are repeatedly performed until the encoding of the image is completed 24.

도3은 도2의 다음 영상을 부호화 하는데 사용되는 양자화 스텝 크기 계산 방법(22)에 대한 처리 흐름도이다.3 is a process flow diagram for the quantization step size calculation method 22 used to encode the next image of FIG.

먼저, 최초의 영상을 부호화하는 경우, 초기화에서 얻어진 목표 출력 비트율( R0)과 목표 프레임율(F0)을 이용하여 다음 프레임에 할당되는 비트율이 계산되나, 이후의 n번째 영상을 부호화 하는 경우에는 아래 [수학식 1]의 목표 출력 비트율(Rn) 및 [수학식 2]의 프레임율(Fn)이 사용된다.First, in the case of encoding the first image, the bit rate allocated to the next frame is calculated using the target output bit rate R0 and the target frame rate F0 obtained in the initialization, but in the case of encoding the subsequent nth image, The target output bit rate Rn of Equation 1 and the frame rate Fn of Equation 2 are used.

Rn = Wr * R0Rn = Wr * R0

Fn = Wf * F0Fn = Wf * F0

상기 [수학식 1]에서 Wr은 부호화된 데이터가 출력되는 전송로의 상태에 따라 달라지는 가중치로서 전송로의 데이터 전송 능력이 R0와 같은 경우에는 '1', R0보다 큰 경우에는 1보다 큰 값, R0보다 작은 경우에는 1보다 작은 값으로 주어진다.In Equation 1, Wr is a weight that varies depending on a state of a transmission path through which coded data is output, and '1' when a data transmission capacity of a transmission path is equal to R0, and a value greater than 1 when R0 is greater than R0, If less than R0, it is given a value less than 1.

마찬가지로 상기 [수학식 2]에서 Wf는 부호화된 데이터가 출력되는 전송로의 상태에 따라 달라지는 가중치로서 전송로의 프레임 전송 능력이 F0와 같은 경우에는 '1', F0보다 큰 경우에는 1보다 큰 값, F0보다 작은 경우에는 1보다 작은 값으로 주어진다.Similarly, in [Equation 2], Wf is a weight that varies depending on the state of a transmission path on which coded data is output, and a value greater than 1 when the frame transmission capacity of the transmission path is equal to F0 and larger than F0 when If F0 is less than F0, it is given a value less than 1.

상기 [수학식 1] 및 [수학식 2]를 이용하여 다음 프레임에 할당되는 비트량(Rt)는 아래 [수학식 3]과 같이 계산된다(31).The bit amount Rt allocated to the next frame by using Equations 1 and 2 is calculated as shown in Equation 3 below (31).

Rt = Wt * {Ws * Bsize - Bs) / Fn} + Rn/FnRt = Wt * (Ws * Bsize-Bs) / Fn} + Rn / Fn

(단, Wt 는 다음 영상의 부호화에 할당되는 비트량을 추가 또는 감소시키기 위한 가중치, Ws 는 버퍼 크기에 대한 버퍼 내에 남아있는 평균 비트량의 비율, Bsize 는 버퍼의 크기, Bs 는 버퍼 내에 남아 있는 현재의 비트량임.)(Wt is a weight for adding or decreasing the amount of bits allocated to encoding of the next image, Ws is the ratio of the average bit amount remaining in the buffer to the buffer size, Bsize is the size of the buffer, Bs is remaining in the buffer Current bit amount.)

다음으로 이전 영상의 부호화시 사용된 양자화 스텝 크기(Qp)를 이용하여 다음 영상을 부호화 하는데 사용될 수 있는 양자화 스텝 크기의 최소 및 최대 값을 계산한다. 이때, 계산되는 양자화 스텝 크기의 최소값(Qm) 및 최대값(QM)은 상기 양자화 스텝크기(Qp)의 값에 따라 서로 다른 값을 갖을 수 있으며, 사용될 수 있는 함수의 일례가 아래 [수학식 4]에 예시되어 있다(32).Next, the minimum and maximum values of the quantization step size that can be used to encode the next image are calculated using the quantization step size (Qp) used when encoding the previous image. In this case, the calculated minimum value (Qm) and maximum value (QM) of the quantization step size may have a different value according to the value of the quantization step size (Qp), an example of a function that can be used is shown in Equation 4 below. (32).

[수학식 4]Qp 가 2보다 작거나 같으면[Equation 4] If Qp is less than or equal to 2

Qm = 1;Qm = 1;

Qp 가 2보다 작거나 같지않고 3이면If Qp is less than or equal to 2 and is 3

Qm = 2;Qm = 2;

Qp 가 2보다 작거나 같지않고, 3이 아니며, 5보다 작거나 같으면Qp is less than or equal to 2, not 3, and less than or equal to 5

Qm = 3;Qm = 3;

Qp 가 2보다 작거나 같지않고, 3이 아니며, 5보다 작거나 같지않고, 6보다 작거나 같으면Qp is less than or equal to 2, not 3, less than or equal to 5, and less than or equal to 6

Qm = 4;Qm = 4;

Qp 가 2보다 작거나 같지않고, 3이 아니며, 5보다 작거나 같지않고, 6보다 작거나 같지않고, 7보다 작거나 같으면Qp is less than or equal to 2, not 3, less than or equal to 5, less than or equal to 6, less than or equal to 7

Qm = 5;Qm = 5;

Qp 가 2보다 작거나 같지않고, 3이 아니며, 5보다 작거나 같지않고, 6보다 작거나 같지않고, 7보다 작거나 같지않고 9보다 작거나 같으면Qp is less than or equal to 2, not 3, less than or equal to 5, less than or equal to 6, less than or equal to 7 and less than or equal to 9

Qm = 6;Qm = 6;

그리고, Qp 가 상기 주어진 조건이 다 아니면 Qm=최대값((Qp-5), 7)And Qm = maximum value ((Qp-5), 7)

Qp 가 1이면, QM = 2;If Qp is 1, QM = 2;

Qp 가 1이 아니고, 2이면 QM = 3;If Qp is not 1 and 2, then QM = 3;

Qp 가 1 또는 2가 아니고 3이면 QM = 5;QM = 5 if Qp is not 1 or 2 and 3;

Qp 가 1 또는 2 또는 3이 아니고, 4이면 QM = 7;QM = 7 if Qp is not 1 or 2 or 3, and 4;

Qp 가 1 또는 2 또는 3 또는 4가 아니고, 5이면 QM = 10;QM = 10 if Qp is not 1 or 2 or 3 or 4, and 5;

그리고, Qp가 1,2,3,4,5중 어느 하나가 아니면,And if Qp is not one of 1,2,3,4,5,

QM = 최소값((Qp + 7), 31);QM = minimum value ((Qp + 7), 31);

상기 양자화 스텝크기의 허용범위 계산 과정(32)에서 계산된 양자화 스텝 크기의 최소 및 최대 값 사이에서 [수학식 3]의 Rt보다 큰 비트량을 발생시키는 양자화 스텝 크기들 중에 가장 작은 비트량을 발생시키는 양자화 스텝 크기 및 그에 대응되는 비트량(Q(1), R(1))과 상기 과정에서 얻어진 할당 비트량보다 작은 비트량을 발생시키는 양자화 스텝 크기들 중에서 가장 큰 비트량을 발생시키는 양자화 스텝 크기 및 그에 대응되는 비트량(Q(2), R(2))을 선택한다.Generates the smallest bit amount among the quantization step sizes that generates a bit amount larger than Rt of [Equation 3] between the minimum and maximum values of the quantization step size calculated in the allowable range calculation process 32 of the quantization step size. A quantization step that generates the largest bit amount among the quantization step sizes to be generated and the corresponding bit amounts Q (1, R (1)) and quantization step sizes that generate a bit amount smaller than the allocated bit amount obtained in the above process. The size and the corresponding bit amounts Q (2) and R (2) are selected.

이때, 임의의 양자화 스텝 크기에 의해 발생되는 비트량은 [수학식 5]와 같이 임의의 함수로 표현될 수 있으며, 사용될 수 있는 함수의 일례가 [수학식 6]에 예시되어 있다(33).In this case, the bit amount generated by the arbitrary quantization step size may be represented by an arbitrary function as shown in Equation 5, and an example of a function that may be used is illustrated in Equation 6 (33).

R(i)=f(Q(i))R (i) = f (Q (i))

R(i) = p1 / sqrt(Q(i)) + p2 / Q(i) + p3R (i) = p1 / sqrt (Q (i)) + p2 / Q (i) + p3

참고로 [수학식 5] 또는 [수학식 6]에서 사용되는 매개변수들은 이전 영상을 부호화 한 결과로부터 얻어진 양자화 스텝 크기(Q(i)) 및 이에 대응되는 발생 비트량 (R(i))들을 이용하여 계산된다. 이때 이전 양자화 스텝 크기 및 이에 대응되는 발생 비트량들 중에서 매개변수의 수보다 적은 수의 데이터를 이용하여 매개변수들이 구해질 수 있는데, 이러한 경우에는 통계적인 실험 데이터를 바탕으로 추정된 양자화 스텝 크기 및 이에 대응되는 발생 비트량 값들이 사용된다.For reference, the parameters used in [Equation 5] or [Equation 6] are used to calculate the quantization step size (Q (i)) obtained from the encoding of the previous image and the corresponding bit amount (R (i)). Calculated using In this case, the parameters may be obtained by using less data than the number of parameters among the previous quantization step size and the corresponding bit amounts. In this case, the estimated quantization step size and Corresponding bit amount values are used.

이러한 방식은 가장 최근 영상의 부호화 특성만을 고려하여 다음 영상 부호화에 적용함으로써 장면 전환과 같은 영상 부호화 복잡도의 급격한 변화에도 빠르게 적응할 수 있는 장점을 제공한다.This method provides the advantage that it is possible to quickly adapt to the rapid change of video encoding complexity such as scene transition by applying to the next video encoding considering only the encoding characteristic of the most recent video.

상기 후보 양자화 스텝크기 및 예상되는 비트수를 선택하는 과정(33)에서 얻어진 (Q(1), R(1))과 (Q(2), R(2)) 중에서 하나가 선택되어 다음 영상을 부호화 하기 위한 양자화 스텝 크기(Q)로 사용되는데, 이때 [수학식 7]이 사용된다(34).One of (Q (1), R (1)) and (Q (2), R (2)) obtained in the step 33 of selecting the candidate quantization step size and the expected number of bits is selected to display the next image. It is used as a quantization step size Q for encoding, in which Equation 7 is used (34).

(ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작고,(ABS (Q (1) -Qp) is less than ABS (Q (2) -Qp)),

((R(1) - Rt)가 Delta * (Rt - R(2))보다 작거나 같으면,((R (1)-Rt) is less than or equal to Delta * (Rt-R (2)),

Q = Q(1);Q = Q (1);

(ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작고,(ABS (Q (1) -Qp) is less than ABS (Q (2) -Qp)),

((R(1) - Rt)가 Delta * (Rt - R(2))보다 작거나 같지 않으면,((R (1)-Rt) is less than or equal to Delta * (Rt-R (2)),

Q = Q(2);Q = Q (2);

(ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작지않고,(ABS (Q (1) -Qp) is not less than ABS (Q (2) -Qp))

( (Rt - R(2))가 Delta * (R(1) - Rt )보다 작거나 같으면,If ((Rt-R (2)) is less than or equal to Delta * (R (1)-Rt),

Q = Q(2);Q = Q (2);

(ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작지 않고,(ABS (Q (1) -Qp) is not less than ABS (Q (2) -Qp)),

( (Rt - R(2))가 Delta * (R(1) - Rt )보다 작거나 같지않으면,If ((Rt-R (2)) is less than or equal to Delta * (R (1)-Rt),

Q = Q(1);Q = Q (1);

이때 영상의 화질과 양자화 스텝 크기는 서로 직접적인 연관이 있으므로, 다음 영상을 부호화하기 위한 양자화 스텝 크기를 결정할 때 상기 [수학식 7]을 이용하는 경우 연속된 영상 사이에 존재할 수 있는 화질의 변화가 최소화되는 장점이 있다.In this case, since the image quality of the image and the quantization step size are directly related to each other, when the [Equation 7] is used to determine the quantization step size for encoding the next image, the change in the image quality that may exist between consecutive images is minimized. There is an advantage.

상기한 본 발명은 부호화기 내에 있는 버퍼의 전체 구간을 N개의 부분 구간으로 분할한 뒤 현재의 버퍼 상태가 속한 구간에 따라 서로 다른 가중치를 곱해줌으로써 다음 프레임의 부호화를 위해 할당되는 목표 비트량을 계산하게 되는데, 이때, 곱해지는 가중치는 현재의 버퍼 상태가 속한 구간이 임의의 기준 위치에서 멀어질수록 커지게 함으로써 버퍼의 넘침(overflow) 또는 결핍(underflow)을 최소화할 수 있다.The above-described present invention divides the entire interval of the buffer in the encoder into N partial intervals and multiplies different weights according to the intervals to which the current buffer state belongs to calculate the target bit amount allocated for encoding the next frame. In this case, the multiplied weight may be increased as the interval to which the current buffer state belongs becomes farther from any reference position, thereby minimizing overflow or underflow of the buffer.

그리고, 목표 출력 비트량을 만족시키는 양자화 스텝 크기를 결정함에 있어서 연속된 영상 사이의 화질을 가능한 한 균일하게 유지시키기 위하여 다음 영상의 부호화를 위해 할당된 목표 비트량(RT)보다 작은 값들 중에서 가장 큰 예측 비트량(R1) 및 이때 사용되는 양자화 스텝 크기(Q1)와 RT보다 큰 값들 중에서 가장 작은 예측 비트량(R2) 및 이때 사용되는 양자화 스텝 크기(Q2)를 구한 뒤, Q1보다 Q2가 바로 이전 영상의 부호화를 위해 사용된 양자화 스텝 크기에 가까우면 (R2 - RT)가 (RT - R1)보다 어느 정도 크더라도 Q2를 사용하여 다음 영상을 부호화하고, Q2보다 Q1이 바로 이전 영상의 부호화를 위해 사용된 양자화 스텝 크기에 가까우면 (RT - R1)이 (R2 - RT)보다 어느 정도 크더라도 Q1를 사용하여 다음 영상을 부호화 한다. 이렇게 함으로써 연속된 영상 사이의 화질 변화가 최소화되도록 하는 것이다.And, in determining the quantization step size that satisfies the target output bit amount, the largest value among the values smaller than the target bit amount (RT) allocated for encoding the next image in order to maintain the image quality between consecutive images as uniformly as possible. After obtaining the smallest prediction bit amount R2 and the quantization step size Q2 used at this time among the prediction bit amount R1 and the quantization step size Q1 and the values larger than RT, Q2 is immediately before Q1. If it is close to the quantization step size used for encoding the image, the next image is encoded using Q2, even if (R2-RT) is somewhat larger than (RT-R1), and Q1 is used for encoding the previous image before Q2. If it is close to the quantization step size used, even if (RT-R1) is somewhat larger than (R2-RT), the next image is encoded using Q1. This minimizes the change in image quality between successive images.

이상에서 설명한 본 발명은 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하다는 것이 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiments and the accompanying drawings, and various substitutions, modifications, and changes can be made in the art without departing from the technical spirit of the present invention. It will be apparent to those of ordinary knowledge.

상기와 같이 이루어지는 본 발명은, 동영상 부호화 및 전송에 있어 전송로 상의 특성으로 인해 수시로 변경될 수 있는 가변적인 목표 출력 비트율을 만족시키면서 부호화기 내에 있는 버퍼의 넘침(overflow) 또는 결핍(underflow)을 최소화 하는 동시에 연속된 영상 사이의 화질을 최대한 균일하게 유지되도록 하여, 종래의 기술에서 요구되었던 장면전환에 필요한 추가적인 계산이나, 장면전화을 미리 검출할 필요가 없도록 하는 효과가 있다.The present invention as described above, in order to minimize the overflow or underflow of the buffer in the encoder while satisfying the variable target output bit rate that can be changed from time to time due to the characteristics on the transmission path in video encoding and transmission At the same time, the image quality between successive images can be maintained as uniformly as possible, thereby eliminating the need for additional calculations or scene calls required for scene change required in the prior art.

Claims (5)

가변 출력 동영상 비트율 제어 방법에 있어서,In the variable output video bit rate control method, 이전 영상의 부호화 결과중 발생된 비트수, 현재 전송로의 상태, 및 현재 버퍼의 상태를 이용하여 다음 영상의 부호화에 할당되는 비트량을 계산하는 제 1 단계;A first step of calculating the amount of bits allocated for encoding the next image using the number of bits generated in the encoding result of the previous image, the state of the current transmission path, and the state of the current buffer; 이전 영상의 부호화 결과중 양자화 스텝 크기에 따른 다음 영상 부호화시 사용 가능한 양자화 스텝 크기의 허용 범위를 계산하는 제 2 단계;A second step of calculating an allowable range of the quantization step sizes usable in the next image encoding according to the quantization step sizes among the encoding results of the previous image; 상기 양자화 스텝 크기의 허용 범위 내에서 상기 계산된 할당 비트량보다 큰 비트량을 발생시키는 양자화 스텝 크기들 중 최소 비트량을 발생시키는 양자화 스텝 크기 및 그에 대응되는 비트량과, 상기 계산된 할당 비트량보다 작은 비트량을 발생시키는 양자화 스텝 크기 중 최대 비트량을 발생시키는 양자화 스텝 크기 및 그에 대응되는 비트량을 선택하는 제 3 단계; 및A quantization step size and a corresponding bit amount for generating a minimum bit amount among quantization step sizes for generating a bit amount larger than the calculated allocation bit amount within an allowable range of the quantization step size, and the calculated allocation bit amount A third step of selecting a quantization step size for generating a maximum bit amount among the quantization step sizes for generating a smaller bit amount and a corresponding bit amount; And 상기 각각의 양자화 스텝 크기 및 대응되는 비트량 중 상기 계산된 할당 비트량과의 오차의 크기에 관계없이 이전 영상의 부호화에 사용된 양자화 스텝 크기에 가까운 양자화 스텝 크기를 선택하는 제 4 단계를 포함하여 이루어진 가변출력 동영상 비트율 제어 방법.And a fourth step of selecting a quantization step size close to the quantization step size used for encoding a previous image regardless of the magnitude of the error from the calculated allocation bit amount among the respective quantization step sizes and corresponding bit amounts. Variable output video bit rate control method. 제 1 항에 있어서,The method of claim 1, 상기 제 1 단계는,The first step is, 상기 다음 영상의 부호화에 할당되는 비트량(Rt)을 아래 [수학식 1],[수학식 2] 및 [수학식 3]에 의해 계산하는 것을 특징으로 하는 가변출력 동영상 비트율 제어방법.And a bit amount Rt allocated to the encoding of the next image is calculated by Equation 1, Equation 2 and Equation 3 below. Rn = Wr * R0Rn = Wr * R0 Fn = Wf * F0Fn = Wf * F0 (단, Wr 은 부호화된 데이터가 출력되는 전송로의 상태에 따라 달라지는 가중치, Wf는 부호화된 데이터가 출력되는 전송로의 상태에 따라 달라지는 가중치, Rn은 목표출력 비트율, Fn은 프레임율임.)(Wr is a weight that varies depending on the state of the transmission path on which the encoded data is output, Wf is a weight that varies depending on the state of the transmission path on which the encoded data is output, Rn is a target output bit rate, and Fn is a frame rate.) Rt = Wt * {Ws * Bsize - Bs) / Fn} + Rn/FnRt = Wt * (Ws * Bsize-Bs) / Fn} + Rn / Fn (단, Wt는 다음 영상의 부호화에 할당되는 비트량을 추가 또는 감소시키기 위한 가중치, Ws는 버퍼 크기에 대한 버퍼 내에 남아있는 평균 비트량의 비율, Bsize는 버퍼의 크기, Bs는 버퍼 내에 남아 있는 현재의 비트량임.)(Wt is a weight for adding or decreasing the amount of bits allocated to the encoding of the next image, Ws is the ratio of the average bit amount remaining in the buffer to the buffer size, Bsize is the size of the buffer, Bs is remaining in the buffer Current bit amount.) 제 1 항에 있어서,The method of claim 1, 상기 제 2 단계는,The second step, 다음 영상의 부호화에 사용될 수 있는 양자화 스텝 크기의 허용 범위 계산시, 이전 영상의 부호화에 사용된 양자화 스텝 크기의 값이 작은 경우에는 허용범위가 작고, 큰 경우에는 허용범위가 크도록 한 것을 특징으로 하는 가변 출력 동영상 비트율 제어 방법.When calculating the allowable range of the quantization step size that can be used for encoding the next image, the allowable range is small when the value of the quantization step size used for the encoding of the previous image is small, and when the large value is large, the allowable range is large. Variable output video bit rate control method. 제 1 항에 있어서,The method of claim 1, 상기 제 3 단계는,The third step, 임의의 값(Q)을 이용하여 영상 블록을 부호화하는 경우 발생되는 비트량(Ri)을 아래 [수학식 6]에 의해 계산하는 것을 특징으로 하는 가변 출력 동영상 비트율 제어방법.And a bit rate Ri generated when an image block is encoded using an arbitrary value Q according to Equation 6 below. R(i) = p1 / sqrt(Q(i)) + p2 / Q(i) + p3R (i) = p1 / sqrt (Q (i)) + p2 / Q (i) + p3 (단, Q(i)은 이전 영상을 부호화 한 결과로부터 얻어진 양자화 스텝 크기, R(i)은 상기 Q(i)에 대응하는 발생 비트량, p1,p2,p3는 이전 부호화된 영상의 양자화 스텝 크기들과 대응되는 발생 비트량들로부터 얻어지는 매개 변수들임.)(Where, Q (i) is the quantization step size obtained from the result of encoding the previous image, R (i) is the generated bit amount corresponding to Q (i), and p1, p2, and p3 are the quantization steps of the previously encoded image). Are parameters derived from the amount of occurrence bits corresponding to the sizes.) 제 1 항에 있어서,The method of claim 1, 상기 제 4 단계는,The fourth step, 다음 영상 블록을 부호화하기 위해 여러 개의 양자화 스텝 크기 및 대응되는 발생 비트량 중에서 하나를 선택하기 위해 [수학식 7]에 의해 계산하는 것을 특징으로 하는 가변출력 동영상 비트율 제어방법.And calculating by Equation (7) to select one of a plurality of quantization step sizes and a corresponding amount of generated bits to encode a next image block. (ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작고,(ABS (Q (1) -Qp) is less than ABS (Q (2) -Qp)), ((R(1) - Rt)가 Delta * (Rt - R(2))보다 작거나 같으면,((R (1)-Rt) is less than or equal to Delta * (Rt-R (2)), Q = Q(1);Q = Q (1); (ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작고,(ABS (Q (1) -Qp) is less than ABS (Q (2) -Qp)), ((R(1) - Rt)가 Delta * (Rt - R(2))보다 작거나 같지 않으면,((R (1)-Rt) is less than or equal to Delta * (Rt-R (2)), Q = Q(2);Q = Q (2); (ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작지않고,(ABS (Q (1) -Qp) is not less than ABS (Q (2) -Qp)) ( (Rt - R(2))가 Delta * (R(1) - Rt )보다 작거나 같으면,If ((Rt-R (2)) is less than or equal to Delta * (R (1)-Rt), Q = Q(2);Q = Q (2); (ABS(Q(1)-Qp)가 ABS(Q(2) - Qp))보다 작지 않고,(ABS (Q (1) -Qp) is not less than ABS (Q (2) -Qp)), ( (Rt - R(2))가 Delta * (R(1) - Rt )보다 작거나 같지않으면,If ((Rt-R (2)) is less than or equal to Delta * (R (1)-Rt), Q = Q(1);Q = Q (1); (단, Q(i)은 이전 영상을 부호화 한 결과로부터 얻어진 양자화 스텝 크기, R(i)는 상기 Q(i)에 대응하는 발생 비트량, p1,p2, p3는 이전 부호화된 영상의 양자화 스텝 크기들과 대응되는 발생 비트량들로부터 얻어지는 매개 변수임.(Where, Q (i) is the quantization step size obtained from the result of encoding the previous image, R (i) is the generated bit amount corresponding to Q (i), and p1, p2, and p3 are the quantization steps of the previously encoded image). A parameter obtained from the amount of generated bits corresponding to the sizes.
KR1019980012810A 1998-04-10 1998-04-10 Variable output video bit rate control method KR100283980B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980012810A KR100283980B1 (en) 1998-04-10 1998-04-10 Variable output video bit rate control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980012810A KR100283980B1 (en) 1998-04-10 1998-04-10 Variable output video bit rate control method

Publications (2)

Publication Number Publication Date
KR19990079917A KR19990079917A (en) 1999-11-05
KR100283980B1 true KR100283980B1 (en) 2001-03-02

Family

ID=65861115

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980012810A KR100283980B1 (en) 1998-04-10 1998-04-10 Variable output video bit rate control method

Country Status (1)

Country Link
KR (1) KR100283980B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100918560B1 (en) * 2002-09-30 2009-09-21 주식회사 케이티 Apparatus and method for prediction of bit rate in real-time H.263 video coding rate control
KR100678843B1 (en) * 2005-03-22 2007-02-05 엘지전자 주식회사 Intra-prame qvantomizing system for mpeg encoder and method thereof

Also Published As

Publication number Publication date
KR19990079917A (en) 1999-11-05

Similar Documents

Publication Publication Date Title
KR100327650B1 (en) Quantization Control Device of Video Signal Compression System
US5038209A (en) Adaptive buffer/quantizer control for transform video coders
EP3264772B1 (en) Quantization control method and apparatus, program therefor, and storage medium which stores the program
JP2010508769A (en) Video coding rate adaptation to reduce packetization overhead
JP2882287B2 (en) Video encoding device
KR0127329B1 (en) Buffer control apparatus for intraframe using tct
KR20010014281A (en) Transcoding of a data stream
JP2008085673A (en) Moving image encoding apparatus and method
US20080013628A1 (en) Computation Scheduling and Allocation for Visual Communication
CN110213585A (en) Method for video coding, device, computer readable storage medium and computer equipment
US20100104010A1 (en) Real-time rate-control method for video encoder chip
KR100283980B1 (en) Variable output video bit rate control method
CA2722051C (en) Method and apparatus for variable video bitrate control in which picture bitrate correction is limited to be within a calculated range
EP1883246B1 (en) Video Encoder with Adaptive Frame Skipping
US5822004A (en) Adaptive quantification based on actual and predicted image data amounts
CN112788335A (en) H.264 frame-level code rate control method suitable for real-time video transmission
JP2001028753A (en) Dynamic image coder and its method
US8780977B2 (en) Transcoder
JP2004328150A (en) Moving picture coding apparatus and method
KR100337103B1 (en) Complexity Determination Device of Data Signal
JPH06113271A (en) Picture signal coding device
GB2540242A (en) Method and apparatus for rate control subjective optimisation
Sun et al. Scene adaptive parameters selection for MPEG syntax based HDTV coding
KR100585635B1 (en) Bit allocation method
CN115914632A (en) Video encoding method, decoding method, video codec, and computer medium

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

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee