TW569625B - Bit rate control method of low delay video signal by using dynamic rate table - Google Patents

Bit rate control method of low delay video signal by using dynamic rate table Download PDF

Info

Publication number
TW569625B
TW569625B TW90128890A TW90128890A TW569625B TW 569625 B TW569625 B TW 569625B TW 90128890 A TW90128890 A TW 90128890A TW 90128890 A TW90128890 A TW 90128890A TW 569625 B TW569625 B TW 569625B
Authority
TW
Taiwan
Prior art keywords
bits
bit rate
sad
encoding
compensable
Prior art date
Application number
TW90128890A
Other languages
Chinese (zh)
Inventor
Ji-Chang Tsai
Jau-He Shie
Original Assignee
Ji-Chang Tsai
Jau-He Shie
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 Ji-Chang Tsai, Jau-He Shie filed Critical Ji-Chang Tsai
Priority to TW90128890A priority Critical patent/TW569625B/en
Application granted granted Critical
Publication of TW569625B publication Critical patent/TW569625B/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention provides a bit rate control method of low delay video signal by using dynamic rate table. The method is to design a dynamic rate table according to the parameters such as the degree of complication of the video image block, quantization parameters and encoding bit numbers. For each inputted image block, by using the summation of absolute difference and the allocated number of bits to search the dynamic rate table, the best quantization parameters can be found under the requirement of minimum difference between the estimated number of encoding bits and allocated number of bits, so as to quantize and encode the block, and use the encoded practical number of bits to update the dynamic rate table. Thus, the dynamic rate table is updated automatically after each image block is updated, thereby the statistical characteristics of the video image can be quickly captured, and the variation of image content can be tracked correctly, so as to accurately control the output bit rate of the video encoder and obtain a better image reconstruction quality. In addition, since the bit rate control processing of the present invention has only integer computation program, the computational function of bit rate control is greatly enhanced, and the cost of hardware circuit is greatly reduced, so that the whole computation can be completed easily.

Description

