Handling DVD Errors

written by: Corrado Passein; article published: year 2006, month 11;


In: Root » Computers and technology » Storage devices » Handling DVD Errors

Dutch French Spanish Portuguese Italian German Japanese Chinese Korean Russian Arabic Bookmark and Share this Article

DVDs use more powerful error correcting codes than were first devised for CDs. Unlike CDs, which have different levels of error correction depending on whether audio/video or data is being stored, DVDs treat all information equally and apply the full error correction to all sectors.

The main error correcting in DVDs takes place in the ECC frame. Parity outer (column) and parity inner (row) bits are added to detect and correct errors. The scheme is simple and yet very effective. The information from the data frames is first broken up into 192 rows of 172 bytes each. Then, a polynomial equation is used to calculate and add 10 PI bytes to each row, making the rows now 182 bytes each. Finally, another polynomial equation is used to calculate 16 PO (Parity Outer) bytes for each column, resulting in 16 bytes (rows) being added to each column. What started out as 192 rows of 172 bytes becomes 208 rows of 182 bytes with the PI and PO information added.

The function of the PI and PO bytes can be explained with a simple example using simple parity. In this example, 2 bytes are stored (01001110 = N, 01001111 = O). To add the error correcting information, they are organized in rows, as shown in the following:

            Data bits              
            1 2 3 4 5 6 7 8 
-------------------------------  
Byte 1      0 1 0 0 1 1 1 0  
Byte 2      0 1 0 0 1 1 1 1  
-------------------------------  

Then, 1 PI bit is added for each row, using odd parity. This means you count up the 1 bits: In the first row there are 4, so the parity bit is created as a 1, making the sum an odd number. In the second row, the parity bit is a 0 because the sum of the 1s was already an odd number. The result is as follows:

                 Data bits       |               
                 1 2 3 4 5 6 7 8 |     
PI  -----------------------------|---------  
Byte 1           0 1 0 0 1 1 1 0 |    1  
Byte 2           0 1 0 0 1 1 1 1 |    0  
---------------------------------|---------  

Next, the parity bits for each column are added and calculated the same as before. In other words, the parity bit will be such that the sum of the 1s in each column is an odd number. The result is as follows:

             Data bits           |               
             1 2 3 4 5 6 7 8     |      PI  
---------------------------------|---------  
Byte 1       0 1 0 0 1 1 1 0     |      1  
Byte 2       0 1 0 0 1 1 1 1     |      0  
---------------------------------|---------      
PO           1 1 1 1 1 1 1 0     |      1  

Now the code is complete, and the extra bits are stored along with the data. So, instead of just the 2 bytes being stored, 11 additional bits are stored for error correction. When the data is read back, the error correction bit calculations are repeated and they're checked to see whether they are the same as before. To see how it works, let's change one of the data bits (due to a read error) and recalculate the error correcting bits as follows:

             Data bits           |               
             1 2 3 4 5 6 7 8     |      PI  
---------------------------------|---------  
Byte 1       0 1 0 0 1 0 1 0     |      0  
Byte 2       0 1 0 0 1 1 1 1     |      0  
---------------------------------|---------      
PO           1 1 1 1 1 0 1 0     |      1  

Now, when you compare the PI and PO bits you calculated after reading the data to what was originally stored, you see a change in the PI bit for byte (row) 1 and in the PO bit for bit (column) 6. This identifies the precise row and column where the error was, which is at byte 1 (row 1), bit 6 (column 6). That bit was read as a 0, and you now know it is wrong, so it must have been a 1. The error correction circuitry then simply changes it back to a 1 before passing it back to the system. As you can see, with some extra information added to each row and column, error correction codes can indeed detect and correct errors on-the-fly.

Besides the ECC frames, DVDs also scramble the data in the frames using a bit-shift technique and also interleave parts of the ECC frames when they are actually recorded on the disc. These schemes serve to store the data somewhat out of sequence, preventing a scratch from corrupting consecutive pieces of data.

Disclaimer

1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here.

link to this article