]> granicus.if.org Git - libvpx/commitdiff
Mark loopfilter C functions as static
authorJohn Koleszar <jkoleszar@google.com>
Mon, 9 Aug 2010 13:33:00 +0000 (09:33 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 9 Aug 2010 13:36:44 +0000 (09:36 -0400)
Clang defaults to C99 mode, and inline works differently in C99.
(gcc, on the other hand, defaults to a special gnu-style inlining,
which uses different syntax.)   Making the functions static makes sure
clang doesn't decide to discard a function because it's too large to
inline.

Thanks to eli.friedman for the patch.

Fixes http://code.google.com/p/webm/issues/detail?id=114

Change-Id: If3c1c3c176eb855a584a60007237283b0cc631a4

vp8/common/loopfilter_filters.c

index 2d209ee98ba4784346d808c0af7202142ebb9666..7aba7ed13e3a122d6af91e4c10bba6f8658ef417 100644 (file)
@@ -18,7 +18,7 @@
 
 typedef unsigned char uc;
 
-__inline signed char vp8_signed_char_clamp(int t)
+static __inline signed char vp8_signed_char_clamp(int t)
 {
     t = (t < -128 ? -128 : t);
     t = (t > 127 ? 127 : t);
@@ -27,7 +27,7 @@ __inline signed char vp8_signed_char_clamp(int t)
 
 
 // should we apply any filter at all ( 11111111 yes, 00000000 no)
-__inline signed char vp8_filter_mask(signed char limit, signed char flimit,
+static __inline signed char vp8_filter_mask(signed char limit, signed char flimit,
                                      uc p3, uc p2, uc p1, uc p0, uc q0, uc q1, uc q2, uc q3)
 {
     signed char mask = 0;
@@ -47,7 +47,7 @@ __inline signed char vp8_filter_mask(signed char limit, signed char flimit,
 }
 
 // is there high variance internal edge ( 11111111 yes, 00000000 no)
-__inline signed char vp8_hevmask(signed char thresh, uc p1, uc p0, uc q0, uc q1)
+static __inline signed char vp8_hevmask(signed char thresh, uc p1, uc p0, uc q0, uc q1)
 {
     signed char hev = 0;
     hev  |= (abs(p1 - p0) > thresh) * -1;
@@ -55,7 +55,7 @@ __inline signed char vp8_hevmask(signed char thresh, uc p1, uc p0, uc q0, uc q1)
     return hev;
 }
 
-__inline void vp8_filter(signed char mask, signed char hev, uc *op1, uc *op0, uc *oq0, uc *oq1)
+static __inline void vp8_filter(signed char mask, signed char hev, uc *op1, uc *op0, uc *oq0, uc *oq1)
 
 {
     signed char ps0, qs0;
@@ -161,7 +161,7 @@ void vp8_loop_filter_vertical_edge_c
     while (++i < count * 8);
 }
 
-__inline void vp8_mbfilter(signed char mask, signed char hev,
+static __inline void vp8_mbfilter(signed char mask, signed char hev,
                            uc *op2, uc *op1, uc *op0, uc *oq0, uc *oq1, uc *oq2)
 {
     signed char s, u;
@@ -281,7 +281,7 @@ void vp8_mbloop_filter_vertical_edge_c
 }
 
 // should we apply any filter at all ( 11111111 yes, 00000000 no)
-__inline signed char vp8_simple_filter_mask(signed char limit, signed char flimit, uc p1, uc p0, uc q0, uc q1)
+static __inline signed char vp8_simple_filter_mask(signed char limit, signed char flimit, uc p1, uc p0, uc q0, uc q1)
 {
 // Why does this cause problems for win32?
 // error C2143: syntax error : missing ';' before 'type'
@@ -294,7 +294,7 @@ __inline signed char vp8_simple_filter_mask(signed char limit, signed char flimi
     return mask;
 }
 
-__inline void vp8_simple_filter(signed char mask, uc *op1, uc *op0, uc *oq0, uc *oq1)
+static __inline void vp8_simple_filter(signed char mask, uc *op1, uc *op0, uc *oq0, uc *oq1)
 {
     signed char vp8_filter, Filter1, Filter2;
     signed char p1 = (signed char) * op1 ^ 0x80;