1. Field of the Invention
The present invention relates to optical disc recording and, more particularly, to a recording method for optical discs with buffer handling and defect management.
2. Description of the Prior Art
Currently, the standard of the common format for CD-RW (Compact Disc Re-writable) is being discussed continually. The standard is called CD-MRW (CD-Mount Rainier rewritable), in which the recording area of an information-recording medium (e.g. optical disc) is divided into a plurality of areas, and the areas are provided with respective alternative areas. Among the areas, the areas in which user data is written are called Data Areas (DA), and the alternative areas are called Spare Areas (SA). Normally, when replacing a block of a DA in which an error occurs, the block is replaced by a block of a SA that immediately precedes the DA. This is a mechanism of defect management in the standard for CD MRW. The mechanism of defect management is also adopted in the disc standards of DVD-MRW, DVD-RAM, BD-R, BD-RE, and so on.
In the prior art, when a defect block is encountered in data recording, the writing process is suspended so as to perform a defect replacement process. Data in a buffer memory, which correspond to the defect block, are read for modifying the defect block and then are recorded into a corresponding SA. Accordingly, when there are many defect blocks in DA, frequent switches between the functions of reading and writing will affect the efficiency of the defect management process.
Accordingly, a scope of the present invention provides a recording method for optical discs, such as optical discs in accordance with the standard for CD-MRW. According to the recording method of the present invention, data is accumulated in a buffer memory and then the received data is continuously recorded. Furthermore, when the buffer memory is used up, the method will perform a defect management process on the buffer memory, so that the frequency of interrupting the process of data recording by defect replacement is effectively decreased.
Another scope of the invention provides a higher usage of the buffer memory by compressing the recorded data into the buffer memory.
According to a preferred embodiment of the invention, in the recording method for optical disc, data packets to be recorded are first accumulated in a buffer memory; then, the data packets are recorded and verified onto the optical disc via the pick-up head of an optical disc drive. According to the recording method of the present invention, first, the data packets are received and then are stored into the buffer memory. Secondly, the recorded data packets are encoded into a data stream. Thirdly, the recorded data packets in the buffer memory are reorganized in accordance with a criterion. Finally, a defect verification process is performed on the recorded data packets on the optical disc based on the encoded data stream.
The advantage and spirit of the invention may be understood by the following recitations together with the appended drawings.
The present invention provides a recording method for optical discs, which also includes the method for buffer handling and defect management of the optical disc drive. According to the recording method of the present invention, data is accumulated in a buffer memory, and the received data is continuously recorded. Furthermore, when the buffer memory is used up, the method will perform a defect management process on the buffer memory, so that the frequency of interrupting the process of data recording by defect replacement is effectively decreased.
Another scope of the invention provides a higher usage of buffer memory by compressing the recorded data into the buffer memory. According to the recording method of a preferred embodiment of the invention, the received data in the buffer memory are compressed and encoded by the run-length encoding algorithm, so as to gain additional space for storing and recording data.
The following describes the steps of recording data onto an optical disc in detail according to the recording method of the present invention.
According to the present invention, first, the recording method performs step S10, a recording process at the start. Secondly, to perform S11, the optical disc drive receives the data packets to be recorded into the buffer memory and does not record the data packets to be recorded directly onto the optical disc unless the data packets to be recorded stored in the buffer memory are accumulated to a threshold. The purpose of not immediately recording the data packets onto the optical disc is to avoid any occurrence of under-run error in the data in the buffer memory. When the accumulated data packets reach the threshold, the optical disc drive activates the data recording process, and the method is to perform step S12 at that time. The optical disc drive continuously receives data packets and also records the data packets in the buffer memory onto the optical disc. Then, the optical disc drive encodes the recorded data packets into a data stream; after that, the data stream is stored into the buffer memory from the start of the buffer memory to replace the original data packets, so as to release the space of the buffer memory where the recorded data packets are originally stored.
In a preferred embodiment, the encoding of the recorded data packets into a data stream can be implemented in a compression way. For example, the recorded data packets are compressed and encoded into the data stream by the run-length encoding algorithm, and the data stream hereby uses less buffer memory. Of course, other compression ways can also be applied in this process.
According to the recording method of the present invention, step S13 is performed next to verify whether the data packets accumulated in the buffer memory have reached the end of the buffer memory. If the verification of step S13 is negative, the recording of data in step S12 is executed continuously. If the verification of step S13 is positive, step S14 is performed because there is no more space at the end of the buffer memory for recording. The optical disc drive temporarily stops receiving data. The receiving of data packets will not be resumed until the buffer memory has finished reorganizing. Then, step S15 is performed. When the receiving of data packets stops, the optical disc drive continuously records the data packets in the buffer memory onto the optical disc and encodes the recorded data packets into the data stream. When the status of the buffer memory satisfies a criterion, the buffer memory is reorganized to allow the further receiving of data packets. The criterion and the buffer memory reorganization are described in detail in the following.
Step 16 is performed to verify whether the size of the data packets in the buffer memory, which have not been recorded yet, is less than or equal to a predetermined value (such as size of 5 data packets). If the verification of step S16 is negative, step S15 is repeated. Therefore, the data packets in the buffer memory are continuously recorded onto the optical disc, and the recorded data packets are encoded into the data stream to consume the data packets in the buffer memory. If the verification of step 16 is positive, step S17 is performed to verify whether the size of the available space in the buffer memory is less than or equal to the predetermined value. If the verification of step S17 is negative, step S18 is performed to reorganize the buffer memory. In a preferred embodiment, a lower boundary of the buffer memory is reset. The optical disc drive resumes to receive data packets, and the received data packets are accumulated, starting from the lower boundary. After resetting the lower boundary of the buffer memory, according to the present invention, the step flow of the recording method returns to step 12, and the above steps are repeated.
If the verification of step S17 is positive, it means that the buffer memory is used up, and the optical disc drive records the remaining data packets in the buffer memory, which have not been recorded yet, onto the optical disc and encodes them into the data stream (step S19). A recording process is completed at this point, and the data stream in the buffer memory is a compressed version of the recorded data packets in the current recording process (step S20). Before the optical disc drive releases the space of the buffer memory where the data stream is originally stored, the data stream is used to perform a defect verification process (step S21). The steps of the defect verification process are described in detail later.
Please refer to
As shown in
After the recording process is completed, the data stream in the buffer memory is a compressed version of the recorded data packets on the optical disc in the recording process. Before the optical disc drive releases the space of the buffer memory where the data stream is originally stored, the data stream is used to perform the defect verification process on the recorded data packets on the optical disc. Please refer 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 |
---|---|---|---|
094141055 | Nov 2005 | TW | national |