[vlc-commits] adjust: fix contrast calculation

Tristan Matthews git at videolan.org
Fri Jan 8 18:55:00 CET 2016


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Fri Jan  8 12:53:22 2016 -0500| [21881440dadb12c4f748a7cba7e4025ed5923551] | committer: Tristan Matthews

adjust: fix contrast calculation

Regression from b5662ea90b8b67d6cddb0f4f0106671d1e7f3821

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21881440dadb12c4f748a7cba7e4025ed5923551
---

 modules/video_filter/adjust.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_filter/adjust.c b/modules/video_filter/adjust.c
index 49dbfc5..ea50221 100644
--- a/modules/video_filter/adjust.c
+++ b/modules/video_filter/adjust.c
@@ -296,7 +296,7 @@ static picture_t *FilterPlanar( filter_t *p_filter, picture_t *p_pic )
         /* Fill the luma lookup table */
         for( unsigned i = 0 ; i < i_size; i++ )
         {
-            pi_luma[ i ] = pi_gamma[VLC_CLIP( ( i_lum + i_cont * i / i_range), 0, i_max )];
+            pi_luma[ i ] = pi_gamma[VLC_CLIP( (int)(i_lum + i_cont * i / i_range), 0, i_max )];
         }
     }
     else



More information about the vlc-commits mailing list