summaryrefslogtreecommitdiff
path: root/vpx_dsp
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-08-24 21:46:26 -0700
committerJames Zern <jzern@google.com>2016-08-24 21:46:26 -0700
commit3ddff4503ac59c5280e393545145fad4b5da58e3 (patch)
tree3a4d657bd774da901cee45f7414dcc7c562d8334 /vpx_dsp
parentce634bbf4d4e995067f47494f57056727751df15 (diff)
downloadlibvpx-3ddff4503ac59c5280e393545145fad4b5da58e3.tar
libvpx-3ddff4503ac59c5280e393545145fad4b5da58e3.tar.gz
libvpx-3ddff4503ac59c5280e393545145fad4b5da58e3.tar.bz2
libvpx-3ddff4503ac59c5280e393545145fad4b5da58e3.zip
add_noise,vpx_setup_noise: correct 'char_dist' type
fixes SSE2/AddNoiseTest.CheckCvsAssembly/0 with -funsigned-char. visibly broken since: 0dc69c7 postproc : fix function parameters for noise functions. where the types diverged (char vs. int8) but likely the return changed in: 2ca24b0 postproc - move filling of noise buffer to vpx_dsp. when multiple implementations were merged. Change-Id: I176ca1f170217f05ba7872b0c4de63e41949e999
Diffstat (limited to 'vpx_dsp')
-rw-r--r--vpx_dsp/add_noise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vpx_dsp/add_noise.c b/vpx_dsp/add_noise.c
index 4d192d78e..a2b4c9010 100644
--- a/vpx_dsp/add_noise.c
+++ b/vpx_dsp/add_noise.c
@@ -43,7 +43,7 @@ static double gaussian(double sigma, double mu, double x) {
}
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 @@ int vpx_setup_noise(double sigma, int8_t *noise, int size) {
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;
}