IPP Memory Copy

IPP Memory Copy

I want to do memory copy as follows, but I can not find the related IPP functions for PXA, could you help me please?

Thanks,

David

/*
* SRC - the source buffer
* DST - the destination buffer
*
* Then the function does the 8->16 bit transfer and this serie of operations :
*
* SRC (8bit) = SRC
* DST (16bit) = SRC
*
*/

void
transfer_8to16copy_c(int16_t * const dst,
const uint8_t * const src,
uint32_t stride)
{
uint32_t i, j;
for (j = 0; j < 8; j++) {
for (i = 0; i < 8; i++) {
dst[j * 8 + i] = (int16_t) src[j * stride + i];
}
}
}
/*
* SRC - the source buffer
* DST - the destination buffer
*
* Then the function does the 8->16 bit transfer and this serie of operations :
*
* SRC (16bit) = SRC
* DST (8bit) = max(min(SRC, 255), 0)
*/
void
transfer_16to8copy_c(uint8_t * const dst,
const int16_t * const src,
uint32_t stride)
{
uint32_t i, j;
for (j = 0; j < 8; j++) {
for (i = 0; i < 8; i++) {
int16_t pixel = src[j * 8 + i];
if (pixel < 0) {
pixel = 0;
} else if (pixel > 255) {
pixel = 255;
}
dst[j * stride + i] = (uint8_t) pixel;
}
}
}

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
vladimir-dudnik (Intel)'s picture

You are right, we do not have such function in IPP for PCA. Do you think it will be useful to have it? If so, please submit your request through technical support channel.

Regards,
Vladimir

Login to leave a comment.