569625 A7 ___ B7 五、發明說明(1) 發明背景: (請先閱讀背面之注意事項再填寫本頁) 本發明係一種對視訊影像之解/編之位元率進行控制之方法,尤指一種在 區塊層(macroblock layer)中發展出之位元率控制技術,以針對低延遲之視訊通 訊應用,利用一動態位元率對照表(dynamic rate table),達到精確控制視訊編 碼器之輸出位元率。 先前技藝: 按,解/編碼之位元率(decoding/encoding rate,以下簡稱位元率)控制,在 視訊影像之編碼器(video encoder),如Η·26χ及MPEG等編碼器上,扮演著極 經濟部智慧財產局員工消費合作社印製 爲重要之角色,位元率控制係用以控制視訊影像被編碼之位元資料流(bit stream),令其符合頻道之位元率,以保持良好之影像品質。一般而言,爲順利 完成對位元資料流之控制,均利用一編碼緩衝器(encoder buffer),以暫存該等 被編碼之位元資料,然此一作法,將導致位元資料在傳輸過程中發生時間上之 延遲(delay)。對即時(real time)視訊影像通訊系統而言,由於視訊影像在端點至 端點(end to end)之傳輸上所發生之延遲,必需被控制並維持在一極小之範圍, 因此,該編碼緩衝器之容量必需很小。在此情況下,若針對某一畫面(frame) 所產生之位元數太大時,該緩衝器會發生資料溢流(overflow)之現象,爲避免此 現象,該緩衝器通常會被設計成跳過後續畫面之影像,不予以編碼,然此一作 法,將在重新建構影像序列時,產生不連續現象。相反地,若某一畫面所產生 之位元數太小,該緩衝器將發生位元資料流不足(underflow)之現象,造成無位 元資料被傳送到該頻道,造成該頻道頻寬之浪費。因此,位元率控制之目標, 係在控制編碼器所產生之位元資料,以避免該緩衝器發生資料溢出(即跳畫面) 或不足之現象。 一般而言,低位元率視訊影像之位元率控制可在畫面層(frame layer)及區 塊層(macroblock layer,以下簡稱MB層冲完成。畫面層之位元率控制爲每個 編碼系統所必需,然而單藉畫面層控制,編碼系統經常無法精準地調整畫面之 位元率。在許多低時間延遲之應用系統,如:視訊電話(video phone)及視訊會 本紙張尺錢財國g家標準(CNS)A4規格(210 X 297公1f ) 569625 A7 B7 經濟部智慧財產局員工消費合作社印製 五、發明說明) 議系統(video conference system)中,均要求具備精準之緩衝器調校功能,故區 塊層之位元率控制必須被使用於該等應用系統中,一般而言,區塊層之控制程 序較爲困難,茲舉一習用實施例,說明區塊層之控制程序如下: 標準之視訊編碼系統,如:H.263及MPEG,均係藉助運動補償(motion compensation)及離散餘弦轉換(discrete cosine transform,簡稱 DCT)之運作,來 增加影像之壓縮率,其中運動補償係在一 16x16之區塊基礎下被完成,且在完 成運動補償後,產生一運動補償差異畫面(motion comPensation difference frame,簡稱誤差畫面),接著一 8x8之DCT被應用至該誤差畫面上,並產生 相對應之DCT係數(coefficient),然後利用量化參數(quantization parameter, 簡稱(2户)對DCT係數進行量化後,以可變長度碼(variable lenSth code ’簡稱 VLC)對其進行編碼。在H.263及MPEG之系統中,每一 MB允許使用不同之 量化參數。 若/)、及办分別爲一誤差畫面之第k個MB之位元率、失真 (distortion)及量化參數,且Μ爲一畫面中MB之數量’ 爲該畫面之可用編 碼位元數(bit budget),區塊層之最佳位元率控制係在求取一畫面所有MB之最 佳量化參數,在下列位元率R(Q)之限制下: Μ R(Q)= Σ rk(q0 <BT K=1 ,使得下列之整體失真乃必(overaUdistortion)極小化: Μ D(Q)= Σ dM K=1 此一偏限最佳化之問題,可由Lagrange乘法器(mu)ltiPlier)加以解決’該 項解決方案必需仰賴位元率-失真模式(rate-distortion獅似’簡稱R-D模式)’ 許多R-D模式均已揭露於諸多文獻中,然而,在現有R-D模式之技術中,均存 在有下列之缺點: (1) R-D函數係根據某種訊號源統計特性(source statistics)之假設下所獲得者, __3 ___— i紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) " " (請先閱讀背面之注意事項再填寫本頁) # 訂---------線_ -·1 569625 A7 B7 經濟部智慧財產局員工消費合作社印製 五、發明説明) 如:假設訊號源爲Laplaciait分佈(distribution),由於該等假設僅係一種近 似,故R-D模式無法維持經常性地準確; (2) R-D模式經常關係到每一誤差MB之變異量(variance,σ2),然而,在典型之 視訊編碼系統中,絕對差總和(summation of absolute difference,簡稱SAD) 通常被使用於運動估測(motion estimation),以減少所需之運算。因此,根 據變異量ο2進行演算之R-D模式,尙需加以適當修正,方能使用SAD準則 而此種修正通常均不夠準確; (3) 根據R-D模式,量化參數ρρ係以最佳化方法求得,然而,在低位元率之 編碼標準中,如:Η.263中,一區塊群(a group 〇f block,簡稱GOB)中相鄰 之區塊間,量化參數之改變係被限制在二個層級間(即-2至+2),此一限制, 使得最佳化之效能打折扣,以至於無法準確地控制畫面所產生之位元數, 導致影像品質惡化; ⑷R-D模式涉及浮點運算(floating point computation),故需較昂貴之硬體設備 及較複雜之運算機制。 發明綱要: 有鑑於在前述之現有各式R-D模式中,其位元率控制上所產生之諸多缺 點,發明人經多年之硏究與實驗,終於發明出一種利用動態位元率對照表對低 延遲視訊影像進行位元率控制之方法。 本發明之一目的,係在區塊層(MB)中發展出一種有效率且低成本之位元 率控制技術,該技術係根據MB之複雜度(即SAD)、量化參數ρρ及編碼位元 計數(coding bit counts)等參數,設計出一動態位元率對照表(dynamic rate table),該對照表內包含某一複雜度爲SAD之MB,使用量化參數ρρ進行量化 編碼後,所產生之編碼位元數之估測値。該方法對於每一輸入之MB,係利用 其SAD値及位元分配數(allocated number of bits),去查找該動態位元率對照 表,在編碼位元數估測値及位元分配數間之誤差最小之要求下,查找到最佳之 量化參數ρρ〇 4 本紙張尺度適用中國國家標準(CNS ) Α4規格(210X297公釐) (請先閲讀背面之注意事項再填寫本頁) 569625 A7 B7_ 一 五、發明説明(4 ) (請先閱讀背面之注意事項再填寫本頁) 本發明之另一目的,係在該動態位元率對照表中隱含有位元-失真模式’ 且該對照表會隨著處理區塊之特性,動態地更新,故可快速地追蹤到影像區塊 之區域統計特性(local statistics),達到精確控制位元率之目的。 本發明之又一目的,係在該技術中,僅有整數値之運算程序,故僅需低成 本之硬體電路,即可完成整個運算,有效降低解/編碼電路裝置之成本。 附圖及附表說明: 表1係TMN8及本發明所達成之位元率之比較表; 表2係TMN8及本發明在H.263 codec中所達成之跳過畫面數及平均訊 號雜訊比(簡稱PSNR)之比較表。 第1⑻圖所示乃利用TMN8及本發明對“Salesman”之影像序列’以 64Kbps位元率進行編碼時,每一畫面之PSNR値之示意圖; 第1(b)圖所示乃利用TMN8及本發明對“Silent”之影像序列,以 48Kbps位元率進行編碼時,每一畫面之PSNR値之示意圖; 第2⑻圖所示乃利用TMN8及本發明對“Silent”之影像序列,以 48Kbps位元率進行編碼時,每一畫面在緩衝器中之位元數量之示意圖; 第2(b)圖所示乃利用TMN8及本發明對“Mother & Daughter”之影像 序列,以24Kbps位元率進行編碼時,每一畫面在緩衝器中之位元數量之示意 回· 圖, 第3⑻圖所示乃利用TMN8及本發明對“Foreman”之影像序列,以 112Kbps位元率進行編碼時,每一畫面之真實編碼位元計數之示意圖; 經濟部智慈財產局員工消費合作社印製 第3(b)圖所示乃利用TMN8及本發明對“Silent”之視訊序列,以 64Kbps位元率進行編碼時,每一畫面之真實編碼位元計數之示意圖。 詳細說明: 一般而言,在決定一 MB之βΡ値時,應考量MB之複雜度,即變異量(ο2) 或畫之絕對差SAD,及可用之位元堆積數(available bit budget),亦即如下列所 _____5_ ^紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 經濟部智慧財產局員工消費合作社印製 569625 a7 ____ B7 五、發明說明) 示: 傲雜度,位元堆積數) 在本發明中,係採用絕對差總和SAD,而非變異量(〇V此乃因SAD可 直接在運動補償後獲得,如前所述,在現存之位元率控制模式中,函數/(·)係 根據R-D數學模式演算而得,本發明不使用R-D模式,而係藉設計一位元率-複雜度之對照表,該對照表係一二維陣列(two dimension matrix) A [SADMBk】 [βΡ],該陣列中之第一個參數(parameter) SADMBk,係用以表示第k 個MB之SAD値,該SAD値係一介於(SADmin,SADmax)範圍間之一整數,該陣 列中之第二個參數(parameter) ρ/>,係代表量化參數^1,2,····,31,該陣列之 元素(entry)係代表一 MB (具編碼複雜度SADMM)在某一特定之QP値量化下 之編碼位兀數之估測値(estimate)。 在本發明中,係在離線(offline)狀態下,依下列步驟,建構出該對照表: 1) 首先,將一序列之視訊畫面,以區塊MB爲單位,循序輸入至一視訊 編碼器(如:H.263); 2) 計算輸入MB之SAD値,並設定(2P =1,2,….,31,分別對其進行量化 編碼; 3) 記錄每一 値對該等輸入MB進行量化編碼後之實際編碼位元數; 4) 重覆前述程序處理所有之MB,並將相同SAD及QP之所有MB所產 生之實際編碼位元數,亦即每一 b(SAD , ρρ)元素,予以平均,再依序存入 6[SADMBk][g/>]陣列,即建構出該對照表。 本發明以絕對差總和SAD及量化參數βΡ來建構出該動態位元對照表, 按凡熟悉該項技藝人士,依該對照表之建構原則,可輕易思及之等效變化(如以 變異量ο7取代SAD,或以其它量化參數取代以>),均應屬不脫離本發明之保護 範疇。 本發明在完成該位元率-複雜度-ρρ之對照表之建構後,即可在線上依序 進行畫面層位元率控制(frame_layer rate control)及MB層位元率控制(MB-layer rate control) 〇 本紙張尺度適用中關家標準(CNS)A4規格⑵Q χ 297公 (請先閱讀背面之注意事項再填寫本頁) ---r----訂 ----I 1^ 569625 A7 B7 五、發明說明(g ) 在本發明中,該畫面層位元率控制旨在估算當前輸入畫面之目標編碼位元 計數,其控制程序係類似於TMN8之位元率控制程序,在對當前晝面進行編碼 BU ’係先依下列公式計算編碼緩衝器(encoder buffer)中之位元數量,又稱充滿 度(buffer fullness): W=max(Wprev+ D - R/Fy0) ..............(1) ,其中D係指在對前一畫面進行編碼時,所使用之實際位元數量;係指前 一畫面緩衝器中之充滿度;Λ係指頻道位元率(channel rate) ; F係指畫面位兀 率(frame rate) 〇 此時’若W大於一預先定義之臨界値(threshold)M=R/F,該編碼器將跳 過後續欲編碼之畫面,直到緩衝器之充滿度W小於Μ,故每跳過一個畫面, 該緩衝器之充滿度W將減少Μ位元。在本發明中,當前畫面之設定M= , 則該緩衝器之最大延遲時間,將爲M/i? = 1/F^。 在本發明中,當前畫面之目標編碼位元計數,係依下列公式估算:569625 A7 ___ B7 V. Description of the invention (1) Background of the invention: (Please read the notes on the back before filling out this page) The present invention is a method for controlling the bit rate of the resolution / editing of video images, especially a method The bit rate control technology developed in the macroblock layer is aimed at low-latency video communication applications by using a dynamic bit rate table to achieve precise control of the output bits of the video encoder. Yuan rate. Prior art: Press, decode / encoding bit rate (hereinafter referred to as bit rate) control, play on video encoders, such as Η 26χ and MPEG encoders, playing The consumer cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs has played an important role in printing. The bit rate control is used to control the bit stream of the video image to be encoded, so that it conforms to the bit rate of the channel to maintain good Image quality. Generally speaking, in order to successfully complete the control of the bit data stream, an encoder buffer is used to temporarily store the encoded bit data. However, this method will cause the bit data to be transmitted. A delay in time occurs during the process. For a real-time video image communication system, the delay incurred by the end-to-end transmission of the video image must be controlled and maintained within a very small range. Therefore, this encoding The capacity of the buffer must be small. In this case, if the number of bits generated for a frame is too large, the buffer will have a data overflow phenomenon. To avoid this phenomenon, the buffer is usually designed to The images of subsequent pictures are skipped and not coded. However, this method will cause discontinuities when reconstructing the image sequence. Conversely, if the number of bits generated by a certain screen is too small, the buffer will underflow bit data, causing no bit data to be transmitted to the channel, causing a waste of channel bandwidth. . Therefore, the goal of bit rate control is to control the bit data generated by the encoder in order to avoid data overflow (ie, frame skipping) or insufficient phenomena in the buffer. Generally speaking, the bit rate control of low bit rate video images can be completed at the frame layer and the macroblock layer (hereinafter referred to as the MB layer). The bit rate control of the picture layer is controlled by each encoding system. It is necessary, but the coding system often cannot accurately adjust the bit rate of the picture by controlling the picture layer alone. In many low-time-delay application systems, such as: video phone and video conference paper rule (CNS) A4 specification (210 X 297 male 1f) 569625 A7 B7 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 5. Description of the invention) In the video conference system, precise buffer adjustment functions are required. Therefore, the bit rate control of the block layer must be used in these application systems. Generally speaking, the control process of the block layer is more difficult. Here is a practical example to explain the control process of the block layer as follows: Standard Video coding systems, such as H.263 and MPEG, are augmented by motion compensation and discrete cosine transform (DCT) operations. The image compression ratio, in which motion compensation is completed on a 16x16 block basis, and after completing motion compensation, a motion comPensation difference frame (referred to as error frame) is generated, and then an 8x8 DCT is Apply it to the error screen and generate the corresponding DCT coefficient (coefficient), and then quantize the DCT coefficient using a quantization parameter (referred to as 2 households), and then use a variable length code (variable lenSth code 'referred to as VLC ) Encode it. In H.263 and MPEG systems, each MB allows the use of different quantization parameters. If /), and the bit rate and distortion of the kth MB of an error picture, respectively ) And quantization parameters, and M is the number of MBs in a picture 'is the available coding bit number of the picture (bit budget). The optimal bit rate control of the block layer is to find the best of all MBs in a picture. The quantization parameter is limited by the following bit rate R (Q): Μ R (Q) = Σ rk (q0 < BT K = 1), so that the following overall distortion must be minimized (overaUdistortion): Μ D (Q ) = Σ dM K = 1 The optimization problem can be solved by Lagrange multiplier (mu) ltiPlier) 'This solution must rely on the bit rate-distortion mode (rate-distortion lion' referred to as RD mode) 'Many RD modes have been exposed in many documents However, in the existing RD mode technology, there are the following disadvantages: (1) The RD function is obtained under the assumption of a certain source statistics. __3 ___ — i paper scale is applicable China National Standard (CNS) A4 Specification (210 X 297 mm) " " (Please read the precautions on the back before filling this page) # Order --------- Line_-· 1 569625 A7 B7 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 5. Description of the invention) For example: Assume that the source of the signal is Laplaciait distribution. Since these assumptions are only an approximation, the RD model cannot be maintained regularly and accurately; (2) The RD mode is often related to the variation (σ2) of each error MB. However, in a typical video coding system, the sum of absolute difference (SAD) is usually used for motion estimation. (Motion estimation), in order to reduce the computation required. Therefore, the RD model for calculation based on the variation ο2 does not need to be properly modified before SAD criteria can be used and such corrections are usually not accurate enough; (3) According to the RD model, the quantization parameter ρρ is obtained by optimization. However, in low bit rate coding standards, such as: Η.263, the change of quantization parameters between adjacent blocks in a block group (GOB) is limited to two. Between levels (ie, -2 to +2), this limitation reduces the optimization performance, so that the number of bits generated by the screen cannot be accurately controlled, resulting in deterioration of image quality; ⑷R-D mode involves floating point Computing (floating point computation) requires more expensive hardware equipment and more complex computing mechanisms. Summary of the Invention: In view of the many shortcomings in bit rate control in the existing RD modes described above, the inventor finally invented a dynamic bit rate comparison table for low Method for bit rate control of delayed video image. An object of the present invention is to develop an efficient and low-cost bit rate control technology in the block layer (MB). The technology is based on the complexity of MB (that is, SAD), quantization parameter ρρ, and encoding bit Coding (coding bit counts) and other parameters, a dynamic bit rate table (dynamic rate table) is designed, which contains a certain complexity of the MB of SAD, using the quantization parameter ρρ for quantization encoding, the resulting Estimation of the number of coded bits. For each input MB, the method uses its SAD 値 and the allocated number of bits to find the dynamic bit rate comparison table, and estimates the number of encoded bits and the allocated number of bits. Under the requirements of the smallest error, find the best quantization parameter ρρ〇4 This paper size applies the Chinese National Standard (CNS) A4 specification (210X297 mm) (Please read the precautions on the back before filling this page) 569625 A7 B7_ 15. Description of the invention (4) (Please read the precautions on the back before filling this page) Another object of the present invention is to include a bit-distortion mode in the dynamic bit rate comparison table, and the comparison The table will be dynamically updated with the characteristics of the processing block, so the local statistics of the image block can be quickly tracked to achieve the purpose of accurately controlling the bit rate. Yet another object of the present invention is that in this technology, there is only an arithmetic program for integer unitary. Therefore, only a low-cost hardware circuit can be used to complete the entire operation, effectively reducing the cost of the solution / encoding circuit device. Description of drawings and attached tables: Table 1 is a comparison table of bit rates achieved by TMN8 and the present invention; Table 2 is the number of skipped pictures and average signal-to-noise ratio achieved by TMN8 and the present invention in H.263 codec (Referred to as PSNR) comparison table. Figure 1 shows the schematic diagram of the PSNR of each picture when using TMN8 and the present invention to encode the image sequence "Salesman" at a bit rate of 64Kbps; Figure 1 (b) shows the use of TMN8 and the Schematic diagram of the PSNR of each picture when the "Silent" video sequence is coded at 48Kbps bit rate; Figure 2 shows the video sequence of "Silent" using TMN8 and the present invention at 48Kbps bit rate Schematic diagram of the number of bits in the buffer for each picture when encoding at the rate; Figure 2 (b) shows the image sequence of "Mother & Daughter" using TMN8 and the present invention at 24Kbps bit rate When encoding, the schematic diagram of the number of bits in the buffer of each picture is shown in Figure 3. Figure 3 shows the image sequence of "Foreman" using TMN8 and the present invention at the rate of 112Kbps. Schematic diagram of the actual coded bit count of the picture; printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs, Figure 3 (b). The video sequence of "Silent" is encoded using TMN8 and the present invention at a bit rate of 64Kbps. Every painting Schematic diagram of real encoding bit counts. Detailed explanation: In general, when deciding a β of a MB, the complexity of the MB should be considered, that is, the amount of variation (ο2) or the absolute difference SAD drawn, and the available bit budget, also That is, as follows: _____5_ ^ The paper size applies the Chinese National Standard (CNS) A4 specification (210X297 mm). Printed by the Consumers ’Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs. 569625 a7 ____ B7 5. Description of the invention: Pride, bit Accumulated number) In the present invention, the absolute difference sum SAD is used instead of the amount of variation (0V. This is because SAD can be obtained directly after motion compensation. As mentioned earlier, in the existing bit rate control mode, the function / (·) Is calculated based on the RD mathematical model. The present invention does not use the RD mode, but rather designs a bit rate-complexity comparison table, which is a two-dimensional matrix A [ SADMBk] [βΡ], the first parameter in the array, SADMBk, is used to represent the SAD of the kth MB. The SAD is an integer between (SADmin, SADmax), the array. The second parameter (parameter) ρ / > is the representative Quantization parameters ^ 1, 2, ..., 31, the elements of the array represent an MB (with coding complexity SADMM) in a certain QP (quantization of the estimated number of coding bits) (estimate) In the present invention, in the offline state, the comparison table is constructed according to the following steps: 1) First, a sequence of video images is sequentially input to a block MB unit. Video encoder (such as: H.263); 2) Calculate the SAD 値 of the input MB and set (2P = 1, 2, ...., 31, respectively, to quantize and encode them; 3) Record each 値Enter the actual number of encoding bits after quantization encoding of the MB; 4) Repeat the previous procedure to process all MBs, and the actual number of encoding bits generated by all MBs of the same SAD and QP, that is, each b (SAD, ρρ) elements are averaged, and then stored in the 6 [SADMBk] [g / >] array in order, and the comparison table is constructed. The present invention constructs the dynamic bit comparison table based on the absolute difference sum SAD and the quantization parameter βP. According to the construction principle of the comparison table, those who are familiar with the art can easily consider the equivalent change (such as the amount of variation ο7 Substitute SAD, or replace with other quantization parameters >), shall all belong to the protection scope of the present invention. After completing the construction of the bit rate-complexity-ρρ comparison table, the present invention can sequentially perform frame-layer rate control (MB_layer rate control) and MB-layer rate control (MB-layer rate) online. control) 〇 This paper size applies the Zhongguanjia Standard (CNS) A4 specification ⑵Q χ 297 (Please read the precautions on the back before filling this page) --- r ---- Order ---- I 1 ^ 569625 A7 B7 V. Description of the Invention (g) In the present invention, the bit rate control of the picture layer aims to estimate the target coded bit count of the current input picture. The control procedure is similar to the TMN8 bit rate control procedure. The current day-time encoding BU 'is to first calculate the number of bits in the encoder buffer according to the following formula, also known as buffer fullness: W = max (Wprev + D-R / Fy0) .... .......... (1), where D refers to the actual number of bits used when encoding the previous picture; refers to the fullness in the buffer of the previous picture; Λ refers to Channel bit rate; F refers to the frame rate. At this time, 'if W is greater than a predefined threshold' d) M = R / F, the encoder will skip the subsequent pictures to be encoded until the buffer fullness W is less than M, so each time a frame is skipped, the buffer fullness W will decrease by M bits. In the present invention, if the setting of the current picture is M =, the maximum delay time of the buffer will be M / i? = 1 / F ^. In the present invention, the target encoding bit count of the current picture is estimated according to the following formula:

