Mark loopfilter C functions as static

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
This commit is contained in:
John Koleszar 2010-08-09 09:33:00 -04:00
Родитель cfb204eaf7
Коммит 618c7d27a0
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -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;