2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2012-03-21 08:44:43 +01:00
|
|
|
|
2020-02-05 19:49:18 +01:00
|
|
|
#include "BitReverse.hxx"
|
2012-03-21 08:44:43 +01:00
|
|
|
|
2020-02-05 19:51:46 +01:00
|
|
|
static constexpr BitReverseTable
|
|
|
|
GenerateBitReverseTable() noexcept
|
2012-03-21 08:44:43 +01:00
|
|
|
{
|
2020-02-05 19:51:46 +01:00
|
|
|
BitReverseTable table{};
|
|
|
|
for (unsigned i = 0; i < 256; ++i)
|
|
|
|
table.data[i] = BitReverseMultiplyModulus(i);
|
|
|
|
return table;
|
|
|
|
}
|
|
|
|
|
|
|
|
const BitReverseTable bit_reverse_table = GenerateBitReverseTable();
|