R Βχ=.....Δ ..............(2)R Βχ = ..... Δ .............. (2)

F ,其中△則係依下列公式計算:F, where △ is calculated according to the following formula:

2*W2 * W

——,W>Z ·Μ Δ= F W- Ζ ·Μ,其它 ,其中ζ之內定値爲0.1。 一般而言,一 MB之複雜度(SAD)愈高,需要之位元數量即愈大,故爲提 昇編碼效能,本發明在MB層位元率控制中,係先對所有MB,完成運動估測 及補償之初始化運作,並記錄每一個MB之SAD及運動向量,再將MB分類 成可補償型(compensable type),即SADS臨界値,或不可補償型(uncompensable type),即SAD>臨界値(threshold),其中因可補償型MB不須量化,僅有非本 7 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) (請先閱讀背面之注意事項再填寫本頁) 訂· -I線- 經濟部智慧財產局員工消費合作社印製 569625 A7 B7 五、發明說明(卞) (請先閱讀背面之注意事項再填寫本頁) 文(nontexture)位元,如指示位元(indicator bits)及/或運動向量位元(motion -vector bits)等,被插入位元流之表頭中;反觀不可補償型MB,由於須被量化, 故包含有本文(texture)及非本文之位元資料,此外,不可補償型MB也進一步 再分類成交互編碼(inter-coding)或內部編碼(intra-coding)型。 本發明根據H.263之規格,在編碼前,依下列公式計算出一畫面中部份非 本文之資料位元數量(partial nontexture bits) 5臟^ : Μ——, W > Z · M Δ = F W- ZZ · M, others, where 値 is set to 0.1. Generally speaking, the higher the complexity of a MB (SAD), the greater the number of bits required. Therefore, in order to improve the coding performance, the present invention first performs motion estimation on all MBs in the MB bit rate control. Test and compensate the initialization operation, and record the SAD and motion vector of each MB, and then classify the MB into a compensable type (SADS critical), or an uncompensable type (SAD > critical) (threshold), because compensable MB does not need to be quantified, only non-book 7 paper sizes are applicable to Chinese National Standard (CNS) A4 (210 X 297 mm) (Please read the precautions on the back before filling this page ) Order · -I-Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 569625 A7 B7 V. Description of Invention (卞) (Please read the precautions on the back before filling this page) Non-texture bits, such as indicator bits Indicator bits and / or motion-vector bits are inserted into the header of the bit stream. On the other hand, non-compensable MBs, because they must be quantified, contain text and non- Bit data for this article The compensated MB is further classified into an inter-coding or an intra-coding type. According to the specifications of H.263, the present invention calculates the number of partial nontexture bits in a picture according to the following formula before encoding according to the following formula: 5 ^^

