]> git.sesse.net Git - x264/commitdiff
shut up various gcc warnings
authorLoic Le Loarer <lll+vlc@m4x.org>
Thu, 21 Aug 2008 10:19:24 +0000 (04:19 -0600)
committerLoren Merritt <pengvado@akuvian.org>
Thu, 21 Aug 2008 10:37:19 +0000 (04:37 -0600)
18 files changed:
common/frame.c
common/mdate.c
common/quant.c
common/set.c
common/x86/mc-c.c
common/x86/mc.h
encoder/cabac.c
encoder/cavlc.c
encoder/macroblock.c
encoder/macroblock.h
encoder/ratecontrol.c
encoder/ratecontrol.h
encoder/rdo.c
encoder/set.c
encoder/slicetype.c
matroska.c
muxers.c
tools/checkasm.c

index 3a4078025f6f1d976e7fde81df38ec32bb9f07b2..bba0da9b92d41a7e3367809e8b5026cfea46c892 100644 (file)
@@ -297,7 +297,7 @@ void x264_frame_expand_border_mod16( x264_t *h, x264_frame_t *frame )
 
 /* cavlc + 8x8 transform stores nnz per 16 coeffs for the purpose of
  * entropy coding, but per 64 coeffs for the purpose of deblocking */
-void munge_cavlc_nnz_row( x264_t *h, int mb_y, uint8_t (*buf)[16] )
+static void munge_cavlc_nnz_row( x264_t *h, int mb_y, uint8_t (*buf)[16] )
 {
     uint32_t (*src)[6] = (uint32_t(*)[6])h->mb.non_zero_count + mb_y * h->sps->i_mb_width;
     int8_t *transform = h->mb.mb_transform_size + mb_y * h->sps->i_mb_width;
@@ -770,12 +770,12 @@ void x264_deblock_v8_luma_mmxext( uint8_t *pix, int stride, int alpha, int beta,
 void x264_deblock_h_luma_intra_mmxext( uint8_t *pix, int stride, int alpha, int beta );
 void x264_deblock_v8_luma_intra_mmxext( uint8_t *pix, int stride, int alpha, int beta );
 
-void x264_deblock_v_luma_mmxext( uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0 )
+static void x264_deblock_v_luma_mmxext( uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0 )
 {
     x264_deblock_v8_luma_mmxext( pix,   stride, alpha, beta, tc0   );
     x264_deblock_v8_luma_mmxext( pix+8, stride, alpha, beta, tc0+2 );
 }
-void x264_deblock_v_luma_intra_mmxext( uint8_t *pix, int stride, int alpha, int beta )
+static void x264_deblock_v_luma_intra_mmxext( uint8_t *pix, int stride, int alpha, int beta )
 {
     x264_deblock_v8_luma_intra_mmxext( pix,   stride, alpha, beta );
     x264_deblock_v8_luma_intra_mmxext( pix+8, stride, alpha, beta );
index cd962edc5687b77c884ea20406434152adb10123..1a02cdf56c383c8c7174251c2c51d32ab8028017 100644 (file)
@@ -26,6 +26,7 @@
 #endif
 #include <time.h>
 
+#include "common.h"
 #include "osdep.h"
 
 int64_t x264_mdate( void )
index 74be5919ae98c0f09db707b7a7ae505a519bc55a..f5ec3efc98f348d5ea7f9db134d5fe335e2ff678 100644 (file)
@@ -194,7 +194,7 @@ void x264_mb_dequant_4x4_dc( int16_t dct[4][4], int dequant_mf[6][4][4], int i_q
     }
 }
 
-void x264_denoise_dct( int16_t *dct, uint32_t *sum, uint16_t *offset, int size )
+static void x264_denoise_dct( int16_t *dct, uint32_t *sum, uint16_t *offset, int size )
 {
     int i;
     for( i=1; i<size; i++ )
index 77713d4188735ace40b18b4f9958660ffb4d1d1e..6c7ddc468ff2a09ac4fc86bc4734c7f0fd1e60d8 100644 (file)
@@ -195,7 +195,7 @@ void x264_cqm_delete( x264_t *h )
     }
 }
 
-int x264_cqm_parse_jmlist( x264_t *h, const char *buf, const char *name,
+static int x264_cqm_parse_jmlist( x264_t *h, const char *buf, const char *name,
                            uint8_t *cqm, const uint8_t *jvt, int length )
 {
     char *p;
index 9bdd78f0a61705e424f76861294fa5abf88c8586..777c6b303d19f329652816e9e8cecfb4ce50abe9 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 
 #include "common/common.h"
+#include "mc.h"
 
 /* NASM functions */
 extern void x264_pixel_avg_16x16_sse2( uint8_t *, int, uint8_t *, int );
@@ -87,7 +88,7 @@ PIXEL_AVG_WALL(cache64_sse2)
 PIXEL_AVG_WALL(sse2)
 
 #define AVG_WEIGHT(W,H,name) \
-void x264_pixel_avg_weight_ ## W ## x ## H ## _##name( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int i_weight_dst ) \
+static void x264_pixel_avg_weight_ ## W ## x ## H ## _##name( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int i_weight_dst ) \
 { \
     x264_pixel_avg_weight_w ## W ## _##name( dst, i_dst, src, i_src, i_weight_dst, H ); \
 }
@@ -143,7 +144,7 @@ static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
 static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
 
 #define MC_LUMA(name,instr1,instr2)\
-void mc_luma_##name( uint8_t *dst,    int i_dst_stride,\
+static void mc_luma_##name( uint8_t *dst,    int i_dst_stride,\
                   uint8_t *src[4], int i_src_stride,\
                   int mvx, int mvy,\
                   int i_width, int i_height )\
@@ -174,7 +175,7 @@ MC_LUMA(sse2,sse2,sse2)
 MC_LUMA(cache64_sse2,cache64_sse2,sse2)
 
 #define GET_REF(name)\
-uint8_t *get_ref_##name( uint8_t *dst,   int *i_dst_stride,\
+static uint8_t *get_ref_##name( uint8_t *dst,   int *i_dst_stride,\
                          uint8_t *src[4], int i_src_stride,\
                          int mvx, int mvy,\
                          int i_width, int i_height )\
@@ -210,7 +211,7 @@ void x264_hpel_filter_v_##cpuv( uint8_t *dst, uint8_t *src, int16_t *buf, int st
 void x264_hpel_filter_c_##cpuc( uint8_t *dst, int16_t *buf, int width );\
 void x264_hpel_filter_h_##cpuh( uint8_t *dst, uint8_t *src, int width );\
 void x264_sfence( void );\
-void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,\
+static void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,\
                              int stride, int width, int height )\
 {\
     int16_t *buf;\
index 4271faf28b41740a4f3549610aae1a8fcd57a7e5..fd2bba7fa297d258f2db9748a63d5e75293e34cf 100644 (file)
@@ -26,7 +26,4 @@
 
 void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf );
 
