I have tested the speeds of both and the lookup tables do work faster.
Greyscale is a bit fatser as it has to lookup and calculate less then color mode.
Heres the color
Heres the greyscale
The other slow down is uploading the new pixmap to the image/gfx card every time it needs to be drawn.
I have optimised this as far as possible within 'standard' BlitzMax without using any OpenGL fixes that there may be.
Greyscale is a bit fatser as it has to lookup and calculate less then color mode.
Heres the color
tmp = (Y[ypoint]<<8) + U[upoint]; r = yuv_r[tmp]; tmp = (Y[ypoint]<<16) + (U[upoint]<<8) + V[vpoint]; g = yuv_g[tmp]; tmp = (Y[ypoint]<<8) + V[vpoint]; b = yuv_b[tmp];
Heres the greyscale
g = yuv_bw[Y[ypoint]];
The other slow down is uploading the new pixmap to the image/gfx card every time it needs to be drawn.
I have optimised this as far as possible within 'standard' BlitzMax without using any OpenGL fixes that there may be.