Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).
Hi Do you know in C55x dsps the following: I use fread to read 16-bit samples from a file but even I use "2" as the size parameter for fread but it reads 8-bit samples for each execution of "fread" function. So How can I read a 16-bit samples by fread? Also is it possible to set the arrange of memory in a manner that we could access it in byte or word(16-bit) samples. Regards ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
Hi,
As far as i know, fread and fwrite functions always operate on 8-bitsamples only, if u are
working on CCS .So after u read 8-bits , pack the successive 8-bits samples in to one 16-bit
variable as shown below.
y[i] = x[i+1] << 2 | x[i]
where i represents the no. of bytes.
where x[i] containts 8 bit sample and y[i] contains 16-bit sample, which is your required
output.
Hope, this will help you.
Regards,
sravanthi
On Tue, 10 Jun 2008 a...@yahoo.com wrote :
>Hi
>Do you know in C55x dsps the following:
>I use fread to read 16-bit samples from a file but even I use "2" as the size
parameter for fread but it reads 8-bit samples for each execution of "fread"
function. So How can I read a 16-bit samples by fread?
>
>Also is it possible to set the arrange of memory in a manner that we could access it in
byte or word(16-bit) samples.
>Regards
>
SRAVANTHI
------------------------------------
OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x