Multiply matrix to data vector. When encoding, it contains data in Data and stores error correction codes in Out. When decoding it contains broken data followed by ECC in Data and stores recovered data to Out. We do not use this function now, everything is moved to UpdateECC.
| 221 | // broken data followed by ECC in Data and stores recovered data to Out. |
| 222 | // We do not use this function now, everything is moved to UpdateECC. |
| 223 | void RSCoder16::Process(const uint *Data, uint *Out) |
| 224 | { |
| 225 | uint ProcData[gfSize]; |
| 226 | |
| 227 | for (uint I = 0; I < ND; I++) |
| 228 | ProcData[I]=Data[I]; |
| 229 | |
| 230 | if (Decoding) |
| 231 | { |
| 232 | // Replace broken data units with first available valid recovery codes. |
| 233 | // 'Data' array must contain recovery codes after data. |
| 234 | for (uint I=0, R=ND, Dest=0; I < ND; I++) |
| 235 | if (!ValidFlags[I]) // For every broken data unit. |
| 236 | { |
| 237 | while (!ValidFlags[R]) // Find a valid recovery unit. |
| 238 | R++; |
| 239 | ProcData[I]=Data[R]; |
| 240 | R++; |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | uint H=Decoding ? NE : NR; |
| 245 | for (uint I = 0; I < H; I++) |
| 246 | { |
| 247 | uint R = 0; // Result of matrix row multiplication to data. |
| 248 | |
| 249 | uint *MXi=MX + I * ND; |
| 250 | for (uint J = 0; J < ND; J++) |
| 251 | R ^= gfMul(MXi[J], ProcData[J]); |
| 252 | |
| 253 | Out[I] = R; |
| 254 | } |
| 255 | } |
| 256 | #endif |
| 257 | |
| 258 |
nothing calls this directly
no outgoing calls
no test coverage detected