| 125 | |
| 126 | |
| 127 | void RSCoder16::MakeDecoderMatrix() |
| 128 | { |
| 129 | // Create Cauchy decoder matrix. Skip trivial rows matching valid data |
| 130 | // units and containing "1" on main diagonal. Such rows would just copy |
| 131 | // source data to destination and they have no real value for us. |
| 132 | // Include rows only for broken data units and replace them by first |
| 133 | // available valid recovery code rows. |
| 134 | for (uint Flag=0, R=ND, Dest=0; Flag < ND; Flag++) |
| 135 | if (!ValidFlags[Flag]) // For every broken data unit. |
| 136 | { |
| 137 | while (!ValidFlags[R]) // Find a valid recovery unit. |
| 138 | R++; |
| 139 | for (uint J = 0; J < ND; J++) // And place its row to matrix. |
| 140 | MX[Dest*ND + J] = gfInv( gfAdd(R,J) ); |
| 141 | Dest++; |
| 142 | R++; |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | |
| 147 | // Apply Gauss�Jordan elimination to find inverse of decoder matrix. |
nothing calls this directly
no outgoing calls
no test coverage detected