mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
Compromise on 8 bit decimator pre process shift constants so that it pads to 15 bits instead of 16. Prevents saturation in all cases.
This commit is contained in:
parent
e3575d5f5f
commit
45e04f06ae
@ -83,18 +83,18 @@ struct decimation_shifts<16, 12>
|
|||||||
template<>
|
template<>
|
||||||
struct decimation_shifts<16, 8>
|
struct decimation_shifts<16, 8>
|
||||||
{
|
{
|
||||||
static const uint pre1 = 8;
|
static const uint pre1 = 7;
|
||||||
static const uint pre2 = 7;
|
static const uint pre2 = 6;
|
||||||
static const uint post2 = 0;
|
static const uint post2 = 0;
|
||||||
static const uint pre4 = 6;
|
static const uint pre4 = 5;
|
||||||
static const uint post4 = 0;
|
static const uint post4 = 0;
|
||||||
static const uint pre8 = 5;
|
static const uint pre8 = 4;
|
||||||
static const uint post8 = 0;
|
static const uint post8 = 0;
|
||||||
static const uint pre16 = 4;
|
static const uint pre16 = 3;
|
||||||
static const uint post16 = 0;
|
static const uint post16 = 0;
|
||||||
static const uint pre32 = 3;
|
static const uint pre32 = 2;
|
||||||
static const uint post32 = 0;
|
static const uint post32 = 0;
|
||||||
static const uint pre64 = 2;
|
static const uint pre64 = 1;
|
||||||
static const uint post64 = 0;
|
static const uint post64 = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user