-void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
-                            uint8_t *dst, int i_dst_stride,
-                            int dx, int dy, int i_width, int i_height );
 #endif
index 78736ff6819f039b013c1b1a786618fb72a18164..e1f4ffabbf45116478e27f6e45021af6f927d92b 100644 (file)
@@ -1032,7 +1032,7 @@ void x264_macroblock_write_cabac( x264_t *h, x264_cabac_t *cb )
  * works on all partition sizes except 16x16
  * for sub8x8, call once per 8x8 block
  *****************************************************************************/
-void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int i_pixel )
+static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int i_pixel )
 {
     const int i_mb_type = h->mb.i_type;
     int j;
index e7bc11ef627e6fe01d2598e2f1721850707def9c..e6d85c6b8c1f122b7f74b8b9758aea7ba2a3a3cf 100644 (file)
@@ -680,7 +680,7 @@ void x264_macroblock_write_cavlc( x264_t *h, bs_t *s )
  * works on all partition sizes except 16x16
  * for sub8x8, call once per 8x8 block
  *****************************************************************************/
-int x264_partition_size_cavlc( x264_t *h, int i8, int i_pixel )
+static int x264_partition_size_cavlc( x264_t *h, int i8, int i_pixel )
 {
     bs_t s;
     const int i_mb_type = h->mb.i_type;
index c9b45448e27f2d4fe6065f31a384cfbabe8fe67c..27b41ac4e7bab523d1f6c01a17ed95e5ab5c6184 100644 (file)
@@ -289,7 +289,7 @@ static void x264_macroblock_encode_skip( x264_t *h )
  * x264_macroblock_encode_pskip:
  *  Encode an already marked skip block
  *****************************************************************************/
-void x264_macroblock_encode_pskip( x264_t *h )
+static void x264_macroblock_encode_pskip( x264_t *h )
 {
     const int mvx = x264_clip3( h->mb.cache.mv[0][x264_scan8[0]][0],
                                 h->mb.mv_min[0], h->mb.mv_max[0] );
index 49d13a25fc7b296b6d2719eab1bbc64b7347f357..28b804b0e637d27fbd00902a369ec16c00efe24c 100644 (file)
@@ -29,7 +29,7 @@
 extern const int x264_lambda2_tab[52];
 extern const int x264_lambda_tab[52];
 
-void x264_rdo_init( );
+void x264_rdo_init( void );
 
 int x264_macroblock_probe_skip( x264_t *h, int b_bidir );
 
index 1ffbd3c386c6873006de99e35a90c1e8e0d3bbf3..3afdc89b6c9ec09a5c18932e7684db7c6cfd7c8c 100644 (file)
@@ -149,7 +149,6 @@ static void update_vbv( x264_t *h, int bits );
 static void update_vbv_plan( x264_t *h );
 static double predict_size( predictor_t *p, double q, double var );
 static void update_predictor( predictor_t *p, double q, double var, double bits );
-int  x264_rc_analyse_slice( x264_t *h );
 
 /* Terminology:
  * qp = h.264's quantizer
@@ -212,7 +211,7 @@ static NOINLINE int ac_energy_mb( x264_t *h, int mb_x, int mb_y, int *satd )
     return var;
 }
 
-void x264_autosense_aq( x264_t *h )
+static void x264_autosense_aq( x264_t *h )
 {
     double total = 0;
     double n = 0;
@@ -671,7 +670,7 @@ static int parse_zones( x264_t *h )
     return 0;
 }
 
-x264_zone_t *get_zone( x264_t *h, int frame_num )
+static x264_zone_t *get_zone( x264_t *h, int frame_num )
 {
     int i;
     for( i = h->rc->i_zones-1; i >= 0; i-- )
@@ -858,7 +857,7 @@ void x264_ratecontrol_start( x264_t *h, int i_force_qp )
         x264_autosense_aq(h);
 }
 
-double predict_row_size( x264_t *h, int y, int qp )
+static double predict_row_size( x264_t *h, int y, int qp )
 {
     /* average between two predictors:
      * absolute SATD, and scaled bit cost of the colocated row in the previous frame */
@@ -878,7 +877,7 @@ double predict_row_size( x264_t *h, int y, int qp )
     return (pred_s + pred_t) / 2;
 }
 
-double row_bits_so_far( x264_t *h, int y )
+static double row_bits_so_far( x264_t *h, int y )
 {
     int i;
     double bits = 0;
@@ -887,7 +886,7 @@ double row_bits_so_far( x264_t *h, int y )
     return bits;
 }
 
-double predict_row_size_sum( x264_t *h, int y, int qp )
+static double predict_row_size_sum( x264_t *h, int y, int qp )
 {
     int i;
     double bits = row_bits_so_far(h, y);
index c87414c3fc6097ffb571eace00a8380f004b2f20..d5e3371a6711048f3695678b4b949c02d4e1482c 100644 (file)
@@ -37,6 +37,7 @@ void x264_ratecontrol_summary( x264_t * );
 void x264_adaptive_quant( x264_t * );
 void x264_ratecontrol_set_estimated_size( x264_t *, int bits );
 int  x264_ratecontrol_get_estimated_size( x264_t const *);
+int  x264_rc_analyse_slice( x264_t *h );
 
 #endif
 
index 4c3f855caab1d0bc83a967da9c9e6e2e5999c404..a8a2386eb33c152fe22799484bb73bd197b96b10 100644 (file)
@@ -34,7 +34,7 @@ static uint16_t cabac_prefix_size[15][128];
 #define bs_write_ue(s,v)   ((s)->i_bits_encoded += bs_size_ue(v))
 #define bs_write_se(s,v)   ((s)->i_bits_encoded += bs_size_se(v))
 #define bs_write_te(s,v,l) ((s)->i_bits_encoded += bs_size_te(v,l))
-#define x264_macroblock_write_cavlc  x264_macroblock_size_cavlc
+#define x264_macroblock_write_cavlc  static x264_macroblock_size_cavlc
 #include "cavlc.c"
 
 /* CABAC: not exactly the same. x264_cabac_size_decision() keeps track of
@@ -45,7 +45,7 @@ static uint16_t cabac_prefix_size[15][128];
 #define x264_cabac_encode_bypass(c,v)     ((c)->f8_bits_encoded += 256)
 #define x264_cabac_encode_ue_bypass(c,e,v) ((c)->f8_bits_encoded += (bs_size_ue_big(v+(1<<e)-1)-e)<<8)
 #define x264_cabac_encode_flush(h,c)
-#define x264_macroblock_write_cabac  x264_macroblock_size_cabac
+#define x264_macroblock_write_cabac  static x264_macroblock_size_cabac
 #include "cabac.c"
 
 #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \
@@ -140,7 +140,7 @@ uint64_t x264_rd_cost_part( x264_t *h, int i_lambda2, int i8, int i_pixel )
     return (i_ssd<<8) + i_bits;
 }
 
-uint64_t x264_rd_cost_i8x8( x264_t *h, int i_lambda2, int i8, int i_mode )
+static uint64_t x264_rd_cost_i8x8( x264_t *h, int i_lambda2, int i8, int i_mode )
 {
     uint64_t i_ssd, i_bits;
 
@@ -162,7 +162,7 @@ uint64_t x264_rd_cost_i8x8( x264_t *h, int i_lambda2, int i8, int i_mode )
     return (i_ssd<<8) + i_bits;
 }
 
-uint64_t x264_rd_cost_i4x4( x264_t *h, int i_lambda2, int i4, int i_mode )
+static uint64_t x264_rd_cost_i4x4( x264_t *h, int i_lambda2, int i4, int i_mode )
 {
     uint64_t i_ssd, i_bits;
 
@@ -184,7 +184,7 @@ uint64_t x264_rd_cost_i4x4( x264_t *h, int i_lambda2, int i4, int i_mode )
     return (i_ssd<<8) + i_bits;
 }
 
-uint64_t x264_rd_cost_i8x8_chroma( x264_t *h, int i_lambda2, int i_mode, int b_dct )
+static uint64_t x264_rd_cost_i8x8_chroma( x264_t *h, int i_lambda2, int i_mode, int b_dct )
 {
     uint64_t i_ssd, i_bits;
 
@@ -219,7 +219,7 @@ uint64_t x264_rd_cost_i8x8_chroma( x264_t *h, int i_lambda2, int i_mode, int b_d
 #define LAMBDA_BITS 4
 
 /* precalculate the cost of coding abs_level_m1 */
-void x264_rdo_init( )
+void x264_rdo_init( void )
 {
     int i_prefix;
     int i_ctx;
index 86904b6f16f77312b418c4e561b085599a13013d..ed8413b9643cb735cafa046d658f330dd2b6b591 100644 (file)
@@ -27,6 +27,7 @@
 #ifndef _MSC_VER
 #include "config.h"
 #endif
+#include "set.h"
 
 #define bs_write_ue bs_write_ue_big
 
index 1777100bfb46d4bb2ae9ce3c5056b05e48b3882e..84fabfef9f10a8680e95e13e42ed017caa08a28c 100644 (file)
@@ -37,7 +37,7 @@ static void x264_lowres_context_init( x264_t *h, x264_mb_analysis_t *a )
     h->mb.b_chroma_me = 0;
 }
 
-int x264_slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a,
+static int x264_slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a,
                             x264_frame_t **frames, int p0, int p1, int b,
                             int dist_scale_factor )
 {
@@ -238,7 +238,7 @@ lowres_intra_mb:
 #undef TRY_BIDIR
 #undef SAVE_MVS
 
-int x264_slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a,
+static int x264_slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a,
                                x264_frame_t **frames, int p0, int p1, int b,
                                int b_intra_penalty )
 {
@@ -353,7 +353,7 @@ static int scenecut( x264_t *h, x264_frame_t *frame, int pdist )
     return res;
 }
 
-void x264_slicetype_analyse( x264_t *h )
+static void x264_slicetype_analyse( x264_t *h )
 {
     x264_mb_analysis_t a;
     x264_frame_t *frames[X264_BFRAME_MAX+3] = { NULL, };
index b3029c6d614ea3d07dc8c4ef2d408036e19e4dd4..35ae4cdb4a5bd4aa4523c010489ce765ab8dfa52 100644 (file)
@@ -407,7 +407,7 @@ static int mk_closeCluster(mk_Writer *w) {
   return 0;
 }
 
-int      mk_flushFrame(mk_Writer *w) {
+static int mk_flushFrame(mk_Writer *w) {
   int64_t      delta, ref = 0;
   unsigned     fsize, bgsize;
   unsigned char        c_delta_flags[3];
index 7d2717220dcd5aeabd23c667ef3d9d41c4775b20..497878a0b93f018eaa640e4e05b7a24ccc33506b 100644 (file)
--- a/muxers.c
+++ b/muxers.c
@@ -461,7 +461,7 @@ int get_frame_total_thread( hnd_t handle )
     return h->frame_total;
 }
 
-void read_frame_thread_int( thread_input_arg_t *i )
+static void read_frame_thread_int( thread_input_arg_t *i )
 {
     i->status = i->h->p_read_frame( i->pic, i->h->p_handle, i->i_frame );
 }
@@ -568,7 +568,7 @@ typedef struct
 } mp4_t;
 
 
-void recompute_bitrate_mp4(GF_ISOFile *p_file, int i_track)
+static void recompute_bitrate_mp4(GF_ISOFile *p_file, int i_track)
 {
     u32 i, count, di, timescale, time_wnd, rate;
     u64 offset;
@@ -811,7 +811,7 @@ typedef struct
     char      b_writing_frame;
 } mkv_t;
 
-int write_header_mkv( mkv_t *p_mkv )
+static int write_header_mkv( mkv_t *p_mkv )
 {
     int       ret;
     uint8_t   *avcC;
index 2e895b9df414ecdca6f0a6eabaf53a83ac4ddff7..aea8c5d898708e8d4c1cb1f72474068b8f39b8ce 100644 (file)
@@ -100,12 +100,12 @@ static bench_t* get_bench( const char *name, int cpu )
     return &benchs[i].vers[j];
 }
 
-int cmp_nop( const void *a, const void *b )
+static int cmp_nop( const void *a, const void *b )
 {
     return *(uint16_t*)a - *(uint16_t*)b;
 }
 
-int cmp_bench( const void *a, const void *b )
+static int cmp_bench( const void *a, const void *b )
 {
     // asciibetical sort except preserving numbers
     const char *sa = ((bench_func_t*)a)->name;
@@ -1199,7 +1199,7 @@ static int check_cabac( int cpu_ref, int cpu_new )
     return ret;
 }
 
-int check_all_funcs( int cpu_ref, int cpu_new )
+static int check_all_funcs( int cpu_ref, int cpu_new )
 {
     return check_pixel( cpu_ref, cpu_new )
          + check_dct( cpu_ref, cpu_new )
@@ -1210,7 +1210,7 @@ int check_all_funcs( int cpu_ref, int cpu_new )
          + check_cabac( cpu_ref, cpu_new );
 }
 
-int add_flags( int *cpu_ref, int *cpu_new, int flags, const char *name )
+static int add_flags( int *cpu_ref, int *cpu_new, int flags, const char *name )
 {
     *cpu_ref = *cpu_new;
     *cpu_new |= flags;
@@ -1221,7 +1221,7 @@ int add_flags( int *cpu_ref, int *cpu_new, int flags, const char *name )
     return check_all_funcs( *cpu_ref, *cpu_new );
 }
 
-int check_all_flags( void )
+static int check_all_flags( void )
 {
     int ret = 0;
     int cpu0 = 0, cpu1 = 0;