[vlc-commits] video_filter: gradfun: use C99 declarations

Tristan Matthews git at videolan.org
Mon Aug 31 20:11:03 CEST 2015


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Mon Aug 31 13:26:14 2015 -0400| [57df39147de50f2c99b538a3d0f9429fb5a35594] | committer: Tristan Matthews

video_filter: gradfun: use C99 declarations

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

 modules/video_filter/gradfun.h |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/video_filter/gradfun.h b/modules/video_filter/gradfun.h
index 7094c6d..9edaf66 100644
--- a/modules/video_filter/gradfun.h
+++ b/modules/video_filter/gradfun.h
@@ -54,8 +54,7 @@ static const uint16_t __attribute__((aligned(16))) dither[8][8] = {
 static void filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc,
                           int width, int thresh, const uint16_t *dithers)
 {
-    int x;
-    for (x=0; x<width; x++, dc+=x&1) {
+    for( int x = 0; x < width; x++, dc += x&1 ) {
         int pix = src[x]<<7;
         int delta = dc[0] - pix;
         int m = abs(delta) * thresh >> 16;
@@ -69,10 +68,10 @@ static void filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc,
 static void blur_line_c(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
                         uint8_t *src, int sstride, int width)
 {
-    int x, v, old;
-    for (x=0; x<width; x++) {
-        v = buf1[x] + src[2*x] + src[2*x+1] + src[2*x+sstride] + src[2*x+1+sstride];
-        old = buf[x];
+    for( int x = 0; x < width; x++ ) {
+        int v = buf1[x] + src[2*x] + src[2*x+1] + src[2*x+sstride] +
+                src[2*x+1+sstride];
+        int old = buf[x];
         buf[x] = v;
         dc[x] = v - old;
     }



More information about the vlc-commits mailing list