Buncode= X ( Bc〇D,Bc〇D+ BmCBPC^ BcBPY+ BmVD,BmVD,〇)......⑶ m=l ,其中M係代表一畫面中MB之總數;(X,Y,Z,0)係代表依編碼模式於X,Y,Z 及〇中選擇一項,其中X,Y係對應於可補償型,Z係對應於不可補償型之交互 編碼(inter-coding),0係對應於不可補償型之內部編碼(intra-coding),如⑽係 代表 COD (Coded macroblock indication)訊號之位元數,5MC帆:係代表 MCBPC (Macroblock type & Coded block pattern for chorminance)訊號之位元數, 係代表 CBPY (Coded block pattern for luminance)訊號之位元數, 係代表MVD (Motion Vector Data)訊號之位元數。 至於,預估可用於該等不可補償型MB之位元總數凡心,可依下列公式 被計算出=Buncode = X (Bc〇D, Bc〇D + BmCBPC ^ BcBPY + BmVD, BmVD, 0) ... ⑶ m = 1, where M is the total number of MB in a picture; (X, Y, Z, 0 ) Represents one of X, Y, Z, and 0 according to the encoding mode, where X, Y corresponds to the compensable type, Z corresponds to the non-compensable inter-coding, and 0 corresponds to the Non-compensable intra-coding, such as the number of bits representing the COD (Coded macroblock indication) signal, 5MC sail: the number of bits representing the MCBPC (Macroblock type & Coded block pattern for chorminance) signal Is the number of bits of the CBPY (Coded block pattern for luminance) signal, and is the number of bits of the MVD (Motion Vector Data) signal. As for the estimated total number of bits available for these non-compensable MBs, Fan Xin can be calculated according to the following formula =

Bcode= B T _ Buncode - Bph - BGOBH ............(4) 經濟部智慧財產局員工消費合作社印製 ,其中办係代表一畫面中之目標編碼位元計數,可由公式(2)計算而得; 係代表畫面表頭(picture header)之位元計數,係代表一畫面GOB (Group of Block)表頭之位元計數。 在公式(4)中,由於5_包含有不可補償型MB之本文資料位元數及表頭 位元(header bits)。然而,在進行量化及編碼前,不可補償型MB之表頭位元 係一未知數,因此,本發明乃利用下列公式,估算出用以對不可補償型MB之 本紙張尺度適用中關家標準(CNS)A4規格(21G x 2S7公1) 569625Bcode = BT _ Buncode-Bph-BGOBH ............ (4) Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs, where the office represents the target code bit count in a picture, which can be calculated by Calculated by formula (2); is a bit count representing a picture header, and is a bit count representing a picture GOB (Group of Block) header. In formula (4), 5_ contains the number of data bits and header bits of the text of the non-compensable MB in this text. However, before the quantization and encoding, the header bits of the non-compensable MB are unknown. Therefore, the present invention uses the following formula to estimate the application of the Zhongguanjia standard to the paper size of the non-compensable MB ( CNS) A4 size (21G x 2S7 male 1) 569625

五、發明說明( 本文資料進fj編碼之位元數N :V. Description of the invention

Bava= Bcode 一 Bh4ntr,Nintra—Bh inte,Ninter ............⑸ ,其中‘係代表分配給不可補償型MB之位元總數;系代表內部編碼 =個MB所需之表頭位元數w係代表交互編碼之〜個細所需之表頭位 元數(不包括運動向量位元(___ _ ; 係代表需進行內部編碼之 剩餘MB數量;u代表需進行交互編碼之剩餘MB數量。私⑽及瓜― 係可以下列公式,以疊代計算求得: —a ^hAntra = — (Bh4ntra ^ (j^l) + bh.intra )............⑹ jBava = Bcode-Bh4ntr, Nintra—Bh inte, Ninter ......... ⑸, where 'represents the total number of bits allocated to the non-compensable MB; represents the internal coding = required for each MB The number of header bits w represents the number of header bits required for interactive encoding (excluding motion vector bits (___ _; represents the number of MB remaining for internal encoding); u represents the interaction required The number of remaining MBs encoded. Private and melon-can be obtained by iterative calculation with the following formula: —a ^ hAntra = — (Bh4ntra ^ (j ^ l) + bh.intra) ........ .... ⑹ j

一 1 扣1 J1 1 buckle 1 J

Jih-inter = — (Bh.inter * Q-l) + bh.inter ) ............(7) ’其中瓜/咖係代表利用y·個MB(第一個MB至第j個MB)作爲內部編碼所求 得之平均表頭位元數·係代表第j個MB使用內部編碼之表頭位元數, 凡-⑽,係代表利用)個MB(第一個MB至第j個MB)作爲交互編碼所求得之平 均表頭位元數;係代表第j個MB使用交互編碼之表頭位元數。 俟B«v«被決定後,將可透過下列公式,估算出分配給不可補償型第k個 MB之位元數卜: ^ava * bk:............................ ................................(8)Jih-inter = — (Bh.inter * Ql) + bh.inter) ...... (7) 'Where the melon / coffee represents the use of y · MB (the first MB to The j-th MB) average number of header bits obtained as the internal coding. It represents the number of header bits used by the j-th MB to use internal coding. Where -⑽, it is used on behalf of) MB (first MB) To the j-th MB) as the average number of header bits obtained by the interactive coding; it represents the number of header bits used by the j-th MB to use the interactive coding. After 俟 B «v« is determined, the following formula can be used to estimate the number of bits allocated to the uncompensable k-th MB: ^ ava * bk: ............. ............... ................................(8)

