1293172 九、發明說明: - 【發明所屬之技術領域】 , 本發明乂供一種儲存資料的機制,尤指一種最佳化資料緩衝 的方法、裝置與系統。 【先前技術】 體積小、重量輕、儲存密度高而又成本低廉的光碟片, _ 已成為最普及的非揮發性儲存媒體之一。高倍速光碟燒錄 器作為資料儲存時,緩衝區資料不足(BufferunderRun) 疋一個很關鍵的問題,簡單的說,缓衝區資料不足的發生 原因就是因為資料源無法供應足夠的資料來滿足光碟機在 高速下燒錄一光碟片之所需。 X 數位視 A 燒錄器(digitai vide〇 ree〇r(jer,dvr )為例, φ 在光碟片上燒錄影像資料時,通常燒錄影像資料的速 度疋固疋的’而且DVD燒錄器的寫入速度通常大於資料 產生的速度,在這錄況下,—但謂燒㈣將緩衝區 中所有的資料寫入一光碟片之後,該緩衝區便會清空,此 B夺DVD &錄n便會開始—連結程序來記錄下—筆儲存在 該缓衝區的:貝料。在資料燒錄的過程中,較少的連結點可 以得到較好的燒錄品質,因此,需要一種新的方法來減少 所產生之連結點的數目以相⑽燒錄的最佳化。 1293172 【發明内容】 . 因此,本發明之主要目的即在於提供一種方法、裝置 與系統,其藉由轉送儲存在第一緩衝器以及第二緩衝器的 資料以及當儲存在該第一緩衝器以及該第二緩衝器之資料 之一全部總量達到一特定臨界值時,驅動第一緩衝器輸出 儲存在其中的資料來達到最佳化的資料缓衝,以解決上述 之問題。 根據本發明一實施例’其揭露一^種用來在一第.一緩衝 器以及一第二緩衝器内儲存資料之方法,該方法包含有: 根據一第一臨界值來依序將一輸入資料儲存到該第一缓衝 器以及該第二緩衝器;當儲存在該第二緩衝器之資料之一 總量達到一第二臨界值時,將儲存在該第二緩衝器之資料 轉送到該第一緩衝器;以及在接收從該第二缓衝器所轉送 Φ 之資料後,當儲存在該第一緩衝器之資料之一總量超過該 第一臨界值時,驅動該第一緩衝器輸出其所儲存之資料。 、 根據本發明另一實施例揭露一種用來在一第一緩衝器 以及一第二緩衝器内儲存資料之裝置,該裝置包含有··一 資料儲存控制單元,耦接到該第一緩衝器以及該第二緩衝 器,用來根據一第一臨界值控制一輸入資料儲存到該第一 ' 緩衝器以及該第二緩衝器;以及一資料轉送控制單元,耦 ^ 接到該第一緩衝器以及該第二緩衝器,用來於儲存在該第 1293172 臨界值時,控制_ 緩衝器;以及在接收 儲存在該第一緩衝器 ,驅動該第一緩衝器 二緩衝器之資料之一總量達到一第二 在該第二緩衝器之資料轉送到該第一 從該第二緩衝器所轉送之資料後,當 之資料之一總量超過該第一臨界值時 輸出儲存在其中之資料。 根:月另—實施例揭露一種具有資料緩衝功能之 系,、充,包3有.一第一緩衝器;一第二一 資料產生裝置,用來產生一輸入資料;—資料^多媒體 置,麵接到該多媒體資料產生裝置 料^衝控制裝 單元’為接到該第-緩街器以及 以】;=:輸人資料儲存到該第-緩衝器 及該第―㈣,—資料轉送控制單元,_到該第一 緩衝器以及該第二緩衝器筮. 之資料轉酬該第存在該第二緩衝器 讀15以及在接收從該第二緩衝器 、貝;、〗,當儲存在該第一緩衝器之資料之一總量 超過該第-臨界值時,驅動該第一緩衝器輸出儲存在:中 之資料’·以及-光餘存襄置,麵接到該第一緩衝器,用來 燒錄從該第—緩衝器輸出之資料到-光碟片上。 根據本發明另—實施例揭露—種在—第—緩衝器以及 -第二缓=⑽存資料之方法,财法包含有··依序儲 存-輸入貝料到該第_緩衝器以及該第二緩衝器;以及當 •1293172 二:在4帛、第—緩衝器之資料之—全部總量達到一特 =臨,值時’將儲存在該第二緩衝器之資料轉送到該第一 緩衝盗’以及驅動該第—緩衝器輸出其所儲存之資料。 、根據本發明另一實施例揭露一種用來在一第—緩衝器 ^及第—緩衝器内儲存資料之裝置,該裝置包含有:一 =料儲存控制單疋,搞接到該第—緩衝器以及該第二緩衝 器/,用來根據一第一臨界值控制一輸入資料儲存到該第-緩衝器以及該第二緩衝器;以及一資料轉送控制單元,搞 接到該第一緩衝器以及該第二緩衝器,用來於儲存在該第 -、第二緩衝之資料之—全部總量達到—肢臨界值時, 控制儲存在該第一緩衝器之資料轉送到該第一緩衝器,以 及驅動該第一緩衝器輸出其所儲存之資料。 根據本發月另一實施例揭露一種具有資料緩衝功能之 Ϊ統’包含有:一第-緩衝器;-第二緩衝器,·一多媒體 資料產生裝置,用來產砝―认 番.生一輪入-貝料;一資料緩衝控制裝 勺人Ί媒體貝料產生裝置,該資料緩衝控制裝置 ==料儲存控制單元,接到該第-緩衝器以及 緩衝器用來控制該輸入資料儲存到該第一緩衝器 以及α亥第-緩衝§,—資料轉送控制單元,輕接到該第一 緩衝器以及該第二緩衝器,用來控制儲存在該第二緩衝器 之^料轉送到该第一緩衝器,以及在接收從該第二緩衝器 .1293172 所轉送之資料後,#儲存在該第―、第二緩衝 光碟片上 一全部總4達到—蚊臨界值時,驅動該第-緩衝^輪= 其所儲存之資料;以及4儲存裝置,㈣到該第^ 益’用來燒錄從該第-緩衝器輸出之資料卩 ’’衝 實施方式】 請參閱第1圖,第i圖為根據本發明一實 在第一緩衝器1〇2以及第二緩衝器104内儲存來 緩衝控制褒置100的功能方塊圖。資枓緩衝控制:料 包含資料儲存控制單元110、資料轉送控制單元1如以0 臨界值供應器130,其中臨界值供應器⑽用來提供j 一臨界值予第一緩衝器102以及一第二臨界值予第二緩衝 器104,而資料儲存控制單元110用來依序儲存一輸入資' 料Din到第一緩衝器1〇2以及第二緩衝器1〇4。在本實施例中、, 資料儲存控制單元11〇先將輸入資料Din儲存到第一緩衝器 102 ’直到儲存在第一緩衝器102内的資料總量達到該第一臨界 值’然後便繼續將輸入資料Din儲存到第二緩衝器1〇4,而當餘 存到第一緩衝器102以及第二緩衝器104之資料之一總量達到〜 特定臨界值時,也就是該第一、第二臨界值都達到時,資料轉送 控制單元120便開始將儲存在第二緩衝器104之資料轉送 到第一緩衝器102以及驅動第一緩衝器102輸出其所儲存 的資料,如此一來,資料緩衝的效能是最佳化的。請注意, 第一緩衝器102的資料輸出速度可以是不同於第二緩衝器 •1293172 104的資料輸入速度。 請同時參閱第2圖以及第丨圖’第2圖為資料緩衝控制裝置励 用來在第緩衝器102以及第二緩衝器1〇4内儲存資料之 一方法的流程圖。此一資料緩衝方法簡述如下: 步驟200 :開始„ 步驟210 :決定一特定臨界值。臨界值供應器130提供第一臨界值 給第-緩衝器102以及第二臨界值給第二緩衝器静 步驟22〇:儲存輸入資料到第一緩衝$ 1〇2。資料储存控制單元爪 首先儲存輸入資料Din到苐一緩衝器1〇2。 步驟225:儲存在第—緩衝器糾的資料總量是否達到該第一臨 界值?如果是,跳到步驟230,否則,跳到步驟22〇來 繼續將資料緩衝於第一緩衝器102令。 步驟230 ··儲存該輸入資料到第二緩衝器1〇4。資/觸存控制單元1 在將輸入資料%儲存到第二緩衝器1〇4而 ""235 : :::!:""104 果疋,跳到步驟240’否則 續將資料緩衝於第二緩衝器⑽中。_來繼 步驟240 :將儲存在第二緩衝器1〇4之資料轉送 以及驅動第-緩衝器1〇2輸出儲存—^謂 個步驟是由資料轉送控制單元料加料。這 步驟250 ··結束。 々从控制。 1293172 =錯存控制單元110在第一緩衝$ i及 時ΐ=Γ 峨4她_術臨界值 寻貝科轉运控制單元120彳會啟動資料的轉送。 1 s ’$2a®_緩衝控制裝置 用來在第-緩衝器102以及第二緩衝器104内儲存資料 之另-方法的流程圖。此一資料緩衝方法簡述如下: 步驟2300··開始。 步驟亂·儲存輸入資料到第一緩衝器1〇2。資料儲存控制單元 110百先儲存輸人資料Din到第一緩衝器1〇2。 步驟删:儲存該輸入簡到第二緩衝請。資料儲存控制單 疋no接而儲存輸入資料Din到第二緩衝m 步驟2335 : f存在第一緩衝器102以及第二緩衝器ω4中的全部 資料總量是否達到一第三臨界值?如果是,跳到步驟 否則跳到步驟2320或步驟2330以繼續將資 料緩衝於第—緩衝器1〇2或第二緩衝器1〇4。、 步驟2340 :將儲存在第二緩衝器刚之資料 ,資料轉送㈣單元卿儲存在t:: 之貝料轉送到第一緩衝器102。 步驟2345:儲存在第一緩衝器1〇2的資料總量是否達到一第四臨 界值?如果是,跳到步驟2350,否則,桃到步驟234〇 12 1293172 以繼續將資料緩衝於第一緩衝器1〇2。 4 2350·輪出第—緩衝器1()2中所儲存的資料。資料轉送控制 步驟咖驅動第—緩衝輸㈣存在其中之資料。 資^儲存控制單元110在第一緩衝器1〇2以及第二缓衝器ι〇4 =存所接收的輸入資料Din,以及只有在當第一緩衝器1〇2以 4^衝器1〇4所儲存的全部資料總和達到該第三臨界值時, ^第2制單元120才會將儲存在第二緩衝器1〇4之資料轉送 i 4的一2請。綱,域第—咖收⑽第二緩衝器 =_和已達到該第三臨界值,而儲存在第一緩衝器 會=送控制單元⑽並不 緩衝器__在其中的資料,在此情況下,資 帛緩衝B W之麵送到 值,此時,-貝料轉送控制單元12 儲存在其中之資料。 才^動第-緩衝器!〇2輸出 ▲ ,条_請巾簡#物細送出去之 刖,因為第一、第二緩衝器1〇2、1〇4均用 一 所以便可提升資料緩衝的效能,此外,t的功能’ 置=可喊倾轉龍、_舰邮置 視訊燒錄器可以利用本發明所揭露的資料緩衝震置來改進 13 1293172 寅料燒錄效能。 請參閱第3圖,第3圖為根據本發明一實施例之資料 緩衝系統300的功能方塊圖。資料緩衝系統_利用上述 第1圖中的資料緩衝裝置1〇〇以及具有增進資料緩衝效能 的優點。如第3圖所示,資料緩衝系統300包含第—緩= 器310、第二缓衝器320、資料緩衝控制襞置33〇、多媒體 資料產生裝置340以及光儲存裝置35〇。此外,資料緩衝 控制裝置330包含資料儲存控制單元331、資料轉送控制 單元332以及臨界值供應器333,其中臨界值供應器 係用來提供一第一臨界值予第一緩衝器31〇以及二第二臨 界值予第二緩衝器320,在本實施例中,輸人資料咖,:由 多媒體資料產生裝置340所產生,例如,如果多媒體資料 =生裝置340包含一影像擷取裝置,則輪入資料Din,可能包 3影像資料的一部份;以及如果多媒體資料產生裝置34〇包含 麥克風,則輸入資料Din’可能包含音訊資料的一部份。當儲 存在第-緩衝器31G以及第二緩衝器32G的資料總量到達一^定 臨界值時,資料轉送控制單元332開始將餘存在第二緩衝器 0之資料轉送到第-緩衝器31〇以及驅動第一緩衝器31〇 ,出其所儲存的資料到光儲存裝£ 35G (例如一讎燒錄 最後,光儲存裝置35便在一光碟片上燒錄第一緩衝 10所輸出的資料’請注意,第一緩衝器3⑺的資料輸 迷度是不同於第二緩衝器320的資料輪入速度。 1293172 如第3圖所示,第-緩_ 310以及第二緩衝器32〇是設置 在多媒體資料產生裝置340以及光儲存裝置35(^外的元 件,然而,此僅作為本發明的範例說明,在其他實施例中, 第一緩衝器310可以整合在光儲存裝置35〇之内,以及第二緩 衝器320可以整合在多媒體資料產生裝置34〇之内換句話 說,資料緩衝控制裝置330會控制崁入在光儲存裝置35Q 内之第一緩衝器310以及崁入在多媒體資料產生裝置34〇内之 第二緩衝器320之間的資料緩衝來得到資料緩衝的最佳效能均 屬本發明之範疇。 靖參閱第4圖’第4圖為資料緩衝控制系統2〇〇用來在第一 緩衝器310以及第二緩衝器320内儲存資料之方法的流程 圖。此一資料緩衝方法簡述如下: 步驟400 :開始。 步驟420 ·決疋一特疋界值。臨界值供應器根據多媒體資 料產生裝置340所產生之影像的品質來決定一特 定臨界值,並提供一第一臨界值給第一緩衝器以 及一第二臨界值給第二缓衝器320。 步驟430 ··儲存輸入資料到第一緩衝器31 〇。資料儲存控制單元33 j 首先將輸入資料Din’儲存到第一緩衝器31〇。 步驟435·儲存在第一緩衝器310的資料總量是否達到該第一臨界 值?如果是,跳到步驟440,否則,跳到步驟430來繼 1293172 續將資料緩衝於第一緩衝器310中。 步驟440 :儲存該輸入資料到第二緩衝器32〇。資料儲存控制單元 331現在將輸入資料%,儲存到第二緩衝器綱 一緩衝器102。 步雜:館存在第二緩衝請的資料總量是否達到該第二臨界 值?如果疋,跳到步驟45〇,否則,跳到步驟_來繼 續將資料緩衝於第二緩衝器32〇。 步驟· ••將儲存在第二緩衝㈣之資料轉送到第—緩衝器31〇 以及驅動第-緩衝器31〇輸出儲存在其中之資料。資 料轉送控制單元332會被啟動來開始將儲存在第二 緩衝益320之資料轉送到第一緩衝器以及驅 ,【一緩衝器310輸出儲存在其中之資料到光儲 存裝置350。 步驟460 ··燒錄第一, 一故魅31G所輸出的資料。光儲存裝置350 f光碟片上燒錄第一緩衝器310所輸出的資料。 步驟465:資料燒錄是否終止?如果是,跳到步_,否則,跳 到步驟430。 步驟470 :結束。 請參閱第知圖’第如圖為資料緩衝控制系統200用來在第 一_器310以及第二緩衝器咖内館存資料之另一方法 的k程圖。此-資料緩衝方法簡述如下: 16 ,1293172 步驟500 :開始。 步驟53〇:儲存輸入資料到第-緩衝$310。資料財控制單元别 首先儲存輸入資料Din,到第一緩衝器31〇中。1293172 IX. Description of the invention: - [Technical field to which the invention pertains] The present invention provides a mechanism for storing data, and more particularly to a method, apparatus and system for optimizing data buffering. [Prior Art] Optical discs, which are small in size, light in weight, high in storage density, and low in cost, have become one of the most popular non-volatile storage media. When the high-speed disc burner is stored as a data, the buffer data is insufficient (BufferunderRun). A key problem is that the buffer data is insufficient because the data source cannot supply enough data to satisfy the disc player. The need to burn a disc at high speed. X digital view A burner (digitai vide〇ree〇r (jer, dvr) as an example, φ when burning video data on a disc, usually burns the speed of the image data 疋 疋 ' and the DVD burner The write speed is usually greater than the speed at which the data is generated. In this case, if the burn (4) writes all the data in the buffer to a disc, the buffer will be cleared, and the B will be DVD & It will start - the link program is recorded - the pen is stored in the buffer: the shell material. In the process of data burning, fewer joint points can get better burning quality, therefore, a new kind is needed. The method is to reduce the number of generated joints to optimize the phase (10) burn. 1293172 [The present invention] Accordingly, it is a primary object of the present invention to provide a method, apparatus and system for transfer by storage Data of a buffer and a second buffer and when the total amount of data stored in the first buffer and the second buffer reaches a certain threshold, driving the first buffer to output the data stored therein To reach Optimized data buffering to solve the above problems. According to an embodiment of the invention, a method for storing data in a first buffer and a second buffer is disclosed, the method comprising Having: storing an input data to the first buffer and the second buffer sequentially according to a first threshold; and when a total amount of data stored in the second buffer reaches a second threshold Transmitting the data stored in the second buffer to the first buffer; and after receiving the data transferred from the second buffer, the data stored in the first buffer is always When the quantity exceeds the first threshold, the first buffer is driven to output the stored data. According to another embodiment of the invention, a method for storing data in a first buffer and a second buffer is disclosed. The device includes a data storage control unit coupled to the first buffer and the second buffer for controlling an input data to be stored in the first buffer according to a first threshold The second buffer And a data transfer control unit coupled to the first buffer and the second buffer for storing the threshold value when the threshold value is 1293172; and storing the first buffer in the receiving , the total amount of data driving the first buffer and the second buffer reaches a second data after the second buffer is transferred to the first data transferred from the second buffer, and the data is When the total amount exceeds the first critical value, the data stored therein is output. Root: Month--the embodiment discloses a system with data buffering function, charging, packet 3, a first buffer, and a second one. The data generating device is configured to generate an input data; the data is multimedia, and the multimedia data generating device is connected to the multimedia device to control the loading unit to receive the first-slower and the device; Storing to the first buffer and the first (four), the data transfer control unit, the data transfer to the first buffer and the second buffer, the first existence of the second buffer read 15 and Receiving from the second buffer When the total amount of data stored in the first buffer exceeds the first threshold, the first buffer is driven to output the data stored in: 'and the optical residual storage device, The surface is connected to the first buffer for burning data outputted from the first buffer to the optical disc. According to another embodiment of the present invention, there is disclosed a method for storing data in a first buffer and a second buffer (10), wherein the financial method includes storing the input material to the first buffer and the first Two buffers; and when • 1123172 2: in the data of the 4th, the first buffer - all the total amount reaches one special = Pro, the value 'transfers the data stored in the second buffer to the first buffer The thief's and drives the first buffer to output the data it stores. According to another embodiment of the present invention, a device for storing data in a first buffer and a first buffer is provided. The device includes: a material storage control unit, which is connected to the first buffer. And the second buffer / is configured to control an input data to be stored in the first buffer and the second buffer according to a first threshold; and a data transfer control unit to connect to the first buffer And the second buffer is configured to control the data stored in the first buffer to be transferred to the first buffer when the total amount of the first and second buffered data reaches the limb threshold And driving the first buffer to output its stored data. According to another embodiment of the present disclosure, a system having a data buffering function includes: a first-buffer; a second buffer, and a multimedia data generating device for producing a 砝- a data buffer control device, a data buffer control device == material storage control unit, connected to the first buffer and a buffer for controlling the input data to be stored in the first a buffer and an alpha-buffering §, a data transfer control unit, lightly coupled to the first buffer and the second buffer for controlling transfer of the data stored in the second buffer to the first The buffer, and after receiving the data transferred from the second buffer .1293172, # stored on the first and second buffered optical discs, all of which reach the mosquito threshold value, drive the first buffering wheel = the data stored in it; and 4 storage devices, (4) to the second "used to burn the data output from the first buffer" 卩 ''burst implementation method> Please refer to Figure 1, the i-picture is based on The present invention is a real first buffer 1 2 and stored in the second buffer 104 to buffer control 100 praise functional block diagram of the counter. The resource buffer control unit 110 includes a data storage control unit 110 and a data transfer control unit 1 such as a zero threshold value provider 130, wherein the threshold value provider (10) is configured to provide a threshold value to the first buffer 102 and a second The threshold value is given to the second buffer 104, and the data storage control unit 110 is configured to sequentially store an input resource Din to the first buffer 1〇2 and the second buffer 1〇4. In this embodiment, the data storage control unit 11 first stores the input data Din into the first buffer 102' until the total amount of data stored in the first buffer 102 reaches the first threshold value, and then continues The input data Din is stored in the second buffer 1〇4, and when the total amount of data remaining in the first buffer 102 and the second buffer 104 reaches a certain threshold value, that is, the first and second When the threshold value is reached, the data transfer control unit 120 starts transferring the data stored in the second buffer 104 to the first buffer 102 and drives the first buffer 102 to output the stored data, so that the data buffer is obtained. The performance is optimized. Please note that the data output speed of the first buffer 102 may be different from the data input speed of the second buffer • 1123172. Please refer to FIG. 2 and FIG. 2 at the same time. FIG. 2 is a flow chart showing a method for the data buffer control device to store data in the first buffer 102 and the second buffer 1-4. This data buffering method is briefly described as follows: Step 200: Start „ Step 210: Determine a specific threshold. The threshold value provider 130 provides a first threshold to the first buffer 102 and a second threshold to the second buffer. Step 22: Store the input data to the first buffer $1〇2. The data storage control unit claw first stores the input data Din to the first buffer 1〇2. Step 225: Is the total amount of data stored in the first buffer corrected? The first threshold is reached? If yes, go to step 230, otherwise, go to step 22〇 to continue buffering the data to the first buffer 102. Step 230 • Store the input data to the second buffer 1〇 4. The capital/touch control unit 1 stores the input data % to the second buffer 1〇4 and ""235 : ::::""104, skip to step 240' or continue The data is buffered in the second buffer (10). Following step 240: transferring the data stored in the second buffer 1〇4 and driving the first buffer 1〇2 to output the storage-^ step by data transfer The control unit feeds. This step 250 ·· ends. 々 From the control 1293172 = the error control unit 110 in the first buffer $ i in time ΐ = Γ 她 4 her _ threshold value search for the Becco transport control unit 120 彳 will initiate the transfer of data. 1 s '$2a®_ buffer A flow chart of another method for storing data in the first buffer 102 and the second buffer 104. This data buffering method is briefly described as follows: Step 2300··Start. Step chaos • Store input data to A buffer 1〇2. The data storage control unit 110 first stores the input data Din to the first buffer 1〇2. Step delete: store the input to the second buffer. The data storage control unit 接no is stored. Input data Din to the second buffer m. Step 2335: f Is there a total amount of data in the first buffer 102 and the second buffer ω4 that reaches a third threshold? If yes, skip to step or skip to step 2320 or Step 2330, to continue buffering the data in the first buffer 1〇2 or the second buffer 1〇4. Step 2340: storing the data stored in the second buffer, and transferring the data to the unit (4), storing the data in t:: The material is transferred to the first buffer 102. 2345: Is the total amount of data stored in the first buffer 1〇2 reaching a fourth threshold? If yes, skip to step 2350, otherwise, go to step 234〇12 1293172 to continue buffering the data in the first buffer. 1〇2. 4 2350·Rotate the data stored in the first buffer 1() 2. The data transfer control step coffee drives the first buffered data (4) in which the data exists. The storage control unit 110 is in the first buffer. 1〇2 and the second buffer ι〇4=store the received input data Din, and only the sum of all the data stored in the first buffer 1〇2 by the buffer 1〇4 reaches the third At the critical value, ^2 unit 120 will transfer the data stored in the second buffer 1〇4 to the 2nd of the 4th. The first, the domain - the third (buffer) of the second buffer = _ and has reached the third threshold, and stored in the first buffer = the control unit (10) does not buffer __ in it, in this case Next, the face of the asset buffer BW is sent to the value, and at this time, the material to be stored in the bedding transfer control unit 12 is stored therein. Only move the first - buffer! 〇2 output ▲, strip _ please towel Jane #物细送出刖, because the first and second buffers 1〇2, 1〇4 are used one can improve the performance of the data buffer, in addition, the function of t 'Setting = Shouting Dragon, _ Ship Post Video Recorder can use the data buffer shock disclosed in the present invention to improve the 13 1293172 data burning performance. Please refer to FIG. 3, which is a functional block diagram of a data buffer system 300 in accordance with an embodiment of the present invention. The data buffering system _ utilizes the data buffering device 1 of the above Fig. 1 and has the advantage of improving data buffering efficiency. As shown in Fig. 3, the data buffer system 300 includes a first buffer 310, a second buffer 320, a data buffer control unit 33, a multimedia data generating device 340, and an optical storage device 35A. In addition, the data buffer control device 330 includes a data storage control unit 331, a data transfer control unit 332, and a threshold value provider 333, wherein the threshold value provider is configured to provide a first threshold value to the first buffer 31 and the second The second threshold value is applied to the second buffer 320. In the embodiment, the input data is generated by the multimedia data generating device 340. For example, if the multimedia data=the living device 340 includes an image capturing device, the wheel is inserted. The data Din may include a portion of the image data; and if the multimedia data generating device 34 includes a microphone, the input data Din' may contain a portion of the audio material. When the total amount of data stored in the first buffer 31G and the second buffer 32G reaches a certain threshold value, the material transfer control unit 332 starts transferring the data remaining in the second buffer 0 to the first buffer 31. And driving the first buffer 31 〇 to output the stored data to the optical storage device 35 35 (for example, at the end of the burning, the optical storage device 35 burns the data output by the first buffer 10 on a CD-ROM] Note that the data input density of the first buffer 3 (7) is different from the data rounding speed of the second buffer 320. 1293172 As shown in Fig. 3, the first buffer _ 310 and the second buffer 32 〇 are set in the multimedia The data generating device 340 and the optical storage device 35 are external components. However, this is only an example of the present invention. In other embodiments, the first buffer 310 may be integrated into the optical storage device 35, and The second buffer 320 can be integrated in the multimedia material generating device 34. In other words, the data buffer control device 330 controls the first buffer 310 that is inserted into the optical storage device 35Q and the multimedia data generating device 3 It is within the scope of the present invention to obtain the best performance of data buffering between the data buffers in the second buffer 320. The reference to Fig. 4 is shown in Fig. 4 as the data buffer control system. A flowchart of a method for storing data in a buffer 310 and a second buffer 320. This data buffering method is briefly described as follows: Step 400: Start. Step 420: Determine a special threshold value. The threshold value provider is based on multimedia. The quality of the image generated by the data generating device 340 determines a specific threshold and provides a first threshold to the first buffer and a second threshold to the second buffer 320. Step 430 ··Store input data Go to the first buffer 31. The data storage control unit 33j first stores the input data Din' to the first buffer 31. Step 435: Whether the total amount of data stored in the first buffer 310 reaches the first threshold If yes, go to step 440, otherwise, go to step 430 to continue buffering the data in the first buffer 310 following 1293172. Step 440: Store the input data to the second buffer 32. Data storage control The element 331 now stores the input data % to the second buffer class buffer 102. Step: Does the library have the second buffer to request the total amount of data to reach the second threshold? If so, skip to step 45, Otherwise, skip to step _ to continue buffering the data in the second buffer 32. Steps • • Transfer the data stored in the second buffer (4) to the first buffer 31〇 and drive the first buffer 31 to output the storage. In the data therein, the data transfer control unit 332 is activated to start transferring the data stored in the second buffer 320 to the first buffer and the drive, [a buffer 310 outputs the data stored therein to the optical storage device 350. . Step 460 ·· Burning the first, the data output by a fascinating 31G. The optical storage device 350 f burns the data output by the first buffer 310 on the optical disc. Step 465: Is the data burning terminated? If yes, skip to step_, otherwise, skip to step 430. Step 470: End. Please refer to the figure of the figure. The figure is a k-way diagram of another method for storing data in the first buffer 310 and the second buffer. This - data buffering method is briefly described as follows: 16, 1293172 Step 500: Start. Step 53: Store the input data to the first buffer $310. The data control unit first stores the input data Din to the first buffer 31〇.
步驟540:儲存該輸入資料到第二缓衝器320。資料儲存控制單元 331接而在儲存輸入資料Din,到第二緩衝器3如中。 步驟545 :儲存在第一緩衝器31〇以及第二緩衝器320的全部資料 總量是否達到-第三臨界值?如果是,跳到步驟55〇, 否則,跳到步驟530或步驟54〇以繼續將資料緩衝至 第一緩衝器310或第二缓衝器320。 ^驟550將儲存在第二緩衝g 320之資料轉送到第一緩衝器 31〇。資料轉送控制單元332將儲存在第二緩衝器32〇 之資料轉送到第一緩衝器310。 步驟555·•轉存在第一緩衝$ 310的資料總量是否達到一第四臨界 值?如果是,跳到步驟560,否則,跳到步驟550以繼 續將資料緩衝至第一緩衝器31〇。 步驟560·輸出儲存在第一緩衝器細中的資料。資料轉送控制單 几332驅動第一緩衝器31〇輸出其所儲存的資料。 步驟570 :燒錄第一緩衝器31〇所輸出的資料。光儲存裝置35〇 在一光碟片上燒錄第一緩衝器31〇所輸出的資 料0 々驟575 ·貝料燒錄是否終止?如果是,跳到步驟·,否則,跳 到步驟530或步驟540。 步驟580 :結束。 1293172 熟知此項技藝之人士應可了解,光儲存裝置350的資 料燒錄速度是遠快於多媒體資料產生裝置340的資料產生 速度’所以’目前所緩衝之資料的資料燒錄流程會在一極 短的期間内完成,在本實施例中,於光儲存裝置350開始 貝料燒錄流程之前時,第一緩衝器31〇以及第二緩衝器32〇都 用來作為資料緩衝之用,如此一來,連結點的數目便可以減少, @而S之’本實施例係揭露最佳化第-緩衝H 31G以及第二緩衝 器320的使用來減少連結點的數目。 .請參閱第5圖’第5圖為第3圖所示之第-緩衝n 310以及 第-緩衝器32〇的資料緩衝狀態示意圖。臨界值供應器333分 別提供第一臨界值ΤΗι以及第二臨界質τΗ2給第一緩衝器 、第緩衝器320,一開始時,多媒體資料產生裝置340 在時間T0時產生輸入資料胞,,然後,資料儲存控制單 兀331便將接收到的輸入資料Din,緩衝到第-緩衝器31〇 時’緩衝到第一緩衝器31°的資料總量到達 二的,此時,資料儲存控制單元331便將所接 收到的翰入身料mi f > ^ 緩衝到第一緩衝器320,請注竟,緣 衝到第一緩衝器31 〇的杳祖她曰 ^ ' ,所以:化 還沒有超過第一臨界值 TH1所以貝料轉送控制單分、吾 如第5圖所- 還不會啟動讓資料寫入。 如第5圖所不,在時間 料總量到達第二臨界值TH2,秋u二緩衝器320的資 繼續緩衝輸入資料Din,,緩衝到、第而,如果第二緩衝請 、、、衝丨苐〜緩衝器320的資料總 1293172 量在時間τ2時將超過第二臨界值鲁以及雜轉送控制單 兀332便會因此啟動來將储存在第二緩衝器㈣料 到第-緩衝器310,很明顯的,在接收到從第二緩衝器咖 輸出的資料後,緩衝到第一緩衡器3 i 〇的資料總量亦會在 時間T2時超過第-臨界值Tm,相似地,資料轉送 332便開始將儲存在第-緩衝器则的資料轉送到光財子裝 置350,所以,資料燒錄流程便在時間Τ2時開始 =存裝置350會在-光碟片上燒錄第一緩衝器31〇輸出= 資料。 如第5圖所示,第二緩卿32〇在時間&時被清空 外’緩衝到第-緩衝器310的資料總量也開始減少,以 緩衝器3iG會在時間Τ4時被清心因為沒有資料繼續緩 馬到第-緩衝S 310,所以資料燒錄流程在時間A時會 =及光儲存裝置350緊跟著會產生—連結點,如上所述,’ =存M35G的資料燒錄速度是遠快於多媒體資料產生 置3奶的資料產生速度,因此,在時間了5時,光儲存襄 資料^停止㈣燒錄’多媒體資料產生裝置34G產生輸二 資料:,’以及資料儲存控制單元331緩衝接收到的輸入 "in到目前空置的第一緩衝器310。 如第5圖所示’在第二緩衝器32()中填滿 ,值之前,f 一緩衝器310會先填滿到第—臨界值,: 1293172 只有在第一緩衝器310以及第二緩衝器320都各自填滿資 料達到各自的臨界值之後,資料燒錄流程才會啟動,所以, 每一次資料燒錄期間内,燒錄資料的總量遠大於習知技術的方 法,因為第一緩衝器310以及第二緩衝器320都充分利用到,所 以連結點的數目便可以減少以及整體資料燒錄效能便可以大幅地 增進。 請注意,多媒體資料的品質(例如,HQ, SP,LP,EP,SLP, SEP)會決定資料產生速度,也就是,第二緩衝器32〇的輸 入資料速度是取決於多媒體資料產生裝置340的多媒體資 料品質,而當資料產生速度變慢時,那麼預留給錯誤管理 (errorhandling)的緩衝空間也可減少,所以該第一臨界 值以及第一 6¾界值就可以設成較大的數值,因而更進一步 減少連結點的數目。所以,臨界值供應器可以根據多媒體 丨 資料產生裝置340的多媒體資料品質(例如,HQ,Sp,Lp,Ep, SLP,SEP)來安排所需的臨界值,如此以達到最佳的效能。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範 圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 【圖式簡單說明】 第1圖為根據本發明-實施例之用來在第一緩衝器以及第二緩衝 蒸内儲存m之m緩衝控制裝置的功能方塊圖。 20 ,1293172 第2圖為資料緩衝控制裝置用來在第一緩衝器以及第二緩衝器内 儲存資料之—方、土μ * ★ 万法的流程圖。 第2a圖為資料緩衝控制裝置用來在第一緩衝器以及第二缓衝器内Step 540: Store the input data to the second buffer 320. The data storage control unit 331 then stores the input data Din to the second buffer 3, for example. Step 545: Does the total amount of data stored in the first buffer 31 and the second buffer 320 reach a third threshold? If yes, go to step 55, otherwise, go to step 530 or step 54 to continue buffering the data to the first buffer 310 or the second buffer 320. Step 550 transfers the data stored in the second buffer g 320 to the first buffer 31〇. The material transfer control unit 332 transfers the data stored in the second buffer 32A to the first buffer 310. Step 555·• Is the total amount of data transferred to the first buffer $310 reach a fourth critical value? If yes, go to step 560, otherwise, go to step 550 to continue buffering the data to the first buffer 31. Step 560. Output the data stored in the first buffer. The data transfer control unit 332 drives the first buffer 31 to output its stored data. Step 570: Burn the data output by the first buffer 31. The optical storage device 35 烧 burns the information outputted by the first buffer 31 〇 on a disc. Step 575 • Does the beast burning stop? If yes, skip to step · otherwise, skip to step 530 or step 540. Step 580: End. 1293172 Those skilled in the art should be aware that the data burning speed of the optical storage device 350 is much faster than the data generating speed of the multimedia data generating device 340. Therefore, the data burning process of the currently buffered data will be in a pole. In a short period of time, in the embodiment, the first buffer 31 〇 and the second buffer 32 〇 are used as data buffers before the optical storage device 350 starts the beating process, such that The number of joint points can be reduced, and the present embodiment discloses the use of the optimized buffer-H 31G and the second buffer 320 to reduce the number of joint points. Referring to Fig. 5, Fig. 5 is a schematic diagram showing the data buffering state of the first buffer n 310 and the first buffer 32 第 shown in Fig. 3. The threshold value provider 333 provides a first threshold value 以及ι and a second critical mass τΗ2 to the first buffer and the buffer 320, respectively. At the beginning, the multimedia material generating device 340 generates an input data cell at time T0, and then, The data storage control unit 331 buffers the received input data Din to the first buffer 31〇, and the total amount of data buffered to the first buffer 31° reaches two. At this time, the data storage control unit 331 The buffered mi f > ^ is buffered into the first buffer 320, please note that the edge rushes to the first buffer 31 〇 杳 曰 曰 ^ ', so: the ization has not exceeded A threshold value TH1, so the billet transfer control single point, as shown in Figure 5 - will not start to allow data to be written. As shown in Fig. 5, when the total amount of time material reaches the second critical value TH2, the resources of the autumn u-buffer 320 continue to buffer the input data Din, buffered to, and if, the second buffer, please,资料~ buffer 320 data total 1293172 amount will exceed the second threshold value at time τ2 and the miscellaneous transfer control unit 332 will be activated to be stored in the second buffer (four) to the first buffer 310, very Obviously, after receiving the data outputted from the second buffer coffee, the total amount of data buffered to the first balancer 3 i 亦 will also exceed the first critical value Tm at time T2, and similarly, the data transfer 332 The data stored in the first buffer is transferred to the optical sub-device 350. Therefore, the data burning process starts at time = 2 = the storage device 350 burns the first buffer 31 on the optical disc. data. As shown in Fig. 5, the second buffer 32〇 is cleared at time & the total amount of data buffered to the first buffer 310 also begins to decrease, so that the buffer 3iG will be cleared at time Τ4 because there is no The data continues to slow down to the first buffer S 310, so the data burning process will be at time A = and the optical storage device 350 will be followed by a connection point, as described above, '=Save M35G data burning speed is It is much faster than the multimedia data to generate the data generation speed of the 3 milk. Therefore, at time 5, the optical storage data is stopped (4) burning the multimedia data generating device 34G to generate the data 2:, and the data storage control unit 331 The received input "in is buffered to the currently vacant first buffer 310. As shown in Fig. 5, 'filling in the second buffer 32(), before the value, the f-buffer 310 will first fill up to the first critical value, and: 1293172 is only in the first buffer 310 and the second buffer. After the data is filled to the respective thresholds, the data burning process will be started. Therefore, during each data burning period, the total amount of burning data is much larger than that of the prior art, because the first buffer Both the device 310 and the second buffer 320 are fully utilized, so that the number of connection points can be reduced and the overall data burning performance can be greatly improved. Please note that the quality of the multimedia material (for example, HQ, SP, LP, EP, SLP, SEP) determines the data generation speed, that is, the input data speed of the second buffer 32〇 depends on the multimedia material generating device 340. The quality of the multimedia material, and when the data generation speed is slow, then the buffer space reserved for error handling (errorhandling) can also be reduced, so the first critical value and the first 63⁄4 boundary value can be set to a larger value. Therefore, the number of joint points is further reduced. Therefore, the threshold value provider can arrange the required threshold according to the multimedia material quality (e.g., HQ, Sp, Lp, Ep, SLP, SEP) of the multimedia data generating device 340, so as to achieve the best performance. The above are only the preferred embodiments of the present invention, and all changes and modifications made to the scope of the present invention should fall within the scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a functional block diagram of a buffer control device for storing m in a first buffer and a second buffer according to an embodiment of the present invention. 20, 1293172 Figure 2 is a flow chart of the data buffer control device for storing data in the first buffer and the second buffer. Figure 2a shows the data buffer control device used in the first buffer and the second buffer
儲存資料之g V K另—方法的流程圖。 3 、 為根據本發明一實施例之資料缓衝系統的功能方塊圖。 第4圖為身料緩衝控制系統用來在第一緩衝器以及第二緩衝器内 儲存資料之方法的流程圖。 第知圖為資料緩衝控制系統用來在第一緩衝器以及第二緩衝器内 儲存資料H法的流糊。 =圖為第3圖所不之第_緩衝器以及第二緩衝器的資料缓衝狀 【主要元件符號說明】 300 -〜^^ 資料緩衝系統 ιυζ、、- 1 (\Λ Ζ ----- 第一緩衝器 1U4 % J2U 第二緩衝器 11U Λ i j I ^ 資料儲存控制單元 120、332 - 資料轉送控制單元 臨界值供應器 100、330 ^^〜 資料緩衝控制裝置 340 ^^— 多媒體資料產生裝置 J DU ^ 光儲存裝置 ~^--—^A flow chart of the method of storing data g V K. 3. A functional block diagram of a data buffering system in accordance with an embodiment of the present invention. Figure 4 is a flow diagram of a method used by the body buffer control system to store data in the first buffer and the second buffer. The first picture is a data buffer control system used to store the data hash of the data H method in the first buffer and the second buffer. = The figure is the data buffer of the _buffer and the second buffer of the third figure. [Main component symbol description] 300 -~^^ Data buffer system ιυζ,, - 1 (\Λ Ζ ---- - First buffer 1U4 % J2U Second buffer 11U Λ ij I ^ Data storage control unit 120, 332 - Data transfer control unit threshold value provider 100, 330 ^^~ Data buffer control device 340 ^^ - Multimedia data generation Device J DU ^ Optical storage device~^---^