]> granicus.if.org Git - libx264/commitdiff
Cosmetics: Use consistent "inline" attribute position
authorAnton Mitrofanov <BugMaster@narod.ru>
Mon, 16 Apr 2018 20:54:43 +0000 (23:54 +0300)
committerHenrik Gramner <henrik@gramner.com>
Mon, 6 Aug 2018 21:24:13 +0000 (23:24 +0200)
Place it immediately after "static".

common/common.h
common/dct.c
common/frame.c
common/macroblock.c
common/osdep.h
common/quant.c
common/x86/util.h
encoder/analyse.c
encoder/cabac.c
encoder/me.c

index 927d6fa044f88eb1bb4b665a968fb92db4626fea..320206ef212dbe4e05e06bc64fe263fa808b0c2a 100644 (file)
@@ -767,7 +767,7 @@ typedef struct
 // included at the end because it needs x264_t
 #include "macroblock.h"
 
-static int ALWAYS_INLINE x264_predictor_roundclip( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
+static ALWAYS_INLINE int x264_predictor_roundclip( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
 {
     int cnt = 0;
     for( int i = 0; i < i_mvc; i++ )
@@ -783,7 +783,7 @@ static int ALWAYS_INLINE x264_predictor_roundclip( int16_t (*dst)[2], int16_t (*
     return cnt;
 }
 
-static int ALWAYS_INLINE x264_predictor_clip( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
+static ALWAYS_INLINE int x264_predictor_clip( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
 {
     int cnt = 0;
     int qpel_limit[4] = {mv_limit[0][0] << 2, mv_limit[0][1] << 2, mv_limit[1][0] << 2, mv_limit[1][1] << 2};
index 2b561708e6d84ba6b802675bf12ed15290ed1bbf..322bf7ea096aeed3fd95768ad730c99479c93084 100644 (file)
@@ -437,7 +437,7 @@ static void add16x16_idct8( pixel *dst, dctcoef dct[4][64] )
     add8x8_idct8( &dst[8*FDEC_STRIDE+8], dct[3] );
 }
 
-static void inline add4x4_idct_dc( pixel *p_dst, dctcoef dc )
+static inline void add4x4_idct_dc( pixel *p_dst, dctcoef dc )
 {
     dc = (dc + 32) >> 6;
     for( int i = 0; i < 4; i++, p_dst += FDEC_STRIDE )
index ccbe304ffa780c79e35b8d26471126feb142da97..a74a78583adbf48a7704801428dfafd7b0879e7d 100644 (file)
@@ -475,7 +475,7 @@ int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
     return 0;
 }
 
-static void ALWAYS_INLINE pixel_memset( pixel *dst, pixel *src, int len, int size )
+static ALWAYS_INLINE void pixel_memset( pixel *dst, pixel *src, int len, int size )
 {
     uint8_t *dstp = (uint8_t*)dst;
     uint32_t v1 = *src;
@@ -527,7 +527,7 @@ static void ALWAYS_INLINE pixel_memset( pixel *dst, pixel *src, int len, int siz
     }
 }
 
-static void ALWAYS_INLINE plane_expand_border( pixel *pix, int i_stride, int i_width, int i_height, int i_padh, int i_padv, int b_pad_top, int b_pad_bottom, int b_chroma )
+static ALWAYS_INLINE void plane_expand_border( pixel *pix, int i_stride, int i_width, int i_height, int i_padh, int i_padv, int b_pad_top, int b_pad_bottom, int b_chroma )
 {
 #define PPIXEL(x, y) ( pix + (x) + (y)*i_stride )
     for( int y = 0; y < i_height; y++ )
index bde8fb7f7c9450ef837c6ae1765a36e3eac3b0f0..96ae9d1c298f388f92e3e0077c944f79029d6391 100644 (file)
@@ -565,7 +565,7 @@ NOINLINE void x264_copy_column8( pixel *dst, pixel *src )
         dst[i*FDEC_STRIDE] = src[i*FDEC_STRIDE];
 }
 
-static void ALWAYS_INLINE macroblock_load_pic_pointers( x264_t *h, int mb_x, int mb_y, int i, int b_chroma, int b_mbaff )
+static ALWAYS_INLINE void macroblock_load_pic_pointers( x264_t *h, int mb_x, int mb_y, int i, int b_chroma, int b_mbaff )
 {
     int mb_interlaced = b_mbaff && MB_INTERLACED;
     int height = b_chroma ? 16 >> CHROMA_V_SHIFT : 16;
@@ -669,7 +669,7 @@ static const x264_left_table_t left_indices[4] =
     {{ 4, 5, 6, 3}, { 3,  7, 11, 15}, {16+1, 16+5, 32+1, 32+5}, {0, 1, 2, 3}, {0, 0, 1, 1}}
 };
 
-static void ALWAYS_INLINE macroblock_cache_load_neighbours( x264_t *h, int mb_x, int mb_y, int b_interlaced )
+static ALWAYS_INLINE void macroblock_cache_load_neighbours( x264_t *h, int mb_x, int mb_y, int b_interlaced )
 {
     const int mb_interlaced = b_interlaced && MB_INTERLACED;
     int top_y = mb_y - (1 << mb_interlaced);
@@ -851,7 +851,7 @@ static void ALWAYS_INLINE macroblock_cache_load_neighbours( x264_t *h, int mb_x,
 #   define LBOT 0
 #endif
 
-static void ALWAYS_INLINE macroblock_cache_load( x264_t *h, int mb_x, int mb_y, int b_mbaff )
+static ALWAYS_INLINE void macroblock_cache_load( x264_t *h, int mb_x, int mb_y, int b_mbaff )
 {
     macroblock_cache_load_neighbours( h, mb_x, mb_y, b_mbaff );
 
@@ -1619,7 +1619,7 @@ void x264_macroblock_deblock_strength( x264_t *h )
         macroblock_deblock_strength_mbaff( h, bs );
 }
 
-static void ALWAYS_INLINE macroblock_store_pic( x264_t *h, int mb_x, int mb_y, int i, int b_chroma, int b_mbaff )
+static ALWAYS_INLINE void macroblock_store_pic( x264_t *h, int mb_x, int mb_y, int i, int b_chroma, int b_mbaff )
 {
     int height = b_chroma ? 16>>CHROMA_V_SHIFT : 16;
     int i_stride = h->fdec->i_stride[i];
@@ -1633,7 +1633,7 @@ static void ALWAYS_INLINE macroblock_store_pic( x264_t *h, int mb_x, int mb_y, i
         h->mc.copy[PIXEL_16x16]( &h->fdec->plane[i][i_pix_offset], i_stride2, h->mb.pic.p_fdec[i], FDEC_STRIDE, 16 );
 }
 
-static void ALWAYS_INLINE macroblock_backup_intra( x264_t *h, int mb_x, int mb_y, int b_mbaff )
+static ALWAYS_INLINE void macroblock_backup_intra( x264_t *h, int mb_x, int mb_y, int b_mbaff )
 {
     /* In MBAFF we store the last two rows in intra_border_backup[0] and [1].
      * For progressive mbs this is the bottom two rows, and for interlaced the
index fbc48019cfbe8d77b8a50f70f90a5c5467584f82..715ef8a00c01ad5a94de2b29a422429b9b1f0a53 100644 (file)
@@ -322,7 +322,7 @@ static ALWAYS_INLINE uint16_t endian_fix16( uint16_t x )
 #endif
 
 /* For values with 4 bits or less. */
-static int ALWAYS_INLINE x264_ctz_4bit( uint32_t x )
+static ALWAYS_INLINE int x264_ctz_4bit( uint32_t x )
 {
     static uint8_t lut[16] = {4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0};
     return lut[x];
@@ -332,7 +332,7 @@ static int ALWAYS_INLINE x264_ctz_4bit( uint32_t x )
 #define x264_clz(x) __builtin_clz(x)
 #define x264_ctz(x) __builtin_ctz(x)
 #else
-static int ALWAYS_INLINE x264_clz( uint32_t x )
+static ALWAYS_INLINE int x264_clz( uint32_t x )
 {
     static uint8_t lut[16] = {4,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0};
     int y, z = (((x >> 16) - 1) >> 27) & 16;
@@ -344,7 +344,7 @@ static int ALWAYS_INLINE x264_clz( uint32_t x )
     return z + lut[x];
 }
 
-static int ALWAYS_INLINE x264_ctz( uint32_t x )
+static ALWAYS_INLINE int x264_ctz( uint32_t x )
 {
     static uint8_t lut[16] = {4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0};
     int y, z = (((x & 0xffff) - 1) >> 27) & 16;
index 78366673418ee488703fe06a11aa7e50f3a8728d..92013e1575c70ecf45d36c338c2f91783c84b4d3 100644 (file)
@@ -320,7 +320,7 @@ static void denoise_dct( dctcoef *dct, uint32_t *sum, udctcoef *offset, int size
  *  chroma: for the complete mb: if score < 7 -> null
  */
 
-static int ALWAYS_INLINE decimate_score_internal( dctcoef *dct, int i_max )
+static ALWAYS_INLINE int decimate_score_internal( dctcoef *dct, int i_max )
 {
     const uint8_t *ds_table = (i_max == 64) ? x264_decimate_table8 : x264_decimate_table4;
     int i_score = 0;
index 13578982d2c9e68a43c0c57313c26b284bd6e95e..970103946026c1799fd14350094949a1d259a945 100644 (file)
@@ -122,7 +122,7 @@ static ALWAYS_INLINE uint16_t x264_cabac_mvd_sum_mmx2(uint8_t *mvdleft, uint8_t
 }
 
 #define x264_predictor_clip x264_predictor_clip_mmx2
-static int ALWAYS_INLINE x264_predictor_clip_mmx2( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
+static ALWAYS_INLINE int x264_predictor_clip_mmx2( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
 {
     static const uint32_t pd_32 = 0x20;
     intptr_t tmp = (intptr_t)mv_limit, mvc_max = i_mvc, i = 0;
@@ -184,7 +184,7 @@ static int ALWAYS_INLINE x264_predictor_clip_mmx2( int16_t (*dst)[2], int16_t (*
 
 /* Same as the above, except we do (mv + 2) >> 2 on the input. */
 #define x264_predictor_roundclip x264_predictor_roundclip_mmx2
-static int ALWAYS_INLINE x264_predictor_roundclip_mmx2( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
+static ALWAYS_INLINE int x264_predictor_roundclip_mmx2( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv )
 {
     static const uint64_t pw_2 = 0x0002000200020002ULL;
     static const uint32_t pd_32 = 0x20;
index 9a74360286221192479f101f44f77b0d5951bbca..fb241a7d8cc9b3330501cc72bfcf9608731b3aeb 100644 (file)
@@ -558,7 +558,7 @@ static ALWAYS_INLINE const int8_t *predict_4x4_mode_available( int force_intra,
 }
 
 /* For trellis=2, we need to do this for both sizes of DCT, for trellis=1 we only need to use it on the chosen mode. */
-static void inline psy_trellis_init( x264_t *h, int do_both_dct )
+static inline void psy_trellis_init( x264_t *h, int do_both_dct )
 {
     if( do_both_dct || h->mb.b_transform_8x8 )
         h->dctf.sub16x16_dct8( h->mb.pic.fenc_dct8, h->mb.pic.p_fenc[0], (pixel*)x264_zero );
index f12144935726ac7a9fd20c97156e643d229cbe07..6500174b4e31fbaed10f1713fce3ef30a83393e5 100644 (file)
@@ -609,7 +609,7 @@ static ALWAYS_INLINE void cabac_mb_header_b( x264_t *h, x264_cabac_t *cb, int i_
         cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_B, chroma );
 }
 
-static int ALWAYS_INLINE cabac_cbf_ctxidxinc( x264_t *h, int i_cat, int i_idx, int b_intra, int b_dc )
+static ALWAYS_INLINE int cabac_cbf_ctxidxinc( x264_t *h, int i_cat, int i_idx, int b_intra, int b_dc )
 {
     static const uint16_t base_ctx[14] = {85,89,93,97,101,1012,460,464,468,1016,472,476,480,1020};
 
@@ -752,7 +752,7 @@ void x264_cabac_block_residual_c( x264_t *h, x264_cabac_t *cb, int ctx_block_cat
     cabac_block_residual_internal( h, cb, ctx_block_cat, l, 0 );
 }
 
-static void ALWAYS_INLINE cabac_block_residual( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
+static ALWAYS_INLINE void cabac_block_residual( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
 {
 #if ARCH_X86_64 && HAVE_MMX && !defined( __MACH__ )
     h->bsf.cabac_block_residual_internal( l, MB_INTERLACED, ctx_block_cat, cb );
@@ -772,7 +772,7 @@ static void cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, int ctx_bl
 /* Faster RDO by merging sigmap and level coding. Note that for 8x8dct and chroma 4:2:2 dc this is
  * slightly incorrect because the sigmap is not reversible (contexts are repeated). However, there
  * is nearly no quality penalty for this (~0.001db) and the speed boost (~30%) is worth it. */
-static void ALWAYS_INLINE cabac_block_residual_internal( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l, int b_8x8, int chroma422dc )
+static ALWAYS_INLINE void cabac_block_residual_internal( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l, int b_8x8, int chroma422dc )
 {
     const uint8_t *sig_offset = x264_significant_coeff_flag_offset_8x8[MB_INTERLACED];
     int ctx_sig = x264_significant_coeff_flag_offset[MB_INTERLACED][ctx_block_cat];
index 3c9f0e41da41da3770ebe055f19c7185e3a2463b..8bdc87e990ddca42ccb0912f79e247bb225cbd64 100644 (file)
@@ -1024,7 +1024,7 @@ static void refine_subpel( x264_t *h, x264_me_t *m, int hpel_iters, int qpel_ite
 #define x264_iter_kludge x264_template(iter_kludge)
 int x264_iter_kludge = 0;
 
-static void ALWAYS_INLINE me_refine_bidir( x264_t *h, x264_me_t *m0, x264_me_t *m1, int i_weight, int i8, int i_lambda2, int rd )
+static ALWAYS_INLINE void me_refine_bidir( x264_t *h, x264_me_t *m0, x264_me_t *m1, int i_weight, int i8, int i_lambda2, int rd )
 {
     int x = i8&1;
     int y = i8>>1;