• Home
  • Raw
  • Download

Lines Matching refs:gamma

41 static void CalculateGammaRamp(float gamma, Uint16 *ramp)  in CalculateGammaRamp()  argument
46 if ( gamma <= 0.0f ) { in CalculateGammaRamp()
53 if ( gamma == 1.0f ) { in CalculateGammaRamp()
61 gamma = 1.0f / gamma; in CalculateGammaRamp()
63 value = (int)(pow((double)i/256.0, gamma)*65535.0+0.5); in CalculateGammaRamp()
71 static void CalculateGammaFromRamp(float *gamma, Uint16 *ramp) in CalculateGammaFromRamp() argument
79 *gamma = 1.0; in CalculateGammaFromRamp()
89 *gamma = 1.0f / (sum / count); in CalculateGammaFromRamp()
158 if ( ! video->gamma ) { in SDL_SetGammaRamp()
164 SDL_memcpy(&video->gamma[0*256], red, 256*sizeof(*video->gamma)); in SDL_SetGammaRamp()
167 SDL_memcpy(&video->gamma[1*256], green, 256*sizeof(*video->gamma)); in SDL_SetGammaRamp()
170 SDL_memcpy(&video->gamma[2*256], blue, 256*sizeof(*video->gamma)); in SDL_SetGammaRamp()
189 succeeded = video->SetGammaRamp(this, video->gamma); in SDL_SetGammaRamp()
202 if ( ! video->gamma ) { in SDL_GetGammaRamp()
203 video->gamma = SDL_malloc(3*256*sizeof(*video->gamma)); in SDL_GetGammaRamp()
204 if ( ! video->gamma ) { in SDL_GetGammaRamp()
210 video->GetGammaRamp(this, video->gamma); in SDL_GetGammaRamp()
215 video->gamma[0*256+i] = (i << 8) | i; in SDL_GetGammaRamp()
216 video->gamma[1*256+i] = (i << 8) | i; in SDL_GetGammaRamp()
217 video->gamma[2*256+i] = (i << 8) | i; in SDL_GetGammaRamp()
224 SDL_memcpy(red, &video->gamma[0*256], 256*sizeof(*red)); in SDL_GetGammaRamp()
227 SDL_memcpy(green, &video->gamma[1*256], 256*sizeof(*green)); in SDL_GetGammaRamp()
230 SDL_memcpy(blue, &video->gamma[2*256], 256*sizeof(*blue)); in SDL_GetGammaRamp()