Junior Member
|
引用:
Originally posted by adelies
另外,個人覺得這種串列資料不可能搞出「陣列」求解,因為:
A → B → C → D...
↓ ↓
錯誤更正 錯誤更正
↓ ↓
B' C'
不太懂這為何需要用到陣列?救直直解就好。
|
呵呵
記得您好像有跟takuro大大討論過不少
我特地花了好多時間找出這篇給您參考一下
http://forum.pcdvd.com.tw/showthrea...10&pagenumber=5
takuro大大,不好意思
借用您的文章的一部份來說明為何我提到陣列
在一組陣列資料中
只錯1個會比較好修正
但如果錯不只1個,就得多運算幾次囉
引用:
Originally posted by takuro
有看過幾篇比較深入的
不過忘記在哪裡了
下面這篇算是最簡單的介紹
有一點英文底子的應該沒問題
A Short Digression into How Error Correction might work
To get a feel for how error correction might work, consider a series of data bytes, and we will show them in a table like
4 5 7 1
1 8 7 9
2 0 7 2
1 1 2 3
Now, suppose we add another number to the right, and also to the bottom, which is the sum of all the numbers, so
4 5 7 1 17
1 8 7 9 25
2 0 7 2 11
1 1 2 3 7
8 14 23 15
Now suppose we change one of the numbers in our data, say change the central 7 to 8. How can we identify where the error has occurred? Well if we check the columns, we find the central one doesn't add up. Also if check the rows, we likewise find the central one doesn't check out, so we can pinpoint immediately the central 7 as being wrong. Also since we have the total, we can work out what the correct value should be, and fix the error.
The method of correcting errors on CD data is similiar. We will not go into the precise mechanics, but it is worth exploring what types of errors are fixed.
The First Stage of Error Correction
We have seen that out of 32 bytes read from the CD as one "frame", we only use 24 bytes in our final data. Four of the bytes are used in the first stage of correction, the remaining four are not used till the second part. This first stage is called C1, if you like Correction one. At this point, we have 28 bytes of data, plus four bytes which help us locate any errors, just like in our previous section. Using some funky mathematics, we can detect if those 28 bytes are correct, and if not we can fix a single error straight away, making those 28 bytes good. If we cannot fix the error, there are now only a couple of options open. Some CD players attempt to fix two errors, which is possible if there really are just two errors, however the mathematics is not so reliable for more than two errors. Several errors could create a situtation that looks like only two errors, and we can end up with a frame that we think is good, but is in fact bad.
Having found a bad C1 frame, we do not know at this stage which bytes are in error, all we know is that there are at least two errors.
The De-interleaving stage
As we mentioned before, the data on a CD is scattered. For instance before we take a C1 frame of data, the data we treat is alternating from the current block of data, and the previous. A further scattering happens to the C1 frames, so that we only take one byte out of the 28 at a time, into the C2 processing, the second stage of error correction. Each byte out of C1 is delayed by a whole frame, so the first byte will be used 112 frames later, the second 108 frames later, until the last byte which is used immediately. The blocks are dealt with in sets of four, this also helps the spread of errors, since any continuous burst of errors that could occur is spread throughout 112 frames.
The Second Stage of Error Correction
At this C2 stage, we have 28 bytes which have come from 28 different C1 frames. Each of those frames was either good or bad, we can remember this with a small lookup table. At the C2 stage, we have 28 bytes, four of which are designed to help us determine if the data is good, and to effect a correction. This time round we know which bytes are wrong, and also how many of these faults exist, as contrasted to the C1 frame, where we only knew that the data did not check out.
Using some more clever mathematics, we can now fix up to four of those errors. Any more than that, and we are skuppered.
|
|