Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
44
Src/external_dependencies/openmpt-trunk/include/unrar/rs16.hpp
vendored
Normal file
44
Src/external_dependencies/openmpt-trunk/include/unrar/rs16.hpp
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
#ifndef _RAR_RS16_
|
||||
#define _RAR_RS16_
|
||||
|
||||
class RSCoder16
|
||||
{
|
||||
private:
|
||||
static const uint gfSize=65535; // Galois field size.
|
||||
void gfInit(); // Galois field inititalization.
|
||||
inline uint gfAdd(uint a,uint b); // Addition in Galois field.
|
||||
inline uint gfMul(uint a,uint b); // Multiplication in Galois field.
|
||||
inline uint gfInv(uint a); // Inverse element in Galois field.
|
||||
uint *gfExp; // Galois field exponents.
|
||||
uint *gfLog; // Galois field logarithms.
|
||||
|
||||
void MakeEncoderMatrix();
|
||||
void MakeDecoderMatrix();
|
||||
void InvertDecoderMatrix();
|
||||
|
||||
#ifdef USE_SSE
|
||||
bool SSE_UpdateECC(uint DataNum, uint ECCNum, const byte *Data, byte *ECC, size_t BlockSize);
|
||||
#endif
|
||||
|
||||
bool Decoding; // If we are decoding or encoding data.
|
||||
uint ND; // Number of data units.
|
||||
uint NR; // Number of Reed-Solomon code units.
|
||||
uint NE; // Number of erasures.
|
||||
bool *ValidFlags; // Validity flags for data and ECC units.
|
||||
uint *MX; // Cauchy based coding or decoding matrix.
|
||||
|
||||
uint *DataLog; // Buffer to store data logarithms for UpdateECC.
|
||||
size_t DataLogSize;
|
||||
|
||||
public:
|
||||
RSCoder16();
|
||||
~RSCoder16();
|
||||
|
||||
bool Init(uint DataCount, uint RecCount, bool *ValidityFlags);
|
||||
#if 0 // We use only UpdateECC now.
|
||||
void Process(const uint *Data, uint *Out);
|
||||
#endif
|
||||
void UpdateECC(uint DataNum, uint ECCNum, const byte *Data, byte *ECC, size_t BlockSize);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue