This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FFT and IFFT using CMSIS DSP library, q15 fractional format

Hello,

I am currently trying to use the CMSIS DSP library to implement DSP functionality, by doing FFT or IFFT.

I don't have an embedded Floating point Unit, thus I would like to use the fixed q15 fractional format.
By reading the CMSIS documentation html page, it is specified that the FFT/IFFT output format is different from the input one...
For example, for a FFT length of 256, the input format is q15 (1.15) and the output format is 9.7. With 8 bits to upscale.
If I want to perform an FFT and directly fllowed by an IFFT, I have to convert output FFT data  which are in 9.7 into a q15 for IFFT Input format...

My question is, from my understanding, the conversion from q15 to 9.7 or the reverse, would be just done by a simple shift of 8 bits...?
But, I guess that data may be lost between each conversion...?
It is very confused to me...

Could someone help me ...?

Thanks!

PjEmY
Parents
  • Note: This was originally posted on 15th June 2012 at http://forums.arm.com

    My question is, from my understanding, the conversion from q15 to 9.7 or the reverse, would be just done by a simple shift of 8 bits...?


    Yes. (The only possible got-cha is if the q numbers are signed as you have to be wary of what you shift into/out of the sign bit position - so you may need sign extension in some cases, rather than shifting zeros into the MSB).

    But, I guess that data may be lost between each conversion...?


    Yes. You are converting from a number with 15 fractional bits (more precision, less dynamic range) to a number with 7 fraction bits (less precision, more dynamic range). Any such conversion is obviously going to lose data off one end of the number ...

    Could someone help me ...?


    Doesn't seem like you need much =P
Reply
  • Note: This was originally posted on 15th June 2012 at http://forums.arm.com

    My question is, from my understanding, the conversion from q15 to 9.7 or the reverse, would be just done by a simple shift of 8 bits...?


    Yes. (The only possible got-cha is if the q numbers are signed as you have to be wary of what you shift into/out of the sign bit position - so you may need sign extension in some cases, rather than shifting zeros into the MSB).

    But, I guess that data may be lost between each conversion...?


    Yes. You are converting from a number with 15 fractional bits (more precision, less dynamic range) to a number with 7 fraction bits (less precision, more dynamic range). Any such conversion is obviously going to lose data off one end of the number ...

    Could someone help me ...?


    Doesn't seem like you need much =P
Children
No data