Update LSF puncture matrix P1 to new proposed matrix.

new_P1
Rob Riggs 2021-08-21 19:20:56 -05:00
rodzic 742fd593c3
commit 6189065b84
1 zmienionych plików z 14 dodań i 8 usunięć

Wyświetl plik

@ -15,14 +15,20 @@
namespace mobilinkd
{
/// Puncture matrix for linx setup frame.
inline constexpr auto P1 = std::experimental::make_array<int8_t>(
1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0,
1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0,
1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1,
0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1,
0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1,
1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1);
inline constexpr std::array<int8_t, 61> make_p1() {
std::array<int8_t, 61> result{};
for (size_t i = 0, j = 2; i != 61; ++i) {
if (i == j) {
result[i] = 0;
j += 4;
} else {
result[i] = 1;
}
}
return result;
};
inline constexpr auto P1 = make_p1();
/// Puncture matrix for audio frames. Rate 6/11.
inline constexpr auto P2 = std::experimental::make_array<int8_t>(