[MPlayer-dev-eng] [PATCH] vop eq2 with gamma correction
Milan Cutka
cutka at szm.sk
Wed Sep 25 07:50:35 CEST 2002
> for (j = 0; j < h; j++) {
> for (i = 0; i < w; i++) {
> *(dst++) = lut[*(src++)];
> }
> }
You could try this:
for (j = 0; j < h; j++) {
for (i = 0; i < w; i+=4,src+=4,dst+=4) {
*(unsigned int*)dst=(lut[src[3]]<<24)|(lut[src[2]]<<16)|(lut[src[1]]<<8)|lut[src[0]];
}
}
It works faster for me in ffdshow. Of course the best would be to add
some MMX optimizations, but I don't know how it would be possible to use MMX here.
For faster but not precise MMX optimized gamma correction look here:
http://www.stereopsis.com/polygamma.html.
Milan
More information about the MPlayer-dev-eng
mailing list