DSPF_blk_eswap32
Algorithm
Special Requirements
4-72
This is the C equivalent of the assembly code. Note that the assembly code
is hand optimized and restrictions may apply.
void DSPF_blk_eswap32(void *restrict x, void *restrict r, int
nx)
{
int i;
char *_src, *_dst;
if (r)
{
_src = (char *)x;
_dst = (char *)r;
}
else
{
_src = (char *)x;
_dst = (char *)x;
}
for (i = 0; i < nx; i++)
{
char t0, t1, t2, t3;
t0 = _src[i*4 + 3];
t1 = _src[i*4 + 2];
t2 = _src[i*4 + 1];
t3 = _src[i*4 + 0];
_dst[i*4 + 0] = t0;
_dst[i*4 + 1] = t1;
_dst[i*4 + 2] = t2;
_dst[i*4 + 3] = t3;
}
}
-
nx is greater than 0 and multiple of 2.
-
x and r should be word aligned.
-
Input array x and Output array r do not overlap, except in the special case
"r==NULL" so that the operation occurs in place.
Need help?
Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?
Questions and answers