Hi Steve,

1/ While not strictly necessary, the sqrt(2)/2 sets the BPSK pilot power 
to the same level as the actual tx modem signal. I imagine the call to 
sqrt() it's compiled out anyway, and its in the run-once init code, not 
real time.

BTW as part of the software QA I ensure that the C code exactly matches 
the reference Octave code that was used to develop the modem.  So any 
changes to the C modem code need to mirrored in Octave, and unit tests 
run to ensure thy match, plus probably performance tests (i.e. a few BER 
points) of the modem to ensure nothing has broken.  I can show you how 
to do this if you like.

It's really really easy to have a bug sneak in, have done it many times 
myself!  Hence my careful testing.

2/ Re use of the question mark operator I prefer to be explicit in the C 
code and use if/(thens).  I would assume in a modern C compiler that 
there would be no efficiency gain in using ?, and (for me at least) it 
makes the code harder to read.  I don't mind the ! operator for 
inverting ints.

3/ The use of a char to save storage for filter_mem[] is an interesting 
one.  Looking at the code ...... OK this function is called at init 
time, and the memory used for filter_mem[] is allocated just temporarily 
from the stack, then returned to it before run time.

Thanks,

David

On 18/11/14 02:44, Steve wrote:
> I was trying to optimize this in another language (failed so far), but
> did notice that it could be refreshed a bit for C, as it computes
> sqrt(2) * sqrt(2) / 2 which can be simplified.
>
> Saves 960 * sizeof(float) - 960 * sizeof(char) = 2880 bytes
>
> The pilot_lut[] table was checked using both original and modified
> versions and all 640 values come out the same.
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Freetel-codec2 mailing list
> Freetel-codec2@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2
>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to