mirror of https://github.com/status-im/leopard.git
Fixes
This commit is contained in:
parent
dfb363c992
commit
9bb3375342
|
@ -845,7 +845,7 @@ void Encode(
|
|||
unsigned original_count,
|
||||
unsigned recovery_count,
|
||||
unsigned m,
|
||||
void* const * const data,
|
||||
void* const * data,
|
||||
void** work)
|
||||
{
|
||||
// work <- data
|
||||
|
@ -890,6 +890,7 @@ void Encode(
|
|||
{
|
||||
// temp <- data + i
|
||||
|
||||
data += m;
|
||||
void** temp = work + m;
|
||||
|
||||
// FIXME: Unroll first loop to eliminate this
|
||||
|
@ -930,6 +931,7 @@ void Encode(
|
|||
|
||||
// temp <- data + i
|
||||
|
||||
data += m;
|
||||
void** temp = work + m;
|
||||
|
||||
for (unsigned j = 0; j < last_count; ++j)
|
||||
|
@ -971,9 +973,10 @@ void Encode(
|
|||
temp);
|
||||
}
|
||||
|
||||
// work <- FFT(work, m, 0)
|
||||
skip_body:
|
||||
|
||||
// work <- FFT(work, m, 0)
|
||||
|
||||
for (unsigned width = (m >> 1); width > 0; width >>= 1)
|
||||
{
|
||||
const ffe_t* skewLUT = FFTSkew + width - 1;
|
||||
|
@ -1201,7 +1204,7 @@ void Decode(
|
|||
width,
|
||||
work + j,
|
||||
work + j + width,
|
||||
FFTSkew[j]);
|
||||
skewLUT[j]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ struct TestParameters
|
|||
unsigned original_count = 1000; // under 65536
|
||||
unsigned recovery_count = 100; // under 65536 - original_count
|
||||
#else
|
||||
unsigned original_count = 200; // under 65536
|
||||
unsigned original_count = 100; // under 65536
|
||||
unsigned recovery_count = 10; // under 65536 - original_count
|
||||
#endif
|
||||
unsigned buffer_bytes = 64000; // multiple of 64 bytes
|
||||
|
@ -511,7 +511,6 @@ static void BasicTest(const TestParameters& params)
|
|||
{
|
||||
if (!original_data[i])
|
||||
{
|
||||
cout << "Checking " << i << endl;
|
||||
if (!CheckPacket(decode_work_data[i], params.buffer_bytes))
|
||||
{
|
||||
cout << "Error: Data was corrupted" << endl;
|
||||
|
|
|
@ -554,6 +554,7 @@ void test(unsigned original_count, unsigned recovery_count, unsigned seed)
|
|||
for (unsigned i = m; i < m + recovery_count; ++i)
|
||||
erasure[i] = true;
|
||||
|
||||
#if 0
|
||||
// permuting the erasure array
|
||||
for (unsigned i = m + original_count - 1; i > 0; --i)
|
||||
{
|
||||
|
@ -566,6 +567,7 @@ void test(unsigned original_count, unsigned recovery_count, unsigned seed)
|
|||
erasure[pos] = tmp;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//---------main processing----------
|
||||
|
@ -604,8 +606,8 @@ int main(int argc, char **argv)
|
|||
for (;;)
|
||||
{
|
||||
#ifdef LEO_SHORT_FIELD
|
||||
const unsigned input_count = 100;
|
||||
const unsigned recovery_count = 10;
|
||||
const unsigned input_count = 128;
|
||||
const unsigned recovery_count = 128;
|
||||
#else // LEO_SHORT_FIELD
|
||||
const unsigned input_count = 10000;
|
||||
const unsigned recovery_count = 2000;
|
||||
|
|
Loading…
Reference in New Issue