comparison wc3movie.c @ 4865:1273a2b9c32a libavformat

Slightly improve/correct description of wc3_pal_lookup
author reimar
date Sun, 12 Apr 2009 08:49:20 +0000
parents adec0fc30104
children 4211f91f69b1
comparison
equal deleted inserted replaced
4864:7aa7c5853bb6 4865:1273a2b9c32a
74 74
75 /** 75 /**
76 * palette lookup table that does gamma correction 76 * palette lookup table that does gamma correction
77 * 77 *
78 * can be calculated by this formula: 78 * can be calculated by this formula:
79 * for i between 0 and 252 inclusive: 79 * for i between 0 and 251 inclusive:
80 * wc3_pal_lookup[i] = pow(i / 256.0, 0.8) * 256; 80 * wc3_pal_lookup[i] = round(pow(i / 256.0, 0.8) * 256);
81 * values 253, 254 and 255 are all 0xFD 81 * values 252, 253, 254 and 255 are all 0xFD
82 * calculating this at runtime should not cause any 82 * calculating this at runtime should not cause any
83 * rounding issues, the maximum difference between 83 * rounding issues, the maximum difference between
84 * the table values and the calculated doubles is 84 * the table values and the calculated doubles is
85 * about 0.497527 85 * about 0.497527
86 */ 86 */