N Σ SAD MBk k=l ’其中SADMM係代表第k個MB之SAD値,N代表在一畫面中該不可補償型 (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 本紙張尺度適財_家標準(CNS)A4規格_(21G χ 297公k--N Σ SAD MBk k = l 'Where SADMM is the SAD of the k-th MB 値, N is the non-compensable type in a picture (please read the precautions on the back before filling this page) Staff Consumption of Intellectual Property Bureau of the Ministry of Economic Affairs Cooperatives print this paper in a suitable paper size _ Home Standard (CNS) A4 Specification _ (21G χ 297 km-

ϋ ϋ |_1 一-口、 ϋ ϋ ϋ ^1 ^1 —a— I ϋ ϋ ϋ n ϋ ϋ rn ϋ ϋ ϋ H ϋ >^1 ^1 .^1 ^1 ^1 ^1 I 569625 A7 B7___ 五、發明説明(0 ) MB之總數。 此時,對於具有SADMm之第k個MB,即可藉由分配之位元數心及SAD 値’依下列公式,由動態位元率對照表中,查找出最佳之量化參數ρρ値: (請先閲讀背面之注意事項再填寫本頁) -1ϋ ϋ | _1 一-口, ϋ ϋ ϋ ^ 1 ^ 1 —a— I ϋ ϋ ϋ n ϋ ϋ rn ϋ ϋ ϋ H ϋ > ^ 1 ^ 1. ^ 1 ^ 1 ^ 1 ^ 1 I 569625 A7 B7___ 5. Description of the invention (0) The total number of MB. At this time, for the k-th MB with SADMm, the best quantization parameter ρρ 値 can be found from the dynamic bit rate comparison table by the allocated bit number center and SAD 値 'according to the following formula: ( (Please read the notes on the back before filling out this page) -1

Qp* = 0^1,2,.bfr b[SAD^\ [QP] |}.............(9) ,其中該反極小値(inverse min)係代表左側之逆値,可令所估算出之分配位元 數、,與目標位元計數(targetbitcount)6[&4i)MM】[2/>]間之差異最小。 根據Η263之規格,水平相鄰之區塊間之gp差異値,係被限制在(-2, _1,+1, +2)之範圍內,因此,公式(9)所計算出之最佳量化參數ρΡ,尙需重新調整, 使其與前一 mb之ρρ値相差不大於2。相鄰區塊間之差値,即 D(2i7y47Vr(Quantizer Information) » DQUANTk- QPk -QPk.i ° 然而,若前述處理係發生在一 GOB或一畫面(即第一個GOB)開始時,本 發明將利用所計算出之2P,決定計算出畫面量化參數(Quantizer Information烕區塊群量化參,而非D0t/A/Vr,其作法與/)2£/Α/ν:Γ 之計算方式不同,其處理程序爲: (1)若GOB中沒有不可補償型MB,即設定爲1至31範圍內 之任一整數; (2) 若GOB中存在一個不可補償型MB,即設定; (3) 若GOB中至少存在二個不可補償型MB,則將依下列公式 設定= 經濟部智慧財產局員工消費合作社印製 QPi + 2 if QP2-QPi>h DQUANT: Pj if -h<QP2-QPi<h .................(10)Qp * = 0 ^ 1,2, .bfr b [SAD ^ \ [QP] |} ............. (9), where the inverse min is the left side Conversely, the difference between the estimated number of allocated bits and the target bit count (targetbitcount) 6 [& 4i) MM] [2 / >] can be minimized. According to the specification of Η263, the difference in gp between horizontally adjacent blocks 値 is limited to the range (-2, _1, +1, +2). Therefore, the best quantification calculated by formula (9) The parameter ρp, 尙 needs to be readjusted so that the difference between ρρ 値 and the previous mb is not greater than 2. The difference between adjacent blocks, that is, D (2i7y47Vr (Quantizer Information) »DQUANTk- QPk -QPk.i ° However, if the foregoing processing occurs at the beginning of a GOB or a picture (that is, the first GOB), The invention will use the calculated 2P to decide to calculate the picture quantization parameters (Quantizer Information 烕 block group quantization parameters instead of D0t / A / Vr, the method is the same as /) 2 £ / Α / ν: Γ is calculated differently , Its processing procedure is: (1) if there is no non-compensable MB in GOB, it is set to any integer in the range of 1 to 31; (2) if there is an non-compensable MB in GOB, it is set; (3) If there are at least two non-compensable MBs in the GOB, it will be set according to the following formula = QPi + 2 printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs if QP2-QPi > h DQUANT: Pj if -h < QP2-QPi < h ....... (10)

QP】-2 if QP2-QP1 < - L ,其中L係一正整數,內定値爲L=5,公式(10)之修正値(modification),將使 一 GOB中最前面之二個不可補償型MB之(QP値差異(difference)變小,並進一 步減少了編碼之失真,若處理的是一畫面之第一個GOB,則可利用公式(10)計 算出 GQUANT,再令 PQUANT = GQUANT 〇 ________J10__ 本紙張尺度適用中國國家標準(CNS ) A4規格(21〇X 297公釐) A7 經濟部智慧財產局員工消費合作社印製 569625 B7 五、發明說明(10) 在本發明中,當前MB之實際編碼位元計數心,係被用來更新對照表中之 編碼位元數,故在考量降低硬體實現之成本下,本發明並不真的更改對照表中 的每一元素,而是二維對照表固定不動,更動一個一維之移位陣列(shift array) 56[SADMBk】,此陣列之大小爲1 x SADmax,即每一個SAD對應一個移位陣列元 素,妫[SADMBk】將依下列公式,予以更新: 州 SADMBk】[(2P] =^[SADMBk】+(h,-6[SADMBk】[(2P】‘[SADMBk】)/2.".(ll) 當欲更新動態位元率對照表中每一量化參數之編碼位元預估數時,僅需將 對照表加上移位陣列即可求得,意即: 更新之預估編碼位元數=6[SADMBk】[QP】+圳SADMBk]...............(12) 在此需特別注意者,乃移位陣列圳SAD】的每一元素在最初時皆設爲〇, 如此,在對照表被建構完成後,即不需再予更動,而需要更動者僅係 s6[SADMBk】,此陣列所需之記憶空間,僅爲對照表之1/31 〇 在本發明中,該對照表之更新原則,係以當前MB之實際編碼位元計數 、來更新對照表中之預估編碼位元數,而在一較佳實施例中,係以對照表固定 不動,僅藉更動一個一維移位陣列之方式,加以實現。按凡熟悉該項技藝人士, 依據本發明之對照表更新原則,可輕易思及之等效變化,均應屬不脫離本發明 之保護範疇。 在傳統R-D模式爲基礎之位元率控制技術中,需涉及許多複雜之浮點 (floating-point)運算,如:平方根運算、乘法運算及除法運算,反觀本發明之主 要技術,僅包括對照表之查找,及定點(fixed-point)乘法及除法運算,該類運算 可以移位運算(shift operation)方式完成,因此,就硬體設備之觀點而言,本發 明所運用之技術顯較現存R-D模式之位元率控制技術,具有成本較低之優點。 本發明之成本主要係在位元率對照表所額外增加之記憶體,其記憶體之大小視 SADCS^D^,似/)^)及之範圍値而定。在本發明之下列實施例中,若QP 之範圍値係31,SAD之範圍値係1660,則所需之記憶位置,共計31x1660個, 該對照表之元素(位元計數)之最大値將小於65535,亦即每一記憶位置以兩個位 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) (請先閱讀背面之注意事項再填寫本頁)QP] -2 if QP2-QP1 <-L, where L is a positive integer, the default value is L = 5, and the modification (formation) of formula (10) will make the first two in a GOB uncompensable (QP 値 difference) of the type MB becomes smaller, and further reduces the encoding distortion. If the first GOB of a picture is processed, GQUANT can be calculated by using formula (10), and PQUANT = GQUANT 〇 ________J10__ This paper size applies to Chinese National Standard (CNS) A4 specification (21 × 297 mm) A7 Printed by the Consumers ’Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs 569625 B7 V. Description of the invention (10) In the present invention, The actual encoding bit count is used to update the number of encoding bits in the lookup table. Therefore, in consideration of reducing the cost of hardware implementation, the present invention does not really change each element in the lookup table, but two The dimension comparison table is fixed, and a one-dimensional shift array 56 [SADMBk] is changed. The size of this array is 1 x SADmax, that is, each SAD corresponds to a shift array element. [SADMBk] will be as follows Formula, updated: State SADMBk] [(2P] = ^ [SADMBk] + (h, -6 [SADMBk] [(2P] '[SADMBk]) / 2. ". (Ll) When you want to update the encoding bit prediction of each quantization parameter in the dynamic bit rate comparison table When estimating, you only need to add the lookup table to the shift array, which means: the number of updated estimated coding bits = 6 [SADMBk] [QP] + Shenzhen SADMBk] ........ ....... (12) It should be noted here that each element of the shift array [SAD] is initially set to 0, so that after the comparison table is constructed, there is no need to Those who need to change are only s6 [SADMBk]. The memory space required for this array is only 1/31 of the comparison table. In the present invention, the update principle of the comparison table is based on the actual encoding of the current MB. The bit count is used to update the estimated number of coded bits in the lookup table, but in a preferred embodiment, the lookup table is fixed and implemented by changing only a one-dimensional shift array. Those skilled in the art, according to the principle of updating the comparison table of the present invention, can easily consider the equivalent changes, which should not depart from the protection scope of the present invention. Based on the traditional RD mode In the basic bit rate control technology, many complex floating-point operations are involved, such as: square root operation, multiplication operation, and division operation. In contrast, the main technology of the present invention only includes the lookup of the lookup table and fixed points. (fixed-point) multiplication and division operations. Such operations can be performed in a shift operation. Therefore, in terms of hardware equipment, the technology used in the present invention is significantly higher than the bit rate of the existing RD mode. Control technology has the advantage of lower cost. The cost of the present invention is mainly in the additional memory added by the bit rate comparison table. The size of the memory depends on the range of SADCS ^ D ^, like /) ^). In the following embodiments of the present invention, if the range of QP is 31, and the range of SAD is 1660, the required memory positions are 31x1660 in total. The maximum value of the element (bit count) of the lookup table will be less than 65535, that is, each memory location is in the two standard paper sizes. Applicable to China National Standard (CNS) A4 (210 X 297 public love) (Please read the precautions on the back before filling this page)

569625 A7 B7569625 A7 B7

五、發明説明 (IV 兀組(byte)表示,即已綽綽有餘,因此,所需之記憶體大小僅約1⑽K位元組 (byte)。該等額外增加之記憶體,對於現今半導體產業而言,實屬一極低微之成 本。 (請先閱讀背面之注意事項再填寫本頁} 在本發明之一較佳之實施例中,係利用一 H.263 codec之基本版,評估本 發明之位元率控制技術邏輯之價値,並將其與TWN8之位元率控制比較如下。 在該codec中,其運動估測係採用全部搜尋演算法(full search algorithm,以下 簡稱FSA) ’並在X及Y方向中以2:1之次取樣(subsampling),先將16x16之 MB減少至8x8,以降低其搜尋之運算量,然後以FSA在-15至+15間進行搜尋。 在該實施例中,將不引入H.263可選用之高階工具,如:進階估測(advanced prediction,即AP模式)及無限制運動向量(unrestricted motion vector ),測試視 訊包括六個QCIF影像序列,每一個影像序列均用10Hz之畫面速率(fame rate) 〇 在該實施例中,表I係代表TWN8及本發明之位元率控制技術所達成之 實際位元率,該表顯示本發明之位元率控制較TWN8方法更接近目標位元率, 表II係代表重建影像(reconstructed pictures)品質(PSNR)之比較,顯示本發明 之位元率控制技術具有較佳之PSNR品質(其平均比TWN8約多了 0.8dB)。 經濟部智慧財產局S工消費合作杜印製 參閱第1⑻至1(b)圖所示,乃不同影像序列之每一畫面之PSNR値,該等 圖中淸楚地指出,本發明之位元率控制技術在最先之幾個畫面,雖有較低之 PSNR値,然而,在數張畫面後,卻迅速超越TMN8,且一直到影像序列尾, 均保持此一超越狀態。此一現像顯示,本發明之位元率控制技術在一開始時, 雖不儘理想,但卻可迅速地掌握影像之統計特性,並正確地追蹤影像內容的變 化,故本發明之動態位元率對照表,確實能更精準地反映出影像內容。 參閱第2⑻至2(b)圖所示,乃每一畫面在緩衝器中之充滿度,在該實施例 中,緩衝器之溢流臨界値(overflow threshold)被設定爲R/F,若該緩衝器之充滿 度大於該臨界値,稱之爲溢流。在對“Mother & Daughter”之影片,以24Kbps 位元率進行編碼時,TWN8溢流5次,顯示有5張畫面被跳過,然而本發明在 不同之測試條件下,所有影像序列中均完全未發生溢流現象。由於,跳過畫面 12 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 569625 Μ Β7 五、發明説明(12) 之數量與影像播放之連續性有關,這意味著本發明在影像播放之連續性上優於 TMN8。若緩衝器充滿度曲線碰觸到X軸時,將發生緩衝器位元不足(underflow) 之問題。TMN8在大多數影像序列中,均發生多次位元不足之現象,然而,本 發明則無此問題。另由該等圖可知,參閱第2⑻至2(b)圖所示,乃每一畫面在 緩衝器中之充滿度,在該實施例中,本發明能達成較低且較穩定之緩衝器充滿 度。 參閱第3(a)至3(b)圖所示,乃每一畫面之實際編碼位元計數,該等圖顯示 本發明所控制之每一畫面所產生之位元數較爲均与穩定。 綜上所述,由於本發明之動態位元率對照表在每處理一影像區塊後,即自 動更新一次,故能迅速掌握視訊影像之統計特性,並正確地追蹤影像內容之變 化,精確地控制視訊編碼器之輸出位元率,獲得較佳之影像重建品質,此外, 由於在本發明之位元率控制處理中,僅有整數之運算程序,故不僅大幅提昇了 位元率控制之運算效能,且可大幅降低硬體電路之成本,輕易完成整個運算。 以上所述,僅係本發明之較佳實施例,惟,本發明所主張之權利範圍,並 不局限於此,按凡熟悉該項技藝人士,依據本發明所揭露之技術內容,可輕易 思及之等效變化,均應屬不脫離本發明之保護範疇。 (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 13 本紙張尺度適用中國國家標準(CNS ) Α4規格(210X 297公釐)V. Description of the Invention (IV byte indicates that it is more than enough, so the required memory size is only about 1⑽K bytes. For the current semiconductor industry, It is a very low cost. (Please read the notes on the back before filling in this page} In a preferred embodiment of the present invention, a basic version of the H.263 codec is used to evaluate the bits of the present invention. The price of the logic of the rate control technology is compared with the bit rate control of TWN8 as follows. In this codec, its motion estimation uses a full search algorithm (hereinafter referred to as FSA) 'and X and Y In the direction, subsampling is performed at a ratio of 2: 1, and the MB of 16x16 is first reduced to 8x8 to reduce the search operation amount, and then the search is performed between -15 and +15 with FSA. In this embodiment, H.263 optional advanced tools such as advanced prediction (AP mode) and unrestricted motion vector are not introduced. The test video includes six QCIF image sequences, and each image sequence is With a frame rate of 10Hz The rate (fame rate). In this embodiment, Table I represents the actual bit rate achieved by the TWN8 and the bit rate control technology of the present invention. The table shows that the bit rate control of the present invention is closer to the target than the TWN8 method Bit rate, Table II represents the comparison of reconstructed pictures (PSNR) quality, which shows that the bit rate control technology of the present invention has better PSNR quality (which averages about 0.8dB more than TWN8). Printed by the Industrial and Commercial Bureau of Industrial and Commercial Cooperation, please refer to Figures 1 to 1 (b), which are the PSNR of each picture of different image sequences. These figures clearly point out that the bit rate control technology of the present invention In the first few pictures, although there is a lower PSNR, however, after several pictures, it quickly surpassed TMN8, and it remained in this state until the end of the image sequence. This phenomenon shows that the present invention Although the bit rate control technology is not ideal at the beginning, it can quickly grasp the statistical characteristics of the image and correctly track the changes in the image content. Therefore, the dynamic bit rate comparison table of the present invention can indeed be more accurate. Accurately reflect the shadow Refer to the figures 2 to 2 (b) for the fullness of each picture in the buffer. In this embodiment, the overflow threshold of the buffer is set to R / F. If the buffer is fuller than the critical threshold, it is called overflow. When the "Mother & Daughter" movie is encoded at a bit rate of 24Kbps, TWN8 overflows 5 times and 5 pictures are displayed. Skip, but under different test conditions, the present invention does not have any overflow phenomenon at all. Because the paper size of this paper is skipped, 12 Chinese paper standard (CNS) A4 (210X297 mm) 569625 Μ B7 V. The number of invention description (12) is related to the continuity of video playback, which means that the invention The continuity of playback is better than TMN8. If the buffer fullness curve touches the X axis, an underflow problem will occur. TMN8 has many bit shortages in most image sequences. However, the present invention does not have this problem. It can also be seen from these figures that referring to the figures 2 to 2 (b), it is the fullness of each picture in the buffer. In this embodiment, the present invention can achieve a lower and more stable buffer full. degree. Refer to Figures 3 (a) to 3 (b), which are actual coded bit counts of each picture. These figures show that the number of bits generated by each picture controlled by the present invention is relatively stable. In summary, since the dynamic bit rate comparison table of the present invention is automatically updated after each image block is processed, it can quickly grasp the statistical characteristics of the video image, and correctly track the changes in the image content, accurately Control the output bit rate of the video encoder to obtain better image reconstruction quality. In addition, in the bit rate control process of the present invention, there is only an integer operation program, so not only the operation performance of bit rate control is greatly improved. , And can greatly reduce the cost of hardware circuits, and easily complete the entire operation. The above are only the preferred embodiments of the present invention. However, the scope of the rights claimed by the present invention is not limited to this. According to those skilled in the art, the technical content disclosed by the present invention can be easily considered. And equivalent changes should all belong to the protection scope of the present invention. (Please read the notes on the back before filling out this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 13 This paper size applies to China National Standard (CNS) Α4 specification (210X 297 mm)

Claims (1)

569625 A8 B8 C8 D8 六、申請專利範圍 1、 一種利用動態位元率對照表對低延遲視訊影像進行位元率控制之方 法’該方法係包括下列步驟: 在離線狀態下,設計出一動態位元率對照表; (請先閱讀背面之注意事項再填寫本頁) 估算當前輸入晝面之目標編碼位元計數BT ; 對當前輸入畫面執行初始化運作,該初始化運作包括計算及記錄每一個 MB之SAD値及運動向量,再將MB分類成可補償型及不可補償型,再進一步 將不可補償型MB分類成交互編碼及內部編碼型,再計算交互編碼及內部編碼 型MB之數量,並將其分別記錄於及AU,中; 估算出分配給不可補償型第k個MB之分配位元數 對於每一個輸入MB,利用其SAD値及該分配位元數心,查找該動態位 元率對照表,以得到最佳之量化參數βΡ値,並重新調整βΡ値,使其與前一 MB之βΡ値相差不大於2 ; 利用該量化參數逆對MB進行量化及編碼,並利用編碼後之實際編碼位 元計數,來更新該動態位元率對照表。 2、 如申請專利範圍第1項所述之方法,其中該動態位元率對照表係一二 維陣列: b[SAO][QP] ,該陣列中之第一個參數SAD,其値係一介於(SADmin,SADmax)範圍間之一整 數,該陣列中之第二個參數(2P,係代表量化參數ρ/Μ,2,··.·,31,該陣列之元 素係代表一具SAD値之MB其編碼位元計數之估測値。 經濟部智慧財產局員工消費合作社印製 3、 如申請專利範圍第2項所述之方法,其中該動態位元率對照表係依下 列步驟建構完成: 首先,將一序列之視訊畫面,以區塊MB爲單位,循序輸入至一視訊編 碼器, 計算輸入MB之SAD値,並設定!gP =1,2,…·,31,分別對其進行量化編碼; 記錄每一以> 値對該等輸入MB進行量化編碼後之實際編碼位元數; 重覆前述步驟處理所有之MB,並將相同SAD及QP之所有MB所產生 14 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 569625 A8 B8 C8 D8 六、申請專利範圍 之實際編碼位元數,亦即每一 b(SAD , βΡ)元素,予以平均’再依序存入 6[SADMBk][eP】陣列,即建構出該對照表。 4、如申請專利範圍第1項所述之方法,其中當前畫面之目標編碼位元計 數Βτ,係依下列公式估算: R «Μ··園 Λ F ,其中Δ則係依下列公式計算: 2*W ——,W>Z ·Μ Δ= F W- Ζ ·Μ,其它 ,其中ζ之內定値爲〇·1,D - ΙΪ/Ρ,Ο),D係指在對前一畫面進 行編碼時,所使用之實際位元數量,係指前一畫面緩衝器中之充滿度,及 係指頻道位元率,F係指畫面位元率。 5、如申請專利範圍第i項所述之方法,其中分配給不可補償型第k個 MB之位元數係依下列公式計算:: bkz SAD備女 N Σ SAD MBk k=l (請先閱讀背面之注意事項再填寫本頁) 訂---------線· 經濟部智慧財產局員工消費合作社印製 ’其中及⑽係代表分配給不可補償型MB之位元總數,SAD聰係代表第让個 MB之SAD値,N代表在—畫面中不可補償型MB之總數。 6、如申請專利範圍第5項所述之方法,其中係利用下列公式估算: Bn Bcode - Bh-intra Nintra —Bh-inter * Ninter 丄其中係代表分配給不可補償型MB之位元總數;係代表內部編碼 個所銜之表頭位兀數,馬·"〃〃係代表父互編碼之一個mb所需之表頭位 元數;厲·7^係代表需進行內部編碼之剩餘MB數量;iv^r係代表需進行交互編 569625 A8 B8 C8 D8 六、申請專利範圍 碼之剩餘]MB _胃。 、7如申W專利範圍第6項所述之方法,其中凡如,及I"伽〃係可以下列 公式,以疊代計算求得: Bh-L· j-l Q_1)+b h-intra . N Winter = — (Bh4nter * (j^l) + ^ inter . ’其中心_係代表利用·/·個MB(第一個MB至第j個MB)作爲內部編碼所求 ^之平均表頭位元數;係代表第j個MB使用內部編碼之表頭位元數, 知*係代表利用·/·個MB(第一個MB至第j個MB)作爲交互編碼所求得之平 均表頭位元數;係代表第j個MB使用交互編碼之表頭位元數。 8、如申請專利範圍第6項所述之方法,其中預估可用於不可補償型MB 之位元總數尽咖,可依下列公式被計算出: (請先閱讀背面之注意事項再填寫本頁) GOBH 經濟部智慧財產局員工消費合作社印製 Bcode Βτ - Buncode - ΒρΗ - B ,其中而w係代表畫面表頭之位元計數,忍^⑽〃係代表一畫面gob表頭之位元 計數。 9、如申請專利範圍第8項所述之方法,其中一畫面中部份非本文之資料 位元數量及,可依下列公式被計算出: Μ ^uncode- Σ (Bq〇D y Bc〇D+ BmCBPC^ BcBPV^ BmVD f ^MVDy〇) m=l 16 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 569625 A8 B8 C8569625 A8 B8 C8 D8 6. Scope of patent application 1. A method for controlling bit rate of low-latency video image by using a dynamic bit rate comparison table. The method includes the following steps: In the offline state, design a dynamic bit Yuan rate comparison table; (Please read the precautions on the back before filling out this page) Estimate the target code bit count BT of the current input day and day; Perform the initialization operation on the current input screen. The initialization operation includes calculating and recording each MB. SAD 値 and motion vector, then classify MB into compensable and non-compensable, and then further classify non-compensable MB into interactive coding and internal coding, calculate the number of interactive coding and internal coding MB, and Recorded in and AU, respectively; Estimate the number of allocated bits allocated to the uncompensable k-th MB. For each input MB, use its SAD 値 and the number of allocated bits to find the dynamic bit rate comparison table. To get the best quantization parameter βP 値, and readjust βP 値 so that the difference between it and the previous MB's βP 値 is not greater than 2; use this quantization parameter to inverse M B performs quantization and encoding, and updates the dynamic bit rate comparison table by using the actual encoded bit count after encoding. 2. The method as described in item 1 of the scope of patent application, wherein the dynamic bit rate comparison table is a two-dimensional array: b [SAO] [QP], the first parameter SAD in the array, which is not a reference An integer between the (SADmin, SADmax) range. The second parameter (2P in the array, which represents the quantization parameter ρ / M, 2, ...., 31. The elements of the array represent a SAD.) The estimation of MB's coded bit count. Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs. 3. The method described in item 2 of the scope of patent application, where the dynamic bit rate comparison table is constructed according to the following steps. : First of all, input a sequence of video pictures in block MB as a unit, input them to a video encoder in sequence, calculate the SAD 値 of input MB, and set! GP = 1, 2, ..., 31, respectively. Quantized coding; Record the actual number of coding bits after each quantized coding of these input MBs; Repeat the previous steps to process all MBs, and generate 14 paper sizes from all MBs of the same SAD and QP Applicable to China National Standard (CNS) A4 (210 x 297 mm) ) 569625 A8 B8 C8 D8 6. The actual number of coded bits in the scope of the patent application, that is, each b (SAD, βP) element is averaged, and then stored in the 6 [SADMBk] [eP] array in order, that is, constructed The comparison table 4. The method as described in item 1 of the scope of patent application, wherein the target code bit count Bτ of the current picture is estimated according to the following formula: R «M ··· Λ F, where Δ is according to the following Formula calculation: 2 * W ——, W > Z · M Δ = F W- ZZ · M, others, where ζ is set to · 1, D-ΙΪ / Ρ, 〇), D means before When encoding a picture, the actual number of bits used refers to the fullness of the previous picture buffer, and refers to the channel bit rate, and F refers to the picture bit rate. 5. The method described in item i of the scope of patent application, wherein the number of bits allocated to the non-compensable k-th MB is calculated according to the following formula: bkz SAD prepared female N Σ SAD MBk k = l (Please read first Note on the back, please fill in this page again) Order --------- Line · Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, where the total number of bits allocated to non-compensable MB by the representative, SAD Satoshi It represents the SAD of the first MB, and N represents the total number of non-compensable MBs in the picture. 6. The method described in item 5 of the scope of patent application, which is estimated using the following formula: Bn Bcode-Bh-intra Nintra —Bh-inter * Ninter 丄 where represents the total number of bits allocated to the non-compensable MB; Represents the number of header bits for internal coding. Ma " is the number of header bits required to represent one mb of the parent's mutual encoding; Li · 7 ^ represents the remaining MB number for internal encoding; iv ^ r refers to the need to interactively edit 569625 A8 B8 C8 D8 6. Remainder of patent application scope code] MB _ stomach. , 7 The method as described in item 6 of the scope of the patent application, where Fan Ru, and I " Gamma system can be obtained by iterative calculation with the following formula: Bh-L · jl Q_1) + b h-intra. N Winter = — (Bh4nter * (j ^ l) + ^ inter. 'The center_ represents the average header bits of ^ obtained by using ... MBs (the first MB to the jth MB) as the internal encoding] The number represents the number of header bits used by the j-th MB to use internal encoding. Knowing * represents the average header bits obtained by using the number of MBs (the first MB to the j-th MB) as the interactive encoding. The number of bits represents the number of bits in the header of the j-th MB using interactive encoding. 8. The method described in item 6 of the scope of the patent application, in which the total number of bits that can be used for the non-compensable MB is estimated. Calculated according to the following formula: (Please read the notes on the back before filling out this page) GOBH Printed Bcode Βτ-Buncode-ΒρΗ-B by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, where w is the position of the screen header Yuan count, tolerance is a bit count representing the head of a picture gob. 9. The method described in item 8 of the scope of patent application The number of data bits in one of the pictures that is not in this article can be calculated according to the following formula: Μ ^ uncode- Σ (Bq〇D y Bc〇D + BmCBPC ^ BcBPV ^ BmVD f ^ MVDy〇) m = l 16 This paper size applies to China National Standard (CNS) A4 (210 x 297 mm) 569625 A8 B8 C8 經濟部智慧財產局員工消費合作社印製 ^、、申睛專利範圍 ’其中1^係代表一畫面中MB之總數;(X,Y,Z,0)係代表依編碼模式於X,γ,乙 及〇中選擇一項,其中X,γ係對應於可補償型,z係對應於不可補償型之交互 編碼’ 0係對應於不可補償型之內部編碼,^係代表C〇D訊號之位元數, 係代表MCBPC訊號之位元數,系代表CBPY訊號之位元數, Am)係代袠MVD訊號之位元數。 、如申請專利範圍第1項所述之方法,其中對於每一個輸入MB,利用 其SAD値及該分配位元數^,查找該動態位元率對照表,使得以與付似乃胃】 [2乃間之差異値最小,此時所對應之量化參數ρρ即最佳之量化參數値, 調整0Ρ*値,使其與前一 MB之値相差不大於2,並將其記錄於Ζ)2Κ4ΑΤ 中。 11、 如申請專利範圍第1項所述之方法,其中當前MB之實際編碼位元 計數~’係被用來更新對照表中之編碼位元數,動態位元率對照表中每一量化參 數之編碼位元預估數,係依下列公式予以更新: 更新之預估編碼位元數=6[SADMBk] [βΡ] +圳SADMBk】 ,其中圳SADMBk】係一維之移位陣列(shift array),此陣列之大小爲1 x SADmax,即每一個SAD對應一個移位陣列元素,圳SADMBk]係依下列公式, 予以更新: s6[SADMBk】[0户】=圳SAD]\iBk]+(〜^[SADMBkn^3]-圳SAD]MBk])/2 0 12、 如申請專利範圍第1項所述之方法,其中若處理係發生在一 GOB開 始時,將依下列步驟計算出畫面量化參數或區塊群量化參 若GOB中沒有不可補償型MB,即設定爲1至31範圍內之任 一整數; 若GOB中存在一個不可補償型MB,即設定; 若GOB中至少存在二個不可補償型MB ,則將依下列公式設 定: QPi + 2 if QP^QP!>L DQUANT= Pi if -h<QP2-QPi<l^ 17 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) ^ --------訂---------線· (請先閱讀背面之注意事項再填寫本頁) 569625 A8 B8 C8 D8 六、申請專利範圍 QP广 2 if QP2-QP1 < - L 其中L係一正整數,內定値爲L=5。 (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 18 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐)Printed by the Intellectual Property Bureau of the Ministry of Economic Affairs, Consumer Cooperatives, ^, and Shen Jing Patent Scope, where 1 ^ represents the total number of MB in a picture; (X, Y, Z, 0) represents X, γ, B according to the coding mode. And 〇, where X and γ correspond to the compensable type, z corresponds to the non-compensable interactive code '0 corresponds to the non-compensable internal code, and ^ represents the bit of the COD signal The number is the number of bits representing the MCBPC signal, the number of bits representing the CBPY signal, and the number of bits representing the MVD signal. The method as described in item 1 of the scope of patent application, wherein, for each input MB, using its SAD 値 and the number of allocated bits ^, look up the dynamic bit rate comparison table so that it is similar to Fusinaiwei] The difference between 2 is the smallest. At this time, the corresponding quantization parameter ρρ is the best quantization parameter. Adjust OP * so that the difference from the previous MB is not greater than 2 and record it in Z) 2Κ4ΑΤ in. 11. The method described in item 1 of the scope of patent application, wherein the actual encoding bit count of the current MB ~ 'is used to update the number of encoding bits in the lookup table, and each quantization parameter in the dynamic bit rate lookup table The estimated number of coding bits is updated according to the following formula: The updated estimated number of coding bits = 6 [SADMBk] [βΡ] + Shenzhen SADMBk], where Shenzhen SADMBk] is a one-dimensional shift array ), The size of this array is 1 x SADmax, that is, each SAD corresponds to a shift array element, and SADMBk] is updated according to the following formula: s6 [SADMBk] [0 户] = zhenSAD] \ iBk] + ( ~ ^ [SADMBkn ^ 3] -ZhenSAD] MBk]) / 2 0 12. The method described in item 1 of the scope of patent application, wherein if the processing occurs at the beginning of a GOB, the picture quantization will be calculated according to the following steps If there is no non-compensable MB in the GOB, it is set to any integer in the range of 1 to 31. If there is an uncompensable MB in the GOB, it is set; if there are at least two non-compensable MBs in the GOB, Compensation MB will be set according to the following formula: QPi + 2 if QP ^ QP! ≫ L DQUANT = Pi if -h < QP2-QPi < l ^ 17 This paper size applies to China National Standard (CNS) A4 (210 x 297 mm) ^ -------- Order --------- Line · (Please read the precautions on the back before filling this page) 569625 A8 B8 C8 D8 VI. Patent application scope QP2 2 if QP2-QP1 <-L where L is a positive integer and the default value is L = 5. (Please read the precautions on the back before filling out this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 18 This paper size applies to China National Standard (CNS) A4 (210 X 297 mm)
TW90128890A 2001-11-22 2001-11-22 Bit rate control method of low delay video signal by using dynamic rate table TW569625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW90128890A TW569625B (en) 2001-11-22 2001-11-22 Bit rate control method of low delay video signal by using dynamic rate table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW90128890A TW569625B (en) 2001-11-22 2001-11-22 Bit rate control method of low delay video signal by using dynamic rate table

Publications (1)

Publication Number Publication Date
TW569625B true TW569625B (en) 2004-01-01

Family

ID=32590191

Family Applications (1)

Application Number Title Priority Date Filing Date
TW90128890A TW569625B (en) 2001-11-22 2001-11-22 Bit rate control method of low delay video signal by using dynamic rate table

Country Status (1)

Country Link
TW (1) TW569625B (en)

Similar Documents

Publication Publication Date Title
CN103402099B (en) The method and system that the picture-level rate of Video coding controls
JP5180294B2 (en) Buffer-based rate control that utilizes frame complexity, buffer level, and intra-frame location in video encoding
JP5351040B2 (en) Improved video rate control for video coding standards
TW404132B (en) A real-time single pass variable bit rate control strategy and encoder
TW404137B (en) Method and apparatus for adaptively encoding an information stream
JP5173409B2 (en) Encoding device and moving image recording system provided with encoding device
CN110740318A (en) Automatic adaptive long-term reference frame selection for video processing and video coding
WO2004010702A1 (en) A bit-rate control method and device combined with rate-distortion optimization
EP2067358A2 (en) Method for rho-domain frame level bit allocation for effective rate control and enhanced video coding quality
TW571589B (en) Method of performing video encoding rate control using bit budget
JP4221655B2 (en) Encoding apparatus, encoding method, program, and recording medium
US7826529B2 (en) H.263/MPEG video encoder for efficiently controlling bit rates and method of controlling the same
JP2015533461A (en) Optimization techniques including rate distortion optimizer and simultaneous optimization of multiple color components
JP2024514348A (en) Video encoding methods, equipment and electronic equipment
JP3846424B2 (en) Image signal quantization apparatus and method
JP5087624B2 (en) Method and apparatus for analytical and experimental hybrid coding distortion modeling
Lei et al. Accurate bit allocation and rate control for DCT domain video transcoding
Esmaeeli et al. A content-based intra rate-distortion model for HEVC-SCC
TW569625B (en) Bit rate control method of low delay video signal by using dynamic rate table
JP2004040811A (en) Method and apparatus for controlling amount of dct computation performed to encode motion image
AU2011265659B2 (en) Video rate control based on transform-coefficients histogram
Zhang et al. A two-pass rate control algorithm for H. 264/AVC high definition video coding
Tsai Rate control for low-delay video using a dynamic rate table
Chen et al. Encoder Control Enhancement in HEVC Based on R-Lambda Coefficient Distribution
JP4186544B2 (en) Encoding apparatus, encoding method, program, and recording medium

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent