[x264-devel] Mark some local functions as static, cosmetics

Anton Mitrofanov git at videolan.org
Tue Dec 6 01:00:43 CET 2011


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Sat Nov 12 00:47:48 2011 +0400| [e6d33a931c08918e78dcae97e4d80d0c3411bf2c] | committer: Jason Garrett-Glaser

Mark some local functions as static, cosmetics

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e6d33a931c08918e78dcae97e4d80d0c3411bf2c
---

 common/mc.c           |   14 +++++++-------
 common/rectangle.c    |    2 +-
 encoder/ratecontrol.c |    2 +-
 encoder/slicetype.c   |    2 +-
 x264.c                |    1 +
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/common/mc.c b/common/mc.c
index 6f772af..314c6f9 100644
--- a/common/mc.c
+++ b/common/mc.c
@@ -304,9 +304,9 @@ void x264_plane_copy_interleave_c( pixel *dst, int i_dst,
         }
 }
 
-void x264_plane_copy_deinterleave_c( pixel *dstu, int i_dstu,
-                                     pixel *dstv, int i_dstv,
-                                     pixel *src, int i_src, int w, int h )
+static void x264_plane_copy_deinterleave_c( pixel *dstu, int i_dstu,
+                                            pixel *dstv, int i_dstv,
+                                            pixel *src, int i_src, int w, int h )
 {
     for( int y=0; y<h; y++, dstu+=i_dstu, dstv+=i_dstv, src+=i_src )
         for( int x=0; x<w; x++ )
@@ -316,10 +316,10 @@ void x264_plane_copy_deinterleave_c( pixel *dstu, int i_dstu,
         }
 }
 
-void x264_plane_copy_deinterleave_rgb_c( pixel *dsta, int i_dsta,
-                                         pixel *dstb, int i_dstb,
-                                         pixel *dstc, int i_dstc,
-                                         pixel *src, int i_src, int pw, int w, int h )
+static void x264_plane_copy_deinterleave_rgb_c( pixel *dsta, int i_dsta,
+                                                pixel *dstb, int i_dstb,
+                                                pixel *dstc, int i_dstc,
+                                                pixel *src, int i_src, int pw, int w, int h )
 {
     for( int y=0; y<h; y++, dsta+=i_dsta, dstb+=i_dstb, dstc+=i_dstc, src+=i_src )
     {
diff --git a/common/rectangle.c b/common/rectangle.c
index 1bb4f52..a59f0de 100644
--- a/common/rectangle.c
+++ b/common/rectangle.c
@@ -26,7 +26,7 @@
 #include "common.h"
 
 #define CACHE_FUNC(name,size,width,height)\
-void x264_macroblock_cache_##name##_##width##_##height( void *target, uint32_t val )\
+static void x264_macroblock_cache_##name##_##width##_##height( void *target, uint32_t val )\
 {\
     x264_macroblock_cache_rect( target, width*size, height, size, val );\
 }
diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index 4853432..aad66cd 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -2385,7 +2385,7 @@ static float rate_estimate_qscale( x264_t *h )
     }
 }
 
-void x264_threads_normalize_predictors( x264_t *h )
+static void x264_threads_normalize_predictors( x264_t *h )
 {
     double totalsize = 0;
     for( int i = 0; i < h->param.i_threads; i++ )
diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index 7ea493b..e6fa93a 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -283,7 +283,7 @@ static NOINLINE unsigned int x264_weight_cost_chroma444( x264_t *h, x264_frame_t
     return cost;
 }
 
-void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *ref, int b_lookahead )
+static void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *ref, int b_lookahead )
 {
     int i_delta_index = fenc->i_frame - ref->i_frame - 1;
     /* epsilon is chosen to require at least a numerator of 127 (with denominator = 128) */
diff --git a/x264.c b/x264.c
index d735ab4..b40b873 100644
--- a/x264.c
+++ b/x264.c
@@ -53,6 +53,7 @@
 #endif
 
 #if HAVE_SWSCALE
+#undef DECLARE_ALIGNED
 #include <libswscale/swscale.h>
 #endif
 



More information about the x264-devel mailing list