Speed up decoder with new DIT-IFFT

This commit is contained in:
Christopher Taylor 2017-05-31 01:20:17 -07:00
parent ac68c62d28
commit 8c35c8d4de
2 changed files with 11 additions and 19 deletions

View File

@ -1345,23 +1345,14 @@ void ReedSolomonDecode(
// work <- IFFT(work, n, 0)
const unsigned input_count = m + original_count;
unsigned mip_level = 0;
for (unsigned width = 1; width < n; width <<= 1, ++mip_level)
{
const unsigned range = width << 1;
for (unsigned j = width; j < n; j += range)
{
VectorIFFTButterfly(
buffer_bytes,
width,
work + j - width,
work + j,
FFTSkew[j - 1]);
}
}
IFFT_DIT(
buffer_bytes,
nullptr,
n,
work,
nullptr,
n,
FFTSkew - 1);
// work <- FormalDerivative(work, n)
@ -1378,6 +1369,7 @@ void ReedSolomonDecode(
// work <- FFT(work, n, 0) truncated to m + original_count
unsigned mip_level = LastNonzeroBit32(n);
const unsigned output_count = m + original_count;
for (unsigned width = (n >> 1); width > 0; width >>= 1, --mip_level)
{

View File

@ -48,7 +48,7 @@ struct TestParameters
unsigned original_count = 128; // under 65536
unsigned recovery_count = 128; // under 65536 - original_count
#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 seed = 2;
bool multithreaded = true;
@ -399,7 +399,7 @@ static LEO_FORCE_INLINE void SIMDSafeFree(void* ptr)
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);