mirror of https://github.com/status-im/leopard.git
Speed up decoder with new DIT-IFFT
This commit is contained in:
parent
ac68c62d28
commit
8c35c8d4de
|
@ -1345,23 +1345,14 @@ void ReedSolomonDecode(
|
||||||
|
|
||||||
// work <- IFFT(work, n, 0)
|
// work <- IFFT(work, n, 0)
|
||||||
|
|
||||||
const unsigned input_count = m + original_count;
|
IFFT_DIT(
|
||||||
unsigned mip_level = 0;
|
buffer_bytes,
|
||||||
|
nullptr,
|
||||||
for (unsigned width = 1; width < n; width <<= 1, ++mip_level)
|
n,
|
||||||
{
|
work,
|
||||||
const unsigned range = width << 1;
|
nullptr,
|
||||||
|
n,
|
||||||
for (unsigned j = width; j < n; j += range)
|
FFTSkew - 1);
|
||||||
{
|
|
||||||
VectorIFFTButterfly(
|
|
||||||
buffer_bytes,
|
|
||||||
width,
|
|
||||||
work + j - width,
|
|
||||||
work + j,
|
|
||||||
FFTSkew[j - 1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// work <- FormalDerivative(work, n)
|
// work <- FormalDerivative(work, n)
|
||||||
|
|
||||||
|
@ -1378,6 +1369,7 @@ void ReedSolomonDecode(
|
||||||
|
|
||||||
// work <- FFT(work, n, 0) truncated to m + original_count
|
// work <- FFT(work, n, 0) truncated to m + original_count
|
||||||
|
|
||||||
|
unsigned mip_level = LastNonzeroBit32(n);
|
||||||
const unsigned output_count = m + original_count;
|
const unsigned output_count = m + original_count;
|
||||||
for (unsigned width = (n >> 1); width > 0; width >>= 1, --mip_level)
|
for (unsigned width = (n >> 1); width > 0; width >>= 1, --mip_level)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ struct TestParameters
|
||||||
unsigned original_count = 128; // under 65536
|
unsigned original_count = 128; // under 65536
|
||||||
unsigned recovery_count = 128; // under 65536 - original_count
|
unsigned recovery_count = 128; // under 65536 - original_count
|
||||||
#endif
|
#endif
|
||||||
unsigned buffer_bytes = 64; // multiple of 64 bytes
|
unsigned buffer_bytes = 64000; // multiple of 64 bytes
|
||||||
unsigned loss_count = 32768; // some fraction of original_count
|
unsigned loss_count = 32768; // some fraction of original_count
|
||||||
unsigned seed = 2;
|
unsigned seed = 2;
|
||||||
bool multithreaded = true;
|
bool multithreaded = true;
|
||||||
|
@ -399,7 +399,7 @@ static LEO_FORCE_INLINE void SIMDSafeFree(void* ptr)
|
||||||
|
|
||||||
static bool BasicTest(const TestParameters& params)
|
static bool BasicTest(const TestParameters& params)
|
||||||
{
|
{
|
||||||
const unsigned kTrials = params.original_count > 8000 ? 1 : 100000;
|
const unsigned kTrials = params.original_count > 8000 ? 1 : 100;
|
||||||
|
|
||||||
std::vector<uint8_t*> original_data(params.original_count);
|
std::vector<uint8_t*> original_data(params.original_count);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue