aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gamma_corr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gamma_corr.c b/gamma_corr.c
index c0e5cd4..2a85b1e 100644
--- a/gamma_corr.c
+++ b/gamma_corr.c
@@ -97,7 +97,7 @@ int gamma_corr(struct gamma_data_t *gamma_data) {
*/
if(gamma_table_bitdepth != bit_channel || gamma != gamma_table_init) {
for(i = 0; i <= max_pix; i++) {
- gamma_table[i] = roundf(max_pix*pow(i/((float)max_pix), 1.0/gamma));
+ gamma_table[i] = roundf(max_pix*pow(i/((float)max_pix), gamma));
}
gamma_data->gamma_table_bitdepth = bit_channel;
gamma_data->gamma_table_init = gamma;
@@ -110,4 +110,4 @@ int gamma_corr(struct gamma_data_t *gamma_data) {
gamma_corr16(img_gamma, img_in, height, width, gamma_table, is_color);
}
return 0;
-} \ No newline at end of file
+}