Summary of the invention
The invention provides the method and apparatus of the EFM data decode that applies to CD-ROM system, can handle the misdata that meets the EFM modulating rule especially, promote data reading reliability, and avoid choosing sheet or can not read problem such as data.
The present invention proposes a kind of EFM data decoding method that applies to CD-ROM system, and it comprises the following steps: at first to receive serial datum; From serial data, take out first data of utilizing first bit format coding; From the EFM decoding table of revising, table look-up, become second data of utilizing second bit format coding to change these first data, wherein, have the format conversion data that do not meet the EFM modulating rule in the EFM decoding table of correction, so that the first data fit EFM modulating rule; When in the EFM decoding table of revising, can not find can corresponding conversion second data time, skip to expand in the decoding table and table look-up, become second data of utilizing second bit format coding to change first data, wherein, but this expands to have in decoding table and meets the EFM modulating rule first data in the EFM decoding table that does not meet correction, second data that its institute may correspondence; And export second data.
The present invention also provides a kind of EFM data decoding method that applies to CD-ROM system, comprises the following steps: at first to receive serial datum; From serial data, take out first data of utilizing first bit format coding; When these first data do not meet the EFM modulating rule, adjust first data, so that first data are met the EFM modulating rule; From the EFM decoding table, table look-up again, become second data of utilizing second bit format coding to change first data; When in the EFM decoding table, can not find can corresponding conversion second data time, skip to expand in the decoding table and table look-up, become second data of utilizing second bit format coding to change first data, wherein, but this expands to have in decoding table and meets the EFM modulating rule do not meet first data in the EFM decoding table, second data that its institute may correspondence; And export second data.
The present invention also proposes a kind of EFM data decoding method that applies to CD-ROM system, comprises the following steps: at first to receive serial datum; From serial data, take out first data of utilizing one first bit format coding; From the EFM decoding table, table look-up, become second data of utilizing second bit format coding to change first data; When in the EFM decoding table, can not find can corresponding conversion second data time, skip to expand in the decoding table and table look-up, become second data of utilizing second bit format coding to change first data, wherein, expand to have in the decoding table and meet the EFM modulating rule but do not meet first data in the EFM decoding table, second data that its institute may correspondence; And export second data.
In preferred embodiment of the present invention, wherein do not meet the format conversion data of EFM modulating rule, be meant that in first data its two contiguous data are that data are that 0 number is less than 2 in 1, or be that data are that 0 number is greater than 10 in 1 in two contiguous data.
In preferred embodiment of the present invention, can be that first bit format coding is encoded with 14, and second bit format coding be to encode with 8.And if first bit format coding is during with 16 codings, then essential first data of earlier this 16 bit format being encoded are converted to 12 coded formats, convert 8 coded format again to.
In preferred embodiment of the present invention, wherein, expand pairing second data in the decoding table, be meant that in first data one data are 1 the traversing or traversing pairing result in position in position left to the right; Or be when the terminal position of first data is 0, with terminal position transition 1 result; Or when the start bit of first data is 0, with the start bit transition 1 result.
Because the special misdata that meets the EFM modulating rule of handling of the present invention, and it is replaced with most possible bit data in the mode that substitutes, so that follow-up handling procedure is obtained more the multidata processing that continues, thereby promote the fiduciary level of data processing, and avoid choosing sheet or can not read problem such as data.
For content of the present invention, feature and advantage can be become apparent, several preferred embodiments cited below particularly, and conjunction with figs. are described in detail below.
Embodiment
Fig. 1 shows the process flow diagram of method that applies to the EFM data decode of CD-ROM system according to a preferred embodiment of the present invention a kind of.Please refer to Fig. 1, the method for detailed explanation a kind of EFM data decode provided by the present invention.At this, CD-ROM system can be the CD-ROM system that can read compact disc read-only memory (CD-ROM) or multifunctional digital disc (DVD).Execution in step S101 at first, receive serial data exactly, for example: induction gets rf frequency data (Radio Frequency Data is called for short RF DATA) from the discs laser light reflected, and reads this RF DATA, produces its numeric string line data through the data shaping circuit again.Then execution in step S103 is exactly from serial data, takes out 14 bit data of waiting for the EFM decoding.Execution in step 105 then, from revise the EFM decoding table, table look-up, change this 14 bit data and become decoded 8 bit data, because having revised the EFM decoding table, this has 14 to 8 translation data that do not meet the EFM modulating rule, so can convert the 14 bit data decoding that does not meet the EFM modulating rule to the most approaching 8 correct bit data.If in step S105, can not find the decoded data that meets, met the EFM modulating rule though promptly represent this 14 bit data, but wrong data promptly enter step S107, skip to one and expand the decoding table transcoding of tabling look-up.Last execution in step S109 exports this decoded 8 bit data.
At the expansion decoding table described in the step S107, this table have meet the EFM modulating rule misdata its may be corresponding data.Owing to the RF DATA that is read from CD-ROM drive may cause mistake on the reading of data because of the scratch of discs or other reason, though in step S105, can revise through the modified solutions code table earlier, but this modified solutions code table is to handle at the data that do not meet the EFM modulating rule, but have no idea to revise for the misdata that meets the EFM modulating rule, therefore expand in the decoding table and revise at the misdata that meets the EFM modulating rule especially.
In this expands decoding table, meeting under the EFM modulating rule, one 14 bit data institute may corresponding data, can be in this 14 bit data, and an one data are a traversing left or traversing to the right pairing result in position of 1.Can also be when the terminal position of these data is 0, be 1 result with terminal position transition, or when the start bit of these data is 0, is 1 result with the start bit transition.
For example one 14 data are 00010001000100, though this data fit EMF modulating rule, if but when in the modified solutions code table, can not find corresponding 8 bit data, represent that promptly this is the data of a mistake, and according to the said corresponded manner in front, the data of its possibility correspondence as shown in Table 1, in these data 3 be that left and right displacement is once separately for 1 position, therefore extendible obtaining is 6 groups of data, in addition, because the data of the start bit of this 14 bit data and terminal position are all 0, therefore can change it into 1 separately, so can expand 2 groups again comes out, but in 14 bit data in this example, if with its terminal position is that 0 14 bit data transitions are 1 o'clock, these data can become 00010001000101, the situation generation of EMF modulating rule in the end can appear in the data of three positions not meeting, and in expanding sign indicating number in order to determine that each group does not meet the data of EFM modulating rule, its data that expand correspondence all are bound to meet under the prerequisite of EFM modulating rule, therefore do not meet the expanding data of EFM modulating rule within the limit of consideration of this expansion decoding table for this type.
Table one
14 original bit data |
00010001000100 |
14 bit data that expand |
00100001000100 |
00001001000100 |
00010010000100 |
00010000100100 |
00010001001000 |
00010001000010 |
10010001000100 |
As shown in Table 1, one group of 14 bit data, more than one group of its data that can expand possibility, therefore in expanding decoding table, to determine to select for use that group expanding data, can use the mode of picked at random, or the mode of rotating in regular turn, or elect according to predetermined weight mode, though in this way select to choose wrong data, but in fact, on data processing backward, still can come debug, the practice of the present invention can not produce the extra work burden by ECC (Error Correction Code) and EDC (Error Detection Code).And the present invention is after data transfer digital kenel to by simulation, carries out the correction of data immediately, when the data that do not meet when data in the modified solutions code table, just directly with " most probable " the EFM data replace.With thinking in the other direction, be exactly unfortunate conjecture mistake, also, can't influence the correctness of reading with original not coming to the same thing of conjecture.
Certainly, be familiar with this skill person and can in like manner push away it, the method also can be used on multifunctional digital disc (DVD) CD-ROM drive, just no longer just 8 to 14 modulation on DVD, but become 8 to 16 modulation, therefore the action in step S103, must change into and take out 16 bit data, if and because directly with 16 decoding forms transcodings of tabling look-up, then the data of 16 decoding tables will be too big too much, therefore in this step, must 16 bit data be encoded to obtain 12 bit data, the rule of coding can mathematical expression be expressed as follows again:
dvccw=
{nst, //dvdcw[11]
EFMD[15], //dvdcw[10]
(EFMD[14]or EFMD[13]), //dvdcw[9]
(EFMD[14]or EFMD[12]), //dvdcw[8]
(EFMD[11]or EFMD[10]), //dvdcw[7]
(EFMD[11]or EFMD[9]), //dvdcw[6]
(EFMD[8]or EFMD[7]), //dvdcw[5]
(EFMD[8]or EFMD[6]), //dvdcw[4]
(EFMD[5]or EFMD[4]), //dvdcw[3]
(EFMD[5]or EFMD[3]), //dvdcw[2]
(EFMD[2]or EFMD[1]), //dvdcw[1]
(EFMD[2]or EFMD[0])} //dvdcw[0]
In the formula: dvdcw is 12 bit data after encoding,
And EFMD is 16 data,
Nst: be the state of back one 16 bit data.
Roughly, this cryptoprinciple is to be one group of 2 position of weaving into 12 bit data with per 3 positions in 16 bit data, the 16th position EFMD[15 of 16 bit data] directly become the 11st position dvdcw[10 of 12 bit data], the 12nd position of 12 bit data then after the state of one 16 bit data decide.
After finishing above-mentioned steps, then again step S105 is originally changed into from 12 to 8 decoding tables of revising and tabling look-up, become 8 bit data to change this 12 bit data, and then the subsequent treatment that continues original action.And in 12 to 8 decoding tables of this correction, have unusual 12 to 8 translation data, that is to say, in these unusual 12 to 8 translation data, the 12 bit data part that belonging to tables look-up receives be not generally meet 16 bit data of coding rule of data of optical disk coded and data, but coded unusual 12 bit data that form of unusual 16 bit data of the coding rule of violation data of optical disk, for example: in these unusual 16 bit data, two contiguous data are that data are that 0 number is less than 2 in 1.Table two is the data representation of a part of decoding table of having revised, and wherein 16 bit data of representing with bracket are unusual 16 bit data of the coding rule that does not meet data of optical disk, and 12 bit data of representing with bracket then are corresponding unusual 12 bit data.
Table two
16 bit data |
12 bit data |
8 bit data |
16′h2009 |
12′h205 |
8′h0 |
(16′h2005) |
(12′h203) |
8′h0 |
(16′h2005) |
(12′ha03) |
8′h0 |
16′h4120 |
12′h33c |
8′h0 |
(16′h40a0) |
(12′h32c) |
8′h0 |
16′h0480 |
12′h0a0 |
8′h0 |
16′h0480 |
12′h8a0 |
8′h0 |
(16′h0500) |
(12′h0b0) |
8′h0 |
(16′h0500) |
(12′h8b0) |
8′h0 |
Fig. 2 shows the process flow diagram of method that another kind according to a preferred embodiment of the present invention applies to the EFM data decode of CD-ROM system.When this CD-ROM system was CD-ROM, it comprised the following steps: at first execution in step S201, receives serial data exactly.Then execution in step S203 is exactly from serial data, takes out 14 bit data of waiting for the EFM decoding.Execution in step S205 judges whether this 14 bit data meets the EFM modulating rule, then adjusts this 14 bit data when not meeting the EFM modulating rule, to meet the EFM modulating rule then.Execution in step S207 tables look-up from the EFM decoding table again, becomes decoded 8 bit data to change this 14 bit data.In step 207, if when in the EFM decoding table, can not find the decoded data that meets, met the EFM modulating rule, but wrong data promptly enter step S209 though promptly represent this 14 bit data, skip to one and expand the decoding table transcoding of tabling look-up.Last execution in step S211 exports this decoded 8 bit data.At the expansion decoding table described in the step S209, itself and the expansion decoding table when key diagram 3 have same function, it can change the misdata that meets the EFM modulating rule, makes it can correspond to the data that another group may be correct, with the decoding action of the back of continuing.
Certainly, be familiar with this skill person and can in like manner push away it, the method also can be used in DVD drive, just no longer just 8 to 14 modulation of DVD, but become 8 to 16 modulation, therefore the action in step S203, must change into and read 16 data earlier, directly adjusting this 16 bit data then in step S205 makes it become the most approaching 16 correct bit data, again 16 bit data are encoded to obtain 12 bit data, then in step S207, change into from 12 to 8 decoding table and tabling look-up, become 8 bit data to change this 12 bit data, and then the subsequent treatment that continues original action.And in above-mentioned coded system and the prior figures 1 when carrying out the DVD decoding described coded system identical.
Fig. 3 shows the process flow diagram of method that applies to the EFM data decode of CD-ROM system according to a preferred embodiment of the present invention another kind of again.When this CD-ROM system was CD-ROM, it comprised the following steps: at first execution in step S301, receives serial data exactly.Then execution in step S303 is exactly from serial data, takes out 14 bit data of waiting for the EFM decoding.Execution in step S305 tables look-up from the EFM decoding table then, becomes decoded 8 bit data to change this 14 bit data.In step 305, if when in the EFM decoding table, can not find the decoded data that meets, met the EFM modulating rule, but wrong data promptly enter step S307 though promptly represent this 14 bit data, skip to one and expand the decoding table transcoding of tabling look-up.Last execution in step S309 exports this decoded 8 bit data.And at the expansion decoding table described in the step S307, itself and the expansion decoding table when key diagram 3 have same function, it can change the misdata that meets the EFM modulating rule, makes it can correspond to the data that another group may be correct, with the decoding action of the back of continuing.
Certainly, be familiar with this skill person and can in like manner push away it, the method also can be used in DVD drive, just no longer just 8 to 14 modulation of DVD, but become 8 to 16 modulation, the therefore action in step S303, must change into and read 16 data earlier, and in this step, again with 16 bit data codings obtaining 12 bit data, in this coded system and the prior figures 1 when carrying out the DVD decoding the identical work of described coded system.Then in step S305, change into from 12 to 8 and tabling look-up the decoding table, and then continue and originally identical subsequent treatment action.
A preferred embodiment more of the present invention is a kind of EFM data deciphering device that applies to CD-ROM system, as shown in Figure 4, comprises the following units: receiving trap 41, in order to receive serial datum; Extraction equipment 43 is in order to take out first data of utilizing first bit format coding from serial data; Conversion equipment 45 in order to according to the EFM coding schedule, is converted to second data of utilizing second bit format coding with first data, and can't be according to the EFM coding schedule time, according to expanding decoding table, first data be converted to second data of utilizing second bit format coding; And output unit 47 is in order to export second data.
In the present embodiment, conversion equipment 45 has more following function: when resulting first bit formats coding of extraction equipment 43 is when encoding with 14, second bit format coding that is produced is to encode with 8; And when resulting first bit format coding of extraction equipment 43 be during with one 16 codings, be earlier first data to be converted to 12 coded formats, produce second bit format coding again with 8 codings.By this, present embodiment can not be subject to the data layout of discs, also just goes for CD, VCD and DVD or the like.
In the present embodiment, expand to have in the decoding table and meet the EFM modulating rule but do not meet first data in the EFM decoding table, second data that its institute may correspondence.And, do not meet the condition of the format conversion data of this correction EFM modulating rule, be selected from one of following: two adjacent data are that data are that 0 number is less than 2, is that data are that 0 number is greater than 10 in 1 in two contiguous data in 1 in these first data.
At this, expand pairing these second data in the decoding table, be be selected from one of following: be in these first data (a), an one data be 1 the position the traversing left pairing result in position, (b) be in these first data, an one data be 1 the position the traversing to the right pairing result in position, (c) be when the start bit of these first data is 0, being 1 result with the start bit transition and (d) being when the terminal position of these first data is 0, is 1 result with terminal position transition.And conversion equipment 45 meets the EFM modulating rule in processing when but not meet this correction be first data in the EFM decoding table, can find at least one may correspondingly expand decoded data in expanding decoding table; And, conversion equipment 45 these may be corresponding the expansion decoded data, pick out one may be corresponding the method for expansion decoded data be selected from one of following: picked at random, rotate in regular turn and choose according to weight.
In sum, because the present invention can handle the misdata that meets the EFM modulating rule especially, and select one group of most possible bit data to replace expanding decoding table in the mode that substitutes, so that follow-up handling procedure is obtained more the multidata processing that continues, thereby promote the fiduciary level of data processing, and avoid choosing sheet or can not read problem such as data.
Though the present invention discloses as above with preferred embodiment; right its is not in order to limit the present invention; anyly have the knack of this skill person; without departing from the spirit and scope of the present invention; when can doing a little change and retouching, so protection scope of the present invention is as the criterion when looking accompanying the claim person of defining.