I & Q samples in a source module

My source modules has 16-bit I & Q samples that are interleaved:
I,Q,I,Q,I,Q… as signed 16 bit values. I generate 512 pairs at a time
in
my work function (C++). I set noutput_items to 512 and copy I and Q
out
512 times to the output_items variable in the work function. Is this
the
correct format of data that subsequent modules can expect? I use the
IShort_to_Complex module to convert the samples for subsequent modules.

Thanks,
Y-

Hi Y,

I set noutput_items to 512
no, noutput_items is the maximum number you’re allowed to produce, it
doesn’t change anything if you set it to anything. You just return the
number of items you’ve produced at the end of your work (or
general_work) function. Make sure to not write more items than
noutput_items allows you to do!

If you’re returning 512, this tells the scheduler you’ve produced 512
items – I don’t know what your block’s output signature looks like,
but an item has the size of 2x 16bit, it’s right.

Best regards,
Marcus

Y,

yes, if you’re producing 512 I+Q, you’re actually producing either 1024
items of sizeof(unsigned short) or 512 items of sizeof(unsigned
short)*2.
I’d like to repeat that you must make sure that the number of items
you write into your output buffer is ??? noutput_items!
What kind of block are you writing?

Best regards,
Marcus

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs