ref: 58a497dc29a722412f62fa3d9ea9bcd42abf424b
parent: fcc4f3fa21d82925e23cfb96564d5d3aefd9a0b5
parent: 3ddff4503ac59c5280e393545145fad4b5da58e3
author: James Zern <[email protected]>
date: Fri Aug 26 14:47:39 EDT 2016
Merge "add_noise,vpx_setup_noise: correct 'char_dist' type"
--- a/vpx_dsp/add_noise.c
+++ b/vpx_dsp/add_noise.c
@@ -43,7 +43,7 @@
}
int vpx_setup_noise(double sigma, int8_t *noise, int size) {
- char char_dist[256];
+ int8_t char_dist[256];
int next = 0, i, j;
// set up a 256 entry lookup that matches gaussian distribution
@@ -51,7 +51,7 @@
const int a_i = (int)(0.5 + 256 * gaussian(sigma, 0, i));
if (a_i) {
for (j = 0; j < a_i; ++j) {
- char_dist[next + j] = (char)i;
+ char_dist[next + j] = (int8_t)i;
}
next = next + j;
}