Fix DSB channel filter taps, don't saturate max tap value.

This commit is contained in:
Jared Boone 2016-01-30 20:45:16 -08:00
parent a79aa3e580
commit ccafc1e82c

View File

@ -189,26 +189,30 @@ constexpr fir_taps_real<32> taps_6k0_decim_2 {
} },
};
// Channel filter: fs=12000, pass=3000, stop=3300, decim=1, fout=12000
/* NOTE: Slightly less than 1.0 gain (normalized to 65536) due to max(taps) being
* slightly larger than 32767 (33312).
*/
constexpr fir_taps_complex<64> taps_6k0_dsb_channel {
.pass_frequency_normalized = 3000.0f / 12000.0f,
.stop_frequency_normalized = 3300.0f / 12000.0f,
.taps = { {
{ -70, 0 }, { -142, 0 }, { 121, 0 }, { 90, 0 },
{ -134, 0 }, { -136, 0 }, { 200, 0 }, { 170, 0 },
{ -278, 0 }, { -209, 0 }, { 378, 0 }, { 251, 0 },
{ -505, 0 }, { -294, 0 }, { 665, 0 }, { 336, 0 },
{ -868, 0 }, { -378, 0 }, { 1131, 0 }, { 417, 0 },
{ -1479, 0 }, { -453, 0 }, { 1965, 0 }, { 484, 0 },
{ -2698, 0 }, { -510, 0 }, { 3967, 0 }, { 528, 0 },
{ -6829, 0 }, { -540, 0 }, { 20819, 0 }, { 32767, 0 }, /* TODO: Saturated peak! Originally 33312. */
{ 20819, 0 }, { -540, 0 }, { -6829, 0 }, { 528, 0 },
{ 3967, 0 }, { -510, 0 }, { -2698, 0 }, { 484, 0 },
{ 1965, 0 }, { -453, 0 }, { -1479, 0 }, { 417, 0 },
{ 1131, 0 }, { -378, 0 }, { -868, 0 }, { 336, 0 },
{ 665, 0 }, { -294, 0 }, { -505, 0 }, { 251, 0 },
{ 378, 0 }, { -209, 0 }, { -278, 0 }, { 170, 0 },
{ 200, 0 }, { -136, 0 }, { -134, 0 }, { 90, 0 },
{ 121, 0 }, { -142, 0 }, { -70, 0 }, { 0, 0 },
{ -69, 0 }, { -140, 0 }, { 119, 0 }, { 89, 0 },
{ -132, 0 }, { -134, 0 }, { 197, 0 }, { 167, 0 },
{ -273, 0 }, { -206, 0 }, { 372, 0 }, { 247, 0 },
{ -497, 0 }, { -289, 0 }, { 654, 0 }, { 331, 0 },
{ -854, 0 }, { -372, 0 }, { 1112, 0 }, { 411, 0 },
{ -1455, 0 }, { -446, 0 }, { 1933, 0 }, { 476, 0 },
{ -2654, 0 }, { -501, 0 }, { 3902, 0 }, { 520, 0 },
{ -6717, 0 }, { -531, 0 }, { 20478, 0 }, { 32767, 0 },
{ 20478, 0 }, { -531, 0 }, { -6717, 0 }, { 520, 0 },
{ 3902, 0 }, { -501, 0 }, { -2654, 0 }, { 476, 0 },
{ 1933, 0 }, { -446, 0 }, { -1455, 0 }, { 411, 0 },
{ 1112, 0 }, { -372, 0 }, { -854, 0 }, { 331, 0 },
{ 654, 0 }, { -289, 0 }, { -497, 0 }, { 247, 0 },
{ 372, 0 }, { -206, 0 }, { -273, 0 }, { 167, 0 },
{ 197, 0 }, { -134, 0 }, { -132, 0 }, { 89, 0 },
{ 119, 0 }, { -140, 0 }, { -69, 0 }, { 0, 0 },
} },
};