mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
IntHalBandFilter: added order 96
This commit is contained in:
parent
f5bbbb7cab
commit
06b2c4930e
@ -139,3 +139,40 @@ const qint32 HBFIRFilterTraits<80>::hbCoeffs[20] = {
|
|||||||
(qint32)( 0.3176437752925042046214798574510496109724 * (1 << hbShift)),
|
(qint32)( 0.3176437752925042046214798574510496109724 * (1 << hbShift)),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const qint16 HBFIRFilterTraits<96>::hbMod[96+6] = {
|
||||||
|
95,96,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
|
||||||
|
24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
|
||||||
|
47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,
|
||||||
|
70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,
|
||||||
|
93,94,95,96,0,1,2
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const qint32 HBFIRFilterTraits<96>::hbCoeffs[24] = {
|
||||||
|
//* Remez as in https://www.dsprelated.com/showcode/270.php */
|
||||||
|
(qint32)(-0.0000243052463317893968695708462046667364 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0000503567741519847557611806732058568059 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0001002354600628052128195172310043403741 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0001801275832684542921834081052878673290 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0003014864432246496970743687704441526876 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0004783148860127731604417744559754055445 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0007274200147704492930983422027679807798 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0010686503612886001472748187524075547117 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0015251456116906108098629779590282851132 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0021238131085570461677181075543785482296 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0028960654265650425873146467381502588978 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0038789688077727475616629515542399531114 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0051173875903961539915454359572777320864 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0066675444490017317031305132957186287967 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0086031967328669932404405784609480178915 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0110268456349653827530676863943881471641 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0140900919878225727721599014330422505736 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0180336055419063577553995258995200856589 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0232708957455770061584221508610426099040 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0305843805330435619671547442521841730922 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.0416576245224431485070226699463091790676 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.0608846679850302968661779345893592108041 * (1 << hbShift)),
|
||||||
|
(qint32)(-0.1044156487571061137087369274922821205109 * (1 << hbShift)),
|
||||||
|
(qint32)( 0.3177437550265513332981015537370694801211 * (1 << hbShift)),
|
||||||
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// uses Q1.14 format internally, input and output are S16
|
// uses Q1.14 format internally, input and output are S16
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* supported filter orders: 80, 64, 48, 32
|
* supported filter orders: 96, 80, 64, 48, 32
|
||||||
* any usage of another value will be prevented by compilation errors
|
* any usage of another value will be prevented by compilation errors
|
||||||
*/
|
*/
|
||||||
template<uint32_t HBFilterOrder>
|
template<uint32_t HBFilterOrder>
|
||||||
@ -52,6 +52,15 @@ struct HBFIRFilterTraits<80>
|
|||||||
static const qint32 hbCoeffs[20];
|
static const qint32 hbCoeffs[20];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct HBFIRFilterTraits<96>
|
||||||
|
{
|
||||||
|
static const qint32 hbOrder = 96;
|
||||||
|
static const qint32 hbShift = 16;
|
||||||
|
static const qint16 hbMod[96+6];
|
||||||
|
static const qint32 hbCoeffs[24];
|
||||||
|
};
|
||||||
|
|
||||||
template<uint32_t HBFilterOrder>
|
template<uint32_t HBFilterOrder>
|
||||||
class SDRANGEL_API IntHalfbandFilter {
|
class SDRANGEL_API IntHalfbandFilter {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user