proper scaling

Signed-off-by: Dimitri Stolnikov <horiz0n@gmx.net>
This commit is contained in:
Hoernchen 2012-04-09 22:47:46 +02:00 committed by Dimitri Stolnikov
parent 519eb053bc
commit 43b35f0f0d
1 changed files with 4 additions and 4 deletions

View File

@ -80,11 +80,11 @@ rtl_source_c::rtl_source_c (const std::string &args)
for (unsigned int i = 0; i <= 0xffff; i++)
{
#if 1 // little endian
_lut.push_back( gr_complex( (float(i & 0xff) - 127.0) * 0.00787,
(float(i >> 8) - 127.0) * 0.00787 ) );
_lut.push_back( gr_complex( (float(i & 0xff) - 127.5f) *(1.0f/128.0f),
(float(i >> 8) - 127.5f) * (1.0f/128.0f) ) );
#else // big endian
_lut.push_back( gr_complex( (float(i >> 8) - 127.0) * 0.00787,
(float(i & 0xff) - 127.0) * 0.00787 ) );
_lut.push_back( gr_complex( (float(i >> 8) - 127.5f) * (1.0f/128.0f),
(float(i & 0xff) - 127.5f) * (1.0f/128.0f) ) );
#endif
}