The present invention relates to data processing for an optical disc, more particularly, to processing of data replacement for a defect or remapped block of the optical disc.
In optical disc data processing, sometimes it is necessary to replace data of an original address by data of another address. For example, in jump recording mode of a −R dual layer disc, a replacing process is necessary for a remapped ECC block. In addition, a replacement is usually recorded in a spare area of the disc to replace a defect.
In reading or verifying written data from an optical disc, the data fetched from the optical disc is buffered to a main buffer of a disc drive, and the buffered data is then decoded. Finally, the decoded data is then transferred to a host when host requested. In the conventional scheme, buffering and/or decoding are stopped when a defect block or a known remapped block is read. The replacement for the defect or remapped block will be dealt with. A block can comprise a single sector.
In one prior art method, the block number of each buffered data block is monitored. If the block number matches a defect block number (defect ID) or a remapped block address, then buffering is stopped, as well as decoding. Replacement for the defect of remapped block is performed. For example, if replacement for the defect is recorded in a spare area of the optical disc, the buffering is stopped and the replacement is fetched to replace the defect. After the replacing process is finished, seeking must be re-executed so as to find the interrupted location where the buffering is to resume. That is, since the buffering is interrupted, it is necessary to re-seek to resume buffering. A pick-up head of the disc drive needs to shift back and forth. Accordingly, efficiency of the optical disc drive will be reduced.
In another prior art method, the disc drive monitors block number of a next block to be decoded. If the monitored block number matches a defect ID (or remapped block address), that is, it is found that the next block to be decoded is a defect (or remapped ECC block), then the decoding is stopped. After the replacing is processed, decoding is resumed.
In either of these two conventional methods, data block to be replaced such as a defect or remapped block is immediately processed once it is found. However, sometimes the data block to be replaced found during the buffering or decoding is not required to be transferred to the host. In this case, therefore, it is possible that the replacement processing for the data block to be replaced is redundant.
The present invention provides a solution to overcome the drawbacks described above.
An aspect of the present invention is to provide a data replacement processing method. When a defective block (simply referred to as a “defect”) or a remapped ECC block is found as a data block to be replaced of an optical disc, the discovery of the data block to be replaced is ignored during buffer and decoding. Accordingly, buffering and decoding are not interrupted when the data block to be replaced is found. By using the method of the present invention, the buffering and decoding can be continued even when the data block to be replaced is found. Therefore, re-seeking operation times are reduced.
Another aspect of the present invention is to provide a data replacement processing method. When a defective block (simply referred to as a “defect”) or a remapped ECC block is found as a data block to be replaced in transferring decoded data of an optical disc, transferring is stopped and the data block to be replaced is processed. That is, the data block to be replaced is replaced by a replacement block. The data to be replaced is not processed until the data thereof is requested to be transferred according to the method of the present invention. Therefore, redundant processing of replacement is reduced or even avoided since only the data blocks, which needs to be replaced, to be transferred are processed.
Another aspect of the present invention is to provide a data replacement processing method. When a defective block (simply referred to as a “defect”) or a remapped ECC block is found as a data block to be replaced in decoding data of an optical disc, the discovery of the data block to be replaced is ignored, and no processing is executed for the data block to be replaced at this stage. When the defect or a remapped ECC block is found in transferring the decoded data, transferring is stopped and the data block to be replaced is processed. That is, the data block to be replaced is replaced by a replacement.
In accordance with an aspect of the present invention, the data replacement processing method includes obtaining data from an optical disc; buffering the obtained data into a buffer; decoding the buffered data; monitoring decoding process; and ignoring discovery of a data block to be replaced when the data to be replaced is found. That is, when a defect block or a remapped block is found during the decoding procedure, the decoded defect block or remapped block is ignored.
In accordance with another aspect of the present invention, the data replacement processing method includes obtaining data from an optical disc; buffering the obtained data into a buffer; decoding the buffered data; transferring the decoded data; monitoring transferring process; stopping transferring when a data block to be replaced is found in transferring monitoring; and processing the data to be replaced.
In accordance with a further aspect of the present invention, the data replacement processing method includes obtaining data from an optical disc; buffering the obtained data into a buffer; decoding the buffered data; transferring the decoded data; monitoring decoding process; monitoring transferring process; ignoring a data block to be replaced when the data block to be replaced is found in decoding monitoring; and stopping transferring when the data block to be replaced is found in transferring monitoring; and processing the data block to be replaced.
The present invention will be further described in details in conjunction with the accompanying drawings, wherein:
The present invention will be described in details in conjunction with the appending drawings.
As mentioned, the decoded data is usually to be transferred to a host (not shown) (step S21). In the present invention, the transferring is also monitored. (step S22). It is noted that the transfer monitoring is also continuously executed throughout the whole process. For example, data blocks to be transferred are monitored. When it is found that the block to be transferred is a data block to be replaced, for example, if the block to be transferred is a defect or a remapped block, then transferring is stopped (step S24). When the data block to be replaced is to be transferred, that is, this block is supposedly or indeed requested by the host, then the optical disc drive processes this block (defect or remapped block) (step S25).
The disc drive reads data of a replacement to replace the block to be replaced. If the replacement data has been stored in a reserve buffer (not shown), then it can be copied from the reserve buffer to the main buffer, thus the optical disc drive needs not to stop buffering and decoding, and needs not to seek the location of the replacement in the spare area of the disc. If the replacement data is not stored in a buffer, then the optical disc drive may need to stop buffering and decoding so as to seek the location of the replacement in the spare area of the disc and read the data thereof. After transferring is stopped, the time required to process the defect (remapped block) may be different in various conditions. For example, it is preferred that the disc drive processes the defect immediately in random reading mode. In sequential reading mode, the defect processing is preferably held until the defects are accumulated to a predetermined number. It is noted that the disc drive only executes replacement processing under the request of host according to the present invention. That is, the disc drive only processes the data blocks to be replaced that are to be transferred. Therefore, the processing for the defect or remapped block will not be redundant.
As described, when a data block to be replaced such as a defect or remapped block is found in decoding monitoring process, according to the present invention, the disc drive ignores the discovery of the data block to be replaced, so that buffering and decoding are not interrupted. That is, the decoded defect or remapped block is ignored. One way is to mask the decoded defect or remapped block, so that the masked defect or remapped block will not be processed. In addition, a decode error interruption signal, which is generated when there is a data block to be replaced found to a processor (not shown) of the optical disc drive, thereby masking the request to interrupt buffering and decoding. By doing so, the buffering and decoding will not be interrupted.
As mentioned above, when the data block to be replaced (e.g. a defect or a remapped block) is to be transferred in data transferring process, the transferring should be stopped, and the data block to be replaced should be processed in a proper timing.
As described above, the disc drive should process the defect (or remapped block) after the transferring is stopped, since the data of the defect is requested or supposed to be requested by the host. The disc drive fetches data of a corresponding replacement to replace the defect. If the data of the replacement (simply referred to as replacement data) has been stored in the reserve buffer or another memory, the disc drive can simply copy the replacement data to use. Otherwise, the disc drive may need to move the pick-up head (not shown) to fetch the replacement data, which is usually allocated in a spare area of the disc. Since the pick-up head is moved to seek the replace data, the buffering and decoding must be interrupted.
As mentioned, in the embodiment, the present invention is described by mainly using the defect as the example, it can also be applicable for the remapped block or any other kind of data block to be replaced by data recorded in another address.
While the preferred embodiments of the present invention have been illustrated and described in details, various modifications and alterations can be made by persons skilled in this art. The embodiments of the present invention are therefore described in an illustrative but not restrictive sense. It is intended that the present invention should not be limited to the particular forms as illustrated, and that all modifications and alterations which maintain the spirit and realm of the present invention are within the scope as defined in the appended claims.