1. Field of the Invention
The present invention relates to a method for controlling the recording speed of an optical drive.
2. Description of the Prior Art
When using an optical drive to record data onto an optical disc, users usually choose the highest speed that the optical drive can support to record data. However, using the highest speed does not mean spending the least time to record data onto the optical disc.
When the optical drive records data onto the optical disc at a rapid speed, the condition of buffer under-run will happen if the transfer rate of the computer cannot support the speed to transfer data to a buffer of the optical drive. Once the condition of buffer under-run happens, the optical drive has to stop the action of recording data until the data stored in the buffer reach a threshold amount and starts to record data again. Therefore, when the speed of the computer cannot support the recording speed of the optical drive, the condition of buffer under-run will happen repeatedly and will cause the total recording time of recording data onto the disc to be even longer than that of using slower speed to record. This kind of condition not only sacrifices the recording quality of the optical drive, but also wastes more time to complete the action of recording data.
Accordingly, a scope of the invention is to provide a method for controlling the recording speed of an optical drive that solves the problem mentioned above, so as to reach the objective of optimizing the overall recording time.
A scope of the invention is to provide a method for controlling the recording speed of an optical drive. The optical drive is capable of operating at one of the N allowable recording speeds among which the first allowable recording speed to the Nth allowable recording speed are sorted from slow to rapid, and N is an integer larger than 1. The optical drive includes a buffer for storing data transferred from an external source, and the optical drive continuously records the data stored in the buffer onto an optical disc.
In the method, first, the recording speed of the optical drive is set to equal the k-th allowable recording speed in the N allowable recording speeds, and k is an integer index ranging from 1 to N. Next, a judgment step is performed to judge if the k-th allowable recording speed is the slowest possible speed among the N allowable recording speeds. If the k-th allowable recording speed is the slowest one among the N allowable recording speeds, the current recording speed of the optical drive is kept.
If the k-th allowable recording speed is not the slowest one among the N allowable recording speeds, the following steps are performed. When the optical drive performs continuous recording for M times, a first data transfer rate between the external source and the buffer is calculated according to an algorithm, and a second data transfer rate is calculated according to the l-th allowable recording speed in the N allowable recording speeds, where l is an integer smaller than k. After calculating the first data transfer rate and the second data transfer rate, a judging step is performed to judge if the first data transfer rate is slower than the second data transfer rate. If the first data transfer rate is slower than the second data transfer rate, the recording speed of the optical drive is adjusted to the (k-1)th allowable recording speed in the N allowable recording speeds.
The method for controlling the recording speed of an optical drive employs the amount of the transferred data of the buffer and the transferring time to calculate the transfer rate between the computer and the optical drive. When the transfer rate of the computer is inadequate, the speed of the optical drive can be adjusted; hence, users can use the adaptive speed to record data onto the optical disc to reduce the total recording time.
The advantage and spirit of the invention may be understood by the following recitations together with the appended drawings.
An objective of the invention is to provide a method for controlling the recording speed of an optical drive, and the purpose of the method is to shorten the overall recording time to the shortest possible time.
The optical drive is capable of operating at one of N allowable recording speeds among which the first allowable recording speed to the Nth allowable recording speed are sorted from slow to rapid, and N is an integer larger than 1. The optical drive includes a buffer for storing data transferred from an external source, and the optical drive continuously records the data stored in the buffer onto an optical disc.
Referring to
If the k-th allowable recording speed is not the slowest one among the N allowable recording speeds, the following steps are performed. When the optical drive performs continuous recording for M times, a first data transfer rate between the external source and the buffer is calculated according to an algorithm, and a second data transfer rate, shown in
In an embodiment, the data is transferred in the form of blocks from the external source, and the algorithm is as follows:
wherein HTR1 represents the first data transfer rate; i represents the i-th continuous recording among the M times of continuous recording, and each continuous recording is between two buffer under-runs. Xi represents the total amount of the block at the i-th continuous recording, and RSi represents a current recording speed of the optical drive at the i-th continuous recording; furthermore, WTB (Writing threshold blocks) represents a threshold amount of blocks that have been stored in the buffer at the start of the i-th continuous recording. In other words, when the amount of blocks reaches the WTB, the optical drive starts the action of recording data.
In an embodiment, the optical drive includes a spindle motor for driving the rotation of the optical disc. When the spindle motor is controlled in a constant angular velocity (CAV) mode, RSi is calculated by the following formula:
wherein Vstarti represents a speed of the spindle motor at the start of the i-th continuous recording, and Vstopi represents the speed of the spindle motor at the end of the i-th continuous recording.
When the spindle motor is controlled in a CLV (Constant linear velocity) mode or a Z-CLV (Zoned constant linear velocity) mode, RSi is the speed of the spindle motor at the i-th continuous recording.
In an embodiment, the second data transfer rate is calculated in accordance with the (k-1)th allowable recording speed in the N allowable recording speeds. The second data transfer rate is calculated by multiplying the (k-1)th allowable recording speed by a first multiple which is equal to or larger than 1, such as 1.1.
In another embodiment, the data is transferred in the form of blocks from the external source. The optical disc complies with a specification, and the algorithm is as follows:
wherein HTR1 represents the first data transfer rate, and i represents the i-th continuous recording among the M times of continuous data recording; each continuous recording is between two buffer under-runs. Xi represents an total amount of the block at the i-th continuous recording, T1 represents a duration for transferring Xi, and 1X_TransferRate represents a data transfer rate unit specified in the specification. The first data transfer rate is calculated by the algorithm.
Referring to
In this preferred embodiment, the optical drive is capable of operating at one of N allowable recording speeds among which the first allowable recording speed to the Nth allowable recording speed are sorted from slow to rapid, and N is an integer larger than 1. For example, a 16x optical drive is capable of operating at 2x, 4x, 8x, 12x, and 16x recording speeds. The optical drive includes a buffer for storing data transferred, in the form of blocks, from an external source such as a computer, and the optical drive continuously records the data stored in the buffer onto an optical disc.
As shown in
When the optical drive performs continuous recording for M times, a first data transfer rate between the external source and the buffer is calculated according to a first algorithm, and M is a natural number. The algorithm is as follows:
wherein HTR1 represents the first data transfer rate, i represents the i-th continuous recording among M times of continuous data recording, and each continuous recording is between two buffer under-runs. Xi represents the total amount of the block at the i-th continuous recording, RSi represents a current recording speed of the optical drive at the i-th continuous recording, and WTB (Writing threshold blocks) represents a threshold amount of blocks that have already been stored in the buffer at the start of the i-th continuous recording. In other words, when the amount of blocks reaches the WTB, the optical drive starts the action for recording data.
A second data transfer rate, shown in
After calculating the first data transfer rate and the second data transfer rate, step S22 is performed to judge if the first data transfer rate is slower than the second data transfer rate. If the first data transfer rate is less than the second data transfer rate, step S23 is performed to adjust the recording speed of the optical drive to equal to the (k-1)th allowable recording speed in the N allowable recording speeds. If the first data transfer rate is faster than the second data transfer rate, the following procedure is performed.
A third data transfer rate between the external source and the buffer is calculated according to a second algorithm. The optical disc complies with a specification, and the second algorithm is as follows:
wherein HTR3 represents the third data transfer rate, Ti represents a duration for transferring Xi, and 1X_TransferRate represents a data transfer rate unit specified in the specification. For example, the 1X_TransferRate of DVD disc is 1385 kilobit per second, and the 1X_TransferRate of CD disc is 150 kilobit per second. A fourth data transfer rate, shown in
After calculating the third data transfer rate and the fourth data transfer rate, step S24 is performed to judge if the third data transfer rate is slower than the fourth data transfer rate. If the third data transfer rate is less than the fourth data transfer rate, step S23 is performed to adjust the recording speed of the optical drive to equal to the (k-1)th allowable recording speed in the N allowable recording speeds. If the third data transfer rate is faster than the fourth data transfer rate, step S25 is performed to keep the recording speed of the optical drive to equal to the k-th allowable recording speed in the N allowable recording speeds.
The data transfer rate calculated by the first algorithm is mostly decided by the speed of the software, and the operation time of the server is not put into consideration. Therefore, the calculated first data transfer rate is faster than the actual data transfer rate. The third data transfer rate calculated by the second algorithm is used for confirming if the current recording speed of the optical drive is appropriate. The operation time of the server is considered in the second algorithm; consequently, the calculated third data transfer rate is much slower than the first data transfer rate. The second algorithm can be used to distinguish if there is a significant difference between the recording speed of the optical drive and the data transfer rate between the external source and the buffer.
In an embodiment, the optical disc is a DVD+R disc.
Referring to
With the example and explanations above, the features and spirits of the invention will be hopefully well described. Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teaching of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
094111124 | Apr 2005 | TW | national |