[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] attribute/control stream question

From: Eric A. Cottrell
Subject: [Discuss-gnuradio] attribute/control stream question
Date: Tue, 12 Jun 2007 11:49:27 -0400
User-agent: Thunderbird (X11/20060911)


The processing of pulses into data requires me to keep track of valid
pulses (following samples are above threshold) and leading edges (sample
is 6 dB or more than previous sample and following sample is 6 dB or
less than current sample).  I also want to indicate preamble start and
pass timestamps along.  I have thought of three methods to do this but
do not know which would be the best one.

The first method is to have two streams through the blocks, one a float
stream containing the sample values and the other a short or int stream
containing the attributes and control.  The float data makes it easier
to do processing as some of the blocks use 3 dB multiplication of the
samples (1.414 and 0.707).  Being an old programmer I still have the
float equals slow performance mindset.

The second method is to have the two streams as shorts.  I have to deal
with an integer multiplication and division (sample * 707 / 1000).  I
have no handle if integers would be faster than floats other than
integer division tends to be expensive.

The third method is to use one integer stream and have the upper 16 bits
be the attributes/control and the lower 16 bits be the value.  This
method has an additional minor disadvantage over the second method of
needing to mask off the upper 16 bits when using the value but I do not
have to deal with two streams.

73 Eric

reply via email to

[Prev in Thread] Current Thread [Next in Thread]