From 3ddff4503ac59c5280e393545145fad4b5da58e3 Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 24 Aug 2016 21:46:26 -0700 Subject: 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 --- vpx_dsp/add_noise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vpx_dsp') 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; } -- cgit v1.2.3