I try to implement your code in Arduino, by storing the array in PROGMEM and using it to modify pixel values. I use FastLED so my updates are fast (about 1ms for noise, sending pixels and more)
Still I don't get the right effect, so I might still miss something. What happens in the two functions below?
#define fb2color(n,shiftin,shiftout) ((gammaTableDithered[ (n>>shiftin)&0xff ])<<shiftout)
#define adjustRGB(rgb) (fb2color(rgb,16,0) | fb2color(rgb,8,8) | fb2color(rgb,0,16))
What does do parts fb2color(rgb,16,0) etc. do? Right now the gamma is not stable, but different colors get a different brightness. The primaries (r,b,g) are really bright the other colors not.
I ported your code to Arduino like below. I hope you can help.
for (int i=0; i <NUM_LEDS; i++)
{
CRGB pixel = CHSV(hue,255,noise[i]);
pixel.r = pgm_read_byte_near(gammaTable + (ditherFrame<<8) + (pixel.r));
pixel.g = pgm_read_byte_near(gammaTable + (ditherFrame<<8) + (pixel.g));
pixel.b = pgm_read_byte_near(gammaTable + (ditherFrame<<8) + (pixel.b));
leds[i] = pixel;
}
ditherFrame++;
if(ditherFrame>15) ditherFrame = 0;
FastLED.show();