In a follow-up to some previous questions on converting RGB to RGBA, and ARGB to BGR, I would like to speed up a RGB to BGRA conversion with SSE
I personally found that implementing the following gave me the best result for converting BGR-24 to ARGB-32.
This code runs at about 8.8ms on an image whereas the 128-bit vectorization code presented above came in at 14.5ms per image.
void PixelFix(u_int32_t *buff,unsigned char *diskmem)
{
int i,j;
int picptr, srcptr;
int w = 1920;
int h = 1080;
for (j=0; j
Previously, I had been using this routine (about 13.2ms per image). Here, buff is an unsigned char*.
for (j=0; j
Running a 2012 MacMini 2.6ghz/i7.