Drop the x264 prefix from static functions and variables
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 27 Jan 2017 10:58:33 +0000 (11:58 +0100)
committerAnton Mitrofanov <BugMaster@narod.ru>
Sun, 24 Dec 2017 20:11:30 +0000 (23:11 +0300)
40 files changed:
common/aarch64/mc-c.c
common/arm/mc-c.c
common/bitstream.c
common/cabac.c
common/common.c
common/deblock.c
common/frame.c
common/macroblock.c
common/mc.c
common/mc.h
common/mips/mc-c.c
common/mvpred.c
common/opencl.c
common/osdep.c
common/pixel.c
common/ppc/mc.c
common/ppc/pixel.c
common/predict.c
common/quant.c
common/rectangle.c
common/set.c
common/threadpool.c
common/win32thread.c
common/x86/mc-c.c
common/x86/predict-c.c
encoder/analyse.c
encoder/cabac.c
encoder/cavlc.c
encoder/encoder.c
encoder/lookahead.c
encoder/macroblock.c
encoder/me.c
encoder/ratecontrol.c
encoder/rdo.c
encoder/slicetype-cl.c
encoder/slicetype.c
filters/video/resize.c
input/avs.c
input/input.c
tools/checkasm.c

index f94aa5e..793662a 100644 (file)
@@ -74,7 +74,7 @@ void x264_mc_weight_w16##func##_neon( uint8_t *, intptr_t, uint8_t *, intptr_t,
 void x264_mc_weight_w8##func##_neon ( uint8_t *, intptr_t, uint8_t *, intptr_t, const x264_weight_t *, int );\
 void x264_mc_weight_w4##func##_neon ( uint8_t *, intptr_t, uint8_t *, intptr_t, const x264_weight_t *, int );\
 \
-static void (* x264_mc##func##_wtab_neon[6])( uint8_t *, intptr_t, uint8_t *, intptr_t, const x264_weight_t *, int ) =\
+static void (* mc##func##_wtab_neon[6])( uint8_t *, intptr_t, uint8_t *, intptr_t, const x264_weight_t *, int ) =\
 {\
     x264_mc_weight_w4##func##_neon,\
     x264_mc_weight_w4##func##_neon,\
@@ -106,28 +106,28 @@ void x264_mbtree_fix8_pack_neon( uint16_t *dst, float *src, int count );
 void x264_mbtree_fix8_unpack_neon( float *dst, uint16_t *src, int count );
 
 #if !HIGH_BIT_DEPTH
-static void x264_weight_cache_neon( x264_t *h, x264_weight_t *w )
+static void weight_cache_neon( x264_t *h, x264_weight_t *w )
 {
     if( w->i_scale == 1<<w->i_denom )
     {
         if( w->i_offset < 0 )
         {
-            w->weightfn = x264_mc_offsetsub_wtab_neon;
+            w->weightfn = mc_offsetsub_wtab_neon;
             w->cachea[0] = -w->i_offset;
         }
         else
         {
-            w->weightfn = x264_mc_offsetadd_wtab_neon;
+            w->weightfn = mc_offsetadd_wtab_neon;
             w->cachea[0] = w->i_offset;
         }
     }
     else if( !w->i_denom )
-        w->weightfn = x264_mc_nodenom_wtab_neon;
+        w->weightfn = mc_nodenom_wtab_neon;
     else
-        w->weightfn = x264_mc_wtab_neon;
+        w->weightfn = mc_wtab_neon;
 }
 
-static void (* const x264_pixel_avg_wtab_neon[6])( uint8_t *, intptr_t, uint8_t *, intptr_t, uint8_t *, int ) =
+static void (* const pixel_avg_wtab_neon[6])( uint8_t *, intptr_t, uint8_t *, intptr_t, uint8_t *, int ) =
 {
     NULL,
     x264_pixel_avg2_w4_neon,
@@ -137,7 +137,7 @@ static void (* const x264_pixel_avg_wtab_neon[6])( uint8_t *, intptr_t, uint8_t
     x264_pixel_avg2_w20_neon,
 };
 
-static void (* const x264_mc_copy_wtab_neon[5])( uint8_t *, intptr_t, uint8_t *, intptr_t, int ) =
+static void (* const mc_copy_wtab_neon[5])( uint8_t *, intptr_t, uint8_t *, intptr_t, int ) =
 {
     NULL,
     x264_mc_copy_w4_neon,
@@ -160,7 +160,7 @@ static void mc_luma_neon( uint8_t *dst,    intptr_t i_dst_stride,
     if( qpel_idx & 5 ) /* qpel interpolation needed */
     {
         uint8_t *src2 = src[x264_hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);
-        x264_pixel_avg_wtab_neon[i_width>>2](
+        pixel_avg_wtab_neon[i_width>>2](
                 dst, i_dst_stride, src1, i_src_stride,
                 src2, i_height );
         if( weight->weightfn )
@@ -169,7 +169,7 @@ static void mc_luma_neon( uint8_t *dst,    intptr_t i_dst_stride,
     else if( weight->weightfn )
         weight->weightfn[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, weight, i_height );
     else
-        x264_mc_copy_wtab_neon[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, i_height );
+        mc_copy_wtab_neon[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, i_height );
 }
 
 static uint8_t *get_ref_neon( uint8_t *dst,   intptr_t *i_dst_stride,
@@ -186,7 +186,7 @@ static uint8_t *get_ref_neon( uint8_t *dst,   intptr_t *i_dst_stride,
     if( qpel_idx & 5 ) /* qpel interpolation needed */
     {
         uint8_t *src2 = src[x264_hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);
-        x264_pixel_avg_wtab_neon[i_width>>2](
+        pixel_avg_wtab_neon[i_width>>2](
                 dst, *i_dst_stride, src1, i_src_stride,
                 src2, i_height );
         if( weight->weightfn )
@@ -234,11 +234,11 @@ void x264_mc_init_aarch64( int cpu, x264_mc_functions_t *pf )
     pf->copy[PIXEL_8x8]      = x264_mc_copy_w8_neon;
     pf->copy[PIXEL_4x4]      = x264_mc_copy_w4_neon;
 
-    pf->plane_copy                  = x264_plane_copy_neon;
-    pf->plane_copy_swap             = x264_plane_copy_swap_neon;
+    pf->plane_copy                  = plane_copy_neon;
+    pf->plane_copy_swap             = plane_copy_swap_neon;
     pf->plane_copy_deinterleave     = x264_plane_copy_deinterleave_neon;
     pf->plane_copy_deinterleave_rgb = x264_plane_copy_deinterleave_rgb_neon;
-    pf->plane_copy_interleave       = x264_plane_copy_interleave_neon;
+    pf->plane_copy_interleave       = plane_copy_interleave_neon;
 
     pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_neon;
     pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_neon;
@@ -254,10 +254,10 @@ void x264_mc_init_aarch64( int cpu, x264_mc_functions_t *pf )
     pf->avg[PIXEL_4x4]   = x264_pixel_avg_4x4_neon;
     pf->avg[PIXEL_4x2]   = x264_pixel_avg_4x2_neon;
 
-    pf->weight       = x264_mc_wtab_neon;
-    pf->offsetadd    = x264_mc_offsetadd_wtab_neon;
-    pf->offsetsub    = x264_mc_offsetsub_wtab_neon;
-    pf->weight_cache = x264_weight_cache_neon;
+    pf->weight       = mc_wtab_neon;
+    pf->offsetadd    = mc_offsetadd_wtab_neon;
+    pf->offsetsub    = mc_offsetsub_wtab_neon;
+    pf->weight_cache = weight_cache_neon;
 
     pf->mc_chroma = x264_mc_chroma_neon;
     pf->mc_luma = mc_luma_neon;
@@ -271,7 +271,7 @@ void x264_mc_init_aarch64( int cpu, x264_mc_functions_t *pf )
     pf->integral_init8v = x264_integral_init8v_neon;
 
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_neon;
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_neon;
+    pf->mbtree_propagate_list = mbtree_propagate_list_neon;
     pf->mbtree_fix8_pack      = x264_mbtree_fix8_pack_neon;
     pf->mbtree_fix8_unpack    = x264_mbtree_fix8_unpack_neon;
 
index ab47229..7fe9f27 100644 (file)
@@ -74,7 +74,7 @@ void x264_mc_weight_w16##func##_neon( uint8_t *, intptr_t, uint8_t *, intptr_t,
 void x264_mc_weight_w8##func##_neon ( uint8_t *, intptr_t, uint8_t *, intptr_t, const x264_weight_t *, int );\
 void x264_mc_weight_w4##func##_neon ( uint8_t *, intptr_t, uint8_t *, intptr_t, const x264_weight_t *, int );\
 \
-static weight_fn_t x264_mc##func##_wtab_neon[6] =\
+static weight_fn_t mc##func##_wtab_neon[6] =\
 {\
     x264_mc_weight_w4##func##_neon,\
     x264_mc_weight_w4##func##_neon,\
@@ -113,28 +113,28 @@ void x264_mbtree_fix8_pack_neon( uint16_t *dst, float *src, int count );
 void x264_mbtree_fix8_unpack_neon( float *dst, uint16_t *src, int count );
 
 #if !HIGH_BIT_DEPTH
-static void x264_weight_cache_neon( x264_t *h, x264_weight_t *w )
+static void weight_cache_neon( x264_t *h, x264_weight_t *w )
 {
     if( w->i_scale == 1<<w->i_denom )
     {
         if( w->i_offset < 0 )
         {
-            w->weightfn = x264_mc_offsetsub_wtab_neon;
+            w->weightfn = mc_offsetsub_wtab_neon;
             w->cachea[0] = -w->i_offset;
         }
         else
         {
-            w->weightfn = x264_mc_offsetadd_wtab_neon;
+            w->weightfn = mc_offsetadd_wtab_neon;
             w->cachea[0] = w->i_offset;
         }
     }
     else if( !w->i_denom )
-        w->weightfn = x264_mc_nodenom_wtab_neon;
+        w->weightfn = mc_nodenom_wtab_neon;
     else
-        w->weightfn = x264_mc_wtab_neon;
+        w->weightfn = mc_wtab_neon;
 }
 
-static void (* const x264_pixel_avg_wtab_neon[6])( uint8_t *, intptr_t, uint8_t *, intptr_t, uint8_t *, int ) =
+static void (* const pixel_avg_wtab_neon[6])( uint8_t *, intptr_t, uint8_t *, intptr_t, uint8_t *, int ) =
 {
     NULL,
     x264_pixel_avg2_w4_neon,
@@ -144,7 +144,7 @@ static void (* const x264_pixel_avg_wtab_neon[6])( uint8_t *, intptr_t, uint8_t
     x264_pixel_avg2_w20_neon,
 };
 
-static void (* const x264_mc_copy_wtab_neon[5])( uint8_t *, intptr_t, uint8_t *, intptr_t, int ) =
+static void (* const mc_copy_wtab_neon[5])( uint8_t *, intptr_t, uint8_t *, intptr_t, int ) =
 {
     NULL,
     x264_mc_copy_w4_neon,
@@ -167,7 +167,7 @@ static void mc_luma_neon( uint8_t *dst,    intptr_t i_dst_stride,
     if( qpel_idx & 5 ) /* qpel interpolation needed */
     {
         uint8_t *src2 = src[x264_hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);
-        x264_pixel_avg_wtab_neon[i_width>>2](
+        pixel_avg_wtab_neon[i_width>>2](
                 dst, i_dst_stride, src1, i_src_stride,
                 src2, i_height );
         if( weight->weightfn )
@@ -176,7 +176,7 @@ static void mc_luma_neon( uint8_t *dst,    intptr_t i_dst_stride,
     else if( weight->weightfn )
         weight->weightfn[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, weight, i_height );
     else
-        x264_mc_copy_wtab_neon[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, i_height );
+        mc_copy_wtab_neon[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, i_height );
 }
 
 static uint8_t *get_ref_neon( uint8_t *dst,   intptr_t *i_dst_stride,
@@ -193,7 +193,7 @@ static uint8_t *get_ref_neon( uint8_t *dst,   intptr_t *i_dst_stride,
     if( qpel_idx & 5 ) /* qpel interpolation needed */
     {
         uint8_t *src2 = src[x264_hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);
-        x264_pixel_avg_wtab_neon[i_width>>2](
+        pixel_avg_wtab_neon[i_width>>2](
                 dst, *i_dst_stride, src1, i_src_stride,
                 src2, i_height );
         if( weight->weightfn )
@@ -260,11 +260,11 @@ void x264_mc_init_arm( int cpu, x264_mc_functions_t *pf )
     pf->copy[PIXEL_8x8]   = x264_mc_copy_w8_neon;
     pf->copy[PIXEL_4x4]   = x264_mc_copy_w4_neon;
 
-    pf->plane_copy              = x264_plane_copy_neon;
+    pf->plane_copy              = plane_copy_neon;
     pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_neon;
     pf->plane_copy_deinterleave_rgb = x264_plane_copy_deinterleave_rgb_neon;
-    pf->plane_copy_interleave = x264_plane_copy_interleave_neon;
-    pf->plane_copy_swap = x264_plane_copy_swap_neon;
+    pf->plane_copy_interleave = plane_copy_interleave_neon;
+    pf->plane_copy_swap = plane_copy_swap_neon;
 
     pf->store_interleave_chroma = x264_store_interleave_chroma_neon;
     pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_neon;
@@ -280,10 +280,10 @@ void x264_mc_init_arm( int cpu, x264_mc_functions_t *pf )
     pf->avg[PIXEL_4x4]   = x264_pixel_avg_4x4_neon;
     pf->avg[PIXEL_4x2]   = x264_pixel_avg_4x2_neon;
 
-    pf->weight    = x264_mc_wtab_neon;
-    pf->offsetadd = x264_mc_offsetadd_wtab_neon;
-    pf->offsetsub = x264_mc_offsetsub_wtab_neon;
-    pf->weight_cache = x264_weight_cache_neon;
+    pf->weight    = mc_wtab_neon;
+    pf->offsetadd = mc_offsetadd_wtab_neon;
+    pf->offsetsub = mc_offsetsub_wtab_neon;
+    pf->weight_cache = weight_cache_neon;
 
     pf->mc_chroma = x264_mc_chroma_neon;
     pf->mc_luma = mc_luma_neon;
@@ -297,7 +297,7 @@ void x264_mc_init_arm( int cpu, x264_mc_functions_t *pf )
     pf->integral_init8v = x264_integral_init8v_neon;
 
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_neon;
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_neon;
+    pf->mbtree_propagate_list = mbtree_propagate_list_neon;
     pf->mbtree_fix8_pack      = x264_mbtree_fix8_pack_neon;
     pf->mbtree_fix8_unpack    = x264_mbtree_fix8_unpack_neon;
 #endif // !HIGH_BIT_DEPTH
index cc76300..e11d613 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "common.h"
 
-static uint8_t *x264_nal_escape_c( uint8_t *dst, uint8_t *src, uint8_t *end )
+static uint8_t *nal_escape_c( uint8_t *dst, uint8_t *src, uint8_t *end )
 {
     if( src < end ) *dst++ = *src++;
     if( src < end ) *dst++ = *src++;
@@ -117,7 +117,7 @@ void x264_bitstream_init( int cpu, x264_bitstream_function_t *pf )
 {
     memset( pf, 0, sizeof(*pf) );
 
-    pf->nal_escape = x264_nal_escape_c;
+    pf->nal_escape = nal_escape_c;
 #if HAVE_MMX
 #if ARCH_X86_64 && !defined( __MACH__ )
     pf->cabac_block_residual_internal = x264_cabac_block_residual_internal_sse2;
index 0342ac5..04264ac 100644 (file)
@@ -1364,7 +1364,7 @@ void x264_cabac_encode_init( x264_cabac_t *cb, uint8_t *p_data, uint8_t *p_end )
     cb->p_end   = p_end;
 }
 
-static inline void x264_cabac_putbyte( x264_cabac_t *cb )
+static inline void cabac_putbyte( x264_cabac_t *cb )
 {
     if( cb->i_queue >= 0 )
     {
@@ -1396,13 +1396,13 @@ static inline void x264_cabac_putbyte( x264_cabac_t *cb )
     }
 }
 
-static inline void x264_cabac_encode_renorm( x264_cabac_t *cb )
+static inline void cabac_encode_renorm( x264_cabac_t *cb )
 {
     int shift = x264_cabac_renorm_shift[cb->i_range>>3];
     cb->i_range <<= shift;
     cb->i_low   <<= shift;
     cb->i_queue  += shift;
-    x264_cabac_putbyte( cb );
+    cabac_putbyte( cb );
 }
 
 /* Making custom versions of this function, even in asm, for the cases where
@@ -1419,7 +1419,7 @@ void x264_cabac_encode_decision_c( x264_cabac_t *cb, int i_ctx, int b )
         cb->i_range = i_range_lps;
     }
     cb->state[i_ctx] = x264_cabac_transition[i_state][b];
-    x264_cabac_encode_renorm( cb );
+    cabac_encode_renorm( cb );
 }
 
 /* Note: b is negated for this function */
@@ -1428,7 +1428,7 @@ void x264_cabac_encode_bypass_c( x264_cabac_t *cb, int b )
     cb->i_low <<= 1;
     cb->i_low += b & cb->i_range;
     cb->i_queue += 1;
-    x264_cabac_putbyte( cb );
+    cabac_putbyte( cb );
 }
 
 static const int bypass_lut[16] =
@@ -1449,7 +1449,7 @@ void x264_cabac_encode_ue_bypass( x264_cabac_t *cb, int exp_bits, int val )
         cb->i_low <<= i;
         cb->i_low += ((x>>k)&0xff) * cb->i_range;
         cb->i_queue += i;
-        x264_cabac_putbyte( cb );
+        cabac_putbyte( cb );
         i = 8;
     } while( k > 0 );
 }
@@ -1457,7 +1457,7 @@ void x264_cabac_encode_ue_bypass( x264_cabac_t *cb, int exp_bits, int val )
 void x264_cabac_encode_terminal_c( x264_cabac_t *cb )
 {
     cb->i_range -= 2;
-    x264_cabac_encode_renorm( cb );
+    cabac_encode_renorm( cb );
 }
 
 void x264_cabac_encode_flush( x264_t *h, x264_cabac_t *cb )
@@ -1466,12 +1466,12 @@ void x264_cabac_encode_flush( x264_t *h, x264_cabac_t *cb )
     cb->i_low |= 1;
     cb->i_low <<= 9;
     cb->i_queue += 9;
-    x264_cabac_putbyte( cb );
-    x264_cabac_putbyte( cb );
+    cabac_putbyte( cb );
+    cabac_putbyte( cb );
     cb->i_low <<= -cb->i_queue;
     cb->i_low |= (0x35a4e4f5 >> (h->i_frame & 31) & 1) << 10;
     cb->i_queue = 0;
-    x264_cabac_putbyte( cb );
+    cabac_putbyte( cb );
 
     while( cb->i_bytes_outstanding > 0 )
     {
index 561212d..5018cf2 100644 (file)
@@ -39,7 +39,7 @@ const int x264_bit_depth = BIT_DEPTH;
 
 const int x264_chroma_format = X264_CHROMA_FORMAT;
 
-static void x264_log_default( void *, int, const char *, va_list );
+static void log_default( void *, int, const char *, va_list );
 
 /****************************************************************************
  * x264_param_default:
@@ -123,7 +123,7 @@ void x264_param_default( x264_param_t *param )
     param->rc.b_mb_tree = 1;
 
     /* Log */
-    param->pf_log = x264_log_default;
+    param->pf_log = log_default;
     param->p_log_private = NULL;
     param->i_log_level = X264_LOG_INFO;
 
@@ -179,7 +179,7 @@ void x264_param_default( x264_param_t *param )
     param->psz_clbin_file = NULL;
 }
 
-static int x264_param_apply_preset( x264_param_t *param, const char *preset )
+static int param_apply_preset( x264_param_t *param, const char *preset )
 {
     char *end;
     int i = strtol( preset, &end, 10 );
@@ -301,7 +301,7 @@ static int x264_param_apply_preset( x264_param_t *param, const char *preset )
     return 0;
 }
 
-static int x264_param_apply_tune( x264_param_t *param, const char *tune )
+static int param_apply_tune( x264_param_t *param, const char *tune )
 {
     char *tmp = x264_malloc( strlen( tune ) + 1 );
     if( !tmp )
@@ -411,9 +411,9 @@ int x264_param_default_preset( x264_param_t *param, const char *preset, const ch
 {
     x264_param_default( param );
 
-    if( preset && x264_param_apply_preset( param, preset ) < 0 )
+    if( preset && param_apply_preset( param, preset ) < 0 )
         return -1;
-    if( tune && x264_param_apply_tune( param, tune ) < 0 )
+    if( tune && param_apply_tune( param, tune ) < 0 )
         return -1;
     return 0;
 }
@@ -534,7 +534,7 @@ static int parse_cqm( const char *str, uint8_t *cqm, int length )
     return (i == length) ? 0 : -1;
 }
 
-static int x264_atobool( const char *str, int *b_error )
+static int atobool_internal( const char *str, int *b_error )
 {
     if( !strcmp(str, "1") ||
         !strcasecmp(str, "true") ||
@@ -548,7 +548,7 @@ static int x264_atobool( const char *str, int *b_error )
     return 0;
 }
 
-static int x264_atoi( const char *str, int *b_error )
+static int atoi_internal( const char *str, int *b_error )
 {
     char *end;
     int v = strtol( str, &end, 0 );
@@ -557,7 +557,7 @@ static int x264_atoi( const char *str, int *b_error )
     return v;
 }
 
-static double x264_atof( const char *str, int *b_error )
+static double atof_internal( const char *str, int *b_error )
 {
     char *end;
     double v = strtod( str, &end );
@@ -566,11 +566,11 @@ static double x264_atof( const char *str, int *b_error )
     return v;
 }
 
-#define atobool(str) ( name_was_bool = 1, x264_atobool( str, &b_error ) )
+#define atobool(str) ( name_was_bool = 1, atobool_internal( str, &b_error ) )
 #undef atoi
 #undef atof
-#define atoi(str) x264_atoi( str, &b_error )
-#define atof(str) x264_atof( str, &b_error )
+#define atoi(str) atoi_internal( str, &b_error )
+#define atof(str) atof_internal( str, &b_error )
 
 int x264_param_parse( x264_param_t *p, const char *name, const char *value )
 {
@@ -1079,14 +1079,14 @@ void x264_log( x264_t *h, int i_level, const char *psz_fmt, ... )
         va_list arg;
         va_start( arg, psz_fmt );
         if( !h )
-            x264_log_default( NULL, i_level, psz_fmt, arg );
+            log_default( NULL, i_level, psz_fmt, arg );
         else
             h->param.pf_log( h->param.p_log_private, i_level, psz_fmt, arg );
         va_end( arg );
     }
 }
 
-static void x264_log_default( void *p_unused, int i_level, const char *psz_fmt, va_list arg )
+static void log_default( void *p_unused, int i_level, const char *psz_fmt, va_list arg )
 {
     char *psz_prefix;
     switch( i_level )
@@ -1134,7 +1134,7 @@ int x264_picture_alloc( x264_picture_t *pic, int i_csp, int i_width, int i_heigh
         int height_fix8[3];
     } x264_csp_tab_t;
 
-    static const x264_csp_tab_t x264_csp_tab[] =
+    static const x264_csp_tab_t csp_tab[] =
     {
         [X264_CSP_I420] = { 3, { 256*1, 256/2, 256/2 }, { 256*1, 256/2, 256/2 } },
         [X264_CSP_YV12] = { 3, { 256*1, 256/2, 256/2 }, { 256*1, 256/2, 256/2 } },
@@ -1157,14 +1157,14 @@ int x264_picture_alloc( x264_picture_t *pic, int i_csp, int i_width, int i_heigh
         return -1;
     x264_picture_init( pic );
     pic->img.i_csp = i_csp;
-    pic->img.i_plane = x264_csp_tab[csp].planes;
+    pic->img.i_plane = csp_tab[csp].planes;
     int depth_factor = i_csp & X264_CSP_HIGH_DEPTH ? 2 : 1;
     int plane_offset[3] = {0};
     int frame_size = 0;
     for( int i = 0; i < pic->img.i_plane; i++ )
     {
-        int stride = (((int64_t)i_width * x264_csp_tab[csp].width_fix8[i]) >> 8) * depth_factor;
-        int plane_size = (((int64_t)i_height * x264_csp_tab[csp].height_fix8[i]) >> 8) * stride;
+        int stride = (((int64_t)i_width * csp_tab[csp].width_fix8[i]) >> 8) * depth_factor;
+        int plane_size = (((int64_t)i_height * csp_tab[csp].height_fix8[i]) >> 8) * stride;
         pic->img.i_stride[i] = stride;
         plane_offset[i] = frame_size;
         frame_size += plane_size;
index 0c7f128..cd80199 100644 (file)
@@ -337,7 +337,7 @@ static ALWAYS_INLINE void deblock_edge_intra( x264_t *h, pixel *pix, intptr_t i_
     pf_intra( pix, i_stride, alpha, beta );
 }
 
-static ALWAYS_INLINE void x264_macroblock_cache_load_neighbours_deblock( x264_t *h, int mb_x, int mb_y )
+static ALWAYS_INLINE void macroblock_cache_load_neighbours_deblock( x264_t *h, int mb_x, int mb_y )
 {
     int deblock_on_slice_edges = h->sh.i_disable_deblocking_filter_idc != 2;
 
@@ -390,7 +390,7 @@ void x264_frame_deblock_row( x264_t *h, int mb_y )
     for( int mb_x = 0; mb_x < h->mb.i_mb_width; mb_x += (~b_interlaced | mb_y)&1, mb_y ^= b_interlaced )
     {
         x264_prefetch_fenc( h, h->fdec, mb_x, mb_y );
-        x264_macroblock_cache_load_neighbours_deblock( h, mb_x, mb_y );
+        macroblock_cache_load_neighbours_deblock( h, mb_x, mb_y );
 
         int mb_xy = h->mb.i_mb_xy;
         int transform_8x8 = h->mb.mb_transform_size[mb_xy];
index 4d80cbb..49ea899 100644 (file)
@@ -42,7 +42,7 @@ static int align_plane_size( int x, int disalign )
     return x;
 }
 
-static int x264_frame_internal_csp( int external_csp )
+static int frame_internal_csp( int external_csp )
 {
     switch( external_csp & X264_CSP_MASK )
     {
@@ -69,10 +69,10 @@ static int x264_frame_internal_csp( int external_csp )
     }
 }
 
-static x264_frame_t *x264_frame_new( x264_t *h, int b_fdec )
+static x264_frame_t *frame_new( x264_t *h, int b_fdec )
 {
     x264_frame_t *frame;
-    int i_csp = x264_frame_internal_csp( h->param.i_csp );
+    int i_csp = frame_internal_csp( h->param.i_csp );
     int i_mb_count = h->mb.i_mb_count;
     int i_stride, i_width, i_lines, luma_plane_count;
     int i_padv = PADV << PARAM_INTERLACED;
@@ -366,7 +366,7 @@ static int get_plane_ptr( x264_t *h, x264_picture_t *src, uint8_t **pix, int *st
 int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
 {
     int i_csp = src->img.i_csp & X264_CSP_MASK;
-    if( dst->i_csp != x264_frame_internal_csp( i_csp ) )
+    if( dst->i_csp != frame_internal_csp( i_csp ) )
     {
         x264_log( h, X264_LOG_ERROR, "Invalid input colorspace\n" );
         return -1;
@@ -784,7 +784,7 @@ x264_frame_t *x264_frame_pop_unused( x264_t *h, int b_fdec )
     if( h->frames.unused[b_fdec][0] )
         frame = x264_frame_pop( h->frames.unused[b_fdec] );
     else
-        frame = x264_frame_new( h, b_fdec );
+        frame = frame_new( h, b_fdec );
     if( !frame )
         return NULL;
     frame->b_last_minigop_bframe = 0;
index 6168671..86cadfb 100644 (file)
@@ -34,7 +34,7 @@
                    mvx, mvy, 4*width, 4*height, \
                    list ? x264_weight_none : &h->sh.weight[i_ref][p] );
 
-static NOINLINE void x264_mb_mc_0xywh( x264_t *h, int x, int y, int width, int height )
+static NOINLINE void mb_mc_0xywh( x264_t *h, int x, int y, int width, int height )
 {
     int i8    = x264_scan8[0]+x+8*y;
     int i_ref = h->mb.cache.ref[0][i8];
@@ -73,7 +73,7 @@ static NOINLINE void x264_mb_mc_0xywh( x264_t *h, int x, int y, int width, int h
                                                        &h->sh.weight[i_ref][2], height );
     }
 }
-static NOINLINE void x264_mb_mc_1xywh( x264_t *h, int x, int y, int width, int height )
+static NOINLINE void mb_mc_1xywh( x264_t *h, int x, int y, int width, int height )
 {
     int i8    = x264_scan8[0]+x+8*y;
     int i_ref = h->mb.cache.ref[1][i8];
@@ -109,7 +109,7 @@ static NOINLINE void x264_mb_mc_1xywh( x264_t *h, int x, int y, int width, int h
     h->mc.avg[i_mode]( &h->mb.pic.p_fdec[p][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE, \
                        src0, i_stride0, src1, i_stride1, weight );
 
-static NOINLINE void x264_mb_mc_01xywh( x264_t *h, int x, int y, int width, int height )
+static NOINLINE void mb_mc_01xywh( x264_t *h, int x, int y, int width, int height )
 {
     int i8 = x264_scan8[0]+x+8*y;
     int i_ref0 = h->mb.cache.ref[0][i8];
@@ -165,21 +165,21 @@ void x264_mb_mc_8x8( x264_t *h, int i8 )
         switch( h->mb.i_sub_partition[i8] )
         {
             case D_L0_8x8:
-                x264_mb_mc_0xywh( h, x, y, 2, 2 );
+                mb_mc_0xywh( h, x, y, 2, 2 );
                 break;
             case D_L0_8x4:
-                x264_mb_mc_0xywh( h, x, y+0, 2, 1 );
-                x264_mb_mc_0xywh( h, x, y+1, 2, 1 );
+                mb_mc_0xywh( h, x, y+0, 2, 1 );
+                mb_mc_0xywh( h, x, y+1, 2, 1 );
                 break;
             case D_L0_4x8:
-                x264_mb_mc_0xywh( h, x+0, y, 1, 2 );
-                x264_mb_mc_0xywh( h, x+1, y, 1, 2 );
+                mb_mc_0xywh( h, x+0, y, 1, 2 );
+                mb_mc_0xywh( h, x+1, y, 1, 2 );
                 break;
             case D_L0_4x4:
-                x264_mb_mc_0xywh( h, x+0, y+0, 1, 1 );
-                x264_mb_mc_0xywh( h, x+1, y+0, 1, 1 );
-                x264_mb_mc_0xywh( h, x+0, y+1, 1, 1 );
-                x264_mb_mc_0xywh( h, x+1, y+1, 1, 1 );
+                mb_mc_0xywh( h, x+0, y+0, 1, 1 );
+                mb_mc_0xywh( h, x+1, y+0, 1, 1 );
+                mb_mc_0xywh( h, x+0, y+1, 1, 1 );
+                mb_mc_0xywh( h, x+1, y+1, 1, 1 );
                 break;
         }
     }
@@ -189,11 +189,11 @@ void x264_mb_mc_8x8( x264_t *h, int i8 )
 
         if( h->mb.cache.ref[0][scan8] >= 0 )
             if( h->mb.cache.ref[1][scan8] >= 0 )
-                x264_mb_mc_01xywh( h, x, y, 2, 2 );
+                mb_mc_01xywh( h, x, y, 2, 2 );
             else
-                x264_mb_mc_0xywh( h, x, y, 2, 2 );
+                mb_mc_0xywh( h, x, y, 2, 2 );
         else
-            x264_mb_mc_1xywh( h, x, y, 2, 2 );
+            mb_mc_1xywh( h, x, y, 2, 2 );
     }
 }
 
@@ -214,33 +214,33 @@ void x264_mb_mc( x264_t *h )
         if( h->mb.i_partition == D_16x16 )
         {
             if( ref0a >= 0 )
-                if( ref1a >= 0 ) x264_mb_mc_01xywh( h, 0, 0, 4, 4 );
-                else             x264_mb_mc_0xywh ( h, 0, 0, 4, 4 );
-            else                 x264_mb_mc_1xywh ( h, 0, 0, 4, 4 );
+                if( ref1a >= 0 ) mb_mc_01xywh( h, 0, 0, 4, 4 );
+                else             mb_mc_0xywh ( h, 0, 0, 4, 4 );
+            else                 mb_mc_1xywh ( h, 0, 0, 4, 4 );
         }
         else if( h->mb.i_partition == D_16x8 )
         {
             if( ref0a >= 0 )
-                if( ref1a >= 0 ) x264_mb_mc_01xywh( h, 0, 0, 4, 2 );
-                else             x264_mb_mc_0xywh ( h, 0, 0, 4, 2 );
-            else                 x264_mb_mc_1xywh ( h, 0, 0, 4, 2 );
+                if( ref1a >= 0 ) mb_mc_01xywh( h, 0, 0, 4, 2 );
+                else             mb_mc_0xywh ( h, 0, 0, 4, 2 );
+            else                 mb_mc_1xywh ( h, 0, 0, 4, 2 );
 
             if( ref0b >= 0 )
-                if( ref1b >= 0 ) x264_mb_mc_01xywh( h, 0, 2, 4, 2 );
-                else             x264_mb_mc_0xywh ( h, 0, 2, 4, 2 );
-            else                 x264_mb_mc_1xywh ( h, 0, 2, 4, 2 );
+                if( ref1b >= 0 ) mb_mc_01xywh( h, 0, 2, 4, 2 );
+                else             mb_mc_0xywh ( h, 0, 2, 4, 2 );
+            else                 mb_mc_1xywh ( h, 0, 2, 4, 2 );
         }
         else if( h->mb.i_partition == D_8x16 )
         {
             if( ref0a >= 0 )
-                if( ref1a >= 0 ) x264_mb_mc_01xywh( h, 0, 0, 2, 4 );
-                else             x264_mb_mc_0xywh ( h, 0, 0, 2, 4 );
-            else                 x264_mb_mc_1xywh ( h, 0, 0, 2, 4 );
+                if( ref1a >= 0 ) mb_mc_01xywh( h, 0, 0, 2, 4 );
+                else             mb_mc_0xywh ( h, 0, 0, 2, 4 );
+            else                 mb_mc_1xywh ( h, 0, 0, 2, 4 );
 
             if( ref0b >= 0 )
-                if( ref1b >= 0 ) x264_mb_mc_01xywh( h, 2, 0, 2, 4 );
-                else             x264_mb_mc_0xywh ( h, 2, 0, 2, 4 );
-            else                 x264_mb_mc_1xywh ( h, 2, 0, 2, 4 );
+                if( ref1b >= 0 ) mb_mc_01xywh( h, 2, 0, 2, 4 );
+                else             mb_mc_0xywh ( h, 2, 0, 2, 4 );
+            else                 mb_mc_1xywh ( h, 2, 0, 2, 4 );
         }
     }
 }
@@ -562,7 +562,7 @@ NOINLINE void x264_copy_column8( pixel *dst, pixel *src )
         dst[i*FDEC_STRIDE] = src[i*FDEC_STRIDE];
 }
 
-static void ALWAYS_INLINE x264_macroblock_load_pic_pointers( x264_t *h, int mb_x, int mb_y, int i, int b_chroma, int b_mbaff )
+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 )
 {
     int mb_interlaced = b_mbaff && MB_INTERLACED;
     int height = b_chroma ? 16 >> CHROMA_V_SHIFT : 16;
@@ -666,7 +666,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 x264_macroblock_cache_load_neighbours( x264_t *h, int mb_x, int mb_y, int b_interlaced )
+static void ALWAYS_INLINE 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);
@@ -848,9 +848,9 @@ static void ALWAYS_INLINE x264_macroblock_cache_load_neighbours( x264_t *h, int
 #   define LBOT 0
 #endif
 
-static void ALWAYS_INLINE x264_macroblock_cache_load( x264_t *h, int mb_x, int mb_y, int b_mbaff )
+static void ALWAYS_INLINE macroblock_cache_load( x264_t *h, int mb_x, int mb_y, int b_mbaff )
 {
-    x264_macroblock_cache_load_neighbours( h, mb_x, mb_y, b_mbaff );
+    macroblock_cache_load_neighbours( h, mb_x, mb_y, b_mbaff );
 
     int *left = h->mb.i_mb_left_xy;
     int top  = h->mb.i_mb_top_xy;
@@ -996,15 +996,15 @@ static void ALWAYS_INLINE x264_macroblock_cache_load( x264_t *h, int mb_x, int m
     {
         x264_copy_column8( h->mb.pic.p_fdec[0]-1+ 4*FDEC_STRIDE, h->mb.pic.p_fdec[0]+15+ 4*FDEC_STRIDE );
         x264_copy_column8( h->mb.pic.p_fdec[0]-1+12*FDEC_STRIDE, h->mb.pic.p_fdec[0]+15+12*FDEC_STRIDE );
-        x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 0, 0, 0 );
+        macroblock_load_pic_pointers( h, mb_x, mb_y, 0, 0, 0 );
         if( CHROMA444 )
         {
             x264_copy_column8( h->mb.pic.p_fdec[1]-1+ 4*FDEC_STRIDE, h->mb.pic.p_fdec[1]+15+ 4*FDEC_STRIDE );
             x264_copy_column8( h->mb.pic.p_fdec[1]-1+12*FDEC_STRIDE, h->mb.pic.p_fdec[1]+15+12*FDEC_STRIDE );
             x264_copy_column8( h->mb.pic.p_fdec[2]-1+ 4*FDEC_STRIDE, h->mb.pic.p_fdec[2]+15+ 4*FDEC_STRIDE );
             x264_copy_column8( h->mb.pic.p_fdec[2]-1+12*FDEC_STRIDE, h->mb.pic.p_fdec[2]+15+12*FDEC_STRIDE );
-            x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 0, 0 );
-            x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 2, 0, 0 );
+            macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 0, 0 );
+            macroblock_load_pic_pointers( h, mb_x, mb_y, 2, 0, 0 );
         }
         else
         {
@@ -1015,19 +1015,19 @@ static void ALWAYS_INLINE x264_macroblock_cache_load( x264_t *h, int mb_x, int m
                 x264_copy_column8( h->mb.pic.p_fdec[1]-1+12*FDEC_STRIDE, h->mb.pic.p_fdec[1]+ 7+12*FDEC_STRIDE );
                 x264_copy_column8( h->mb.pic.p_fdec[2]-1+12*FDEC_STRIDE, h->mb.pic.p_fdec[2]+ 7+12*FDEC_STRIDE );
             }
-            x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 1, 0 );
+            macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 1, 0 );
         }
     }
     else
     {
-        x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 0, 0, 1 );
+        macroblock_load_pic_pointers( h, mb_x, mb_y, 0, 0, 1 );
         if( CHROMA444 )
         {
-            x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 0, 1 );
-            x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 2, 0, 1 );
+            macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 0, 1 );
+            macroblock_load_pic_pointers( h, mb_x, mb_y, 2, 0, 1 );
         }
         else
-            x264_macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 1, 1 );
+            macroblock_load_pic_pointers( h, mb_x, mb_y, 1, 1, 1 );
     }
 
     if( h->fdec->integral )
@@ -1348,15 +1348,15 @@ static void ALWAYS_INLINE x264_macroblock_cache_load( x264_t *h, int mb_x, int m
 
 void x264_macroblock_cache_load_progressive( x264_t *h, int mb_x, int mb_y )
 {
-    x264_macroblock_cache_load( h, mb_x, mb_y, 0 );
+    macroblock_cache_load( h, mb_x, mb_y, 0 );
 }
 
 void x264_macroblock_cache_load_interlaced( x264_t *h, int mb_x, int mb_y )
 {
-    x264_macroblock_cache_load( h, mb_x, mb_y, 1 );
+    macroblock_cache_load( h, mb_x, mb_y, 1 );
 }
 
-static void x264_macroblock_deblock_strength_mbaff( x264_t *h, uint8_t (*bs)[8][4] )
+static void macroblock_deblock_strength_mbaff( x264_t *h, uint8_t (*bs)[8][4] )
 {
     if( (h->mb.i_neighbour & MB_LEFT) && h->mb.field[h->mb.i_mb_left_xy[0]] != MB_INTERLACED )
     {
@@ -1613,10 +1613,10 @@ void x264_macroblock_deblock_strength( x264_t *h )
                                bs, 4 >> MB_INTERLACED, h->sh.i_type == SLICE_TYPE_B );
 
     if( SLICE_MBAFF )
-        x264_macroblock_deblock_strength_mbaff( h, bs );
+        macroblock_deblock_strength_mbaff( h, bs );
 }
 
-static void ALWAYS_INLINE x264_macroblock_store_pic( x264_t *h, int mb_x, int mb_y, int i, int b_chroma, int b_mbaff )
+static void ALWAYS_INLINE 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];
@@ -1630,7 +1630,7 @@ static void ALWAYS_INLINE x264_macroblock_store_pic( x264_t *h, int mb_x, int mb
         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 x264_macroblock_backup_intra( x264_t *h, int mb_x, int mb_y, int b_mbaff )
+static void ALWAYS_INLINE 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
@@ -1688,27 +1688,27 @@ void x264_macroblock_cache_save( x264_t *h )
 
     if( SLICE_MBAFF )
     {
-        x264_macroblock_backup_intra( h, h->mb.i_mb_x, h->mb.i_mb_y, 1 );
-        x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 0, 0, 1 );
+        macroblock_backup_intra( h, h->mb.i_mb_x, h->mb.i_mb_y, 1 );
+        macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 0, 0, 1 );
         if( CHROMA444 )
         {
-            x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 0, 1 );
-            x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 2, 0, 1 );
+            macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 0, 1 );
+            macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 2, 0, 1 );
         }
         else
-            x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 1, 1 );
+            macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 1, 1 );
     }
     else
     {
-        x264_macroblock_backup_intra( h, h->mb.i_mb_x, h->mb.i_mb_y, 0 );
-        x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 0, 0, 0 );
+        macroblock_backup_intra( h, h->mb.i_mb_x, h->mb.i_mb_y, 0 );
+        macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 0, 0, 0 );
         if( CHROMA444 )
         {
-            x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 0, 0 );
-            x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 2, 0, 0 );
+            macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 0, 0 );
+            macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 2, 0, 0 );
         }
         else
-            x264_macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 1, 0 );
+            macroblock_store_pic( h, h->mb.i_mb_x, h->mb.i_mb_y, 1, 1, 0 );
     }
 
     x264_prefetch_fenc( h, h->fdec, h->mb.i_mb_x, h->mb.i_mb_y );
index 65af5b9..31a1493 100644 (file)
@@ -107,7 +107,7 @@ PIXEL_AVG_C( pixel_avg_2x8,   2, 8 )
 PIXEL_AVG_C( pixel_avg_2x4,   2, 4 )
 PIXEL_AVG_C( pixel_avg_2x2,   2, 2 )
 
-static void x264_weight_cache( x264_t *h, x264_weight_t *w )
+static void weight_cache( x264_t *h, x264_weight_t *w )
 {
     w->weightfn = h->mc.weight;
 }
@@ -134,7 +134,7 @@ static void mc_weight( pixel *dst, intptr_t i_dst_stride, pixel *src, intptr_t i
 }
 
 #define MC_WEIGHT_C( name, width ) \
-    static void name( pixel *dst, intptr_t i_dst_stride, pixel *src, intptr_t i_src_stride, const x264_weight_t *weight, int height ) \
+static void name( pixel *dst, intptr_t i_dst_stride, pixel *src, intptr_t i_src_stride, const x264_weight_t *weight, int height ) \
 { \
     mc_weight( dst, i_dst_stride, src, i_src_stride, weight, width, height );\
 }
@@ -146,7 +146,7 @@ MC_WEIGHT_C( mc_weight_w8,   8 )
 MC_WEIGHT_C( mc_weight_w4,   4 )
 MC_WEIGHT_C( mc_weight_w2,   2 )
 
-static weight_fn_t x264_mc_weight_wtab[6] =
+static weight_fn_t mc_weight_wtab[6] =
 {
     mc_weight_w2,
     mc_weight_w4,
@@ -336,10 +336,10 @@ void x264_plane_copy_deinterleave_c( pixel *dsta, intptr_t i_dsta, pixel *dstb,
         }
 }
 
-static void x264_plane_copy_deinterleave_rgb_c( pixel *dsta, intptr_t i_dsta,
-                                                pixel *dstb, intptr_t i_dstb,
-                                                pixel *dstc, intptr_t i_dstc,
-                                                pixel *src,  intptr_t i_src, int pw, int w, int h )
+static void plane_copy_deinterleave_rgb_c( pixel *dsta, intptr_t i_dsta,
+                                           pixel *dstb, intptr_t i_dstb,
+                                           pixel *dstc, intptr_t i_dstc,
+                                           pixel *src,  intptr_t 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 )
     {
@@ -361,9 +361,9 @@ static ALWAYS_INLINE uint32_t v210_endian_fix32( uint32_t x )
 #define v210_endian_fix32(x) (x)
 #endif
 
-static void x264_plane_copy_deinterleave_v210_c( pixel *dsty, intptr_t i_dsty,
-                                                 pixel *dstc, intptr_t i_dstc,
-                                                 uint32_t *src, intptr_t i_src, int w, int h )
+static void plane_copy_deinterleave_v210_c( pixel *dsty, intptr_t i_dsty,
+                                            pixel *dstc, intptr_t i_dstc,
+                                            uint32_t *src, intptr_t i_src, int w, int h )
 {
     for( int l = 0; l < h; l++ )
     {
@@ -630,10 +630,10 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf, int cpu_independent )
     pf->avg[PIXEL_2x4]  = pixel_avg_2x4;
     pf->avg[PIXEL_2x2]  = pixel_avg_2x2;
 
-    pf->weight    = x264_mc_weight_wtab;
-    pf->offsetadd = x264_mc_weight_wtab;
-    pf->offsetsub = x264_mc_weight_wtab;
-    pf->weight_cache = x264_weight_cache;
+    pf->weight    = mc_weight_wtab;
+    pf->offsetadd = mc_weight_wtab;
+    pf->offsetsub = mc_weight_wtab;
+    pf->weight_cache = weight_cache;
 
     pf->copy_16x16_unaligned = mc_copy_w16;
     pf->copy[PIXEL_16x16] = mc_copy_w16;
@@ -647,10 +647,11 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf, int cpu_independent )
     pf->plane_copy = x264_plane_copy_c;
     pf->plane_copy_swap = x264_plane_copy_swap_c;
     pf->plane_copy_interleave = x264_plane_copy_interleave_c;
+
     pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_c;
     pf->plane_copy_deinterleave_yuyv = x264_plane_copy_deinterleave_c;
-    pf->plane_copy_deinterleave_rgb = x264_plane_copy_deinterleave_rgb_c;
-    pf->plane_copy_deinterleave_v210 = x264_plane_copy_deinterleave_v210_c;
+    pf->plane_copy_deinterleave_rgb = plane_copy_deinterleave_rgb_c;
+    pf->plane_copy_deinterleave_v210 = plane_copy_deinterleave_v210_c;
 
     pf->hpel_filter = hpel_filter;
 
index f3e7079..bbc8d27 100644 (file)
@@ -39,9 +39,9 @@ void x264_mbtree_propagate_list_internal_##cpu( int16_t (*mvs)[2], int16_t *prop
                                                 uint16_t *lowres_costs, int16_t *output,\
                                                 int bipred_weight, int mb_y, int len );\
 \
-static void x264_mbtree_propagate_list_##cpu( x264_t *h, uint16_t *ref_costs, int16_t (*mvs)[2],\
-                                              int16_t *propagate_amount, uint16_t *lowres_costs,\
-                                              int bipred_weight, int mb_y, int len, int list )\
+static void mbtree_propagate_list_##cpu( x264_t *h, uint16_t *ref_costs, int16_t (*mvs)[2],\
+                                         int16_t *propagate_amount, uint16_t *lowres_costs,\
+                                         int bipred_weight, int mb_y, int len, int list )\
 {\
     int16_t *current = h->scratch_buffer2;\
 \
@@ -103,7 +103,7 @@ static void x264_mbtree_propagate_list_##cpu( x264_t *h, uint16_t *ref_costs, in
 void x264_plane_copy_c( pixel *, intptr_t, pixel *, intptr_t, int w, int h );
 
 #define PLANE_COPY(align, cpu)\
-static void x264_plane_copy_##cpu( pixel *dst, intptr_t i_dst, pixel *src, intptr_t i_src, int w, int h )\
+static void plane_copy_##cpu( pixel *dst, intptr_t i_dst, pixel *src, intptr_t i_src, int w, int h )\
 {\
     int c_w = (align) / sizeof(pixel) - 1;\
     if( w < 256 ) /* tiny resolutions don't want non-temporal hints. dunno the exact threshold. */\
@@ -131,7 +131,7 @@ static void x264_plane_copy_##cpu( pixel *dst, intptr_t i_dst, pixel *src, intpt
 void x264_plane_copy_swap_c( pixel *, intptr_t, pixel *, intptr_t, int w, int h );
 
 #define PLANE_COPY_SWAP(align, cpu)\
-static void x264_plane_copy_swap_##cpu( pixel *dst, intptr_t i_dst, pixel *src, intptr_t i_src, int w, int h )\
+static void plane_copy_swap_##cpu( pixel *dst, intptr_t i_dst, pixel *src, intptr_t i_src, int w, int h )\
 {\
     int c_w = (align>>1) / sizeof(pixel) - 1;\
     if( !(w&c_w) )\
@@ -166,8 +166,8 @@ void x264_plane_copy_deinterleave_c( pixel *dsta, intptr_t i_dsta, pixel *dstb,
 /* We can utilize existing plane_copy_deinterleave() functions for YUYV/UYUV
  * input with the additional constraint that we cannot overread src. */
 #define PLANE_COPY_YUYV(align, cpu)\
-static void x264_plane_copy_deinterleave_yuyv_##cpu( pixel *dsta, intptr_t i_dsta, pixel *dstb, intptr_t i_dstb,\
-                                                     pixel *src, intptr_t i_src, int w, int h )\
+static void plane_copy_deinterleave_yuyv_##cpu( pixel *dsta, intptr_t i_dsta, pixel *dstb, intptr_t i_dstb,\
+                                                pixel *src, intptr_t i_src, int w, int h )\
 {\
     int c_w = (align>>1) / sizeof(pixel) - 1;\
     if( !(w&c_w) )\
@@ -198,9 +198,9 @@ void x264_plane_copy_interleave_c( pixel *dst,  intptr_t i_dst,
                                    pixel *srcv, intptr_t i_srcv, int w, int h );
 
 #define PLANE_INTERLEAVE(cpu) \
-static void x264_plane_copy_interleave_##cpu( pixel *dst,  intptr_t i_dst,\
-                                              pixel *srcu, intptr_t i_srcu,\
-                                              pixel *srcv, intptr_t i_srcv, int w, int h )\
+static void plane_copy_interleave_##cpu( pixel *dst,  intptr_t i_dst,\
+                                         pixel *srcu, intptr_t i_srcu,\
+                                         pixel *srcv, intptr_t i_srcv, int w, int h )\
 {\
     int c_w = 16 / sizeof(pixel) - 1;\
     if( !(w&c_w) )\
index 0fa339e..5172073 100644 (file)
@@ -51,129 +51,6 @@ static const uint8_t pu_chroma_mask_arr[16 * 5] =
     0, 1, 1, 2, 16, 17, 17, 18, 16, 17, 17, 18, 18, 19, 19, 20
 };
 
-void x264_mc_copy_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                           uint8_t *p_src, intptr_t i_src_stride,
-                           int32_t i_height );
-void x264_mc_copy_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                          uint8_t *p_src, intptr_t i_src_stride,
-                          int32_t i_height );
-void x264_mc_copy_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8_t *p_src,
-                          intptr_t i_src_stride, int32_t i_height );
-void x264_memzero_aligned_msa( void *p_dst, size_t n );
-
-void x264_pixel_avg_16x16_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                               uint8_t *p_pix2, intptr_t i_pix2_stride,
-                               uint8_t *p_pix3, intptr_t i_pix3_stride,
-                               int32_t i_weight );
-void x264_pixel_avg_16x8_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                              uint8_t *p_pix2, intptr_t i_pix2_stride,
-                              uint8_t *p_pix3, intptr_t i_pix3_stride,
-                              int32_t i_weight );
-void x264_pixel_avg_8x16_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                              uint8_t *p_pix2, intptr_t i_pix2_stride,
-                              uint8_t *p_pix3, intptr_t i_pix3_stride,
-                              int32_t i_weight );
-void x264_pixel_avg_8x8_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                             uint8_t *p_pix2, intptr_t i_pix2_stride,
-                             uint8_t *p_pix3, intptr_t i_pix3_stride,
-                             int32_t i_weight );
-void x264_pixel_avg_8x4_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                             uint8_t *p_pix2, intptr_t i_pix2_stride,
-                             uint8_t *p_pix3, intptr_t i_pix3_stride,
-                             int32_t i_weight );
-void x264_pixel_avg_4x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                              uint8_t *p_pix2, intptr_t pix2_stride,
-                              uint8_t *p_pix3, intptr_t pix3_stride,
-                              int32_t i_weight );
-void x264_pixel_avg_4x8_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                             uint8_t *p_pix2, intptr_t i_pix2_stride,
-                             uint8_t *p_pix3, intptr_t i_pix3_stride,
-                             int32_t i_weight );
-void x264_pixel_avg_4x4_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                             uint8_t *p_pix2, intptr_t i_pix2_stride,
-                             uint8_t *p_pix3, intptr_t i_pix3_stride,
-                             int32_t i_weight );
-void x264_pixel_avg_4x2_msa( uint8_t *p_pix1, intptr_t i_pix1_stride,
-                             uint8_t *p_pix2, intptr_t i_pix2_stride,
-                             uint8_t *p_pix3, intptr_t i_pix3_stride,
-                             int32_t i_weight );
-
-void x264_mc_weight_w20_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                             uint8_t *p_src, intptr_t i_src_stride,
-                             const x264_weight_t *pWeight, int32_t i_height );
-void x264_mc_weight_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                            uint8_t *p_src, intptr_t i_src_stride,
-                            const x264_weight_t *pWeight, int32_t i_height );
-void x264_mc_weight_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                            uint8_t *p_src, intptr_t i_src_stride,
-                            const x264_weight_t *pWeight, int32_t i_height );
-void x264_mc_weight_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                             uint8_t *p_src, intptr_t i_src_stride,
-                             const x264_weight_t *pWeight, int32_t i_height );
-
-weight_fn_t x264_mc_weight_wtab_msa[6] =
-{
-    x264_mc_weight_w4_msa,
-    x264_mc_weight_w4_msa,
-    x264_mc_weight_w8_msa,
-    x264_mc_weight_w16_msa,
-    x264_mc_weight_w16_msa,
-    x264_mc_weight_w20_msa,
-};
-
-void x264_mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                       uint8_t *p_src[4], intptr_t i_src_stride,
-                       int32_t m_vx, int32_t m_vy,
-                       int32_t i_width, int32_t i_height,
-                       const x264_weight_t *pWeight );
-uint8_t *x264_get_ref_msa( uint8_t *p_dst,   intptr_t *p_dst_stride,
-                           uint8_t *p_src[4], intptr_t i_src_stride,
-                           int32_t m_vx, int32_t m_vy,
-                           int32_t i_width, int32_t i_height,
-                           const x264_weight_t *pWeight );
-void x264_mc_chroma_msa( uint8_t *p_dst_u, uint8_t *p_dst_v,
-                         intptr_t i_dst_stride,
-                         uint8_t *p_src, intptr_t i_src_stride,
-                         int32_t m_vx, int32_t m_vy,
-                         int32_t i_width, int32_t i_height );
-void x264_hpel_filter_msa( uint8_t *p_dsth, uint8_t *p_dst_v,
-                           uint8_t *p_dstc, uint8_t *p_src,
-                           intptr_t i_stride, int32_t i_width,
-                           int32_t i_height, int16_t *p_buf );
-
-void x264_plane_copy_interleave_msa( uint8_t *p_dst,  intptr_t i_dst_stride,
-                                     uint8_t *p_src0, intptr_t i_src_stride0,
-                                     uint8_t *p_src1, intptr_t i_src_stride1,
-                                     int32_t i_width, int32_t i_height );
-void x264_plane_copy_deinterleave_msa( uint8_t *p_dst0, intptr_t i_dst_stride0,
-                                       uint8_t *p_dst1, intptr_t i_dst_stride1,
-                                       uint8_t *p_src,  intptr_t i_src_stride,
-                                       int32_t i_width, int32_t i_height );
-void x264_plane_copy_deinterleave_rgb_msa( uint8_t *p_dst0,
-                                           intptr_t i_dst_stride0,
-                                           uint8_t *p_dst1,
-                                           intptr_t i_dst_stride1,
-                                           uint8_t *p_dst2,
-                                           intptr_t i_dst_stride2,
-                                           uint8_t *p_src,
-                                           intptr_t i_src_stride,
-                                           int32_t i_src_width, int32_t i_width,
-                                           int32_t i_height );
-void x264_store_interleave_chroma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                                       uint8_t *p_src0, uint8_t *p_src1,
-                                       int32_t i_height );
-void x264_load_deinterleave_chroma_fenc_msa( uint8_t *p_dst, uint8_t *p_src,
-                                             intptr_t i_src_stride,
-                                             int32_t i_height );
-void x264_load_deinterleave_chroma_fdec_msa( uint8_t *p_dst, uint8_t *p_src,
-                                             intptr_t i_src_stride,
-                                             int32_t i_height );
-void x264_frame_init_lowres_core_msa( uint8_t *p_src, uint8_t *p_dst0,
-                                      uint8_t *p_dst1, uint8_t *p_dst2,
-                                      uint8_t *p_dst3, intptr_t i_src_stride,
-                                      intptr_t i_dst_stride, int32_t i_width,
-                                      int32_t i_height );
-
 static void avc_luma_hz_16w_msa( uint8_t *p_src, int32_t i_src_stride,
                                  uint8_t *p_dst, int32_t i_dst_stride,
                                  int32_t i_height )
@@ -1861,10 +1738,10 @@ static void memset_zero_16width_msa( uint8_t *p_src, int32_t i_stride,
     }
 }
 
-static void plane_copy_interleave_msa( uint8_t *p_src0, int32_t i_src0_stride,
-                                       uint8_t *p_src1, int32_t i_src1_stride,
-                                       uint8_t *p_dst, int32_t i_dst_stride,
-                                       int32_t i_width, int32_t i_height )
+static void core_plane_copy_interleave_msa( uint8_t *p_src0, int32_t i_src0_stride,
+                                            uint8_t *p_src1, int32_t i_src1_stride,
+                                            uint8_t *p_dst, int32_t i_dst_stride,
+                                            int32_t i_width, int32_t i_height )
 {
     int32_t i_loop_width, i_loop_height, i_w_mul8, i_h4w;
     v16u8 src0, src1, src2, src3, src4, src5, src6, src7;
@@ -1966,10 +1843,10 @@ static void plane_copy_interleave_msa( uint8_t *p_src0, int32_t i_src0_stride,
     }
 }
 
-static void plane_copy_deinterleave_msa( uint8_t *p_src, int32_t i_src_stride,
-                                         uint8_t *p_dst0, int32_t dst0_stride,
-                                         uint8_t *p_dst1, int32_t dst1_stride,
-                                         int32_t i_width, int32_t i_height )
+static void core_plane_copy_deinterleave_msa( uint8_t *p_src, int32_t i_src_stride,
+                                              uint8_t *p_dst0, int32_t dst0_stride,
+                                              uint8_t *p_dst1, int32_t dst1_stride,
+                                              int32_t i_width, int32_t i_height )
 {
     int32_t i_loop_width, i_loop_height, i_w_mul4, i_w_mul8, i_h4w;
     uint32_t u_res_w0, u_res_w1;
@@ -2098,16 +1975,16 @@ static void plane_copy_deinterleave_msa( uint8_t *p_src, int32_t i_src_stride,
 }
 
 
-static void plane_copy_deinterleave_rgb_msa( uint8_t *p_src,
-                                             int32_t i_src_stride,
-                                             uint8_t *p_dst0,
-                                             int32_t i_dst0_stride,
-                                             uint8_t *p_dst1,
-                                             int32_t i_dst1_stride,
-                                             uint8_t *p_dst2,
-                                             int32_t i_dst2_stride,
-                                             int32_t i_width,
-                                             int32_t i_height )
+static void core_plane_copy_deinterleave_rgb_msa( uint8_t *p_src,
+                                                  int32_t i_src_stride,
+                                                  uint8_t *p_dst0,
+                                                  int32_t i_dst0_stride,
+                                                  uint8_t *p_dst1,
+                                                  int32_t i_dst1_stride,
+                                                  uint8_t *p_dst2,
+                                                  int32_t i_dst2_stride,
+                                                  int32_t i_width,
+                                                  int32_t i_height )
 {
     uint8_t *p_src_orig = p_src;
     uint8_t *p_dst0_orig = p_dst0;
@@ -2234,16 +2111,16 @@ static void plane_copy_deinterleave_rgb_msa( uint8_t *p_src,
     }
 }
 
-static void plane_copy_deinterleave_rgba_msa( uint8_t *p_src,
-                                              int32_t i_src_stride,
-                                              uint8_t *p_dst0,
-                                              int32_t i_dst0_stride,
-                                              uint8_t *p_dst1,
-                                              int32_t i_dst1_stride,
-                                              uint8_t *p_dst2,
-                                              int32_t i_dst2_stride,
-                                              int32_t i_width,
-                                              int32_t i_height )
+static void core_plane_copy_deinterleave_rgba_msa( uint8_t *p_src,
+                                                   int32_t i_src_stride,
+                                                   uint8_t *p_dst0,
+                                                   int32_t i_dst0_stride,
+                                                   uint8_t *p_dst1,
+                                                   int32_t i_dst1_stride,
+                                                   uint8_t *p_dst2,
+                                                   int32_t i_dst2_stride,
+                                                   int32_t i_width,
+                                                   int32_t i_height )
 {
     uint8_t *p_src_orig = p_src;
     uint8_t *p_dst0_orig = p_dst0;
@@ -2441,10 +2318,10 @@ static void plane_copy_deinterleave_rgba_msa( uint8_t *p_src,
     }
 }
 
-static void store_interleave_chroma_msa( uint8_t *p_src0, int32_t i_src0_stride,
-                                         uint8_t *p_src1, int32_t i_src1_stride,
-                                         uint8_t *p_dst, int32_t i_dst_stride,
-                                         int32_t i_height )
+static void core_store_interleave_chroma_msa( uint8_t *p_src0, int32_t i_src0_stride,
+                                              uint8_t *p_src1, int32_t i_src1_stride,
+                                              uint8_t *p_dst, int32_t i_dst_stride,
+                                              int32_t i_height )
 {
     int32_t i_loop_height, i_h4w;
     v16u8 in0, in1, in2, in3, in4, in5, in6, in7;
@@ -2476,12 +2353,12 @@ static void store_interleave_chroma_msa( uint8_t *p_src0, int32_t i_src0_stride,
     }
 }
 
-static void frame_init_lowres_core_msa( uint8_t *p_src, int32_t i_src_stride,
-                                        uint8_t *p_dst0, int32_t dst0_stride,
-                                        uint8_t *p_dst1, int32_t dst1_stride,
-                                        uint8_t *p_dst2, int32_t dst2_stride,
-                                        uint8_t *p_dst3, int32_t dst3_stride,
-                                        int32_t i_width, int32_t i_height )
+static void core_frame_init_lowres_core_msa( uint8_t *p_src, int32_t i_src_stride,
+                                             uint8_t *p_dst0, int32_t dst0_stride,
+                                             uint8_t *p_dst1, int32_t dst1_stride,
+                                             uint8_t *p_dst2, int32_t dst2_stride,
+                                             uint8_t *p_dst3, int32_t dst3_stride,
+                                             int32_t i_width, int32_t i_height )
 {
     int32_t i_loop_width, i_loop_height, i_w16_mul;
     v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8;
@@ -2583,29 +2460,29 @@ static void frame_init_lowres_core_msa( uint8_t *p_src, int32_t i_src_stride,
     }
 }
 
-void x264_mc_copy_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                           uint8_t *p_src, intptr_t i_src_stride,
-                           int32_t i_height )
+static void mc_copy_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                             uint8_t *p_src, intptr_t i_src_stride,
+                             int32_t i_height )
 {
     copy_width16_msa( p_src, i_src_stride, p_dst, i_dst_stride, i_height );
 }
 
-void x264_mc_copy_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8_t *p_src,
-                          intptr_t i_src_stride, int32_t i_height )
+static void mc_copy_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8_t *p_src,
+                            intptr_t i_src_stride, int32_t i_height )
 {
     copy_width8_msa( p_src, i_src_stride, p_dst, i_dst_stride, i_height );
 }
 
-void x264_mc_copy_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8_t *p_src,
-                          intptr_t i_src_stride, int32_t i_height )
+static void mc_copy_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride, uint8_t *p_src,
+                            intptr_t i_src_stride, int32_t i_height )
 {
     copy_width4_msa( p_src, i_src_stride, p_dst, i_dst_stride, i_height );
 }
 
-void x264_pixel_avg_16x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                               uint8_t *p_pix2, intptr_t pix2_stride,
-                               uint8_t *p_pix3, intptr_t pix3_stride,
-                               int32_t i_weight )
+static void pixel_avg_16x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                                 uint8_t *p_pix2, intptr_t pix2_stride,
+                                 uint8_t *p_pix3, intptr_t pix3_stride,
+                                 int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2630,10 +2507,10 @@ void x264_pixel_avg_16x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_16x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                              uint8_t *p_pix2, intptr_t pix2_stride,
-                              uint8_t *p_pix3, intptr_t pix3_stride,
-                              int32_t i_weight )
+static void pixel_avg_16x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                                uint8_t *p_pix2, intptr_t pix2_stride,
+                                uint8_t *p_pix3, intptr_t pix3_stride,
+                                int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2658,10 +2535,10 @@ void x264_pixel_avg_16x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_8x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                              uint8_t *p_pix2, intptr_t pix2_stride,
-                              uint8_t *p_pix3, intptr_t pix3_stride,
-                              int32_t i_weight )
+static void pixel_avg_8x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                                uint8_t *p_pix2, intptr_t pix2_stride,
+                                uint8_t *p_pix3, intptr_t pix3_stride,
+                                int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2684,10 +2561,10 @@ void x264_pixel_avg_8x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_8x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                             uint8_t *p_pix2, intptr_t pix2_stride,
-                             uint8_t *p_pix3, intptr_t pix3_stride,
-                             int32_t i_weight )
+static void pixel_avg_8x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                               uint8_t *p_pix2, intptr_t pix2_stride,
+                               uint8_t *p_pix3, intptr_t pix3_stride,
+                               int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2710,10 +2587,10 @@ void x264_pixel_avg_8x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_8x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                             uint8_t *p_pix2, intptr_t pix2_stride,
-                             uint8_t *p_pix3, intptr_t pix3_stride,
-                             int32_t i_weight )
+static void pixel_avg_8x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                               uint8_t *p_pix2, intptr_t pix2_stride,
+                               uint8_t *p_pix3, intptr_t pix3_stride,
+                               int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2736,10 +2613,10 @@ void x264_pixel_avg_8x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_4x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                              uint8_t *p_pix2, intptr_t pix2_stride,
-                              uint8_t *p_pix3, intptr_t pix3_stride,
-                              int32_t i_weight )
+static void pixel_avg_4x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                                uint8_t *p_pix2, intptr_t pix2_stride,
+                                uint8_t *p_pix3, intptr_t pix3_stride,
+                                int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2762,10 +2639,10 @@ void x264_pixel_avg_4x16_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_4x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                             uint8_t *p_pix2, intptr_t pix2_stride,
-                             uint8_t *p_pix3, intptr_t pix3_stride,
-                             int32_t i_weight )
+static void pixel_avg_4x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                               uint8_t *p_pix2, intptr_t pix2_stride,
+                               uint8_t *p_pix3, intptr_t pix3_stride,
+                               int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2788,10 +2665,10 @@ void x264_pixel_avg_4x8_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_4x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                             uint8_t *p_pix2, intptr_t pix2_stride,
-                             uint8_t *p_pix3, intptr_t pix3_stride,
-                             int32_t i_weight )
+static void pixel_avg_4x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                               uint8_t *p_pix2, intptr_t pix2_stride,
+                               uint8_t *p_pix3, intptr_t pix3_stride,
+                               int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2814,10 +2691,10 @@ void x264_pixel_avg_4x4_msa( uint8_t *p_pix1, intptr_t pix1_stride,
     }
 }
 
-void x264_pixel_avg_4x2_msa( uint8_t *p_pix1, intptr_t pix1_stride,
-                             uint8_t *p_pix2, intptr_t pix2_stride,
-                             uint8_t *p_pix3, intptr_t pix3_stride,
-                             int32_t i_weight )
+static void pixel_avg_4x2_msa( uint8_t *p_pix1, intptr_t pix1_stride,
+                               uint8_t *p_pix2, intptr_t pix2_stride,
+                               uint8_t *p_pix3, intptr_t pix3_stride,
+                               int32_t i_weight )
 {
     if( 32 == i_weight )
     {
@@ -2841,7 +2718,7 @@ void x264_pixel_avg_4x2_msa( uint8_t *p_pix1, intptr_t pix1_stride,
 }
 
 
-void x264_memzero_aligned_msa( void *p_dst, size_t n )
+static void memzero_aligned_msa( void *p_dst, size_t n )
 {
     uint32_t u_tot32_mul_lines = n >> 5;
     uint32_t u_remaining = n - ( u_tot32_mul_lines << 5 );
@@ -2854,9 +2731,9 @@ void x264_memzero_aligned_msa( void *p_dst, size_t n )
     }
 }
 
-void x264_mc_weight_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                            uint8_t *p_src, intptr_t i_src_stride,
-                            const x264_weight_t *pWeight, int32_t i_height )
+static void mc_weight_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                              uint8_t *p_src, intptr_t i_src_stride,
+                              const x264_weight_t *pWeight, int32_t i_height )
 {
     int32_t i_log2_denom = pWeight->i_denom;
     int32_t i_offset = pWeight->i_offset;
@@ -2866,9 +2743,9 @@ void x264_mc_weight_w4_msa( uint8_t *p_dst, intptr_t i_dst_stride,
                                 i_height, i_log2_denom, i_weight, i_offset );
 }
 
-void x264_mc_weight_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                            uint8_t *p_src, intptr_t i_src_stride,
-                            const x264_weight_t *pWeight, int32_t i_height )
+static void mc_weight_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                              uint8_t *p_src, intptr_t i_src_stride,
+                              const x264_weight_t *pWeight, int32_t i_height )
 {
     int32_t i_log2_denom = pWeight->i_denom;
     int32_t i_offset = pWeight->i_offset;
@@ -2878,9 +2755,9 @@ void x264_mc_weight_w8_msa( uint8_t *p_dst, intptr_t i_dst_stride,
                                 i_height, i_log2_denom, i_weight, i_offset );
 }
 
-void x264_mc_weight_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                             uint8_t *p_src, intptr_t i_src_stride,
-                             const x264_weight_t *pWeight, int32_t i_height )
+static void mc_weight_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                               uint8_t *p_src, intptr_t i_src_stride,
+                               const x264_weight_t *pWeight, int32_t i_height )
 {
     int32_t i_log2_denom = pWeight->i_denom;
     int32_t i_offset = pWeight->i_offset;
@@ -2890,21 +2767,21 @@ void x264_mc_weight_w16_msa( uint8_t *p_dst, intptr_t i_dst_stride,
                                  i_height, i_log2_denom, i_weight, i_offset );
 }
 
-void x264_mc_weight_w20_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                             uint8_t *p_src, intptr_t i_src_stride,
-                             const x264_weight_t *pWeight, int32_t i_height )
+static void mc_weight_w20_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                               uint8_t *p_src, intptr_t i_src_stride,
+                               const x264_weight_t *pWeight, int32_t i_height )
 {
-    x264_mc_weight_w16_msa( p_dst, i_dst_stride, p_src, i_src_stride,
-                            pWeight, i_height );
-    x264_mc_weight_w4_msa( p_dst + 16, i_dst_stride, p_src + 16, i_src_stride,
-                           pWeight, i_height );
+    mc_weight_w16_msa( p_dst, i_dst_stride, p_src, i_src_stride,
+                       pWeight, i_height );
+    mc_weight_w4_msa( p_dst + 16, i_dst_stride, p_src + 16, i_src_stride,
+                      pWeight, i_height );
 }
 
-void x264_mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                       uint8_t *p_src[4], intptr_t i_src_stride,
-                       int32_t m_vx, int32_t m_vy,
-                       int32_t i_width, int32_t i_height,
-                       const x264_weight_t *pWeight )
+static void mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                         uint8_t *p_src[4], intptr_t i_src_stride,
+                         int32_t m_vx, int32_t m_vy,
+                         int32_t i_width, int32_t i_height,
+                         const x264_weight_t *pWeight )
 {
     int32_t  i_qpel_idx;
     int32_t  i_offset;
@@ -2940,19 +2817,19 @@ void x264_mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
         {
             if( 16 == i_width )
             {
-                x264_mc_weight_w16_msa( p_dst, i_dst_stride,
-                                        p_dst, i_dst_stride,
-                                        pWeight, i_height );
+                mc_weight_w16_msa( p_dst, i_dst_stride,
+                                   p_dst, i_dst_stride,
+                                   pWeight, i_height );
             }
             else if( 8 == i_width )
             {
-                x264_mc_weight_w8_msa( p_dst, i_dst_stride, p_dst, i_dst_stride,
-                                       pWeight, i_height );
+                mc_weight_w8_msa( p_dst, i_dst_stride, p_dst, i_dst_stride,
+                                  pWeight, i_height );
             }
             else if( 4 == i_width )
             {
-                x264_mc_weight_w4_msa( p_dst, i_dst_stride, p_dst, i_dst_stride,
-                                       pWeight, i_height );
+                mc_weight_w4_msa( p_dst, i_dst_stride, p_dst, i_dst_stride,
+                                  pWeight, i_height );
             }
         }
     }
@@ -2960,18 +2837,18 @@ void x264_mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
     {
         if( 16 == i_width )
         {
-            x264_mc_weight_w16_msa( p_dst, i_dst_stride, p_src1, i_src_stride,
-                                    pWeight, i_height );
+            mc_weight_w16_msa( p_dst, i_dst_stride, p_src1, i_src_stride,
+                               pWeight, i_height );
         }
         else if( 8 == i_width )
         {
-            x264_mc_weight_w8_msa( p_dst, i_dst_stride, p_src1, i_src_stride,
-                                   pWeight, i_height );
+            mc_weight_w8_msa( p_dst, i_dst_stride, p_src1, i_src_stride,
+                              pWeight, i_height );
         }
         else if( 4 == i_width )
         {
-            x264_mc_weight_w4_msa( p_dst, i_dst_stride, p_src1, i_src_stride,
-                                   pWeight, i_height );
+            mc_weight_w4_msa( p_dst, i_dst_stride, p_src1, i_src_stride,
+                              pWeight, i_height );
         }
     }
     else
@@ -2994,11 +2871,11 @@ void x264_mc_luma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
     }
 }
 
-void x264_mc_chroma_msa( uint8_t *p_dst_u, uint8_t *p_dst_v,
-                         intptr_t i_dst_stride,
-                         uint8_t *p_src, intptr_t i_src_stride,
-                         int32_t m_vx, int32_t m_vy,
-                         int32_t i_width, int32_t i_height )
+static void mc_chroma_msa( uint8_t *p_dst_u, uint8_t *p_dst_v,
+                           intptr_t i_dst_stride,
+                           uint8_t *p_src, intptr_t i_src_stride,
+                           int32_t m_vx, int32_t m_vy,
+                           int32_t i_width, int32_t i_height )
 {
     int32_t i_d8x = m_vx & 0x07;
     int32_t i_d8y = m_vy & 0x07;
@@ -3035,10 +2912,10 @@ void x264_mc_chroma_msa( uint8_t *p_dst_u, uint8_t *p_dst_v,
     }
 }
 
-void x264_hpel_filter_msa( uint8_t *p_dsth, uint8_t *p_dst_v,
-                           uint8_t *p_dstc, uint8_t *p_src,
-                           intptr_t i_stride, int32_t i_width,
-                           int32_t i_height, int16_t *p_buf )
+static void hpel_filter_msa( uint8_t *p_dsth, uint8_t *p_dst_v,
+                             uint8_t *p_dstc, uint8_t *p_src,
+                             intptr_t i_stride, int32_t i_width,
+                             int32_t i_height, int16_t *p_buf )
 {
     for( int32_t i = 0; i < ( i_width / 16 ); i++ )
     {
@@ -3055,96 +2932,96 @@ void x264_hpel_filter_msa( uint8_t *p_dsth, uint8_t *p_dst_v,
     }
 }
 
-void x264_plane_copy_interleave_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                                     uint8_t *p_src0, intptr_t i_src_stride0,
-                                     uint8_t *p_src1, intptr_t i_src_stride1,
-                                     int32_t i_width, int32_t i_height )
+static void plane_copy_interleave_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                                       uint8_t *p_src0, intptr_t i_src_stride0,
+                                       uint8_t *p_src1, intptr_t i_src_stride1,
+                                       int32_t i_width, int32_t i_height )
 {
-    plane_copy_interleave_msa( p_src0, i_src_stride0, p_src1, i_src_stride1,
-                               p_dst, i_dst_stride, i_width, i_height );
+    core_plane_copy_interleave_msa( p_src0, i_src_stride0, p_src1, i_src_stride1,
+                                    p_dst, i_dst_stride, i_width, i_height );
 }
 
-void x264_plane_copy_deinterleave_msa( uint8_t *p_dst0, intptr_t i_dst_stride0,
-                                       uint8_t *p_dst1, intptr_t i_dst_stride1,
-                                       uint8_t *p_src, intptr_t i_src_stride,
-                                       int32_t i_width, int32_t i_height )
+static void plane_copy_deinterleave_msa( uint8_t *p_dst0, intptr_t i_dst_stride0,
+                                         uint8_t *p_dst1, intptr_t i_dst_stride1,
+                                         uint8_t *p_src, intptr_t i_src_stride,
+                                         int32_t i_width, int32_t i_height )
 {
-    plane_copy_deinterleave_msa( p_src, i_src_stride, p_dst0, i_dst_stride0,
-                                 p_dst1, i_dst_stride1, i_width, i_height );
+    core_plane_copy_deinterleave_msa( p_src, i_src_stride, p_dst0, i_dst_stride0,
+                                      p_dst1, i_dst_stride1, i_width, i_height );
 }
 
-void x264_plane_copy_deinterleave_rgb_msa( uint8_t *p_dst0,
-                                           intptr_t i_dst_stride0,
-                                           uint8_t *p_dst1,
-                                           intptr_t i_dst_stride1,
-                                           uint8_t *p_dst2,
-                                           intptr_t i_dst_stride2,
-                                           uint8_t *p_src,
-                                           intptr_t i_src_stride,
-                                           int32_t i_src_width,
-                                           int32_t i_width,
-                                           int32_t i_height )
+static void plane_copy_deinterleave_rgb_msa( uint8_t *p_dst0,
+                                             intptr_t i_dst_stride0,
+                                             uint8_t *p_dst1,
+                                             intptr_t i_dst_stride1,
+                                             uint8_t *p_dst2,
+                                             intptr_t i_dst_stride2,
+                                             uint8_t *p_src,
+                                             intptr_t i_src_stride,
+                                             int32_t i_src_width,
+                                             int32_t i_width,
+                                             int32_t i_height )
 {
     if( 3 == i_src_width )
     {
-        plane_copy_deinterleave_rgb_msa( p_src, i_src_stride,
-                                         p_dst0, i_dst_stride0,
-                                         p_dst1, i_dst_stride1,
-                                         p_dst2, i_dst_stride2,
-                                         i_width, i_height );
+        core_plane_copy_deinterleave_rgb_msa( p_src, i_src_stride,
+                                              p_dst0, i_dst_stride0,
+                                              p_dst1, i_dst_stride1,
+                                              p_dst2, i_dst_stride2,
+                                              i_width, i_height );
     }
     else if( 4 == i_src_width )
     {
-        plane_copy_deinterleave_rgba_msa( p_src, i_src_stride,
-                                          p_dst0, i_dst_stride0,
-                                          p_dst1, i_dst_stride1,
-                                          p_dst2, i_dst_stride2,
-                                          i_width, i_height );
+        core_plane_copy_deinterleave_rgba_msa( p_src, i_src_stride,
+                                               p_dst0, i_dst_stride0,
+                                               p_dst1, i_dst_stride1,
+                                               p_dst2, i_dst_stride2,
+                                               i_width, i_height );
     }
 }
 
-void x264_store_interleave_chroma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
-                                       uint8_t *p_src0, uint8_t *p_src1,
-                                       int32_t i_height )
+static void store_interleave_chroma_msa( uint8_t *p_dst, intptr_t i_dst_stride,
+                                         uint8_t *p_src0, uint8_t *p_src1,
+                                         int32_t i_height )
 {
-    store_interleave_chroma_msa( p_src0, FDEC_STRIDE, p_src1, FDEC_STRIDE,
-                                 p_dst, i_dst_stride, i_height );
+    core_store_interleave_chroma_msa( p_src0, FDEC_STRIDE, p_src1, FDEC_STRIDE,
+                                      p_dst, i_dst_stride, i_height );
 }
 
-void x264_load_deinterleave_chroma_fenc_msa( uint8_t *p_dst, uint8_t *p_src,
-                                             intptr_t i_src_stride,
-                                             int32_t i_height )
+static void load_deinterleave_chroma_fenc_msa( uint8_t *p_dst, uint8_t *p_src,
+                                               intptr_t i_src_stride,
+                                               int32_t i_height )
 {
-    plane_copy_deinterleave_msa( p_src, i_src_stride, p_dst, FENC_STRIDE,
-                                 ( p_dst + ( FENC_STRIDE / 2 ) ), FENC_STRIDE,
-                                 8, i_height );
+    core_plane_copy_deinterleave_msa( p_src, i_src_stride, p_dst, FENC_STRIDE,
+                                     ( p_dst + ( FENC_STRIDE / 2 ) ), FENC_STRIDE,
+                                     8, i_height );
 }
 
-void x264_load_deinterleave_chroma_fdec_msa( uint8_t *p_dst, uint8_t *p_src,
-                                             intptr_t i_src_stride,
-                                             int32_t i_height )
+static void load_deinterleave_chroma_fdec_msa( uint8_t *p_dst, uint8_t *p_src,
+                                               intptr_t i_src_stride,
+                                               int32_t i_height )
 {
-    plane_copy_deinterleave_msa( p_src, i_src_stride, p_dst, FDEC_STRIDE,
-                                 ( p_dst + ( FDEC_STRIDE / 2 ) ), FDEC_STRIDE,
-                                 8, i_height );
+    core_plane_copy_deinterleave_msa( p_src, i_src_stride, p_dst, FDEC_STRIDE,
+                                      ( p_dst + ( FDEC_STRIDE / 2 ) ), FDEC_STRIDE,
+                                      8, i_height );
 }
 
-void x264_frame_init_lowres_core_msa( uint8_t *p_src, uint8_t *p_dst0,
-                                      uint8_t *p_dst1, uint8_t *p_dst2,
-                                      uint8_t *p_dst3, intptr_t i_src_stride,
-                                      intptr_t i_dst_stride, int32_t i_width,
-                                      int32_t i_height )
+static void frame_init_lowres_core_msa( uint8_t *p_src, uint8_t *p_dst0,
+                                        uint8_t *p_dst1, uint8_t *p_dst2,
+                                        uint8_t *p_dst3, intptr_t i_src_stride,
+                                        intptr_t i_dst_stride, int32_t i_width,
+                                        int32_t i_height )
 {
-    frame_init_lowres_core_msa( p_src, i_src_stride, p_dst0, i_dst_stride,
-                                p_dst1, i_dst_stride, p_dst2, i_dst_stride,
-                                p_dst3, i_dst_stride, i_width, i_height );
+    core_frame_init_lowres_core_msa( p_src, i_src_stride, p_dst0, i_dst_stride,
+                                     p_dst1, i_dst_stride, p_dst2, i_dst_stride,
+                                     p_dst3, i_dst_stride, i_width, i_height );
 }
 
-uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
-                           uint8_t *p_src[4], intptr_t i_src_stride,
-                           int32_t m_vx, int32_t m_vy,
-                           int32_t i_width, int32_t i_height,
-                           const x264_weight_t *pWeight )
+static uint8_t *get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
+                             uint8_t *p_src[4], intptr_t i_src_stride,
+                             int32_t m_vx, int32_t m_vy,
+                             int32_t i_width, int32_t i_height,
+                             const x264_weight_t *pWeight )
 {
     int32_t i_qpel_idx, i_cnt, i_h4w;
     int32_t i_offset;
@@ -3289,9 +3166,9 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
 
             if( 16 == i_width || 12 == i_width )
             {
-                x264_mc_weight_w16_msa( p_dst, *p_dst_stride,
-                                        p_dst, *p_dst_stride,
-                                        pWeight, i_h4w );
+                mc_weight_w16_msa( p_dst, *p_dst_stride,
+                                   p_dst, *p_dst_stride,
+                                   pWeight, i_h4w );
                 for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
                 {
                     v16i8 zero = {0};
@@ -3349,9 +3226,9 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
             }
             else if( 20 == i_width )
             {
-                x264_mc_weight_w20_msa( p_dst, *p_dst_stride,
-                                        p_dst, *p_dst_stride,
-                                        pWeight, i_h4w );
+                mc_weight_w20_msa( p_dst, *p_dst_stride,
+                                   p_dst, *p_dst_stride,
+                                   pWeight, i_h4w );
                 for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
                 {
                     uint32_t temp0;
@@ -3427,9 +3304,9 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
             }
             else if( 8 == i_width )
             {
-                x264_mc_weight_w8_msa( p_dst, *p_dst_stride,
-                                       p_dst, *p_dst_stride,
-                                       pWeight, i_h4w );
+                mc_weight_w8_msa( p_dst, *p_dst_stride,
+                                  p_dst, *p_dst_stride,
+                                  pWeight, i_h4w );
                 for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
                 {
                     uint64_t temp0;
@@ -3473,9 +3350,9 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
             }
             else if( 4 == i_width )
             {
-                x264_mc_weight_w4_msa( p_dst, *p_dst_stride,
-                                       p_dst, *p_dst_stride,
-                                       pWeight, i_h4w );
+                mc_weight_w4_msa( p_dst, *p_dst_stride,
+                                  p_dst, *p_dst_stride,
+                                  pWeight, i_h4w );
                 for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
                 {
                     uint32_t temp0;
@@ -3537,8 +3414,8 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
 
         if( 16 == i_width || 12 == i_width )
         {
-            x264_mc_weight_w16_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
-                                    pWeight, i_h4w );
+            mc_weight_w16_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
+                               pWeight, i_h4w );
             p_src1 = src1_org + i_h4w * i_src_stride;
 
             for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
@@ -3591,8 +3468,8 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
         }
         else if( 20 == i_width )
         {
-            x264_mc_weight_w20_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
-                                    pWeight, i_h4w );
+            mc_weight_w20_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
+                               pWeight, i_h4w );
             p_src1 = src1_org + i_h4w * i_src_stride;
 
             for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
@@ -3662,8 +3539,8 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
         }
         else if( 8 == i_width )
         {
-            x264_mc_weight_w8_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
-                                   pWeight, i_h4w );
+            mc_weight_w8_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
+                              pWeight, i_h4w );
             p_src1 = src1_org + i_h4w * i_src_stride;
 
             for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
@@ -3707,8 +3584,8 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
         }
         else if( 4 == i_width )
         {
-            x264_mc_weight_w4_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
-                                   pWeight, i_h4w );
+            mc_weight_w4_msa( p_dst, *p_dst_stride, p_src1, i_src_stride,
+                              pWeight, i_h4w );
             p_src1 = src1_org + i_h4w * i_src_stride;
 
             for( i_cnt = i_h4w; i_cnt < i_height; i_cnt++ )
@@ -3761,6 +3638,16 @@ uint8_t *x264_get_ref_msa( uint8_t *p_dst, intptr_t *p_dst_stride,
         return p_src1;
     }
 }
+
+static weight_fn_t mc_weight_wtab_msa[6] =
+{
+    mc_weight_w4_msa,
+    mc_weight_w4_msa,
+    mc_weight_w8_msa,
+    mc_weight_w16_msa,
+    mc_weight_w16_msa,
+    mc_weight_w20_msa,
+};
 #endif // !HIGH_BIT_DEPTH
 
 void x264_mc_init_mips( int32_t cpu, x264_mc_functions_t *pf  )
@@ -3768,42 +3655,42 @@ void x264_mc_init_mips( int32_t cpu, x264_mc_functions_t *pf  )
 #if !HIGH_BIT_DEPTH
     if( cpu & X264_CPU_MSA )
     {
-        pf->mc_luma = x264_mc_luma_msa;
-        pf->mc_chroma = x264_mc_chroma_msa;
-        pf->get_ref = x264_get_ref_msa;
+        pf->mc_luma = mc_luma_msa;
+        pf->mc_chroma = mc_chroma_msa;
+        pf->get_ref = get_ref_msa;
 
-        pf->avg[PIXEL_16x16]= x264_pixel_avg_16x16_msa;
-        pf->avg[PIXEL_16x8] = x264_pixel_avg_16x8_msa;
-        pf->avg[PIXEL_8x16] = x264_pixel_avg_8x16_msa;
-        pf->avg[PIXEL_8x8] = x264_pixel_avg_8x8_msa;
-        pf->avg[PIXEL_8x4] = x264_pixel_avg_8x4_msa;
-        pf->avg[PIXEL_4x16] = x264_pixel_avg_4x16_msa;
-        pf->avg[PIXEL_4x8] = x264_pixel_avg_4x8_msa;
-        pf->avg[PIXEL_4x4] = x264_pixel_avg_4x4_msa;
-        pf->avg[PIXEL_4x2] = x264_pixel_avg_4x2_msa;
+        pf->avg[PIXEL_16x16]= pixel_avg_16x16_msa;
+        pf->avg[PIXEL_16x8] = pixel_avg_16x8_msa;
+        pf->avg[PIXEL_8x16] = pixel_avg_8x16_msa;
+        pf->avg[PIXEL_8x8] = pixel_avg_8x8_msa;
+        pf->avg[PIXEL_8x4] = pixel_avg_8x4_msa;
+        pf->avg[PIXEL_4x16] = pixel_avg_4x16_msa;
+        pf->avg[PIXEL_4x8] = pixel_avg_4x8_msa;
+        pf->avg[PIXEL_4x4] = pixel_avg_4x4_msa;
+        pf->avg[PIXEL_4x2] = pixel_avg_4x2_msa;
 
-        pf->weight = x264_mc_weight_wtab_msa;
-        pf->offsetadd = x264_mc_weight_wtab_msa;
-        pf->offsetsub = x264_mc_weight_wtab_msa;
+        pf->weight = mc_weight_wtab_msa;
+        pf->offsetadd = mc_weight_wtab_msa;
+        pf->offsetsub = mc_weight_wtab_msa;
 
-        pf->copy_16x16_unaligned = x264_mc_copy_w16_msa;
-        pf->copy[PIXEL_16x16] = x264_mc_copy_w16_msa;
-        pf->copy[PIXEL_8x8] = x264_mc_copy_w8_msa;
-        pf->copy[PIXEL_4x4] = x264_mc_copy_w4_msa;
+        pf->copy_16x16_unaligned = mc_copy_w16_msa;
+        pf->copy[PIXEL_16x16] = mc_copy_w16_msa;
+        pf->copy[PIXEL_8x8] = mc_copy_w8_msa;
+        pf->copy[PIXEL_4x4] = mc_copy_w4_msa;
 
-        pf->store_interleave_chroma = x264_store_interleave_chroma_msa;
-        pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_msa;
-        pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_msa;
+        pf->store_interleave_chroma = store_interleave_chroma_msa;
+        pf->load_deinterleave_chroma_fenc = load_deinterleave_chroma_fenc_msa;
+        pf->load_deinterleave_chroma_fdec = load_deinterleave_chroma_fdec_msa;
 
-        pf->plane_copy_interleave = x264_plane_copy_interleave_msa;
-        pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_msa;
-        pf->plane_copy_deinterleave_rgb = x264_plane_copy_deinterleave_rgb_msa;
+        pf->plane_copy_interleave = plane_copy_interleave_msa;
+        pf->plane_copy_deinterleave = plane_copy_deinterleave_msa;
+        pf->plane_copy_deinterleave_rgb = plane_copy_deinterleave_rgb_msa;
 
-        pf->hpel_filter = x264_hpel_filter_msa;
+        pf->hpel_filter = hpel_filter_msa;
 
         pf->memcpy_aligned = memcpy;
-        pf->memzero_aligned = x264_memzero_aligned_msa;
-        pf->frame_init_lowres_core = x264_frame_init_lowres_core_msa;
+        pf->memzero_aligned = memzero_aligned_msa;
+        pf->frame_init_lowres_core = frame_init_lowres_core_msa;
     }
 #endif // !HIGH_BIT_DEPTH
 }
index a7e3448..5fbe0d6 100644 (file)
@@ -180,7 +180,7 @@ void x264_mb_predict_mv_pskip( x264_t *h, int16_t mv[2] )
         x264_mb_predict_mv_16x16( h, 0, 0, mv );
 }
 
-static int x264_mb_predict_mv_direct16x16_temporal( x264_t *h )
+static int mb_predict_mv_direct16x16_temporal( x264_t *h )
 {
     int mb_x = h->mb.i_mb_x;
     int mb_y = h->mb.i_mb_y;
@@ -286,7 +286,7 @@ static int x264_mb_predict_mv_direct16x16_temporal( x264_t *h )
     return 1;
 }
 
-static ALWAYS_INLINE int x264_mb_predict_mv_direct16x16_spatial( x264_t *h, int b_interlaced )
+static ALWAYS_INLINE int mb_predict_mv_direct16x16_spatial( x264_t *h, int b_interlaced )
 {
     int8_t ref[2];
     ALIGNED_ARRAY_8( int16_t, mv,[2],[2] );
@@ -441,14 +441,14 @@ static ALWAYS_INLINE int x264_mb_predict_mv_direct16x16_spatial( x264_t *h, int
 }
 
 
-static int x264_mb_predict_mv_direct16x16_spatial_interlaced( x264_t *h )
+static int mb_predict_mv_direct16x16_spatial_interlaced( x264_t *h )
 {
-    return x264_mb_predict_mv_direct16x16_spatial( h, 1 );
+    return mb_predict_mv_direct16x16_spatial( h, 1 );
 }
 
-static int x264_mb_predict_mv_direct16x16_spatial_progressive( x264_t *h )
+static int mb_predict_mv_direct16x16_spatial_progressive( x264_t *h )
 {
-    return x264_mb_predict_mv_direct16x16_spatial( h, 0 );
+    return mb_predict_mv_direct16x16_spatial( h, 0 );
 }
 
 int x264_mb_predict_mv_direct16x16( x264_t *h, int *b_changed )
@@ -459,12 +459,12 @@ int x264_mb_predict_mv_direct16x16( x264_t *h, int *b_changed )
     else if( h->sh.b_direct_spatial_mv_pred )
     {
         if( SLICE_MBAFF )
-            b_available = x264_mb_predict_mv_direct16x16_spatial_interlaced( h );
+            b_available = mb_predict_mv_direct16x16_spatial_interlaced( h );
         else
-            b_available = x264_mb_predict_mv_direct16x16_spatial_progressive( h );
+            b_available = mb_predict_mv_direct16x16_spatial_progressive( h );
     }
     else
-        b_available = x264_mb_predict_mv_direct16x16_temporal( h );
+        b_available = mb_predict_mv_direct16x16_temporal( h );
 
     if( b_changed != NULL && b_available )
     {
index 7f26ed9..3c11aef 100644 (file)
@@ -115,11 +115,11 @@ void x264_opencl_close_library( x264_opencl_function_t *ocl )
 /* Requires full include path in case of out-of-tree builds */
 #include "common/oclobj.h"
 
-static int x264_detect_switchable_graphics( void );
+static int detect_switchable_graphics( void );
 
 /* Try to load the cached compiled program binary, verify the device context is
  * still valid before reuse */
-static cl_program x264_opencl_cache_load( x264_t *h, const char *dev_name, const char *dev_vendor, const char *driver_version )
+static cl_program opencl_cache_load( x264_t *h, const char *dev_name, const char *dev_vendor, const char *driver_version )
 {
     /* try to load cached program binary */
     FILE *fp = x264_fopen( h->param.psz_clbin_file, "rb" );
@@ -168,7 +168,7 @@ fail:
 
 /* Save the compiled program binary to a file for later reuse.  Device context
  * is also saved in the cache file so we do not reuse stale binaries */
-static void x264_opencl_cache_save( x264_t *h, cl_program program, const char *dev_name, const char *dev_vendor, const char *driver_version )
+static void opencl_cache_save( x264_t *h, cl_program program, const char *dev_name, const char *dev_vendor, const char *driver_version )
 {
     FILE *fp = x264_fopen( h->param.psz_clbin_file, "wb" );
     if( !fp )
@@ -216,7 +216,7 @@ fail:
  * the Makefile. It defines a x264_opencl_source byte array which we will pass
  * to clCreateProgramWithSource().  We also attempt to use a cache file for the
  * compiled binary, stored in the current working folder. */
-static cl_program x264_opencl_compile( x264_t *h )
+static cl_program opencl_compile( x264_t *h )
 {
     x264_opencl_function_t *ocl = h->opencl.ocl;
     cl_program program = NULL;
@@ -239,7 +239,7 @@ static cl_program x264_opencl_compile( x264_t *h )
     if( vectorize )
     {
         /* Disable OpenCL on Intel/AMD switchable graphics devices */
-        if( x264_detect_switchable_graphics() )
+        if( detect_switchable_graphics() )
         {
             x264_log( h, X264_LOG_INFO, "OpenCL acceleration disabled, switchable graphics detected\n" );
             return NULL;
@@ -257,7 +257,7 @@ static cl_program x264_opencl_compile( x264_t *h )
 
     x264_log( h, X264_LOG_INFO, "OpenCL acceleration enabled with %s %s %s\n", dev_vendor, dev_name, h->opencl.b_device_AMD_SI ? "(SI)" : "" );
 
-    program = x264_opencl_cache_load( h, dev_name, dev_vendor, driver_version );
+    program = opencl_cache_load( h, dev_name, dev_vendor, driver_version );
     if( !program )
     {
         /* clCreateProgramWithSource() requires a pointer variable, you cannot just use &x264_opencl_source */
@@ -277,7 +277,7 @@ static cl_program x264_opencl_compile( x264_t *h )
     status = ocl->clBuildProgram( program, 1, &h->opencl.device, buildopts, NULL, NULL );
     if( status == CL_SUCCESS )
     {
-        x264_opencl_cache_save( h, program, dev_name, dev_vendor, driver_version );
+        opencl_cache_save( h, program, dev_name, dev_vendor, driver_version );
         return program;
     }
 
@@ -322,7 +322,7 @@ fail:
     return NULL;
 }
 
-static int x264_opencl_lookahead_alloc( x264_t *h )
+static int opencl_lookahead_alloc( x264_t *h )
 {
     if( !h->param.rc.i_lookahead )
         return -1;
@@ -360,7 +360,7 @@ static int x264_opencl_lookahead_alloc( x264_t *h )
     x264_opencl_function_t *ocl = h->opencl.ocl;
     cl_int status;
 
-    h->opencl.lookahead_program = x264_opencl_compile( h );
+    h->opencl.lookahead_program = opencl_compile( h );
     if( !h->opencl.lookahead_program )
         goto fail;
 
@@ -394,7 +394,7 @@ fail:
     return -1;
 }
 
-static void CL_CALLBACK x264_opencl_error_notify( const char *errinfo, const void *private_info, size_t cb, void *user_data )
+static void CL_CALLBACK opencl_error_notify( const char *errinfo, const void *private_info, size_t cb, void *user_data )
 {
     /* Any error notification can be assumed to be fatal to the OpenCL context.
      * We need to stop using it immediately to prevent further damage. */
@@ -470,7 +470,7 @@ int x264_opencl_lookahead_init( x264_t *h )
 
             if( context )
                 ocl->clReleaseContext( context );
-            context = ocl->clCreateContext( NULL, 1, &h->opencl.device, (void*)x264_opencl_error_notify, (void*)h, &status );
+            context = ocl->clCreateContext( NULL, 1, &h->opencl.device, (void*)opencl_error_notify, (void*)h, &status );
             if( status != CL_SUCCESS || !context )
                 continue;
 
@@ -540,7 +540,7 @@ int x264_opencl_lookahead_init( x264_t *h )
     if( ret )
         x264_log( h, X264_LOG_WARNING, "OpenCL: Unable to find a compatible device\n" );
     else
-        ret = x264_opencl_lookahead_alloc( h );
+        ret = opencl_lookahead_alloc( h );
 
 fail:
     if( context )
@@ -551,7 +551,7 @@ fail:
     return ret;
 }
 
-static void x264_opencl_lookahead_free( x264_t *h )
+static void opencl_lookahead_free( x264_t *h )
 {
     x264_opencl_function_t *ocl = h->opencl.ocl;
 
@@ -600,7 +600,7 @@ void x264_opencl_lookahead_delete( x264_t *h )
     if( h->opencl.queue )
         ocl->clFinish( h->opencl.queue );
 
-    x264_opencl_lookahead_free( h );
+    opencl_lookahead_free( h );
 
     if( h->opencl.queue )
     {
@@ -663,7 +663,7 @@ static void* ADL_CALLBACK adl_malloc_wrapper( int iSize )
     return x264_malloc( iSize );
 }
 
-static int x264_detect_switchable_graphics( void )
+static int detect_switchable_graphics( void )
 {
     void *hDLL;
     ADL_MAIN_CONTROL_CREATE          ADL_Main_Control_Create;
index 9bc926a..2b1fdd5 100644 (file)
@@ -60,9 +60,9 @@ int64_t x264_mdate( void )
 
 #if HAVE_WIN32THREAD || PTW32_STATIC_LIB
 /* state of the threading library being initialized */
-static volatile LONG x264_threading_is_init = 0;
+static volatile LONG threading_is_init = 0;
 
-static void x264_threading_destroy( void )
+static void threading_destroy( void )
 {
 #if PTW32_STATIC_LIB
     pthread_win32_thread_detach_np();
@@ -75,7 +75,7 @@ static void x264_threading_destroy( void )
 int x264_threading_init( void )
 {
     /* if already init, then do nothing */
-    if( InterlockedCompareExchange( &x264_threading_is_init, 1, 0 ) )
+    if( InterlockedCompareExchange( &threading_is_init, 1, 0 ) )
         return 0;
 #if PTW32_STATIC_LIB
     /* if static pthread-win32 is already initialized, then do nothing */
@@ -88,7 +88,7 @@ int x264_threading_init( void )
         return -1;
 #endif
     /* register cleanup to run at process termination */
-    atexit( x264_threading_destroy );
+    atexit( threading_destroy );
 
     return 0;
 }
index 5163104..7e81b2e 100644 (file)
@@ -194,9 +194,9 @@ static uint64_t name( pixel *pix, intptr_t i_stride ) \
     return sum + ((uint64_t)sqr << 32);       \
 }
 
-PIXEL_VAR_C( x264_pixel_var_16x16, 16, 16 )
-PIXEL_VAR_C( x264_pixel_var_8x16,   8, 16 )
-PIXEL_VAR_C( x264_pixel_var_8x8,    8,  8 )
+PIXEL_VAR_C( pixel_var_16x16, 16, 16 )
+PIXEL_VAR_C( pixel_var_8x16,   8, 16 )
+PIXEL_VAR_C( pixel_var_8x8,    8,  8 )
 
 /****************************************************************************
  * pixel_var2_wxh
@@ -225,8 +225,8 @@ static int name( pixel *fenc, pixel *fdec, int ssd[2] ) \
            sqr_v - ((int64_t)sum_v * sum_v >> shift); \
 }
 
-PIXEL_VAR2_C( x264_pixel_var2_8x16, 16, 7 )
-PIXEL_VAR2_C( x264_pixel_var2_8x8,   8, 6 )
+PIXEL_VAR2_C( pixel_var2_8x16, 16, 7 )
+PIXEL_VAR2_C( pixel_var2_8x8,   8, 6 )
 
 #if BIT_DEPTH > 8
     typedef uint32_t sum_t;
@@ -514,7 +514,7 @@ SATD_X_DECL7( _neon )
 #endif // !HIGH_BIT_DEPTH
 
 #define INTRA_MBCMP_8x8( mbcmp, cpu, cpu2 )\
-void x264_intra_##mbcmp##_x3_8x8##cpu( pixel *fenc, pixel edge[36], int res[3] )\
+static void intra_##mbcmp##_x3_8x8##cpu( pixel *fenc, pixel edge[36], int res[3] )\
 {\
     ALIGNED_ARRAY_16( pixel, pix, [8*FDEC_STRIDE] );\
     x264_predict_8x8_v##cpu2( pix, edge );\
@@ -538,7 +538,7 @@ INTRA_MBCMP_8x8(sa8d, _neon, _neon )
 #endif
 
 #define INTRA_MBCMP( mbcmp, size, pred1, pred2, pred3, chroma, cpu, cpu2 )\
-void x264_intra_##mbcmp##_x3_##size##chroma##cpu( pixel *fenc, pixel *fdec, int res[3] )\
+static void intra_##mbcmp##_x3_##size##chroma##cpu( pixel *fenc, pixel *fdec, int res[3] )\
 {\
     x264_predict_##size##chroma##_##pred1##cpu2( fdec );\
     res[0] = x264_pixel_##mbcmp##_##size##cpu( fdec, FDEC_STRIDE, fenc, FENC_STRIDE );\
@@ -614,7 +614,7 @@ INTRA_MBCMP(satd, 16x16,  v, h, dc,  , _neon, _neon )
 #endif
 
 // No C implementation of intra_satd_x9. See checkasm for its behavior,
-// or see x264_mb_analyse_intra for the entirely different algorithm we
+// or see mb_analyse_intra for the entirely different algorithm we
 // use when lacking an asm implementation of it.
 
 
@@ -852,11 +852,11 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
 
     pixf->sa8d[PIXEL_16x16] = x264_pixel_sa8d_16x16;
     pixf->sa8d[PIXEL_8x8]   = x264_pixel_sa8d_8x8;
-    pixf->var[PIXEL_16x16] = x264_pixel_var_16x16;
-    pixf->var[PIXEL_8x16]  = x264_pixel_var_8x16;
-    pixf->var[PIXEL_8x8]   = x264_pixel_var_8x8;
-    pixf->var2[PIXEL_8x16]  = x264_pixel_var2_8x16;
-    pixf->var2[PIXEL_8x8]   = x264_pixel_var2_8x8;
+    pixf->var[PIXEL_16x16] = pixel_var_16x16;
+    pixf->var[PIXEL_8x16]  = pixel_var_8x16;
+    pixf->var[PIXEL_8x8]   = pixel_var_8x8;
+    pixf->var2[PIXEL_8x16]  = pixel_var2_8x16;
+    pixf->var2[PIXEL_8x8]   = pixel_var2_8x8;
 
     pixf->ssd_nv12_core = pixel_ssd_nv12_core;
     pixf->ssim_4x4x2_core = ssim_4x4x2_core;
@@ -864,16 +864,16 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
     pixf->vsad = pixel_vsad;
     pixf->asd8 = pixel_asd8;
 
-    pixf->intra_sad_x3_4x4    = x264_intra_sad_x3_4x4;
-    pixf->intra_satd_x3_4x4   = x264_intra_satd_x3_4x4;
-    pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8;
-    pixf->intra_sa8d_x3_8x8   = x264_intra_sa8d_x3_8x8;
-    pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c;
-    pixf->intra_satd_x3_8x8c  = x264_intra_satd_x3_8x8c;
-    pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c;
-    pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c;
-    pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16;
-    pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16;
+    pixf->intra_sad_x3_4x4    = intra_sad_x3_4x4;
+    pixf->intra_satd_x3_4x4   = intra_satd_x3_4x4;
+    pixf->intra_sad_x3_8x8    = intra_sad_x3_8x8;
+    pixf->intra_sa8d_x3_8x8   = intra_sa8d_x3_8x8;
+    pixf->intra_sad_x3_8x8c   = intra_sad_x3_8x8c;
+    pixf->intra_satd_x3_8x8c  = intra_satd_x3_8x8c;
+    pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c;
+    pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c;
+    pixf->intra_sad_x3_16x16  = intra_sad_x3_16x16;
+    pixf->intra_satd_x3_16x16 = intra_satd_x3_16x16;
 
 #if HIGH_BIT_DEPTH
 #if HAVE_MMX
@@ -890,14 +890,14 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         INIT8( ssd, _mmx2 );
         INIT_ADS( _mmx2 );
 
-        pixf->intra_sad_x3_4x4    = x264_intra_sad_x3_4x4_mmx2;
+        pixf->intra_sad_x3_4x4    = intra_sad_x3_4x4_mmx2;
         pixf->intra_satd_x3_4x4   = x264_intra_satd_x3_4x4_mmx2;
-        pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8_mmx2;
-        pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_mmx2;
+        pixf->intra_sad_x3_8x8    = intra_sad_x3_8x8_mmx2;
+        pixf->intra_sad_x3_8x8c   = intra_sad_x3_8x8c_mmx2;
         pixf->intra_satd_x3_8x8c  = x264_intra_satd_x3_8x8c_mmx2;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_mmx2;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_mmx2;
-        pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_mmx2;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_mmx2;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_mmx2;
+        pixf->intra_sad_x3_16x16  = intra_sad_x3_16x16_mmx2;
         pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16_mmx2;
     }
     if( cpu&X264_CPU_SSE2 )
@@ -907,21 +907,22 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         INIT6( satd, _sse2 );
         pixf->satd[PIXEL_4x16] = x264_pixel_satd_4x16_sse2;
 
-        pixf->sa8d[PIXEL_16x16] = x264_pixel_sa8d_16x16_sse2;
-        pixf->sa8d[PIXEL_8x8]   = x264_pixel_sa8d_8x8_sse2;
-#if ARCH_X86_64
-        pixf->intra_sa8d_x3_8x8 = x264_intra_sa8d_x3_8x8_sse2;
-        pixf->sa8d_satd[PIXEL_16x16] = x264_pixel_sa8d_satd_16x16_sse2;
-#endif
-        pixf->intra_sad_x3_4x4  = x264_intra_sad_x3_4x4_sse2;
-        pixf->ssd_nv12_core = x264_pixel_ssd_nv12_core_sse2;
+        pixf->ssd_nv12_core    = x264_pixel_ssd_nv12_core_sse2;
         pixf->ssim_4x4x2_core  = x264_pixel_ssim_4x4x2_core_sse2;
         pixf->ssim_end4        = x264_pixel_ssim_end4_sse2;
         pixf->var[PIXEL_16x16] = x264_pixel_var_16x16_sse2;
         pixf->var[PIXEL_8x8]   = x264_pixel_var_8x8_sse2;
         pixf->var2[PIXEL_8x8]  = x264_pixel_var2_8x8_sse2;
         pixf->var2[PIXEL_8x16] = x264_pixel_var2_8x16_sse2;
-        pixf->intra_sad_x3_8x8 = x264_intra_sad_x3_8x8_sse2;
+
+        pixf->sa8d[PIXEL_16x16] = x264_pixel_sa8d_16x16_sse2;
+        pixf->sa8d[PIXEL_8x8]   = x264_pixel_sa8d_8x8_sse2;
+#if ARCH_X86_64
+        pixf->sa8d_satd[PIXEL_16x16] = x264_pixel_sa8d_satd_16x16_sse2;
+#endif
+        pixf->intra_sad_x3_4x4  = x264_intra_sad_x3_4x4_sse2;
+        pixf->intra_sad_x3_8x8  = x264_intra_sad_x3_8x8_sse2;
+        pixf->intra_sa8d_x3_8x8 = intra_sa8d_x3_8x8_sse2;
     }
     if( (cpu&X264_CPU_SSE2) && !(cpu&X264_CPU_SSE2_IS_SLOW) )
     {
@@ -937,10 +938,10 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         pixf->vsad = x264_pixel_vsad_sse2;
         pixf->asd8 = x264_pixel_asd8_sse2;
         pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8_sse2;
-        pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_sse2;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_sse2;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_sse2;
-        pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_sse2;
+        pixf->intra_sad_x3_8x8c   = intra_sad_x3_8x8c_sse2;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_sse2;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_sse2;
+        pixf->intra_sad_x3_16x16  = intra_sad_x3_16x16_sse2;
     }
     if( cpu&X264_CPU_SSE2_IS_FAST )
     {
@@ -972,7 +973,6 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         }
         pixf->vsad = x264_pixel_vsad_ssse3;
         pixf->asd8 = x264_pixel_asd8_ssse3;
-        pixf->intra_sad_x3_4x4  = x264_intra_sad_x3_4x4_ssse3;
         pixf->sa8d[PIXEL_16x16]= x264_pixel_sa8d_16x16_ssse3;
         pixf->sa8d[PIXEL_8x8]  = x264_pixel_sa8d_8x8_ssse3;
 #if ARCH_X86_64
@@ -980,10 +980,10 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
 #endif
         pixf->intra_sad_x3_4x4    = x264_intra_sad_x3_4x4_ssse3;
         pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8_ssse3;
-        pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_ssse3;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_ssse3;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_ssse3;
-        pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_ssse3;
+        pixf->intra_sad_x3_8x8c   = intra_sad_x3_8x8c_ssse3;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_ssse3;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_ssse3;
+        pixf->intra_sad_x3_16x16  = intra_sad_x3_16x16_ssse3;
     }
     if( cpu&X264_CPU_SSE4 )
     {
@@ -998,7 +998,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
 #if ARCH_X86_64
         pixf->sa8d_satd[PIXEL_16x16] = x264_pixel_sa8d_satd_16x16_sse4;
 #endif
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_sse4;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_sse4;
     }
     if( cpu&X264_CPU_AVX )
     {
@@ -1023,7 +1023,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
 #if ARCH_X86_64
         pixf->sa8d_satd[PIXEL_16x16] = x264_pixel_sa8d_satd_16x16_avx;
 #endif
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_avx;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_avx;
     }
     if( cpu&X264_CPU_XOP )
     {
@@ -1109,8 +1109,8 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
 #endif
         pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16_mmx2;
         pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_mmx2;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_mmx2;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_mmx2;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_mmx2;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_mmx2;
         pixf->intra_satd_x3_8x8c  = x264_intra_satd_x3_8x8c_mmx2;
         pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_mmx2;
         pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8_mmx2;
@@ -1152,8 +1152,8 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         pixf->var[PIXEL_8x8] = x264_pixel_var_8x8_sse2;
         pixf->var[PIXEL_8x16] = x264_pixel_var_8x16_sse2;
         pixf->intra_sad_x3_16x16 = x264_intra_sad_x3_16x16_sse2;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_sse2;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_sse2;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_sse2;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_sse2;
         if( cpu&X264_CPU_CACHELINE_64 )
         {
             INIT2( ssd, _sse2); /* faster for width 16 on p4 */
@@ -1232,7 +1232,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16_ssse3;
         if( !(cpu&X264_CPU_SLOW_PSHUFB) )
             pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_ssse3;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_ssse3;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_ssse3;
         pixf->intra_satd_x3_8x8c  = x264_intra_satd_x3_8x8c_ssse3;
         pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_ssse3;
         pixf->var2[PIXEL_8x8] = x264_pixel_var2_8x8_ssse3;
@@ -1272,7 +1272,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         }
         pixf->sa8d[PIXEL_16x16]= x264_pixel_sa8d_16x16_sse4;
         pixf->sa8d[PIXEL_8x8]  = x264_pixel_sa8d_8x8_sse4;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_sse4;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_sse4;
 #if ARCH_X86_64
         pixf->sa8d_satd[PIXEL_16x16] = x264_pixel_sa8d_satd_16x16_sse4;
 #endif
@@ -1302,7 +1302,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         INIT5( ssd, _avx );
         pixf->sa8d[PIXEL_16x16]= x264_pixel_sa8d_16x16_avx;
         pixf->sa8d[PIXEL_8x8]  = x264_pixel_sa8d_8x8_avx;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_avx;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_avx;
         pixf->ssd_nv12_core    = x264_pixel_ssd_nv12_core_avx;
         pixf->var[PIXEL_16x16] = x264_pixel_var_16x16_avx;
         pixf->var[PIXEL_8x16]  = x264_pixel_var_8x16_avx;
@@ -1327,7 +1327,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         INIT5( ssd, _xop );
         pixf->sa8d[PIXEL_16x16]= x264_pixel_sa8d_16x16_xop;
         pixf->sa8d[PIXEL_8x8]  = x264_pixel_sa8d_8x8_xop;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_xop;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_xop;
         pixf->ssd_nv12_core    = x264_pixel_ssd_nv12_core_xop;
 #if ARCH_X86_64
         pixf->sa8d_satd[PIXEL_16x16] = x264_pixel_sa8d_satd_16x16_xop;
@@ -1405,16 +1405,16 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         pixf->vsad = x264_pixel_vsad_neon;
         pixf->asd8 = x264_pixel_asd8_neon;
 
-        pixf->intra_sad_x3_4x4    = x264_intra_sad_x3_4x4_neon;
-        pixf->intra_satd_x3_4x4   = x264_intra_satd_x3_4x4_neon;
-        pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8_neon;
-        pixf->intra_sa8d_x3_8x8   = x264_intra_sa8d_x3_8x8_neon;
-        pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_neon;
-        pixf->intra_satd_x3_8x8c  = x264_intra_satd_x3_8x8c_neon;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_neon;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_neon;
-        pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_neon;
-        pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16_neon;
+        pixf->intra_sad_x3_4x4    = intra_sad_x3_4x4_neon;
+        pixf->intra_satd_x3_4x4   = intra_satd_x3_4x4_neon;
+        pixf->intra_sad_x3_8x8    = intra_sad_x3_8x8_neon;
+        pixf->intra_sa8d_x3_8x8   = intra_sa8d_x3_8x8_neon;
+        pixf->intra_sad_x3_8x8c   = intra_sad_x3_8x8c_neon;
+        pixf->intra_satd_x3_8x8c  = intra_satd_x3_8x8c_neon;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_neon;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_neon;
+        pixf->intra_sad_x3_16x16  = intra_sad_x3_16x16_neon;
+        pixf->intra_satd_x3_16x16 = intra_satd_x3_16x16_neon;
 
         pixf->ssd_nv12_core     = x264_pixel_ssd_nv12_core_neon;
         pixf->ssim_4x4x2_core   = x264_pixel_ssim_4x4x2_core_neon;
@@ -1460,16 +1460,16 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
         pixf->vsad = x264_pixel_vsad_neon;
         pixf->asd8 = x264_pixel_asd8_neon;
 
-        pixf->intra_sad_x3_4x4    = x264_intra_sad_x3_4x4_neon;
-        pixf->intra_satd_x3_4x4   = x264_intra_satd_x3_4x4_neon;
-        pixf->intra_sad_x3_8x8    = x264_intra_sad_x3_8x8_neon;
-        pixf->intra_sa8d_x3_8x8   = x264_intra_sa8d_x3_8x8_neon;
-        pixf->intra_sad_x3_8x8c   = x264_intra_sad_x3_8x8c_neon;
-        pixf->intra_satd_x3_8x8c  = x264_intra_satd_x3_8x8c_neon;
-        pixf->intra_sad_x3_8x16c  = x264_intra_sad_x3_8x16c_neon;
-        pixf->intra_satd_x3_8x16c = x264_intra_satd_x3_8x16c_neon;
-        pixf->intra_sad_x3_16x16  = x264_intra_sad_x3_16x16_neon;
-        pixf->intra_satd_x3_16x16 = x264_intra_satd_x3_16x16_neon;
+        pixf->intra_sad_x3_4x4    = intra_sad_x3_4x4_neon;
+        pixf->intra_satd_x3_4x4   = intra_satd_x3_4x4_neon;
+        pixf->intra_sad_x3_8x8    = intra_sad_x3_8x8_neon;
+        pixf->intra_sa8d_x3_8x8   = intra_sa8d_x3_8x8_neon;
+        pixf->intra_sad_x3_8x8c   = intra_sad_x3_8x8c_neon;
+        pixf->intra_satd_x3_8x8c  = intra_satd_x3_8x8c_neon;
+        pixf->intra_sad_x3_8x16c  = intra_sad_x3_8x16c_neon;
+        pixf->intra_satd_x3_8x16c = intra_satd_x3_8x16c_neon;
+        pixf->intra_sad_x3_16x16  = intra_sad_x3_16x16_neon;
+        pixf->intra_satd_x3_16x16 = intra_satd_x3_16x16_neon;
 
         pixf->ssd_nv12_core     = x264_pixel_ssd_nv12_core_neon;
         pixf->ssim_4x4x2_core   = x264_pixel_ssim_4x4x2_core_neon;
index 6b24873..d150754 100644 (file)
@@ -32,9 +32,9 @@
 typedef void (*pf_mc_t)( uint8_t *src, intptr_t i_src,
                          uint8_t *dst, intptr_t i_dst, int i_height );
 
-static inline void x264_pixel_avg2_w4_altivec( uint8_t *dst,  intptr_t i_dst,
-                                               uint8_t *src1, intptr_t i_src1,
-                                               uint8_t *src2, int i_height )
+static inline void pixel_avg2_w4_altivec( uint8_t *dst,  intptr_t i_dst,
+                                          uint8_t *src1, intptr_t i_src1,
+                                          uint8_t *src2, int i_height )
 {
     for( int y = 0; y < i_height; y++ )
     {
@@ -46,9 +46,9 @@ static inline void x264_pixel_avg2_w4_altivec( uint8_t *dst,  intptr_t i_dst,
     }
 }
 
-static inline void x264_pixel_avg2_w8_altivec( uint8_t *dst,  intptr_t i_dst,
-                                               uint8_t *src1, intptr_t i_src1,
-                                               uint8_t *src2, int i_height )
+static inline void pixel_avg2_w8_altivec( uint8_t *dst,  intptr_t i_dst,
+                                          uint8_t *src1, intptr_t i_src1,
+                                          uint8_t *src2, int i_height )
 {
     vec_u8_t src1v, src2v;
     PREP_STORE8;
@@ -67,9 +67,9 @@ static inline void x264_pixel_avg2_w8_altivec( uint8_t *dst,  intptr_t i_dst,
     }
 }
 
-static inline void x264_pixel_avg2_w16_altivec( uint8_t *dst,  intptr_t i_dst,
-                                                uint8_t *src1, intptr_t i_src1,
-                                                uint8_t *src2, int i_height )
+static inline void pixel_avg2_w16_altivec( uint8_t *dst,  intptr_t i_dst,
+                                           uint8_t *src1, intptr_t i_src1,
+                                           uint8_t *src2, int i_height )
 {
     vec_u8_t src1v, src2v;
 
@@ -86,12 +86,12 @@ static inline void x264_pixel_avg2_w16_altivec( uint8_t *dst,  intptr_t i_dst,
     }
 }
 
-static inline void x264_pixel_avg2_w20_altivec( uint8_t *dst,  intptr_t i_dst,
-                                                uint8_t *src1, intptr_t i_src1,
-                                                uint8_t *src2, int i_height )
+static inline void pixel_avg2_w20_altivec( uint8_t *dst,  intptr_t i_dst,
+                                           uint8_t *src1, intptr_t i_src1,
+                                           uint8_t *src2, int i_height )
 {
-    x264_pixel_avg2_w16_altivec(dst, i_dst, src1, i_src1, src2, i_height);
-    x264_pixel_avg2_w4_altivec(dst+16, i_dst, src1+16, i_src1, src2+16, i_height);
+    pixel_avg2_w16_altivec(dst, i_dst, src1, i_src1, src2, i_height);
+    pixel_avg2_w4_altivec(dst+16, i_dst, src1+16, i_src1, src2+16, i_height);
 }
 
 /* mc_copy: plain c */
@@ -108,11 +108,11 @@ static void name( uint8_t *dst, intptr_t i_dst,           \
         dst += i_dst;                                     \
     }                                                     \
 }
-MC_COPY( x264_mc_copy_w4_altivec,  4  )
-MC_COPY( x264_mc_copy_w8_altivec,  8  )
+MC_COPY( mc_copy_w4_altivec,  4  )
+MC_COPY( mc_copy_w8_altivec,  8  )
 
-static void x264_mc_copy_w16_altivec( uint8_t *dst, intptr_t i_dst,
-                                      uint8_t *src, intptr_t i_src, int i_height )
+static void mc_copy_w16_altivec( uint8_t *dst, intptr_t i_dst,
+                                 uint8_t *src, intptr_t i_src, int i_height )
 {
     vec_u8_t cpyV;
 
@@ -127,8 +127,8 @@ static void x264_mc_copy_w16_altivec( uint8_t *dst, intptr_t i_dst,
 }
 
 
-static void x264_mc_copy_w16_aligned_altivec( uint8_t *dst, intptr_t i_dst,
-                                              uint8_t *src, intptr_t i_src, int i_height )
+static void mc_copy_w16_aligned_altivec( uint8_t *dst, intptr_t i_dst,
+                                         uint8_t *src, intptr_t i_src, int i_height )
 {
     for( int y = 0; y < i_height; ++y )
     {
@@ -287,14 +287,14 @@ static void mc_luma_altivec( uint8_t *dst,    intptr_t i_dst_stride,
         switch( i_width )
         {
             case 4:
-                x264_pixel_avg2_w4_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w4_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
                 break;
             case 8:
-                x264_pixel_avg2_w8_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w8_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
                 break;
             case 16:
             default:
-                x264_pixel_avg2_w16_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w16_altivec( dst, i_dst_stride, src1, i_src_stride, src2, i_height );
         }
         if( weight->weightfn )
             weight->weightfn[i_width>>2]( dst, i_dst_stride, dst, i_dst_stride, weight, i_height );
@@ -306,13 +306,13 @@ static void mc_luma_altivec( uint8_t *dst,    intptr_t i_dst_stride,
         switch( i_width )
         {
             case 4:
-                x264_mc_copy_w4_altivec( dst, i_dst_stride, src1, i_src_stride, i_height );
+                mc_copy_w4_altivec( dst, i_dst_stride, src1, i_src_stride, i_height );
                 break;
             case 8:
-                x264_mc_copy_w8_altivec( dst, i_dst_stride, src1, i_src_stride, i_height );
+                mc_copy_w8_altivec( dst, i_dst_stride, src1, i_src_stride, i_height );
                 break;
             case 16:
-                x264_mc_copy_w16_altivec( dst, i_dst_stride, src1, i_src_stride, i_height );
+                mc_copy_w16_altivec( dst, i_dst_stride, src1, i_src_stride, i_height );
                 break;
         }
     }
@@ -334,18 +334,18 @@ static uint8_t *get_ref_altivec( uint8_t *dst,   intptr_t *i_dst_stride,
         switch( i_width )
         {
             case 4:
-                x264_pixel_avg2_w4_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w4_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
                 break;
             case 8:
-                x264_pixel_avg2_w8_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w8_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
                 break;
             case 12:
             case 16:
             default:
-                x264_pixel_avg2_w16_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w16_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
                 break;
             case 20:
-                x264_pixel_avg2_w20_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
+                pixel_avg2_w20_altivec( dst, *i_dst_stride, src1, i_src_stride, src2, i_height );
                 break;
         }
         if( weight->weightfn )
@@ -1274,7 +1274,7 @@ static void mc_weight_w20_altivec( uint8_t *dst, intptr_t i_dst, uint8_t *src, i
     }
 }
 
-static weight_fn_t x264_mc_weight_wtab_altivec[6] =
+static weight_fn_t mc_weight_wtab_altivec[6] =
 {
     mc_weight_w2_altivec,
     mc_weight_w4_altivec,
@@ -1384,16 +1384,16 @@ void x264_mc_init_altivec( x264_mc_functions_t *pf )
     pf->get_ref   = get_ref_altivec;
     pf->mc_chroma = mc_chroma_altivec;
 
-    pf->copy_16x16_unaligned = x264_mc_copy_w16_altivec;
-    pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_altivec;
+    pf->copy_16x16_unaligned = mc_copy_w16_altivec;
+    pf->copy[PIXEL_16x16] = mc_copy_w16_aligned_altivec;
 
     pf->hpel_filter = x264_hpel_filter_altivec;
     pf->frame_init_lowres_core = frame_init_lowres_core_altivec;
 
-    pf->weight = x264_mc_weight_wtab_altivec;
+    pf->weight = mc_weight_wtab_altivec;
 
-    pf->plane_copy_swap = x264_plane_copy_swap_altivec;
-    pf->plane_copy_interleave = x264_plane_copy_interleave_altivec;
+    pf->plane_copy_swap = plane_copy_swap_altivec;
+    pf->plane_copy_interleave = plane_copy_interleave_altivec;
     pf->store_interleave_chroma = x264_store_interleave_chroma_altivec;
     pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_altivec;
 #if HAVE_VSX
index 04ad435..9958e5f 100644 (file)
@@ -1315,7 +1315,7 @@ static int pixel_ssd_8x8_altivec( uint8_t *pix1, intptr_t i_stride_pix1,
 /****************************************************************************
  * variance
  ****************************************************************************/
-static uint64_t x264_pixel_var_16x16_altivec( uint8_t *pix, intptr_t i_stride )
+static uint64_t pixel_var_16x16_altivec( uint8_t *pix, intptr_t i_stride )
 {
     ALIGNED_16(uint32_t sum_tab[4]);
     ALIGNED_16(uint32_t sqr_tab[4]);
@@ -1342,7 +1342,7 @@ static uint64_t x264_pixel_var_16x16_altivec( uint8_t *pix, intptr_t i_stride )
     return sum + ((uint64_t)sqr<<32);
 }
 
-static uint64_t x264_pixel_var_8x8_altivec( uint8_t *pix, intptr_t i_stride )
+static uint64_t pixel_var_8x8_altivec( uint8_t *pix, intptr_t i_stride )
 {
     ALIGNED_16(uint32_t sum_tab[4]);
     ALIGNED_16(uint32_t sqr_tab[4]);
@@ -1634,7 +1634,7 @@ static const vec_u8_t hadamard_permtab[] =
        0x1C,0x0C,0x1D,0x0D, 0x1E,0x0E,0x1F,0x0F )
  };
 
-static uint64_t x264_pixel_hadamard_ac_16x16_altivec( uint8_t *pix, intptr_t stride )
+static uint64_t pixel_hadamard_ac_16x16_altivec( uint8_t *pix, intptr_t stride )
 {
     int idx =  ((uintptr_t)pix & 8) >> 3;
     vec_u8_t permh = hadamard_permtab[idx];
@@ -1646,7 +1646,7 @@ static uint64_t x264_pixel_hadamard_ac_16x16_altivec( uint8_t *pix, intptr_t str
     return ((sum>>34)<<32) + ((uint32_t)sum>>1);
 }
 
-static uint64_t x264_pixel_hadamard_ac_16x8_altivec( uint8_t *pix, intptr_t stride )
+static uint64_t pixel_hadamard_ac_16x8_altivec( uint8_t *pix, intptr_t stride )
 {
     int idx =  ((uintptr_t)pix & 8) >> 3;
     vec_u8_t permh = hadamard_permtab[idx];
@@ -1656,7 +1656,7 @@ static uint64_t x264_pixel_hadamard_ac_16x8_altivec( uint8_t *pix, intptr_t stri
     return ((sum>>34)<<32) + ((uint32_t)sum>>1);
 }
 
-static uint64_t x264_pixel_hadamard_ac_8x16_altivec( uint8_t *pix, intptr_t stride )
+static uint64_t pixel_hadamard_ac_8x16_altivec( uint8_t *pix, intptr_t stride )
 {
     vec_u8_t perm = hadamard_permtab[ (((uintptr_t)pix & 8) >> 3) ];
     uint64_t sum = pixel_hadamard_ac_altivec( pix, stride, perm );
@@ -1664,7 +1664,7 @@ static uint64_t x264_pixel_hadamard_ac_8x16_altivec( uint8_t *pix, intptr_t stri
     return ((sum>>34)<<32) + ((uint32_t)sum>>1);
 }
 
-static uint64_t x264_pixel_hadamard_ac_8x8_altivec( uint8_t *pix, intptr_t stride )
+static uint64_t pixel_hadamard_ac_8x8_altivec( uint8_t *pix, intptr_t stride )
 {
     vec_u8_t perm = hadamard_permtab[ (((uintptr_t)pix & 8) >> 3) ];
     uint64_t sum = pixel_hadamard_ac_altivec( pix, stride, perm );
@@ -1739,7 +1739,7 @@ SATD_X( 4x4 )
 
 
 #define INTRA_MBCMP_8x8( mbcmp )\
-void intra_##mbcmp##_x3_8x8_altivec( uint8_t *fenc, uint8_t edge[36], int res[3] )\
+static void intra_##mbcmp##_x3_8x8_altivec( uint8_t *fenc, uint8_t edge[36], int res[3] )\
 {\
     ALIGNED_8( uint8_t pix[8*FDEC_STRIDE] );\
     x264_predict_8x8_v_c( pix, edge );\
@@ -1754,7 +1754,7 @@ INTRA_MBCMP_8x8(sad)
 INTRA_MBCMP_8x8(sa8d)
 
 #define INTRA_MBCMP( mbcmp, size, pred1, pred2, pred3, chroma )\
-void intra_##mbcmp##_x3_##size##x##size##chroma##_altivec( uint8_t *fenc, uint8_t *fdec, int res[3] )\
+static void intra_##mbcmp##_x3_##size##x##size##chroma##_altivec( uint8_t *fenc, uint8_t *fdec, int res[3] )\
 {\
     x264_predict_##size##x##size##chroma##_##pred1##_c( fdec );\
     res[0] = pixel_##mbcmp##_##size##x##size##_altivec( fdec, FDEC_STRIDE, fenc, FENC_STRIDE );\
@@ -1832,13 +1832,13 @@ void x264_pixel_init_altivec( x264_pixel_function_t *pixf )
 
     pixf->intra_sa8d_x3_8x8   = intra_sa8d_x3_8x8_altivec;
 
-    pixf->var[PIXEL_16x16] = x264_pixel_var_16x16_altivec;
-    pixf->var[PIXEL_8x8]   = x264_pixel_var_8x8_altivec;
+    pixf->var[PIXEL_16x16] = pixel_var_16x16_altivec;
+    pixf->var[PIXEL_8x8]   = pixel_var_8x8_altivec;
 
-    pixf->hadamard_ac[PIXEL_16x16] = x264_pixel_hadamard_ac_16x16_altivec;
-    pixf->hadamard_ac[PIXEL_16x8]  = x264_pixel_hadamard_ac_16x8_altivec;
-    pixf->hadamard_ac[PIXEL_8x16]  = x264_pixel_hadamard_ac_8x16_altivec;
-    pixf->hadamard_ac[PIXEL_8x8]   = x264_pixel_hadamard_ac_8x8_altivec;
+    pixf->hadamard_ac[PIXEL_16x16] = pixel_hadamard_ac_16x16_altivec;
+    pixf->hadamard_ac[PIXEL_16x8]  = pixel_hadamard_ac_16x8_altivec;
+    pixf->hadamard_ac[PIXEL_8x16]  = pixel_hadamard_ac_8x16_altivec;
+    pixf->hadamard_ac[PIXEL_8x8]   = pixel_hadamard_ac_8x8_altivec;
 
     pixf->ssim_4x4x2_core = ssim_4x4x2_core_altivec;
 #endif // !HIGH_BIT_DEPTH
index 8163f94..986bdc0 100644 (file)
@@ -74,7 +74,7 @@ void x264_predict_16x16_dc_c( pixel *src )
 
     PREDICT_16x16_DC( dcsplat );
 }
-static void x264_predict_16x16_dc_left_c( pixel *src )
+static void predict_16x16_dc_left_c( pixel *src )
 {
     int dc = 0;
 
@@ -84,7 +84,7 @@ static void x264_predict_16x16_dc_left_c( pixel *src )
 
     PREDICT_16x16_DC( dcsplat );
 }
-static void x264_predict_16x16_dc_top_c( pixel *src )
+static void predict_16x16_dc_top_c( pixel *src )
 {
     int dc = 0;
 
@@ -94,7 +94,7 @@ static void x264_predict_16x16_dc_top_c( pixel *src )
 
     PREDICT_16x16_DC( dcsplat );
 }
-static void x264_predict_16x16_dc_128_c( pixel *src )
+static void predict_16x16_dc_128_c( pixel *src )
 {
     PREDICT_16x16_DC( PIXEL_SPLAT_X4( 1 << (BIT_DEPTH-1) ) );
 }
@@ -161,7 +161,7 @@ void x264_predict_16x16_p_c( pixel *src )
  * 8x8 prediction for intra chroma block (4:2:0)
  ****************************************************************************/
 
-static void x264_predict_8x8c_dc_128_c( pixel *src )
+static void predict_8x8c_dc_128_c( pixel *src )
 {
     for( int y = 0; y < 8; y++ )
     {
@@ -170,7 +170,7 @@ static void x264_predict_8x8c_dc_128_c( pixel *src )
         src += FDEC_STRIDE;
     }
 }
-static void x264_predict_8x8c_dc_left_c( pixel *src )
+static void predict_8x8c_dc_left_c( pixel *src )
 {
     int dc0 = 0, dc1 = 0;
 
@@ -196,7 +196,7 @@ static void x264_predict_8x8c_dc_left_c( pixel *src )
     }
 
 }
-static void x264_predict_8x8c_dc_top_c( pixel *src )
+static void predict_8x8c_dc_top_c( pixel *src )
 {
     int dc0 = 0, dc1 = 0;
 
@@ -308,7 +308,7 @@ void x264_predict_8x8c_p_c( pixel *src )
  * 8x16 prediction for intra chroma block (4:2:2)
  ****************************************************************************/
 
-static void x264_predict_8x16c_dc_128_c( pixel *src )
+static void predict_8x16c_dc_128_c( pixel *src )
 {
     for( int y = 0; y < 16; y++ )
     {
@@ -317,7 +317,7 @@ static void x264_predict_8x16c_dc_128_c( pixel *src )
         src += FDEC_STRIDE;
     }
 }
-static void x264_predict_8x16c_dc_left_c( pixel *src )
+static void predict_8x16c_dc_left_c( pixel *src )
 {
     for( int i = 0; i < 4; i++ )
     {
@@ -336,7 +336,7 @@ static void x264_predict_8x16c_dc_left_c( pixel *src )
         }
     }
 }
-static void x264_predict_8x16c_dc_top_c( pixel *src )
+static void predict_8x16c_dc_top_c( pixel *src )
 {
     int dc0 = 0, dc1 = 0;
 
@@ -475,16 +475,16 @@ void x264_predict_8x16c_p_c( pixel *src )
 #define PREDICT_4x4_DC(v)\
     SRC_X4(0,0) = SRC_X4(0,1) = SRC_X4(0,2) = SRC_X4(0,3) = v;
 
-static void x264_predict_4x4_dc_128_c( pixel *src )
+static void predict_4x4_dc_128_c( pixel *src )
 {
     PREDICT_4x4_DC( PIXEL_SPLAT_X4( 1 << (BIT_DEPTH-1) ) );
 }
-static void x264_predict_4x4_dc_left_c( pixel *src )
+static void predict_4x4_dc_left_c( pixel *src )
 {
     pixel4 dc = PIXEL_SPLAT_X4( (SRC(-1,0) + SRC(-1,1) + SRC(-1,2) + SRC(-1,3) + 2) >> 2 );
     PREDICT_4x4_DC( dc );
 }
-static void x264_predict_4x4_dc_top_c( pixel *src )
+static void predict_4x4_dc_top_c( pixel *src )
 {
     pixel4 dc = PIXEL_SPLAT_X4( (SRC(0,-1) + SRC(1,-1) + SRC(2,-1) + SRC(3,-1) + 2) >> 2 );
     PREDICT_4x4_DC( dc );
@@ -528,7 +528,7 @@ void x264_predict_4x4_v_c( pixel *src )
 #define F1(a,b)   (((a)+(b)+1)>>1)
 #define F2(a,b,c) (((a)+2*(b)+(c)+2)>>2)
 
-static void x264_predict_4x4_ddl_c( pixel *src )
+static void predict_4x4_ddl_c( pixel *src )
 {
     PREDICT_4x4_LOAD_TOP
     PREDICT_4x4_LOAD_TOP_RIGHT
@@ -540,7 +540,7 @@ static void x264_predict_4x4_ddl_c( pixel *src )
     SRC(3,2)=SRC(2,3)= F2(t5,t6,t7);
     SRC(3,3)= F2(t6,t7,t7);
 }
-static void x264_predict_4x4_ddr_c( pixel *src )
+static void predict_4x4_ddr_c( pixel *src )
 {
     int lt = SRC(-1,-1);
     PREDICT_4x4_LOAD_LEFT
@@ -554,7 +554,7 @@ static void x264_predict_4x4_ddr_c( pixel *src )
     SRC(0,3)= F2(l1,l2,l3);
 }
 
-static void x264_predict_4x4_vr_c( pixel *src )
+static void predict_4x4_vr_c( pixel *src )
 {
     int lt = SRC(-1,-1);
     PREDICT_4x4_LOAD_LEFT
@@ -571,7 +571,7 @@ static void x264_predict_4x4_vr_c( pixel *src )
     SRC(3,0)= F1(t2,t3);
 }
 
-static void x264_predict_4x4_hd_c( pixel *src )
+static void predict_4x4_hd_c( pixel *src )
 {
     int lt= SRC(-1,-1);
     PREDICT_4x4_LOAD_LEFT
@@ -588,7 +588,7 @@ static void x264_predict_4x4_hd_c( pixel *src )
     SRC(3,0)= F2(t2,t1,t0);
 }
 
-static void x264_predict_4x4_vl_c( pixel *src )
+static void predict_4x4_vl_c( pixel *src )
 {
     PREDICT_4x4_LOAD_TOP
     PREDICT_4x4_LOAD_TOP_RIGHT
@@ -604,7 +604,7 @@ static void x264_predict_4x4_vl_c( pixel *src )
     SRC(3,3)= F2(t4,t5,t6);
 }
 
-static void x264_predict_4x4_hu_c( pixel *src )
+static void predict_4x4_hu_c( pixel *src )
 {
     PREDICT_4x4_LOAD_LEFT
     SRC(0,0)= F1(l0,l1);
@@ -626,7 +626,7 @@ static void x264_predict_4x4_hu_c( pixel *src )
 #define PT(x) \
     edge[16+x] = F2(SRC(x-1,-1), SRC(x,-1), SRC(x+1,-1));
 
-static void x264_predict_8x8_filter_c( pixel *src, pixel edge[36], int i_neighbor, int i_filters )
+static void predict_8x8_filter_c( pixel *src, pixel edge[36], int i_neighbor, int i_filters )
 {
     /* edge[7..14] = l7..l0
      * edge[15] = lt
@@ -694,17 +694,17 @@ static void x264_predict_8x8_filter_c( pixel *src, pixel edge[36], int i_neighbo
         src += FDEC_STRIDE; \
     }
 
-static void x264_predict_8x8_dc_128_c( pixel *src, pixel edge[36] )
+static void predict_8x8_dc_128_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_DC( PIXEL_SPLAT_X4( 1 << (BIT_DEPTH-1) ) );
 }
-static void x264_predict_8x8_dc_left_c( pixel *src, pixel edge[36] )
+static void predict_8x8_dc_left_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_LEFT
     pixel4 dc = PIXEL_SPLAT_X4( (l0+l1+l2+l3+l4+l5+l6+l7+4) >> 3 );
     PREDICT_8x8_DC( dc );
 }
-static void x264_predict_8x8_dc_top_c( pixel *src, pixel edge[36] )
+static void predict_8x8_dc_top_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_TOP
     pixel4 dc = PIXEL_SPLAT_X4( (t0+t1+t2+t3+t4+t5+t6+t7+4) >> 3 );
@@ -735,7 +735,7 @@ void x264_predict_8x8_v_c( pixel *src, pixel edge[36] )
         MPIXEL_X4( src+y*FDEC_STRIDE+4 ) = top[1];
     }
 }
-static void x264_predict_8x8_ddl_c( pixel *src, pixel edge[36] )
+static void predict_8x8_ddl_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_TOP
     PREDICT_8x8_LOAD_TOPRIGHT
@@ -755,7 +755,7 @@ static void x264_predict_8x8_ddl_c( pixel *src, pixel edge[36] )
     SRC(6,7)=SRC(7,6)= F2(t13,t14,t15);
     SRC(7,7)= F2(t14,t15,t15);
 }
-static void x264_predict_8x8_ddr_c( pixel *src, pixel edge[36] )
+static void predict_8x8_ddr_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_TOP
     PREDICT_8x8_LOAD_LEFT
@@ -777,7 +777,7 @@ static void x264_predict_8x8_ddr_c( pixel *src, pixel edge[36] )
     SRC(7,0)= F2(t5,t6,t7);
 
 }
-static void x264_predict_8x8_vr_c( pixel *src, pixel edge[36] )
+static void predict_8x8_vr_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_TOP
     PREDICT_8x8_LOAD_LEFT
@@ -805,7 +805,7 @@ static void x264_predict_8x8_vr_c( pixel *src, pixel edge[36] )
     SRC(7,1)= F2(t5,t6,t7);
     SRC(7,0)= F1(t6,t7);
 }
-static void x264_predict_8x8_hd_c( pixel *src, pixel edge[36] )
+static void predict_8x8_hd_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_TOP
     PREDICT_8x8_LOAD_LEFT
@@ -832,7 +832,7 @@ static void x264_predict_8x8_hd_c( pixel *src, pixel edge[36] )
     SRC_X4(4,1)= pack_pixel_2to4(p9,p10);
     SRC_X4(4,0)= pack_pixel_2to4(p10,p11);
 }
-static void x264_predict_8x8_vl_c( pixel *src, pixel edge[36] )
+static void predict_8x8_vl_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_TOP
     PREDICT_8x8_LOAD_TOPRIGHT
@@ -859,7 +859,7 @@ static void x264_predict_8x8_vl_c( pixel *src, pixel edge[36] )
     SRC(7,6)= F1(t10,t11);
     SRC(7,7)= F2(t10,t11,t12);
 }
-static void x264_predict_8x8_hu_c( pixel *src, pixel edge[36] )
+static void predict_8x8_hu_c( pixel *src, pixel edge[36] )
 {
     PREDICT_8x8_LOAD_LEFT
     int p1 = pack_pixel_1to2(F1(l0,l1), F2(l0,l1,l2));
@@ -889,9 +889,9 @@ void x264_predict_16x16_init( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_16x16_H ]     = x264_predict_16x16_h_c;
     pf[I_PRED_16x16_DC]     = x264_predict_16x16_dc_c;
     pf[I_PRED_16x16_P ]     = x264_predict_16x16_p_c;
-    pf[I_PRED_16x16_DC_LEFT]= x264_predict_16x16_dc_left_c;
-    pf[I_PRED_16x16_DC_TOP ]= x264_predict_16x16_dc_top_c;
-    pf[I_PRED_16x16_DC_128 ]= x264_predict_16x16_dc_128_c;
+    pf[I_PRED_16x16_DC_LEFT]= predict_16x16_dc_left_c;
+    pf[I_PRED_16x16_DC_TOP ]= predict_16x16_dc_top_c;
+    pf[I_PRED_16x16_DC_128 ]= predict_16x16_dc_128_c;
 
 #if HAVE_MMX
     x264_predict_16x16_init_mmx( cpu, pf );
@@ -932,9 +932,9 @@ void x264_predict_8x8c_init( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_CHROMA_H ]     = x264_predict_8x8c_h_c;
     pf[I_PRED_CHROMA_DC]     = x264_predict_8x8c_dc_c;
     pf[I_PRED_CHROMA_P ]     = x264_predict_8x8c_p_c;
-    pf[I_PRED_CHROMA_DC_LEFT]= x264_predict_8x8c_dc_left_c;
-    pf[I_PRED_CHROMA_DC_TOP ]= x264_predict_8x8c_dc_top_c;
-    pf[I_PRED_CHROMA_DC_128 ]= x264_predict_8x8c_dc_128_c;
+    pf[I_PRED_CHROMA_DC_LEFT]= predict_8x8c_dc_left_c;
+    pf[I_PRED_CHROMA_DC_TOP ]= predict_8x8c_dc_top_c;
+    pf[I_PRED_CHROMA_DC_128 ]= predict_8x8c_dc_128_c;
 
 #if HAVE_MMX
     x264_predict_8x8c_init_mmx( cpu, pf );
@@ -969,9 +969,9 @@ void x264_predict_8x16c_init( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_CHROMA_H ]     = x264_predict_8x16c_h_c;
     pf[I_PRED_CHROMA_DC]     = x264_predict_8x16c_dc_c;
     pf[I_PRED_CHROMA_P ]     = x264_predict_8x16c_p_c;
-    pf[I_PRED_CHROMA_DC_LEFT]= x264_predict_8x16c_dc_left_c;
-    pf[I_PRED_CHROMA_DC_TOP ]= x264_predict_8x16c_dc_top_c;
-    pf[I_PRED_CHROMA_DC_128 ]= x264_predict_8x16c_dc_128_c;
+    pf[I_PRED_CHROMA_DC_LEFT]= predict_8x16c_dc_left_c;
+    pf[I_PRED_CHROMA_DC_TOP ]= predict_8x16c_dc_top_c;
+    pf[I_PRED_CHROMA_DC_128 ]= predict_8x16c_dc_128_c;
 
 #if HAVE_MMX
     x264_predict_8x16c_init_mmx( cpu, pf );
@@ -991,16 +991,16 @@ void x264_predict_8x8_init( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_
     pf[I_PRED_8x8_V]      = x264_predict_8x8_v_c;
     pf[I_PRED_8x8_H]      = x264_predict_8x8_h_c;
     pf[I_PRED_8x8_DC]     = x264_predict_8x8_dc_c;
-    pf[I_PRED_8x8_DDL]    = x264_predict_8x8_ddl_c;
-    pf[I_PRED_8x8_DDR]    = x264_predict_8x8_ddr_c;
-    pf[I_PRED_8x8_VR]     = x264_predict_8x8_vr_c;
-    pf[I_PRED_8x8_HD]     = x264_predict_8x8_hd_c;
-    pf[I_PRED_8x8_VL]     = x264_predict_8x8_vl_c;
-    pf[I_PRED_8x8_HU]     = x264_predict_8x8_hu_c;
-    pf[I_PRED_8x8_DC_LEFT]= x264_predict_8x8_dc_left_c;
-    pf[I_PRED_8x8_DC_TOP] = x264_predict_8x8_dc_top_c;
-    pf[I_PRED_8x8_DC_128] = x264_predict_8x8_dc_128_c;
-    *predict_filter       = x264_predict_8x8_filter_c;
+    pf[I_PRED_8x8_DDL]    = predict_8x8_ddl_c;
+    pf[I_PRED_8x8_DDR]    = predict_8x8_ddr_c;
+    pf[I_PRED_8x8_VR]     = predict_8x8_vr_c;
+    pf[I_PRED_8x8_HD]     = predict_8x8_hd_c;
+    pf[I_PRED_8x8_VL]     = predict_8x8_vl_c;
+    pf[I_PRED_8x8_HU]     = predict_8x8_hu_c;
+    pf[I_PRED_8x8_DC_LEFT]= predict_8x8_dc_left_c;
+    pf[I_PRED_8x8_DC_TOP] = predict_8x8_dc_top_c;
+    pf[I_PRED_8x8_DC_128] = predict_8x8_dc_128_c;
+    *predict_filter       = predict_8x8_filter_c;
 
 #if HAVE_MMX
     x264_predict_8x8_init_mmx( cpu, pf, predict_filter );
@@ -1029,15 +1029,15 @@ void x264_predict_4x4_init( int cpu, x264_predict_t pf[12] )
     pf[I_PRED_4x4_V]      = x264_predict_4x4_v_c;
     pf[I_PRED_4x4_H]      = x264_predict_4x4_h_c;
     pf[I_PRED_4x4_DC]     = x264_predict_4x4_dc_c;
-    pf[I_PRED_4x4_DDL]    = x264_predict_4x4_ddl_c;
-    pf[I_PRED_4x4_DDR]    = x264_predict_4x4_ddr_c;
-    pf[I_PRED_4x4_VR]     = x264_predict_4x4_vr_c;
-    pf[I_PRED_4x4_HD]     = x264_predict_4x4_hd_c;
-    pf[I_PRED_4x4_VL]     = x264_predict_4x4_vl_c;
-    pf[I_PRED_4x4_HU]     = x264_predict_4x4_hu_c;
-    pf[I_PRED_4x4_DC_LEFT]= x264_predict_4x4_dc_left_c;
-    pf[I_PRED_4x4_DC_TOP] = x264_predict_4x4_dc_top_c;
-    pf[I_PRED_4x4_DC_128] = x264_predict_4x4_dc_128_c;
+    pf[I_PRED_4x4_DDL]    = predict_4x4_ddl_c;
+    pf[I_PRED_4x4_DDR]    = predict_4x4_ddr_c;
+    pf[I_PRED_4x4_VR]     = predict_4x4_vr_c;
+    pf[I_PRED_4x4_HD]     = predict_4x4_hd_c;
+    pf[I_PRED_4x4_VL]     = predict_4x4_vl_c;
+    pf[I_PRED_4x4_HU]     = predict_4x4_hu_c;
+    pf[I_PRED_4x4_DC_LEFT]= predict_4x4_dc_left_c;
+    pf[I_PRED_4x4_DC_TOP] = predict_4x4_dc_top_c;
+    pf[I_PRED_4x4_DC_128] = predict_4x4_dc_128_c;
 
 #if HAVE_MMX
     x264_predict_4x4_init_mmx( cpu, pf );
index ae96222..b160cf5 100644 (file)
@@ -298,7 +298,7 @@ static int optimize_chroma_2x4_dc( dctcoef dct[8], int dequant_mf )
     return optimize_chroma_dc_internal( dct, dequant_mf, 1 );
 }
 
-static void x264_denoise_dct( dctcoef *dct, uint32_t *sum, udctcoef *offset, int size )
+static void denoise_dct( dctcoef *dct, uint32_t *sum, udctcoef *offset, int size )
 {
     for( int i = 0; i < size; i++ )
     {
@@ -332,7 +332,7 @@ const uint8_t x264_decimate_table8[64] =
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 };
 
-static int ALWAYS_INLINE x264_decimate_score_internal( dctcoef *dct, int i_max )
+static int ALWAYS_INLINE 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;
@@ -359,21 +359,21 @@ static int ALWAYS_INLINE x264_decimate_score_internal( dctcoef *dct, int i_max )
     return i_score;
 }
 
-static int x264_decimate_score15( dctcoef *dct )
+static int decimate_score15( dctcoef *dct )
 {
-    return x264_decimate_score_internal( dct+1, 15 );
+    return decimate_score_internal( dct+1, 15 );
 }
-static int x264_decimate_score16( dctcoef *dct )
+static int decimate_score16( dctcoef *dct )
 {
-    return x264_decimate_score_internal( dct, 16 );
+    return decimate_score_internal( dct, 16 );
 }
-static int x264_decimate_score64( dctcoef *dct )
+static int decimate_score64( dctcoef *dct )
 {
-    return x264_decimate_score_internal( dct, 64 );
+    return decimate_score_internal( dct, 64 );
 }
 
 #define last(num)\
-static int x264_coeff_last##num( dctcoef *l )\
+static int coeff_last##num( dctcoef *l )\
 {\
     int i_last = num-1;\
     while( i_last >= 0 && l[i_last] == 0 )\
@@ -388,9 +388,9 @@ last(16)
 last(64)
 
 #define level_run(num)\
-static int x264_coeff_level_run##num( dctcoef *dct, x264_run_level_t *runlevel )\
+static int coeff_level_run##num( dctcoef *dct, x264_run_level_t *runlevel )\
 {\
-    int i_last = runlevel->last = x264_coeff_last##num(dct);\
+    int i_last = runlevel->last = coeff_last##num(dct);\
     int i_total = 0;\
     int mask = 0;\
     do\
@@ -438,20 +438,20 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
     pf->optimize_chroma_2x2_dc = optimize_chroma_2x2_dc;
     pf->optimize_chroma_2x4_dc = optimize_chroma_2x4_dc;
 
-    pf->denoise_dct = x264_denoise_dct;
-    pf->decimate_score15 = x264_decimate_score15;
-    pf->decimate_score16 = x264_decimate_score16;
-    pf->decimate_score64 = x264_decimate_score64;
-
-    pf->coeff_last4 = x264_coeff_last4;
-    pf->coeff_last8 = x264_coeff_last8;
-    pf->coeff_last[  DCT_LUMA_AC] = x264_coeff_last15;
-    pf->coeff_last[ DCT_LUMA_4x4] = x264_coeff_last16;
-    pf->coeff_last[ DCT_LUMA_8x8] = x264_coeff_last64;
-    pf->coeff_level_run4 = x264_coeff_level_run4;
-    pf->coeff_level_run8 = x264_coeff_level_run8;
-    pf->coeff_level_run[  DCT_LUMA_AC] = x264_coeff_level_run15;
-    pf->coeff_level_run[ DCT_LUMA_4x4] = x264_coeff_level_run16;
+    pf->denoise_dct = denoise_dct;
+    pf->decimate_score15 = decimate_score15;
+    pf->decimate_score16 = decimate_score16;
+    pf->decimate_score64 = decimate_score64;
+
+    pf->coeff_last4 = coeff_last4;
+    pf->coeff_last8 = coeff_last8;
+    pf->coeff_last[  DCT_LUMA_AC] = coeff_last15;
+    pf->coeff_last[ DCT_LUMA_4x4] = coeff_last16;
+    pf->coeff_last[ DCT_LUMA_8x8] = coeff_last64;
+    pf->coeff_level_run4 = coeff_level_run4;
+    pf->coeff_level_run8 = coeff_level_run8;
+    pf->coeff_level_run[  DCT_LUMA_AC] = coeff_level_run15;
+    pf->coeff_level_run[ DCT_LUMA_4x4] = coeff_level_run16;
 
 #if HIGH_BIT_DEPTH
 #if HAVE_MMX
index 4057b68..9da821f 100644 (file)
@@ -26,7 +26,7 @@
 #include "common.h"
 
 #define CACHE_FUNC(name,size,width,height)\
-static void x264_macroblock_cache_##name##_##width##_##height( void *target, uint32_t val )\
+static void macroblock_cache_##name##_##width##_##height( void *target, uint32_t val )\
 {\
     x264_macroblock_cache_rect( target, width*size, height, size, val );\
 }
@@ -41,16 +41,16 @@ CACHE_FUNC(name,size,1,2)\
 CACHE_FUNC(name,size,1,1)\
 void (*x264_cache_##name##_func_table[10])(void *, uint32_t) =\
 {\
-    x264_macroblock_cache_##name##_1_1,\
-    x264_macroblock_cache_##name##_2_1,\
-    x264_macroblock_cache_##name##_1_2,\
-    x264_macroblock_cache_##name##_2_2,\
+    macroblock_cache_##name##_1_1,\
+    macroblock_cache_##name##_2_1,\
+    macroblock_cache_##name##_1_2,\
+    macroblock_cache_##name##_2_2,\
     NULL,\
-    x264_macroblock_cache_##name##_4_2,\
+    macroblock_cache_##name##_4_2,\
     NULL,\
-    x264_macroblock_cache_##name##_2_4,\
+    macroblock_cache_##name##_2_4,\
     NULL,\
-    x264_macroblock_cache_##name##_4_4\
+    macroblock_cache_##name##_4_4\
 };\
 
 CACHE_FUNCS(mv, 4)
index b9d94fd..6659db2 100644 (file)
@@ -300,7 +300,7 @@ void x264_cqm_delete( x264_t *h )
     x264_free( h->nr_offset_emergency );
 }
 
-static int x264_cqm_parse_jmlist( x264_t *h, const char *buf, const char *name,
+static int cqm_parse_jmlist( x264_t *h, const char *buf, const char *name,
                                   uint8_t *cqm, const uint8_t *jvt, int length )
 {
     int i;
@@ -361,16 +361,16 @@ int x264_cqm_parse_file( x264_t *h, const char *filename )
     while( (p = strchr( buf, '#' )) != NULL )
         memset( p, ' ', strcspn( p, "\n" ) );
 
-    b_error |= x264_cqm_parse_jmlist( h, buf, "INTRA4X4_LUMA",   h->param.cqm_4iy, x264_cqm_jvt4i, 16 );
-    b_error |= x264_cqm_parse_jmlist( h, buf, "INTER4X4_LUMA",   h->param.cqm_4py, x264_cqm_jvt4p, 16 );
-    b_error |= x264_cqm_parse_jmlist( h, buf, "INTRA4X4_CHROMA", h->param.cqm_4ic, x264_cqm_jvt4i, 16 );
-    b_error |= x264_cqm_parse_jmlist( h, buf, "INTER4X4_CHROMA", h->param.cqm_4pc, x264_cqm_jvt4p, 16 );
-    b_error |= x264_cqm_parse_jmlist( h, buf, "INTRA8X8_LUMA",   h->param.cqm_8iy, x264_cqm_jvt8i, 64 );
-    b_error |= x264_cqm_parse_jmlist( h, buf, "INTER8X8_LUMA",   h->param.cqm_8py, x264_cqm_jvt8p, 64 );
+    b_error |= cqm_parse_jmlist( h, buf, "INTRA4X4_LUMA",   h->param.cqm_4iy, x264_cqm_jvt4i, 16 );
+    b_error |= cqm_parse_jmlist( h, buf, "INTER4X4_LUMA",   h->param.cqm_4py, x264_cqm_jvt4p, 16 );
+    b_error |= cqm_parse_jmlist( h, buf, "INTRA4X4_CHROMA", h->param.cqm_4ic, x264_cqm_jvt4i, 16 );
+    b_error |= cqm_parse_jmlist( h, buf, "INTER4X4_CHROMA", h->param.cqm_4pc, x264_cqm_jvt4p, 16 );
+    b_error |= cqm_parse_jmlist( h, buf, "INTRA8X8_LUMA",   h->param.cqm_8iy, x264_cqm_jvt8i, 64 );
+    b_error |= cqm_parse_jmlist( h, buf, "INTER8X8_LUMA",   h->param.cqm_8py, x264_cqm_jvt8p, 64 );
     if( CHROMA444 )
     {
-        b_error |= x264_cqm_parse_jmlist( h, buf, "INTRA8X8_CHROMA", h->param.cqm_8ic, x264_cqm_jvt8i, 64 );
-        b_error |= x264_cqm_parse_jmlist( h, buf, "INTER8X8_CHROMA", h->param.cqm_8pc, x264_cqm_jvt8p, 64 );
+        b_error |= cqm_parse_jmlist( h, buf, "INTRA8X8_CHROMA", h->param.cqm_8ic, x264_cqm_jvt8i, 64 );
+        b_error |= cqm_parse_jmlist( h, buf, "INTER8X8_CHROMA", h->param.cqm_8pc, x264_cqm_jvt8p, 64 );
     }
 
     x264_free( buf );
index 72eb86d..61d75ce 100644 (file)
@@ -47,7 +47,7 @@ struct x264_threadpool_t
     x264_sync_frame_list_t done;   /* list of jobs that have finished processing */
 };
 
-static void *x264_threadpool_thread( x264_threadpool_t *pool )
+static void *threadpool_thread( x264_threadpool_t *pool )
 {
     if( pool->init_func )
         pool->init_func( pool->init_arg );
@@ -100,7 +100,7 @@ int x264_threadpool_init( x264_threadpool_t **p_pool, int threads,
        x264_sync_frame_list_push( &pool->uninit, (void*)job );
     }
     for( int i = 0; i < pool->threads; i++ )
-        if( x264_pthread_create( pool->thread_handle+i, NULL, (void*)x264_threadpool_thread, pool ) )
+        if( x264_pthread_create( pool->thread_handle+i, NULL, (void*)threadpool_thread, pool ) )
             goto fail;
 
     return 0;
@@ -137,7 +137,7 @@ void *x264_threadpool_wait( x264_threadpool_t *pool, void *arg )
     }
 }
 
-static void x264_threadpool_list_delete( x264_sync_frame_list_t *slist )
+static void threadpool_list_delete( x264_sync_frame_list_t *slist )
 {
     for( int i = 0; slist->list[i]; i++ )
     {
@@ -156,9 +156,9 @@ void x264_threadpool_delete( x264_threadpool_t *pool )
     for( int i = 0; i < pool->threads; i++ )
         x264_pthread_join( pool->thread_handle[i], NULL );
 
-    x264_threadpool_list_delete( &pool->uninit );
-    x264_threadpool_list_delete( &pool->run );
-    x264_threadpool_list_delete( &pool->done );
+    threadpool_list_delete( &pool->uninit );
+    threadpool_list_delete( &pool->run );
+    threadpool_list_delete( &pool->done );
     x264_free( pool->thread_handle );
     x264_free( pool );
 }
index 94e9d89..8f878d9 100644 (file)
@@ -51,7 +51,7 @@
 static x264_pthread_mutex_t static_mutex;
 
 /* _beginthreadex requires that the start routine is __stdcall */
-static unsigned __stdcall x264_win32thread_worker( void *arg )
+static unsigned __stdcall win32thread_worker( void *arg )
 {
     x264_pthread_t *h = arg;
     *h->p_ret = h->func( h->arg );
@@ -65,7 +65,7 @@ int x264_pthread_create( x264_pthread_t *thread, const x264_pthread_attr_t *attr
     thread->arg    = arg;
     thread->p_ret  = &thread->ret;
     thread->ret    = NULL;
-    thread->handle = (void*)_beginthreadex( NULL, 0, x264_win32thread_worker, thread, 0, NULL );
+    thread->handle = (void*)_beginthreadex( NULL, 0, win32thread_worker, thread, 0, NULL );
     return !thread->handle;
 }
 
index c06691c..e617c2e 100644 (file)
@@ -216,7 +216,7 @@ PIXEL_AVG_WALL(cache64_ssse3)
 PIXEL_AVG_WALL(avx2)
 
 #define PIXEL_AVG_WTAB(instr, name1, name2, name3, name4, name5)\
-static void (* const x264_pixel_avg_wtab_##instr[6])( pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t ) =\
+static void (* const pixel_avg_wtab_##instr[6])( pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t ) =\
 {\
     NULL,\
     x264_pixel_avg2_w4_##name1,\
@@ -259,7 +259,7 @@ PIXEL_AVG_WTAB(avx2, mmx2, mmx2, sse2, sse2, avx2)
 #endif // HIGH_BIT_DEPTH
 
 #define MC_COPY_WTAB(instr, name1, name2, name3)\
-static void (* const x264_mc_copy_wtab_##instr[5])( pixel *, intptr_t, pixel *, intptr_t, int ) =\
+static void (* const mc_copy_wtab_##instr[5])( pixel *, intptr_t, pixel *, intptr_t, int ) =\
 {\
     NULL,\
     x264_mc_copy_w4_##name1,\
@@ -277,7 +277,7 @@ MC_COPY_WTAB(sse,mmx,mmx,sse)
 #endif
 
 #define MC_WEIGHT_WTAB(function, instr, name1, name2, w12version)\
-    static void (* x264_mc_##function##_wtab_##instr[6])( pixel *, intptr_t, pixel *, intptr_t, const x264_weight_t *, int ) =\
+static void (* mc_##function##_wtab_##instr[6])( pixel *, intptr_t, pixel *, intptr_t, const x264_weight_t *, int ) =\
 {\
     x264_mc_##function##_w4_##name1,\
     x264_mc_##function##_w4_##name1,\
@@ -295,7 +295,7 @@ MC_WEIGHT_WTAB(weight,sse2,mmx2,sse2,12)
 MC_WEIGHT_WTAB(offsetadd,sse2,mmx2,sse2,16)
 MC_WEIGHT_WTAB(offsetsub,sse2,mmx2,sse2,16)
 
-static void x264_weight_cache_mmx2( x264_t *h, x264_weight_t *w )
+static void weight_cache_mmx2( x264_t *h, x264_weight_t *w )
 {
     if( w->i_scale == 1<<w->i_denom )
     {
@@ -327,7 +327,7 @@ MC_WEIGHT_WTAB(offsetsub,sse2,mmx2,mmx2,16)
 MC_WEIGHT_WTAB(weight,ssse3,ssse3,ssse3,16)
 MC_WEIGHT_WTAB(weight,avx2,ssse3,avx2,16)
 
-static void x264_weight_cache_mmx2( x264_t *h, x264_weight_t *w )
+static void weight_cache_mmx2( x264_t *h, x264_weight_t *w )
 {
     int i;
     int16_t den1;
@@ -350,7 +350,7 @@ static void x264_weight_cache_mmx2( x264_t *h, x264_weight_t *w )
     }
 }
 
-static void x264_weight_cache_ssse3( x264_t *h, x264_weight_t *w )
+static void weight_cache_ssse3( x264_t *h, x264_weight_t *w )
 {
     int i, den1;
     if( w->i_scale == 1<<w->i_denom )
@@ -385,7 +385,7 @@ static void mc_luma_##name( pixel *dst,    intptr_t i_dst_stride,\
     if( qpel_idx & 5 ) /* qpel interpolation needed */\
     {\
         pixel *src2 = src[x264_hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);\
-        x264_pixel_avg_wtab_##instr1[i_width>>2](\
+        pixel_avg_wtab_##instr1[i_width>>2](\
                 dst, i_dst_stride, src1, i_src_stride,\
                 src2, i_height );\
         if( weight->weightfn )\
@@ -394,7 +394,7 @@ static void mc_luma_##name( pixel *dst,    intptr_t i_dst_stride,\
     else if( weight->weightfn )\
         weight->weightfn[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, weight, i_height );\
     else\
-        x264_mc_copy_wtab_##instr2[i_width>>2](dst, i_dst_stride, src1, i_src_stride, i_height );\
+        mc_copy_wtab_##instr2[i_width>>2](dst, i_dst_stride, src1, i_src_stride, i_height );\
 }
 
 MC_LUMA(mmx2,mmx2,mmx)
@@ -423,7 +423,7 @@ static pixel *get_ref_##name( pixel *dst,   intptr_t *i_dst_stride,\
     if( qpel_idx & 5 ) /* qpel interpolation needed */\
     {\
         pixel *src2 = src[x264_hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);\
-        x264_pixel_avg_wtab_##name[i_width>>2](\
+        pixel_avg_wtab_##name[i_width>>2](\
                 dst, *i_dst_stride, src1, i_src_stride,\
                 src2, i_height );\
         if( weight->weightfn )\
@@ -559,9 +559,9 @@ void x264_mbtree_propagate_list_internal_avx512( size_t len, uint16_t *ref_costs
                                                  uint16_t *lowres_costs, int bipred_weight, int mb_y,
                                                  int width, int height, int stride, int list_mask );
 
-static void x264_mbtree_propagate_list_avx512( x264_t *h, uint16_t *ref_costs, int16_t (*mvs)[2],
-                                               int16_t *propagate_amount, uint16_t *lowres_costs,
-                                               int bipred_weight, int mb_y, int len, int list )
+static void mbtree_propagate_list_avx512( x264_t *h, uint16_t *ref_costs, int16_t (*mvs)[2],
+                                          int16_t *propagate_amount, uint16_t *lowres_costs,
+                                          int bipred_weight, int mb_y, int len, int list )
 {
     x264_mbtree_propagate_list_internal_avx512( len, ref_costs, mvs, propagate_amount, lowres_costs, bipred_weight << 9,
                                                 mb_y << 16, h->mb.i_mb_width, h->mb.i_mb_height, h->mb.i_mb_stride,
@@ -588,7 +588,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->prefetch_fenc_422 = x264_prefetch_fenc_422_mmx2;
     pf->prefetch_ref  = x264_prefetch_ref_mmx2;
 
-    pf->plane_copy_interleave = x264_plane_copy_interleave_mmx2;
+    pf->plane_copy_interleave = plane_copy_interleave_mmx2;
     pf->store_interleave_chroma = x264_store_interleave_chroma_mmx2;
 
     pf->avg[PIXEL_16x16] = x264_pixel_avg_16x16_mmx2;
@@ -605,10 +605,10 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->get_ref = get_ref_mmx2;
     pf->mc_chroma = x264_mc_chroma_mmx2;
     pf->hpel_filter = x264_hpel_filter_mmx2;
-    pf->weight = x264_mc_weight_wtab_mmx2;
-    pf->weight_cache = x264_weight_cache_mmx2;
-    pf->offsetadd = x264_mc_offsetadd_wtab_mmx2;
-    pf->offsetsub = x264_mc_offsetsub_wtab_mmx2;
+    pf->weight = mc_weight_wtab_mmx2;
+    pf->weight_cache = weight_cache_mmx2;
+    pf->offsetadd = mc_offsetadd_wtab_mmx2;
+    pf->offsetsub = mc_offsetsub_wtab_mmx2;
 
     pf->frame_init_lowres_core = x264_frame_init_lowres_core_mmx2;
 
@@ -616,7 +616,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     {
         pf->memcpy_aligned  = x264_memcpy_aligned_sse;
         pf->memzero_aligned = x264_memzero_aligned_sse;
-        pf->plane_copy = x264_plane_copy_sse;
+        pf->plane_copy = plane_copy_sse;
     }
 
 #if HIGH_BIT_DEPTH
@@ -633,9 +633,9 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_sse2;
     pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_sse2;
 
-    pf->plane_copy_interleave   = x264_plane_copy_interleave_sse2;
+    pf->plane_copy_interleave   = plane_copy_interleave_sse2;
     pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_sse2;
-    pf->plane_copy_deinterleave_yuyv = x264_plane_copy_deinterleave_yuyv_sse2;
+    pf->plane_copy_deinterleave_yuyv = plane_copy_deinterleave_yuyv_sse2;
 
     if( cpu&X264_CPU_SSE2_IS_FAST )
     {
@@ -648,8 +648,8 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->integral_init8v = x264_integral_init8v_sse2;
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_sse2;
     pf->store_interleave_chroma = x264_store_interleave_chroma_sse2;
-    pf->offsetadd = x264_mc_offsetadd_wtab_sse2;
-    pf->offsetsub = x264_mc_offsetsub_wtab_sse2;
+    pf->offsetadd = mc_offsetadd_wtab_sse2;
+    pf->offsetsub = mc_offsetsub_wtab_sse2;
 
     if( cpu&X264_CPU_SSE2_IS_SLOW )
         return;
@@ -665,7 +665,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->avg[PIXEL_4x2]   = x264_pixel_avg_4x2_sse2;
 
     pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_sse;
-    pf->weight = x264_mc_weight_wtab_sse2;
+    pf->weight = mc_weight_wtab_sse2;
 
     if( !(cpu&X264_CPU_STACK_MOD4) )
         pf->mc_chroma = x264_mc_chroma_sse2;
@@ -674,9 +674,9 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
         return;
 
     pf->frame_init_lowres_core = x264_frame_init_lowres_core_ssse3;
-    pf->plane_copy_swap = x264_plane_copy_swap_ssse3;
+    pf->plane_copy_swap = plane_copy_swap_ssse3;
     pf->plane_copy_deinterleave_v210 = x264_plane_copy_deinterleave_v210_ssse3;
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_ssse3;
+    pf->mbtree_propagate_list = mbtree_propagate_list_ssse3;
     pf->mbtree_fix8_pack      = x264_mbtree_fix8_pack_ssse3;
     pf->mbtree_fix8_unpack    = x264_mbtree_fix8_unpack_ssse3;
 
@@ -689,9 +689,9 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->frame_init_lowres_core = x264_frame_init_lowres_core_avx;
     pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_avx;
     pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_avx;
-    pf->plane_copy_interleave        = x264_plane_copy_interleave_avx;
+    pf->plane_copy_interleave        = plane_copy_interleave_avx;
     pf->plane_copy_deinterleave      = x264_plane_copy_deinterleave_avx;
-    pf->plane_copy_deinterleave_yuyv = x264_plane_copy_deinterleave_yuyv_avx;
+    pf->plane_copy_deinterleave_yuyv = plane_copy_deinterleave_yuyv_avx;
     pf->plane_copy_deinterleave_v210 = x264_plane_copy_deinterleave_v210_avx;
     pf->store_interleave_chroma      = x264_store_interleave_chroma_avx;
     pf->copy[PIXEL_16x16]            = x264_mc_copy_w16_aligned_avx;
@@ -738,18 +738,18 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->hpel_filter = x264_hpel_filter_sse2_amd;
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_sse2;
     pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_sse2;
-    pf->plane_copy_deinterleave_yuyv = x264_plane_copy_deinterleave_yuyv_sse2;
+    pf->plane_copy_deinterleave_yuyv = plane_copy_deinterleave_yuyv_sse2;
     pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_sse2;
     pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_sse2;
     pf->plane_copy_deinterleave_rgb = x264_plane_copy_deinterleave_rgb_sse2;
 
     if( !(cpu&X264_CPU_SSE2_IS_SLOW) )
     {
-        pf->weight = x264_mc_weight_wtab_sse2;
+        pf->weight = mc_weight_wtab_sse2;
         if( !(cpu&X264_CPU_SLOW_ATOM) )
         {
-            pf->offsetadd = x264_mc_offsetadd_wtab_sse2;
-            pf->offsetsub = x264_mc_offsetsub_wtab_sse2;
+            pf->offsetadd = mc_offsetadd_wtab_sse2;
+            pf->offsetsub = mc_offsetsub_wtab_sse2;
         }
 
         pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_sse;
@@ -766,7 +766,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
         if( cpu&X264_CPU_SSE2_IS_FAST )
         {
             pf->store_interleave_chroma = x264_store_interleave_chroma_sse2; // FIXME sse2fast? sse2medium?
-            pf->plane_copy_interleave   = x264_plane_copy_interleave_sse2;
+            pf->plane_copy_interleave   = plane_copy_interleave_sse2;
             pf->mc_luma = mc_luma_sse2;
             pf->get_ref = get_ref_sse2;
             if( cpu&X264_CPU_CACHELINE_64 )
@@ -789,9 +789,9 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->avg[PIXEL_4x8]   = x264_pixel_avg_4x8_ssse3;
     pf->avg[PIXEL_4x4]   = x264_pixel_avg_4x4_ssse3;
     pf->avg[PIXEL_4x2]   = x264_pixel_avg_4x2_ssse3;
-    pf->plane_copy_swap = x264_plane_copy_swap_ssse3;
+    pf->plane_copy_swap  = plane_copy_swap_ssse3;
     pf->plane_copy_deinterleave_rgb = x264_plane_copy_deinterleave_rgb_ssse3;
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_ssse3;
+    pf->mbtree_propagate_list = mbtree_propagate_list_ssse3;
     pf->mbtree_fix8_pack      = x264_mbtree_fix8_pack_ssse3;
     pf->mbtree_fix8_unpack    = x264_mbtree_fix8_unpack_ssse3;
 
@@ -800,7 +800,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
         pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_ssse3;
         pf->load_deinterleave_chroma_fdec = x264_load_deinterleave_chroma_fdec_ssse3;
         pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_ssse3;
-        pf->plane_copy_deinterleave_yuyv = x264_plane_copy_deinterleave_yuyv_ssse3;
+        pf->plane_copy_deinterleave_yuyv = plane_copy_deinterleave_yuyv_ssse3;
     }
 
     if( !(cpu&X264_CPU_SLOW_PALIGNR) )
@@ -827,8 +827,8 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
         }
     }
 
-    pf->weight_cache = x264_weight_cache_ssse3;
-    pf->weight = x264_mc_weight_wtab_ssse3;
+    pf->weight_cache = weight_cache_ssse3;
+    pf->weight = mc_weight_wtab_ssse3;
 
     if( !(cpu&(X264_CPU_SLOW_SHUFFLE|X264_CPU_SLOW_ATOM|X264_CPU_SLOW_PALIGNR)) )
         pf->integral_init4v = x264_integral_init4v_ssse3;
@@ -856,7 +856,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     {
         pf->hpel_filter = x264_hpel_filter_avx2;
         pf->mc_chroma = x264_mc_chroma_avx2;
-        pf->weight = x264_mc_weight_wtab_avx2;
+        pf->weight = mc_weight_wtab_avx2;
         pf->avg[PIXEL_16x16] = x264_pixel_avg_16x16_avx2;
         pf->avg[PIXEL_16x8]  = x264_pixel_avg_16x8_avx2;
         pf->integral_init8v = x264_integral_init8v_avx2;
@@ -881,22 +881,22 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
         return;
     pf->memcpy_aligned  = x264_memcpy_aligned_avx;
     pf->memzero_aligned = x264_memzero_aligned_avx;
-    pf->plane_copy = x264_plane_copy_avx;
+    pf->plane_copy = plane_copy_avx;
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_avx;
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_avx;
+    pf->mbtree_propagate_list = mbtree_propagate_list_avx;
 
     if( cpu&X264_CPU_FMA4 )
         pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_fma4;
 
     if( !(cpu&X264_CPU_AVX2) )
         return;
-    pf->plane_copy_swap = x264_plane_copy_swap_avx2;
+    pf->plane_copy_swap = plane_copy_swap_avx2;
     pf->plane_copy_deinterleave = x264_plane_copy_deinterleave_avx2;
-    pf->plane_copy_deinterleave_yuyv = x264_plane_copy_deinterleave_yuyv_avx2;
+    pf->plane_copy_deinterleave_yuyv = plane_copy_deinterleave_yuyv_avx2;
     pf->load_deinterleave_chroma_fenc = x264_load_deinterleave_chroma_fenc_avx2;
     pf->get_ref = get_ref_avx2;
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_avx2;
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_avx2;
+    pf->mbtree_propagate_list = mbtree_propagate_list_avx2;
     pf->mbtree_fix8_pack      = x264_mbtree_fix8_pack_avx2;
     pf->mbtree_fix8_unpack    = x264_mbtree_fix8_unpack_avx2;
 
@@ -906,6 +906,6 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
     pf->memzero_aligned = x264_memzero_aligned_avx512;
     pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_avx512;
 #if ARCH_X86_64
-    pf->mbtree_propagate_list = x264_mbtree_propagate_list_avx512;
+    pf->mbtree_propagate_list = mbtree_propagate_list_avx512;
 #endif
 }
index 27da63a..aca2504 100644 (file)
@@ -70,7 +70,7 @@ ALIGNED_8( static const int8_t pb_m32101234[8] ) = {-3,-2,-1,0,1,2,3,4};
         x264_predict_16x16_p_core_##name( src, i00, b, c );
 
 #define PREDICT_16x16_P(name, name2)\
-static void x264_predict_16x16_p_##name( pixel *src )\
+static void predict_16x16_p_##name( pixel *src )\
 {\
     PREDICT_16x16_P_CORE\
     PREDICT_16x16_P_END(name2)\
@@ -128,7 +128,7 @@ static void x264_predict_16x16_p_##name( pixel *src )\
       + 1 * ( src[ 8*FDEC_STRIDE-1] - src[ 6*FDEC_STRIDE-1] );
 
 #define PREDICT_16x16_P_INLINE(name, name2)\
-static void x264_predict_16x16_p_##name( pixel *src )\
+static void predict_16x16_p_##name( pixel *src )\
 {\
     PREDICT_16x16_P_CORE_INLINE\
     PREDICT_16x16_P_END(name2)\
@@ -174,7 +174,7 @@ PREDICT_16x16_P_INLINE( avx2, avx2 )
 #endif // HIGH_BIT_DEPTH
 
 #define PREDICT_8x16C_P(name)\
-static void x264_predict_8x16c_p_##name( pixel *src )\
+static void predict_8x16c_p_##name( pixel *src )\
 {\
     PREDICT_8x16C_P_CORE\
     PREDICT_8x16C_P_END(name)\
@@ -211,7 +211,7 @@ PREDICT_8x16C_P( avx2 )
 #endif // HIGH_BIT_DEPTH
 
 #define PREDICT_8x8C_P(name, name2)\
-static void x264_predict_8x8c_p_##name( pixel *src )\
+static void predict_8x8c_p_##name( pixel *src )\
 {\
     PREDICT_8x8C_P_CORE\
     PREDICT_8x8C_P_END(name2)\
@@ -257,7 +257,7 @@ static void x264_predict_8x8c_p_##name( pixel *src )\
     H += -4 * src[-1*FDEC_STRIDE -1];
 
 #define PREDICT_8x8C_P_INLINE(name, name2)\
-static void x264_predict_8x8c_p_##name( pixel *src )\
+static void predict_8x8c_p_##name( pixel *src )\
 {\
     PREDICT_8x8C_P_CORE_INLINE\
     PREDICT_8x8C_P_END(name2)\
@@ -281,7 +281,7 @@ PREDICT_8x8C_P_INLINE( avx, avx )
 PREDICT_8x8C_P_INLINE( avx2, avx2 )
 
 #if ARCH_X86_64 && !HIGH_BIT_DEPTH
-static void x264_predict_8x8c_dc_left( uint8_t *src )
+static void predict_8x8c_dc_left( uint8_t *src )
 {
     int y;
     uint32_t s0 = 0, s1 = 0;
@@ -327,7 +327,7 @@ void x264_predict_16x16_init_mmx( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_16x16_DC_TOP]  = x264_predict_16x16_dc_top_sse2;
     pf[I_PRED_16x16_DC_LEFT] = x264_predict_16x16_dc_left_sse2;
     pf[I_PRED_16x16_H]       = x264_predict_16x16_h_sse2;
-    pf[I_PRED_16x16_P]       = x264_predict_16x16_p_sse2;
+    pf[I_PRED_16x16_P]       = predict_16x16_p_sse2;
     if( !(cpu&X264_CPU_AVX) )
         return;
     pf[I_PRED_16x16_V]       = x264_predict_16x16_v_avx;
@@ -336,7 +336,7 @@ void x264_predict_16x16_init_mmx( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_16x16_H]       = x264_predict_16x16_h_avx2;
 #else
 #if !ARCH_X86_64
-    pf[I_PRED_16x16_P]       = x264_predict_16x16_p_mmx2;
+    pf[I_PRED_16x16_P]       = predict_16x16_p_mmx2;
 #endif
     if( !(cpu&X264_CPU_SSE) )
         return;
@@ -348,22 +348,22 @@ void x264_predict_16x16_init_mmx( int cpu, x264_predict_t pf[7] )
         return;
     pf[I_PRED_16x16_DC_TOP]  = x264_predict_16x16_dc_top_sse2;
     pf[I_PRED_16x16_DC_LEFT] = x264_predict_16x16_dc_left_sse2;
-    pf[I_PRED_16x16_P]       = x264_predict_16x16_p_sse2;
+    pf[I_PRED_16x16_P]       = predict_16x16_p_sse2;
     if( !(cpu&X264_CPU_SSSE3) )
         return;
     if( !(cpu&X264_CPU_SLOW_PSHUFB) )
         pf[I_PRED_16x16_H]       = x264_predict_16x16_h_ssse3;
 #if HAVE_X86_INLINE_ASM
-    pf[I_PRED_16x16_P]       = x264_predict_16x16_p_ssse3;
+    pf[I_PRED_16x16_P]       = predict_16x16_p_ssse3;
 #endif
     if( !(cpu&X264_CPU_AVX) )
         return;
-    pf[I_PRED_16x16_P]       = x264_predict_16x16_p_avx;
+    pf[I_PRED_16x16_P]       = predict_16x16_p_avx;
 #endif // HIGH_BIT_DEPTH
 
     if( cpu&X264_CPU_AVX2 )
     {
-        pf[I_PRED_16x16_P]       = x264_predict_16x16_p_avx2;
+        pf[I_PRED_16x16_P]       = predict_16x16_p_avx2;
         pf[I_PRED_16x16_DC]      = x264_predict_16x16_dc_avx2;
         pf[I_PRED_16x16_DC_TOP]  = x264_predict_16x16_dc_top_avx2;
         pf[I_PRED_16x16_DC_LEFT] = x264_predict_16x16_dc_left_avx2;
@@ -388,16 +388,16 @@ void x264_predict_8x8c_init_mmx( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_CHROMA_DC]      = x264_predict_8x8c_dc_sse2;
     pf[I_PRED_CHROMA_DC_TOP]  = x264_predict_8x8c_dc_top_sse2;
     pf[I_PRED_CHROMA_H]       = x264_predict_8x8c_h_sse2;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x8c_p_sse2;
+    pf[I_PRED_CHROMA_P]       = predict_8x8c_p_sse2;
     if( !(cpu&X264_CPU_AVX) )
         return;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x8c_p_avx;
+    pf[I_PRED_CHROMA_P]       = predict_8x8c_p_avx;
     if( !(cpu&X264_CPU_AVX2) )
         return;
     pf[I_PRED_CHROMA_H]   = x264_predict_8x8c_h_avx2;
 #else
 #if ARCH_X86_64
-    pf[I_PRED_CHROMA_DC_LEFT] = x264_predict_8x8c_dc_left;
+    pf[I_PRED_CHROMA_DC_LEFT] = predict_8x8c_dc_left;
 #endif
     pf[I_PRED_CHROMA_V]       = x264_predict_8x8c_v_mmx;
     if( !(cpu&X264_CPU_MMX2) )
@@ -405,26 +405,26 @@ void x264_predict_8x8c_init_mmx( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_CHROMA_DC_TOP]  = x264_predict_8x8c_dc_top_mmx2;
     pf[I_PRED_CHROMA_H]       = x264_predict_8x8c_h_mmx2;
 #if !ARCH_X86_64
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x8c_p_mmx2;
+    pf[I_PRED_CHROMA_P]       = predict_8x8c_p_mmx2;
 #endif
     pf[I_PRED_CHROMA_DC]      = x264_predict_8x8c_dc_mmx2;
     if( !(cpu&X264_CPU_SSE2) )
         return;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x8c_p_sse2;
+    pf[I_PRED_CHROMA_P]       = predict_8x8c_p_sse2;
     if( !(cpu&X264_CPU_SSSE3) )
         return;
     pf[I_PRED_CHROMA_H]       = x264_predict_8x8c_h_ssse3;
 #if HAVE_X86_INLINE_ASM
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x8c_p_ssse3;
+    pf[I_PRED_CHROMA_P]       = predict_8x8c_p_ssse3;
 #endif
     if( !(cpu&X264_CPU_AVX) )
         return;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x8c_p_avx;
+    pf[I_PRED_CHROMA_P]       = predict_8x8c_p_avx;
 #endif // HIGH_BIT_DEPTH
 
     if( cpu&X264_CPU_AVX2 )
     {
-        pf[I_PRED_CHROMA_P]   = x264_predict_8x8c_p_avx2;
+        pf[I_PRED_CHROMA_P]   = predict_8x8c_p_avx2;
     }
 }
 
@@ -445,10 +445,10 @@ void x264_predict_8x16c_init_mmx( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_CHROMA_DC_TOP]  = x264_predict_8x16c_dc_top_sse2;
     pf[I_PRED_CHROMA_DC]      = x264_predict_8x16c_dc_sse2;
     pf[I_PRED_CHROMA_H]       = x264_predict_8x16c_h_sse2;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x16c_p_sse2;
+    pf[I_PRED_CHROMA_P]       = predict_8x16c_p_sse2;
     if( !(cpu&X264_CPU_AVX) )
         return;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x16c_p_avx;
+    pf[I_PRED_CHROMA_P]       = predict_8x16c_p_avx;
     if( !(cpu&X264_CPU_AVX2) )
         return;
     pf[I_PRED_CHROMA_H]   = x264_predict_8x16c_h_avx2;
@@ -460,22 +460,22 @@ void x264_predict_8x16c_init_mmx( int cpu, x264_predict_t pf[7] )
     pf[I_PRED_CHROMA_DC]      = x264_predict_8x16c_dc_mmx2;
     pf[I_PRED_CHROMA_H]       = x264_predict_8x16c_h_mmx2;
 #if !ARCH_X86_64
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x16c_p_mmx2;
+    pf[I_PRED_CHROMA_P]       = predict_8x16c_p_mmx2;
 #endif
     if( !(cpu&X264_CPU_SSE2) )
         return;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x16c_p_sse2;
+    pf[I_PRED_CHROMA_P]       = predict_8x16c_p_sse2;
     if( !(cpu&X264_CPU_SSSE3) )
         return;
     pf[I_PRED_CHROMA_H]       = x264_predict_8x16c_h_ssse3;
     if( !(cpu&X264_CPU_AVX) )
         return;
-    pf[I_PRED_CHROMA_P]       = x264_predict_8x16c_p_avx;
+    pf[I_PRED_CHROMA_P]       = predict_8x16c_p_avx;
 #endif // HIGH_BIT_DEPTH
 
     if( cpu&X264_CPU_AVX2 )
     {
-        pf[I_PRED_CHROMA_P]   = x264_predict_8x16c_p_avx2;
+        pf[I_PRED_CHROMA_P]   = predict_8x16c_p_avx2;
     }
 }
 
index 036d6c1..45c9767 100644 (file)
@@ -256,7 +256,7 @@ static const uint8_t i_sub_mb_p_cost_table[4] =
     5, 3, 3, 1
 };
 
-static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a );
+static void analyse_update_cache( x264_t *h, x264_mb_analysis_t *a );
 
 static uint16_t x264_cost_ref[QP_MAX+1][3][33];
 static UNUSED x264_pthread_mutex_t cost_ref_mutex = X264_PTHREAD_MUTEX_INITIALIZER;
@@ -367,14 +367,14 @@ void x264_analyse_weight_frame( x264_t *h, int end )
 }
 
 /* initialize an array of lambda*nbits for all possible mvs */
-static void x264_mb_analyse_load_costs( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_load_costs( x264_t *h, x264_mb_analysis_t *a )
 {
     a->p_cost_mv = h->cost_mv[a->i_qp];
     a->p_cost_ref[0] = x264_cost_ref[a->i_qp][x264_clip3(h->sh.i_num_ref_idx_l0_active-1,0,2)];
     a->p_cost_ref[1] = x264_cost_ref[a->i_qp][x264_clip3(h->sh.i_num_ref_idx_l1_active-1,0,2)];
 }
 
-static void x264_mb_analyse_init_qp( x264_t *h, x264_mb_analysis_t *a, int qp )
+static void mb_analyse_init_qp( x264_t *h, x264_mb_analysis_t *a, int qp )
 {
     int effective_chroma_qp = h->chroma_qp_table[SPEC_QP(qp)] + X264_MAX( qp - QP_MAX_SPEC, 0 );
     a->i_lambda = x264_lambda_tab[qp];
@@ -413,7 +413,7 @@ static void x264_mb_analyse_init_qp( x264_t *h, x264_mb_analysis_t *a, int qp )
     h->mb.i_chroma_qp = h->chroma_qp_table[qp];
 }
 
-static void x264_mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int qp )
+static void mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int qp )
 {
     int subme = h->param.analyse.i_subpel_refine - (h->sh.i_type == SLICE_TYPE_B);
 
@@ -424,7 +424,7 @@ static void x264_mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int qp )
     h->mb.b_deblock_rdo = h->param.analyse.i_subpel_refine >= 9 && h->sh.i_disable_deblocking_filter_idc != 1;
     a->b_early_terminate = h->param.analyse.i_subpel_refine < 11;
 
-    x264_mb_analyse_init_qp( h, a, qp );
+    mb_analyse_init_qp( h, a, qp );
 
     h->mb.b_transform_8x8 = 0;
 
@@ -682,7 +682,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 x264_psy_trellis_init( x264_t *h, int do_both_dct )
+static void inline psy_trellis_init( x264_t *h, int do_both_dct )
 {
     ALIGNED_16( static pixel zero[16*FDEC_STRIDE] ) = {0};
 
@@ -693,10 +693,10 @@ static void inline x264_psy_trellis_init( x264_t *h, int do_both_dct )
 }
 
 /* Reset fenc satd scores cache for psy RD */
-static inline void x264_mb_init_fenc_cache( x264_t *h, int b_satd )
+static inline void mb_init_fenc_cache( x264_t *h, int b_satd )
 {
     if( h->param.analyse.i_trellis == 2 && h->mb.i_psy_trellis )
-        x264_psy_trellis_init( h, h->param.analyse.b_transform_8x8 );
+        psy_trellis_init( h, h->param.analyse.b_transform_8x8 );
     if( !h->mb.i_psy_rd )
         return;
 
@@ -709,7 +709,7 @@ static inline void x264_mb_init_fenc_cache( x264_t *h, int b_satd )
         h->mc.memzero_aligned( h->mb.pic.fenc_satd_cache, sizeof(h->mb.pic.fenc_satd_cache) );
 }
 
-static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a )
 {
     if( a->i_satd_chroma < COST_MAX )
         return;
@@ -791,7 +791,7 @@ static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a )
 }
 
 /* FIXME: should we do any sort of merged chroma analysis with 4:4:4? */
-static void x264_mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter )
+static void mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter )
 {
     const unsigned int flags = h->sh.i_type == SLICE_TYPE_I ? h->param.analyse.intra : h->param.analyse.inter;
     pixel *p_src = h->mb.pic.p_fenc[0];
@@ -1103,7 +1103,7 @@ static void x264_mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_satd_
     }
 }
 
-static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
+static void intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
 {
     if( !a->b_early_terminate )
         i_satd_thresh = COST_MAX;
@@ -1111,8 +1111,8 @@ static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
     if( a->i_satd_i16x16 < i_satd_thresh )
     {
         h->mb.i_type = I_16x16;
-        x264_analyse_update_cache( h, a );
-        a->i_satd_i16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_satd_i16x16 = rd_cost_mb( h, a->i_lambda2 );
     }
     else
         a->i_satd_i16x16 = COST_MAX;
@@ -1120,8 +1120,8 @@ static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
     if( a->i_satd_i4x4 < i_satd_thresh )
     {
         h->mb.i_type = I_4x4;
-        x264_analyse_update_cache( h, a );
-        a->i_satd_i4x4 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_satd_i4x4 = rd_cost_mb( h, a->i_lambda2 );
     }
     else
         a->i_satd_i4x4 = COST_MAX;
@@ -1129,15 +1129,15 @@ static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
     if( a->i_satd_i8x8 < i_satd_thresh )
     {
         h->mb.i_type = I_8x8;
-        x264_analyse_update_cache( h, a );
-        a->i_satd_i8x8 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_satd_i8x8 = rd_cost_mb( h, a->i_lambda2 );
         a->i_cbp_i8x8_luma = h->mb.i_cbp_luma;
     }
     else
         a->i_satd_i8x8 = COST_MAX;
 }
 
-static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
+static void intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
 {
     uint64_t i_satd, i_best;
     int plane_count = CHROMA444 ? 3 : 1;
@@ -1155,7 +1155,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
             if( i_mode == old_pred_mode || a->i_satd_i16x16_dir[i_mode] > i_thresh )
                 continue;
             h->mb.i_intra16x16_pred_mode = i_mode;
-            i_satd = x264_rd_cost_mb( h, a->i_lambda2 );
+            i_satd = rd_cost_mb( h, a->i_lambda2 );
             COPY2_IF_LT( i_best, i_satd, a->i_predict16x16, i_mode );
         }
     }
@@ -1181,10 +1181,10 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
             {
                 int i_cbp_chroma_best = h->mb.i_cbp_chroma;
                 int i_chroma_lambda = x264_lambda2_tab[h->mb.i_chroma_qp];
-                /* the previous thing encoded was x264_intra_rd(), so the pixels and
+                /* the previous thing encoded was intra_rd(), so the pixels and
                  * coefs for the current chroma mode are still around, so we only
                  * have to recount the bits. */
-                i_best = x264_rd_cost_chroma( h, i_chroma_lambda, a->i_predict8x8chroma, 0 );
+                i_best = rd_cost_chroma( h, i_chroma_lambda, a->i_predict8x8chroma, 0 );
                 for( int i = 0; i < i_max; i++ )
                 {
                     int i_mode = predict_mode_sorted[i];
@@ -1198,7 +1198,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
                     /* if we've already found a mode that needs no residual, then
                      * probably any mode with a residual will be worse.
                      * so avoid dct on the remaining modes to improve speed. */
-                    i_satd = x264_rd_cost_chroma( h, i_chroma_lambda, i_mode, h->mb.i_cbp_chroma != 0x00 );
+                    i_satd = rd_cost_chroma( h, i_chroma_lambda, i_mode, h->mb.i_cbp_chroma != 0x00 );
                     COPY3_IF_LT( i_best, i_satd, a->i_predict8x8chroma, i_mode, i_cbp_chroma_best, h->mb.i_cbp_chroma );
                 }
                 h->mb.i_chroma_pred_mode = a->i_predict8x8chroma;
@@ -1228,7 +1228,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
             for( ; *predict_mode >= 0; predict_mode++ )
             {
                 int i_mode = *predict_mode;
-                i_satd = x264_rd_cost_i4x4( h, a->i_lambda2, idx, i_mode );
+                i_satd = rd_cost_i4x4( h, a->i_lambda2, idx, i_mode );
 
                 if( i_best > i_satd )
                 {
@@ -1287,7 +1287,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
                     continue;
 
                 h->mb.i_cbp_luma = a->i_cbp_i8x8_luma;
-                i_satd = x264_rd_cost_i8x8( h, a->i_lambda2, idx, i_mode, edge );
+                i_satd = rd_cost_i8x8( h, a->i_lambda2, idx, i_mode, edge );
 
                 if( i_best > i_satd )
                 {
@@ -1366,7 +1366,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
 #define REF_COST(list, ref) \
     (a->p_cost_ref[list][ref])
 
-static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
 {
     x264_me_t m;
     int i_mvc;
@@ -1415,7 +1415,7 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
             && x264_macroblock_probe_pskip( h ) )
         {
             h->mb.i_type = P_SKIP;
-            x264_analyse_update_cache( h, a );
+            analyse_update_cache( h, a );
             assert( h->mb.cache.pskip_mv[1] <= h->mb.mv_max_spel[1] || h->i_thread_frames == 1 );
             return;
         }
@@ -1433,19 +1433,19 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a )
     h->mb.i_type = P_L0;
     if( a->i_mbrd )
     {
-        x264_mb_init_fenc_cache( h, a->i_mbrd >= 2 || h->param.analyse.inter & X264_ANALYSE_PSUB8x8 );
+        mb_init_fenc_cache( h, a->i_mbrd >= 2 || h->param.analyse.inter & X264_ANALYSE_PSUB8x8 );
         if( a->l0.me16x16.i_ref == 0 && M32( a->l0.me16x16.mv ) == M32( h->mb.cache.pskip_mv ) && !a->b_force_intra )
         {
             h->mb.i_partition = D_16x16;
             x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv );
-            a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+            a->l0.i_rd16x16 = rd_cost_mb( h, a->i_lambda2 );
             if( !(h->mb.i_cbp_luma|h->mb.i_cbp_chroma) )
                 h->mb.i_type = P_SKIP;
         }
     }
 }
 
-static void x264_mb_analyse_inter_p8x8_mixed_ref( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_p8x8_mixed_ref( x264_t *h, x264_mb_analysis_t *a )
 {
     x264_me_t m;
     pixel **p_fenc = h->mb.pic.p_fenc;
@@ -1536,7 +1536,7 @@ static void x264_mb_analyse_inter_p8x8_mixed_ref( x264_t *h, x264_mb_analysis_t
     M32( h->mb.i_sub_partition ) = D_L0_8x8 * 0x01010101;
 }
 
-static void x264_mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
 {
     /* Duplicate refs are rarely useful in p8x8 due to the high cost of the
      * reference frame flags.  Thus, if we're not doing mixedrefs, just
@@ -1591,7 +1591,7 @@ static void x264_mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
     M32( h->mb.i_sub_partition ) = D_L0_8x8 * 0x01010101;
 }
 
-static void x264_mb_analyse_inter_p16x8( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
+static void mb_analyse_inter_p16x8( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
 {
     x264_me_t m;
     pixel **p_fenc = h->mb.pic.p_fenc;
@@ -1657,7 +1657,7 @@ static void x264_mb_analyse_inter_p16x8( x264_t *h, x264_mb_analysis_t *a, int i
     a->l0.i_cost16x8 = a->l0.me16x8[0].cost + a->l0.me16x8[1].cost;
 }
 
-static void x264_mb_analyse_inter_p8x16( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
+static void mb_analyse_inter_p8x16( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
 {
     x264_me_t m;
     pixel **p_fenc = h->mb.pic.p_fenc;
@@ -1722,8 +1722,8 @@ static void x264_mb_analyse_inter_p8x16( x264_t *h, x264_mb_analysis_t *a, int i
     a->l0.i_cost8x16 = a->l0.me8x16[0].cost + a->l0.me8x16[1].cost;
 }
 
-static ALWAYS_INLINE int x264_mb_analyse_inter_p4x4_chroma_internal( x264_t *h, x264_mb_analysis_t *a,
-                                                                     pixel **p_fref, int i8x8, int size, int chroma )
+static ALWAYS_INLINE int mb_analyse_inter_p4x4_chroma_internal( x264_t *h, x264_mb_analysis_t *a,
+                                                                pixel **p_fref, int i8x8, int size, int chroma )
 {
     ALIGNED_ARRAY_32( pixel, pix1,[16*16] );
     pixel *pix2 = pix1+8;
@@ -1786,17 +1786,17 @@ static ALWAYS_INLINE int x264_mb_analyse_inter_p4x4_chroma_internal( x264_t *h,
          + h->pixf.mbcmp[chromapix]( &h->mb.pic.p_fenc[2][oe], FENC_STRIDE, pix2, 16 );
 }
 
-static int x264_mb_analyse_inter_p4x4_chroma( x264_t *h, x264_mb_analysis_t *a, pixel **p_fref, int i8x8, int size )
+static int mb_analyse_inter_p4x4_chroma( x264_t *h, x264_mb_analysis_t *a, pixel **p_fref, int i8x8, int size )
 {
     if( CHROMA_FORMAT == CHROMA_444 )
-        return x264_mb_analyse_inter_p4x4_chroma_internal( h, a, p_fref, i8x8, size, CHROMA_444 );
+        return mb_analyse_inter_p4x4_chroma_internal( h, a, p_fref, i8x8, size, CHROMA_444 );
     else if( CHROMA_FORMAT == CHROMA_422 )
-        return x264_mb_analyse_inter_p4x4_chroma_internal( h, a, p_fref, i8x8, size, CHROMA_422 );
+        return mb_analyse_inter_p4x4_chroma_internal( h, a, p_fref, i8x8, size, CHROMA_422 );
     else
-        return x264_mb_analyse_inter_p4x4_chroma_internal( h, a, p_fref, i8x8, size, CHROMA_420 );
+        return mb_analyse_inter_p4x4_chroma_internal( h, a, p_fref, i8x8, size, CHROMA_420 );
 }
 
-static void x264_mb_analyse_inter_p4x4( x264_t *h, x264_mb_analysis_t *a, int i8x8 )
+static void mb_analyse_inter_p4x4( x264_t *h, x264_mb_analysis_t *a, int i8x8 )
 {
     pixel **p_fref = h->mb.pic.p_fref[0][a->l0.me8x8[i8x8].i_ref];
     pixel **p_fenc = h->mb.pic.p_fenc;
@@ -1832,10 +1832,10 @@ static void x264_mb_analyse_inter_p4x4( x264_t *h, x264_mb_analysis_t *a, int i8
                             REF_COST( 0, i_ref ) +
                             a->i_lambda * i_sub_mb_p_cost_table[D_L0_4x4];
     if( h->mb.b_chroma_me && !CHROMA444 )
-        a->l0.i_cost4x4[i8x8] += x264_mb_analyse_inter_p4x4_chroma( h, a, p_fref, i8x8, PIXEL_4x4 );
+        a->l0.i_cost4x4[i8x8] += mb_analyse_inter_p4x4_chroma( h, a, p_fref, i8x8, PIXEL_4x4 );
 }
 
-static void x264_mb_analyse_inter_p8x4( x264_t *h, x264_mb_analysis_t *a, int i8x8 )
+static void mb_analyse_inter_p8x4( x264_t *h, x264_mb_analysis_t *a, int i8x8 )
 {
     pixel **p_fref = h->mb.pic.p_fref[0][a->l0.me8x8[i8x8].i_ref];
     pixel **p_fenc = h->mb.pic.p_fenc;
@@ -1868,10 +1868,10 @@ static void x264_mb_analyse_inter_p8x4( x264_t *h, x264_mb_analysis_t *a, int i8
                             REF_COST( 0, i_ref ) +
                             a->i_lambda * i_sub_mb_p_cost_table[D_L0_8x4];
     if( h->mb.b_chroma_me && !CHROMA444 )
-        a->l0.i_cost8x4[i8x8] += x264_mb_analyse_inter_p4x4_chroma( h, a, p_fref, i8x8, PIXEL_8x4 );
+        a->l0.i_cost8x4[i8x8] += mb_analyse_inter_p4x4_chroma( h, a, p_fref, i8x8, PIXEL_8x4 );
 }
 
-static void x264_mb_analyse_inter_p4x8( x264_t *h, x264_mb_analysis_t *a, int i8x8 )
+static void mb_analyse_inter_p4x8( x264_t *h, x264_mb_analysis_t *a, int i8x8 )
 {
     pixel **p_fref = h->mb.pic.p_fref[0][a->l0.me8x8[i8x8].i_ref];
     pixel **p_fenc = h->mb.pic.p_fenc;
@@ -1904,10 +1904,10 @@ static void x264_mb_analyse_inter_p4x8( x264_t *h, x264_mb_analysis_t *a, int i8
                             REF_COST( 0, i_ref ) +
                             a->i_lambda * i_sub_mb_p_cost_table[D_L0_4x8];
     if( h->mb.b_chroma_me && !CHROMA444 )
-        a->l0.i_cost4x8[i8x8] += x264_mb_analyse_inter_p4x4_chroma( h, a, p_fref, i8x8, PIXEL_4x8 );
+        a->l0.i_cost4x8[i8x8] += mb_analyse_inter_p4x4_chroma( h, a, p_fref, i8x8, PIXEL_4x8 );
 }
 
-static ALWAYS_INLINE int x264_analyse_bi_chroma( x264_t *h, x264_mb_analysis_t *a, int idx, int i_pixel )
+static ALWAYS_INLINE int analyse_bi_chroma( x264_t *h, x264_mb_analysis_t *a, int idx, int i_pixel )
 {
     ALIGNED_ARRAY_32( pixel, pix, [4],[16*16] );
     ALIGNED_ARRAY_32( pixel,  bi, [2],[16*16] );
@@ -1955,7 +1955,7 @@ static ALWAYS_INLINE int x264_analyse_bi_chroma( x264_t *h, x264_mb_analysis_t *
     return i_chroma_cost;
 }
 
-static void x264_mb_analyse_inter_direct( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_direct( x264_t *h, x264_mb_analysis_t *a )
 {
     /* Assumes that fdec still contains the results of
      * x264_mb_predict_mv_direct16x16 and x264_mb_mc */
@@ -2001,7 +2001,7 @@ static void x264_mb_analyse_inter_direct( x264_t *h, x264_mb_analysis_t *a )
     }
 }
 
-static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
 {
     ALIGNED_ARRAY_32( pixel, pix0,[16*16] );
     ALIGNED_ARRAY_32( pixel, pix1,[16*16] );
@@ -2073,7 +2073,7 @@ static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
                 {
                     /* We already tested skip */
                     h->mb.i_type = B_SKIP;
-                    x264_analyse_update_cache( h, a );
+                    analyse_update_cache( h, a );
                     return;
                 }
             }
@@ -2105,7 +2105,7 @@ static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
                      + a->l1.bi16x16.cost_mv;
 
     if( h->mb.b_chroma_me )
-        a->i_cost16x16bi += x264_analyse_bi_chroma( h, a, 0, PIXEL_16x16 );
+        a->i_cost16x16bi += analyse_bi_chroma( h, a, 0, PIXEL_16x16 );
 
     /* Always try the 0,0,0,0 vector; helps avoid errant motion vectors in fades */
     if( M32( a->l0.bi16x16.mv ) | M32( a->l1.bi16x16.mv ) )
@@ -2187,7 +2187,7 @@ static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
     a->l1.me16x16.cost += a->i_lambda * i_mb_b_cost_table[B_L1_L1];
 }
 
-static inline void x264_mb_cache_mv_p8x8( x264_t *h, x264_mb_analysis_t *a, int i )
+static inline void mb_cache_mv_p8x8( x264_t *h, x264_mb_analysis_t *a, int i )
 {
     int x = 2*(i&1);
     int y = i&2;
@@ -2217,7 +2217,7 @@ static inline void x264_mb_cache_mv_p8x8( x264_t *h, x264_mb_analysis_t *a, int
     }
 }
 
-static void x264_mb_load_mv_direct8x8( x264_t *h, int idx )
+static void mb_load_mv_direct8x8( x264_t *h, int idx )
 {
     int x = 2*(idx&1);
     int y = idx&2;
@@ -2253,13 +2253,13 @@ static void x264_mb_load_mv_direct8x8( x264_t *h, int idx )
             x264_macroblock_cache_mvd( h, x,y,dx,dy, 1, 0 ); \
     }
 
-static inline void x264_mb_cache_mv_b8x8( x264_t *h, x264_mb_analysis_t *a, int i, int b_mvd )
+static inline void mb_cache_mv_b8x8( x264_t *h, x264_mb_analysis_t *a, int i, int b_mvd )
 {
     int x = 2*(i&1);
     int y = i&2;
     if( h->mb.i_sub_partition[i] == D_DIRECT_8x8 )
     {
-        x264_mb_load_mv_direct8x8( h, i );
+        mb_load_mv_direct8x8( h, i );
         if( b_mvd )
         {
             x264_macroblock_cache_mvd(  h, x, y, 2, 2, 0, 0 );
@@ -2272,17 +2272,17 @@ static inline void x264_mb_cache_mv_b8x8( x264_t *h, x264_mb_analysis_t *a, int
         CACHE_MV_BI( x, y, 2, 2, a->l0.me8x8[i], a->l1.me8x8[i], h->mb.i_sub_partition[i] );
     }
 }
-static inline void x264_mb_cache_mv_b16x8( x264_t *h, x264_mb_analysis_t *a, int i, int b_mvd )
+static inline void mb_cache_mv_b16x8( x264_t *h, x264_mb_analysis_t *a, int i, int b_mvd )
 {
     CACHE_MV_BI( 0, 2*i, 4, 2, a->l0.me16x8[i], a->l1.me16x8[i], a->i_mb_partition16x8[i] );
 }
-static inline void x264_mb_cache_mv_b8x16( x264_t *h, x264_mb_analysis_t *a, int i, int b_mvd )
+static inline void mb_cache_mv_b8x16( x264_t *h, x264_mb_analysis_t *a, int i, int b_mvd )
 {
     CACHE_MV_BI( 2*i, 0, 2, 4, a->l0.me8x16[i], a->l1.me8x16[i], a->i_mb_partition8x16[i] );
 }
 #undef CACHE_MV_BI
 
-static void x264_mb_analyse_inter_b8x8_mixed_ref( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_b8x8_mixed_ref( x264_t *h, x264_mb_analysis_t *a )
 {
     ALIGNED_ARRAY_16( pixel, pix,[2],[8*8] );
     int i_maxref[2] = {h->mb.pic.i_fref[0]-1, h->mb.pic.i_fref[1]-1};
@@ -2371,7 +2371,7 @@ static void x264_mb_analyse_inter_b8x8_mixed_ref( x264_t *h, x264_mb_analysis_t
 
         if( h->mb.b_chroma_me )
         {
-            int i_chroma_cost = x264_analyse_bi_chroma( h, a, i, PIXEL_8x8 );
+            int i_chroma_cost = analyse_bi_chroma( h, a, i, PIXEL_8x8 );
             i_part_cost_bi += i_chroma_cost;
             a->i_satd8x8[2][i] += i_chroma_cost;
         }
@@ -2387,14 +2387,14 @@ static void x264_mb_analyse_inter_b8x8_mixed_ref( x264_t *h, x264_mb_analysis_t
         a->i_cost8x8bi += i_part_cost;
 
         /* XXX Needed for x264_mb_predict_mv */
-        x264_mb_cache_mv_b8x8( h, a, i, 0 );
+        mb_cache_mv_b8x8( h, a, i, 0 );
     }
 
     /* mb type cost */
     a->i_cost8x8bi += a->i_lambda * i_mb_b_cost_table[B_8x8];
 }
 
-static void x264_mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
+static void mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
 {
     pixel **p_fref[2] =
         { h->mb.pic.p_fref[0][a->l0.me16x16.i_ref],
@@ -2451,7 +2451,7 @@ static void x264_mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
 
         if( h->mb.b_chroma_me )
         {
-            int i_chroma_cost = x264_analyse_bi_chroma( h, a, i, PIXEL_8x8 );
+            int i_chroma_cost = analyse_bi_chroma( h, a, i, PIXEL_8x8 );
             i_part_cost_bi += i_chroma_cost;
             a->i_satd8x8[2][i] += i_chroma_cost;
         }
@@ -2464,14 +2464,14 @@ static void x264_mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
         a->i_cost8x8bi += i_part_cost;
 
         /* XXX Needed for x264_mb_predict_mv */
-        x264_mb_cache_mv_b8x8( h, a, i, 0 );
+        mb_cache_mv_b8x8( h, a, i, 0 );
     }
 
     /* mb type cost */
     a->i_cost8x8bi += a->i_lambda * i_mb_b_cost_table[B_8x8];
 }
 
-static void x264_mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
+static void mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
 {
     ALIGNED_ARRAY_32( pixel, pix,[2],[16*8] );
     ALIGNED_4( int16_t mvc[3][2] );
@@ -2529,7 +2529,7 @@ static void x264_mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a, int i
                         + a->l1.me16x8[i].i_ref_cost;
 
         if( h->mb.b_chroma_me )
-            i_part_cost_bi += x264_analyse_bi_chroma( h, a, i, PIXEL_16x8 );
+            i_part_cost_bi += analyse_bi_chroma( h, a, i, PIXEL_16x8 );
 
         i_part_cost = a->l0.me16x8[i].cost;
         a->i_mb_partition16x8[i] = D_L0_8x8; /* not actually 8x8, only the L0 matters */
@@ -2555,7 +2555,7 @@ static void x264_mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a, int i
             return;
         }
 
-        x264_mb_cache_mv_b16x8( h, a, i, 0 );
+        mb_cache_mv_b16x8( h, a, i, 0 );
     }
 
     /* mb type cost */
@@ -2565,7 +2565,7 @@ static void x264_mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a, int i
     a->i_cost16x8bi += a->i_lambda * i_mb_b16x8_cost_table[a->i_mb_type16x8];
 }
 
-static void x264_mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
+static void mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
 {
     ALIGNED_ARRAY_16( pixel, pix,[2],[8*16] );
     ALIGNED_4( int16_t mvc[3][2] );
@@ -2622,7 +2622,7 @@ static void x264_mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a, int i
                         + a->l1.me8x16[i].i_ref_cost;
 
         if( h->mb.b_chroma_me )
-            i_part_cost_bi += x264_analyse_bi_chroma( h, a, i, PIXEL_8x16 );
+            i_part_cost_bi += analyse_bi_chroma( h, a, i, PIXEL_8x16 );
 
         i_part_cost = a->l0.me8x16[i].cost;
         a->i_mb_partition8x16[i] = D_L0_8x8;
@@ -2648,7 +2648,7 @@ static void x264_mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a, int i
             return;
         }
 
-        x264_mb_cache_mv_b8x16( h, a, i, 0 );
+        mb_cache_mv_b8x16( h, a, i, 0 );
     }
 
     /* mb type cost */
@@ -2658,7 +2658,7 @@ static void x264_mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a, int i
     a->i_cost8x16bi += a->i_lambda * i_mb_b16x8_cost_table[a->i_mb_type8x16];
 }
 
-static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
+static void mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
 {
     int thresh = a->b_early_terminate ? i_satd * 5/4 + 1 : COST_MAX;
 
@@ -2666,15 +2666,15 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
     if( a->l0.i_rd16x16 == COST_MAX && (!a->b_early_terminate || a->l0.me16x16.cost <= i_satd * 3/2) )
     {
         h->mb.i_partition = D_16x16;
-        x264_analyse_update_cache( h, a );
-        a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->l0.i_rd16x16 = rd_cost_mb( h, a->i_lambda2 );
     }
 
     if( a->l0.i_cost16x8 < thresh )
     {
         h->mb.i_partition = D_16x8;
-        x264_analyse_update_cache( h, a );
-        a->l0.i_cost16x8 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->l0.i_cost16x8 = rd_cost_mb( h, a->i_lambda2 );
     }
     else
         a->l0.i_cost16x8 = COST_MAX;
@@ -2682,8 +2682,8 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
     if( a->l0.i_cost8x16 < thresh )
     {
         h->mb.i_partition = D_8x16;
-        x264_analyse_update_cache( h, a );
-        a->l0.i_cost8x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->l0.i_cost8x16 = rd_cost_mb( h, a->i_lambda2 );
     }
     else
         a->l0.i_cost8x16 = COST_MAX;
@@ -2712,7 +2712,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
                     if( costs[subtype] > sub8x8_thresh )
                         continue;
                     h->mb.i_sub_partition[i] = subtype;
-                    x264_mb_cache_mv_p8x8( h, a, i );
+                    mb_cache_mv_p8x8( h, a, i );
                     if( subtype == btype )
                         continue;
                     cost = x264_rd_cost_part( h, a->i_lambda2, i<<2, PIXEL_8x8 );
@@ -2721,19 +2721,19 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
                 if( h->mb.i_sub_partition[i] != btype )
                 {
                     h->mb.i_sub_partition[i] = btype;
-                    x264_mb_cache_mv_p8x8( h, a, i );
+                    mb_cache_mv_p8x8( h, a, i );
                 }
             }
         }
         else
-            x264_analyse_update_cache( h, a );
-        a->l0.i_cost8x8 = x264_rd_cost_mb( h, a->i_lambda2 );
+            analyse_update_cache( h, a );
+        a->l0.i_cost8x8 = rd_cost_mb( h, a->i_lambda2 );
     }
     else
         a->l0.i_cost8x8 = COST_MAX;
 }
 
-static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter )
+static void mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter )
 {
     int thresh = a->b_early_terminate ? i_satd_inter * (17 + (!!h->mb.i_psy_rd))/16 + 1 : COST_MAX;
 
@@ -2743,8 +2743,8 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
         /* Assumes direct/skip MC is still in fdec */
         /* Requires b-rdo to be done before intra analysis */
         h->mb.b_skip_mc = 1;
-        x264_analyse_update_cache( h, a );
-        a->i_rd16x16direct = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_rd16x16direct = rd_cost_mb( h, a->i_lambda2 );
         h->mb.b_skip_mc = 0;
     }
 
@@ -2754,24 +2754,24 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
     if( a->l0.me16x16.cost < thresh && a->l0.i_rd16x16 == COST_MAX )
     {
         h->mb.i_type = B_L0_L0;
-        x264_analyse_update_cache( h, a );
-        a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->l0.i_rd16x16 = rd_cost_mb( h, a->i_lambda2 );
     }
 
     /* L1 */
     if( a->l1.me16x16.cost < thresh && a->l1.i_rd16x16 == COST_MAX )
     {
         h->mb.i_type = B_L1_L1;
-        x264_analyse_update_cache( h, a );
-        a->l1.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->l1.i_rd16x16 = rd_cost_mb( h, a->i_lambda2 );
     }
 
     /* BI */
     if( a->i_cost16x16bi < thresh && a->i_rd16x16bi == COST_MAX )
     {
         h->mb.i_type = B_BI_BI;
-        x264_analyse_update_cache( h, a );
-        a->i_rd16x16bi = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_rd16x16bi = rd_cost_mb( h, a->i_lambda2 );
     }
 
     /* 8x8 */
@@ -2779,8 +2779,8 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
     {
         h->mb.i_type = B_8x8;
         h->mb.i_partition = D_8x8;
-        x264_analyse_update_cache( h, a );
-        a->i_rd8x8bi = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_rd8x8bi = rd_cost_mb( h, a->i_lambda2 );
         x264_macroblock_cache_skip( h, 0, 0, 4, 4, 0 );
     }
 
@@ -2789,8 +2789,8 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
     {
         h->mb.i_type = a->i_mb_type16x8;
         h->mb.i_partition = D_16x8;
-        x264_analyse_update_cache( h, a );
-        a->i_rd16x8bi = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_rd16x8bi = rd_cost_mb( h, a->i_lambda2 );
     }
 
     /* 8x16 */
@@ -2798,12 +2798,12 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
     {
         h->mb.i_type = a->i_mb_type8x16;
         h->mb.i_partition = D_8x16;
-        x264_analyse_update_cache( h, a );
-        a->i_rd8x16bi = x264_rd_cost_mb( h, a->i_lambda2 );
+        analyse_update_cache( h, a );
+        a->i_rd8x16bi = rd_cost_mb( h, a->i_lambda2 );
     }
 }
 
-static void x264_refine_bidir( x264_t *h, x264_mb_analysis_t *a )
+static void refine_bidir( x264_t *h, x264_mb_analysis_t *a )
 {
     int i_biweight;
 
@@ -2846,7 +2846,7 @@ static void x264_refine_bidir( x264_t *h, x264_mb_analysis_t *a )
     }
 }
 
-static inline void x264_mb_analyse_transform( x264_t *h )
+static inline void mb_analyse_transform( x264_t *h )
 {
     if( x264_mb_transform_8x8_allowed( h ) && h->param.analyse.b_transform_8x8 && !h->mb.b_lossless )
     {
@@ -2884,7 +2884,7 @@ static inline void x264_mb_analyse_transform( x264_t *h )
     }
 }
 
-static inline void x264_mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_t *a, int *i_satd, int *i_rd )
+static inline void mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_t *a, int *i_satd, int *i_rd )
 {
     if( h->param.analyse.b_transform_8x8 && h->pps->b_transform_8x8_mode )
     {
@@ -2895,10 +2895,10 @@ static inline void x264_mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_t *
         else if( !x264_transform_allowed[h->mb.i_type] )
             return;
 
-        x264_analyse_update_cache( h, a );
+        analyse_update_cache( h, a );
         h->mb.b_transform_8x8 ^= 1;
         /* FIXME only luma is needed for 4:2:0, but the score for comparison already includes chroma */
-        int i_rd8 = x264_rd_cost_mb( h, a->i_lambda2 );
+        int i_rd8 = rd_cost_mb( h, a->i_lambda2 );
 
         if( *i_rd >= i_rd8 )
         {
@@ -2921,12 +2921,12 @@ static inline void x264_mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_t *
  * There must be a more efficient way to get that portion of the benefit
  * without doing full QP-RD, but RD-decimation doesn't seem to do the
  * trick. */
-static inline void x264_mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
+static inline void mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
 {
     int bcost, cost, failures, prevcost, origcost;
     int orig_qp = h->mb.i_qp, bqp = h->mb.i_qp;
     int last_qp_tried = 0;
-    origcost = bcost = x264_rd_cost_mb( h, a->i_lambda2 );
+    origcost = bcost = rd_cost_mb( h, a->i_lambda2 );
     int origcbp = h->mb.cbp[h->mb.i_mb_xy];
 
     /* If CBP is already zero, don't raise the quantizer any higher. */
@@ -2959,7 +2959,7 @@ static inline void x264_mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
             {
                 h->mb.i_qp = X264_MAX( h->mb.i_qp - threshold - 1, SPEC_QP( h->param.rc.i_qp_min ) );
                 h->mb.i_chroma_qp = h->chroma_qp_table[h->mb.i_qp];
-                already_checked_cost = x264_rd_cost_mb( h, a->i_lambda2 );
+                already_checked_cost = rd_cost_mb( h, a->i_lambda2 );
                 if( !h->mb.cbp[h->mb.i_mb_xy] )
                 {
                     /* If our empty-CBP block is lower QP than the last QP,
@@ -2983,7 +2983,7 @@ static inline void x264_mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
             else
             {
                 h->mb.i_chroma_qp = h->chroma_qp_table[h->mb.i_qp];
-                cost = x264_rd_cost_mb( h, a->i_lambda2 );
+                cost = rd_cost_mb( h, a->i_lambda2 );
                 COPY2_IF_LT( bcost, cost, bqp, h->mb.i_qp );
             }
 
@@ -3008,7 +3008,7 @@ static inline void x264_mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
     {
         h->mb.i_qp = h->mb.i_last_qp;
         h->mb.i_chroma_qp = h->chroma_qp_table[h->mb.i_qp];
-        cost = x264_rd_cost_mb( h, a->i_lambda2 );
+        cost = rd_cost_mb( h, a->i_lambda2 );
         COPY2_IF_LT( bcost, cost, bqp, h->mb.i_qp );
     }
 
@@ -3020,7 +3020,7 @@ static inline void x264_mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
         x264_mb_transform_8x8_allowed( h ) )
     {
         h->mb.b_transform_8x8 ^= 1;
-        cost = x264_rd_cost_mb( h, a->i_lambda2 );
+        cost = rd_cost_mb( h, a->i_lambda2 );
         if( cost > bcost )
             h->mb.b_transform_8x8 ^= 1;
     }
@@ -3042,17 +3042,17 @@ void x264_macroblock_analyse( x264_t *h )
 
     if( h->param.analyse.b_mb_info )
         h->fdec->effective_qp[h->mb.i_mb_xy] = h->mb.i_qp; /* Store the real analysis QP. */
-    x264_mb_analyse_init( h, &analysis, h->mb.i_qp );
+    mb_analyse_init( h, &analysis, h->mb.i_qp );
 
     /*--------------------------- Do the analysis ---------------------------*/
     if( h->sh.i_type == SLICE_TYPE_I )
     {
 intra_analysis:
         if( analysis.i_mbrd )
-            x264_mb_init_fenc_cache( h, analysis.i_mbrd >= 2 );
-        x264_mb_analyse_intra( h, &analysis, COST_MAX );
+            mb_init_fenc_cache( h, analysis.i_mbrd >= 2 );
+        mb_analyse_intra( h, &analysis, COST_MAX );
         if( analysis.i_mbrd )
-            x264_intra_rd( h, &analysis, COST_MAX );
+            intra_rd( h, &analysis, COST_MAX );
 
         i_cost = analysis.i_satd_i16x16;
         h->mb.i_type = I_16x16;
@@ -3062,7 +3062,7 @@ intra_analysis:
             h->mb.i_type = I_PCM;
 
         else if( analysis.i_mbrd >= 2 )
-            x264_intra_rd_refine( h, &analysis );
+            intra_rd_refine( h, &analysis );
     }
     else if( h->sh.i_type == SLICE_TYPE_P )
     {
@@ -3075,7 +3075,7 @@ intra_analysis:
         {
             if( !h->param.analyse.b_psy )
             {
-                x264_mb_analyse_init_qp( h, &analysis, X264_MAX( h->mb.i_qp - h->mb.ip_offset, h->param.rc.i_qp_min ) );
+                mb_analyse_init_qp( h, &analysis, X264_MAX( h->mb.i_qp - h->mb.ip_offset, h->param.rc.i_qp_min ) );
                 goto intra_analysis;
             }
         }
@@ -3147,9 +3147,9 @@ skip_analysis:
             int i_partition;
             int i_satd_inter, i_satd_intra;
 
-            x264_mb_analyse_load_costs( h, &analysis );
+            mb_analyse_load_costs( h, &analysis );
 
-            x264_mb_analyse_inter_p16x16( h, &analysis );
+            mb_analyse_inter_p16x16( h, &analysis );
 
             if( h->mb.i_type == P_SKIP )
             {
@@ -3161,9 +3161,9 @@ skip_analysis:
             if( flags & X264_ANALYSE_PSUB16x16 )
             {
                 if( h->param.analyse.b_mixed_references )
-                    x264_mb_analyse_inter_p8x8_mixed_ref( h, &analysis );
+                    mb_analyse_inter_p8x8_mixed_ref( h, &analysis );
                 else
-                    x264_mb_analyse_inter_p8x8( h, &analysis );
+                    mb_analyse_inter_p8x8( h, &analysis );
             }
 
             /* Select best inter mode */
@@ -3183,24 +3183,24 @@ skip_analysis:
                 {
                     for( int i = 0; i < 4; i++ )
                     {
-                        x264_mb_analyse_inter_p4x4( h, &analysis, i );
+                        mb_analyse_inter_p4x4( h, &analysis, i );
                         int i_thresh8x4 = analysis.l0.me4x4[i][1].cost_mv + analysis.l0.me4x4[i][2].cost_mv;
                         if( !analysis.b_early_terminate || analysis.l0.i_cost4x4[i] < analysis.l0.me8x8[i].cost + i_thresh8x4 )
                         {
                             int i_cost8x8 = analysis.l0.i_cost4x4[i];
                             h->mb.i_sub_partition[i] = D_L0_4x4;
 
-                            x264_mb_analyse_inter_p8x4( h, &analysis, i );
+                            mb_analyse_inter_p8x4( h, &analysis, i );
                             COPY2_IF_LT( i_cost8x8, analysis.l0.i_cost8x4[i],
                                          h->mb.i_sub_partition[i], D_L0_8x4 );
 
-                            x264_mb_analyse_inter_p4x8( h, &analysis, i );
+                            mb_analyse_inter_p4x8( h, &analysis, i );
                             COPY2_IF_LT( i_cost8x8, analysis.l0.i_cost4x8[i],
                                          h->mb.i_sub_partition[i], D_L0_4x8 );
 
                             i_cost += i_cost8x8 - analysis.l0.me8x8[i].cost;
                         }
-                        x264_mb_cache_mv_p8x8( h, &analysis, i );
+                        mb_cache_mv_p8x8( h, &analysis, i );
                     }
                     analysis.l0.i_cost8x8 = i_cost;
                 }
@@ -3215,14 +3215,14 @@ skip_analysis:
                                       + analysis.l0.me8x8[3].cost_mv + analysis.l0.me8x8[3].i_ref_cost + 1) >> 1;
                 analysis.i_cost_est16x8[1] = analysis.i_satd8x8[0][2] + analysis.i_satd8x8[0][3] + i_avg_mv_ref_cost;
 
-                x264_mb_analyse_inter_p16x8( h, &analysis, i_cost );
+                mb_analyse_inter_p16x8( h, &analysis, i_cost );
                 COPY3_IF_LT( i_cost, analysis.l0.i_cost16x8, i_type, P_L0, i_partition, D_16x8 );
 
                 i_avg_mv_ref_cost = (analysis.l0.me8x8[1].cost_mv + analysis.l0.me8x8[1].i_ref_cost
                                   + analysis.l0.me8x8[3].cost_mv + analysis.l0.me8x8[3].i_ref_cost + 1) >> 1;
                 analysis.i_cost_est8x16[1] = analysis.i_satd8x8[0][1] + analysis.i_satd8x8[0][3] + i_avg_mv_ref_cost;
 
-                x264_mb_analyse_inter_p8x16( h, &analysis, i_cost );
+                mb_analyse_inter_p8x16( h, &analysis, i_cost );
                 COPY3_IF_LT( i_cost, analysis.l0.i_cost8x16, i_type, P_L0, i_partition, D_8x16 );
             }
 
@@ -3296,20 +3296,20 @@ skip_analysis:
             {
                 if( CHROMA444 )
                 {
-                    x264_mb_analyse_intra( h, &analysis, i_cost );
-                    x264_mb_analyse_intra_chroma( h, &analysis );
+                    mb_analyse_intra( h, &analysis, i_cost );
+                    mb_analyse_intra_chroma( h, &analysis );
                 }
                 else
                 {
-                    x264_mb_analyse_intra_chroma( h, &analysis );
-                    x264_mb_analyse_intra( h, &analysis, i_cost - analysis.i_satd_chroma );
+                    mb_analyse_intra_chroma( h, &analysis );
+                    mb_analyse_intra( h, &analysis, i_cost - analysis.i_satd_chroma );
                 }
                 analysis.i_satd_i16x16 += analysis.i_satd_chroma;
                 analysis.i_satd_i8x8   += analysis.i_satd_chroma;
                 analysis.i_satd_i4x4   += analysis.i_satd_chroma;
             }
             else
-                x264_mb_analyse_intra( h, &analysis, i_cost );
+                mb_analyse_intra( h, &analysis, i_cost );
 
             i_satd_inter = i_cost;
             i_satd_intra = X264_MIN3( analysis.i_satd_i16x16,
@@ -3318,7 +3318,7 @@ skip_analysis:
 
             if( analysis.i_mbrd )
             {
-                x264_mb_analyse_p_rd( h, &analysis, X264_MIN(i_satd_inter, i_satd_intra) );
+                mb_analyse_p_rd( h, &analysis, X264_MIN(i_satd_inter, i_satd_intra) );
                 i_type = P_L0;
                 i_partition = D_16x16;
                 i_cost = analysis.l0.i_rd16x16;
@@ -3328,8 +3328,8 @@ skip_analysis:
                 h->mb.i_type = i_type;
                 h->mb.i_partition = i_partition;
                 if( i_cost < COST_MAX )
-                    x264_mb_analyse_transform_rd( h, &analysis, &i_satd_inter, &i_cost );
-                x264_intra_rd( h, &analysis, i_satd_inter * 5/4 + 1 );
+                    mb_analyse_transform_rd( h, &analysis, &i_satd_inter, &i_cost );
+                intra_rd( h, &analysis, i_satd_inter * 5/4 + 1 );
             }
 
             COPY2_IF_LT( i_cost, analysis.i_satd_i16x16, i_type, I_16x16 );
@@ -3343,7 +3343,7 @@ skip_analysis:
             {
                 /* Intra masking: copy fdec to fenc and re-encode the block as intra in order to make it appear as if
                  * it was an inter block. */
-                x264_analyse_update_cache( h, &analysis );
+                analyse_update_cache( h, &analysis );
                 x264_macroblock_encode( h );
                 for( int p = 0; p < (CHROMA444 ? 3 : 1); p++ )
                     h->mc.copy[PIXEL_16x16]( h->mb.pic.p_fenc[p], FENC_STRIDE, h->mb.pic.p_fdec[p], FDEC_STRIDE, 16 );
@@ -3353,7 +3353,7 @@ skip_analysis:
                     h->mc.copy[PIXEL_8x8]  ( h->mb.pic.p_fenc[1], FENC_STRIDE, h->mb.pic.p_fdec[1], FDEC_STRIDE, height );
                     h->mc.copy[PIXEL_8x8]  ( h->mb.pic.p_fenc[2], FENC_STRIDE, h->mb.pic.p_fdec[2], FDEC_STRIDE, height );
                 }
-                x264_mb_analyse_init_qp( h, &analysis, X264_MAX( h->mb.i_qp - h->mb.ip_offset, h->param.rc.i_qp_min ) );
+                mb_analyse_init_qp( h, &analysis, X264_MAX( h->mb.i_qp - h->mb.ip_offset, h->param.rc.i_qp_min ) );
                 goto intra_analysis;
             }
 
@@ -3361,7 +3361,7 @@ skip_analysis:
             {
                 if( IS_INTRA( h->mb.i_type ) )
                 {
-                    x264_intra_rd_refine( h, &analysis );
+                    intra_rd_refine( h, &analysis );
                 }
                 else if( i_partition == D_16x16 )
                 {
@@ -3387,7 +3387,7 @@ skip_analysis:
                 }
                 else if( i_partition == D_8x8 )
                 {
-                    x264_analyse_update_cache( h, &analysis );
+                    analyse_update_cache( h, &analysis );
                     for( int i8x8 = 0; i8x8 < 4; i8x8++ )
                     {
                         if( h->mb.i_sub_partition[i8x8] == D_L0_8x8 )
@@ -3422,7 +3422,7 @@ skip_analysis:
         int b_skip = 0;
 
         if( analysis.i_mbrd )
-            x264_mb_init_fenc_cache( h, analysis.i_mbrd >= 2 );
+            mb_init_fenc_cache( h, analysis.i_mbrd >= 2 );
 
         h->mb.i_type = B_SKIP;
         if( h->mb.b_direct_auto_write )
@@ -3490,14 +3490,14 @@ skip_analysis:
             h->mb.b_skip_mc = 0;
             h->mb.i_type = B_DIRECT;
 
-            x264_mb_analyse_load_costs( h, &analysis );
+            mb_analyse_load_costs( h, &analysis );
 
             /* select best inter mode */
             /* direct must be first */
             if( analysis.b_direct_available )
-                x264_mb_analyse_inter_direct( h, &analysis );
+                mb_analyse_inter_direct( h, &analysis );
 
-            x264_mb_analyse_inter_b16x16( h, &analysis );
+            mb_analyse_inter_b16x16( h, &analysis );
 
             if( h->mb.i_type == B_SKIP )
             {
@@ -3517,14 +3517,14 @@ skip_analysis:
 
             if( analysis.i_mbrd && analysis.b_early_terminate && analysis.i_cost16x16direct <= i_cost * 33/32 )
             {
-                x264_mb_analyse_b_rd( h, &analysis, i_cost );
+                mb_analyse_b_rd( h, &analysis, i_cost );
                 if( i_bskip_cost < analysis.i_rd16x16direct &&
                     i_bskip_cost < analysis.i_rd16x16bi &&
                     i_bskip_cost < analysis.l0.i_rd16x16 &&
                     i_bskip_cost < analysis.l1.i_rd16x16 )
                 {
                     h->mb.i_type = B_SKIP;
-                    x264_analyse_update_cache( h, &analysis );
+                    analyse_update_cache( h, &analysis );
                     return;
                 }
             }
@@ -3532,9 +3532,9 @@ skip_analysis:
             if( flags & X264_ANALYSE_BSUB16x16 )
             {
                 if( h->param.analyse.b_mixed_references )
-                    x264_mb_analyse_inter_b8x8_mixed_ref( h, &analysis );
+                    mb_analyse_inter_b8x8_mixed_ref( h, &analysis );
                 else
-                    x264_mb_analyse_inter_b8x8( h, &analysis );
+                    mb_analyse_inter_b8x8( h, &analysis );
 
                 COPY3_IF_LT( i_cost, analysis.i_cost8x8bi, i_type, B_8x8, i_partition, D_8x8 );
 
@@ -3584,17 +3584,17 @@ skip_analysis:
                 int try_16x8_first = i_cost_est16x8bi_total < i_cost_est8x16bi_total;
                 if( try_16x8_first && (!analysis.b_early_terminate || i_cost_est16x8bi_total < i_cost) )
                 {
-                    x264_mb_analyse_inter_b16x8( h, &analysis, i_cost );
+                    mb_analyse_inter_b16x8( h, &analysis, i_cost );
                     COPY3_IF_LT( i_cost, analysis.i_cost16x8bi, i_type, analysis.i_mb_type16x8, i_partition, D_16x8 );
                 }
                 if( !analysis.b_early_terminate || i_cost_est8x16bi_total < i_cost )
                 {
-                    x264_mb_analyse_inter_b8x16( h, &analysis, i_cost );
+                    mb_analyse_inter_b8x16( h, &analysis, i_cost );
                     COPY3_IF_LT( i_cost, analysis.i_cost8x16bi, i_type, analysis.i_mb_type8x16, i_partition, D_8x16 );
                 }
                 if( !try_16x8_first && (!analysis.b_early_terminate || i_cost_est16x8bi_total < i_cost) )
                 {
-                    x264_mb_analyse_inter_b16x8( h, &analysis, i_cost );
+                    mb_analyse_inter_b16x8( h, &analysis, i_cost );
                     COPY3_IF_LT( i_cost, analysis.i_cost16x8bi, i_type, analysis.i_mb_type16x8, i_partition, D_16x8 );
                 }
             }
@@ -3686,7 +3686,7 @@ skip_analysis:
 
             if( analysis.i_mbrd )
             {
-                x264_mb_analyse_b_rd( h, &analysis, i_satd_inter );
+                mb_analyse_b_rd( h, &analysis, i_satd_inter );
                 i_type = B_SKIP;
                 i_cost = i_bskip_cost;
                 i_partition = D_16x16;
@@ -3706,25 +3706,25 @@ skip_analysis:
             {
                 if( CHROMA444 )
                 {
-                    x264_mb_analyse_intra( h, &analysis, i_satd_inter );
-                    x264_mb_analyse_intra_chroma( h, &analysis );
+                    mb_analyse_intra( h, &analysis, i_satd_inter );
+                    mb_analyse_intra_chroma( h, &analysis );
                 }
                 else
                 {
-                    x264_mb_analyse_intra_chroma( h, &analysis );
-                    x264_mb_analyse_intra( h, &analysis, i_satd_inter - analysis.i_satd_chroma );
+                    mb_analyse_intra_chroma( h, &analysis );
+                    mb_analyse_intra( h, &analysis, i_satd_inter - analysis.i_satd_chroma );
                 }
                 analysis.i_satd_i16x16 += analysis.i_satd_chroma;
                 analysis.i_satd_i8x8   += analysis.i_satd_chroma;
                 analysis.i_satd_i4x4   += analysis.i_satd_chroma;
             }
             else
-                x264_mb_analyse_intra( h, &analysis, i_satd_inter );
+                mb_analyse_intra( h, &analysis, i_satd_inter );
 
             if( analysis.i_mbrd )
             {
-                x264_mb_analyse_transform_rd( h, &analysis, &i_satd_inter, &i_cost );
-                x264_intra_rd( h, &analysis, i_satd_inter * 17/16 + 1 );
+                mb_analyse_transform_rd( h, &analysis, &i_satd_inter, &i_cost );
+                intra_rd( h, &analysis, i_satd_inter * 17/16 + 1 );
             }
 
             COPY2_IF_LT( i_cost, analysis.i_satd_i16x16, i_type, I_16x16 );
@@ -3736,14 +3736,14 @@ skip_analysis:
             h->mb.i_partition = i_partition;
 
             if( analysis.i_mbrd >= 2 && IS_INTRA( i_type ) && i_type != I_PCM )
-                x264_intra_rd_refine( h, &analysis );
+                intra_rd_refine( h, &analysis );
             if( h->mb.i_subpel_refine >= 5 )
-                x264_refine_bidir( h, &analysis );
+                refine_bidir( h, &analysis );
 
             if( analysis.i_mbrd >= 2 && i_type > B_DIRECT && i_type < B_SKIP )
             {
                 int i_biweight;
-                x264_analyse_update_cache( h, &analysis );
+                analyse_update_cache( h, &analysis );
 
                 if( i_partition == D_16x16 )
                 {
@@ -3814,7 +3814,7 @@ skip_analysis:
         }
     }
 
-    x264_analyse_update_cache( h, &analysis );
+    analyse_update_cache( h, &analysis );
 
     /* In rare cases we can end up qpel-RDing our way back to a larger partition size
      * without realizing it.  Check for this and account for it if necessary. */
@@ -3830,22 +3830,22 @@ skip_analysis:
     }
 
     if( !analysis.i_mbrd )
-        x264_mb_analyse_transform( h );
+        mb_analyse_transform( h );
 
     if( analysis.i_mbrd == 3 && !IS_SKIP(h->mb.i_type) )
-        x264_mb_analyse_qp_rd( h, &analysis );
+        mb_analyse_qp_rd( h, &analysis );
 
     h->mb.b_trellis = h->param.analyse.i_trellis;
     h->mb.b_noise_reduction = h->mb.b_noise_reduction || (!!h->param.analyse.i_noise_reduction && !IS_INTRA( h->mb.i_type ));
 
     if( !IS_SKIP(h->mb.i_type) && h->mb.i_psy_trellis && h->param.analyse.i_trellis == 1 )
-        x264_psy_trellis_init( h, 0 );
+        psy_trellis_init( h, 0 );
     if( h->mb.b_trellis == 1 || h->mb.b_noise_reduction )
         h->mb.i_skip_intra = 0;
 }
 
 /*-------------------- Update MB from the analysis ----------------------*/
-static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
+static void analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
 {
     switch( h->mb.i_type )
     {
@@ -3853,17 +3853,17 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
             for( int i = 0; i < 16; i++ )
                 h->mb.cache.intra4x4_pred_mode[x264_scan8[i]] = a->i_predict4x4[i];
 
-            x264_mb_analyse_intra_chroma( h, a );
+            mb_analyse_intra_chroma( h, a );
             break;
         case I_8x8:
             for( int i = 0; i < 4; i++ )
                 x264_macroblock_cache_intra8x8_pred( h, 2*(i&1), 2*(i>>1), a->i_predict8x8[i] );
 
-            x264_mb_analyse_intra_chroma( h, a );
+            mb_analyse_intra_chroma( h, a );
             break;
         case I_16x16:
             h->mb.i_intra16x16_pred_mode = a->i_predict16x16;
-            x264_mb_analyse_intra_chroma( h, a );
+            mb_analyse_intra_chroma( h, a );
             break;
 
         case I_PCM:
@@ -3903,7 +3903,7 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
             x264_macroblock_cache_ref( h, 0, 2, 2, 2, 0, a->l0.me8x8[2].i_ref );
             x264_macroblock_cache_ref( h, 2, 2, 2, 2, 0, a->l0.me8x8[3].i_ref );
             for( int i = 0; i < 4; i++ )
-                x264_mb_cache_mv_p8x8( h, a, i );
+                mb_cache_mv_p8x8( h, a, i );
             break;
 
         case P_SKIP:
@@ -3917,16 +3917,16 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
         case B_SKIP:
         case B_DIRECT:
             h->mb.i_partition = h->mb.cache.direct_partition;
-            x264_mb_load_mv_direct8x8( h, 0 );
-            x264_mb_load_mv_direct8x8( h, 1 );
-            x264_mb_load_mv_direct8x8( h, 2 );
-            x264_mb_load_mv_direct8x8( h, 3 );
+            mb_load_mv_direct8x8( h, 0 );
+            mb_load_mv_direct8x8( h, 1 );
+            mb_load_mv_direct8x8( h, 2 );
+            mb_load_mv_direct8x8( h, 3 );
             break;
 
         case B_8x8:
             /* optimize: cache might not need to be rewritten */
             for( int i = 0; i < 4; i++ )
-                x264_mb_cache_mv_b8x8( h, a, i, 1 );
+                mb_cache_mv_b8x8( h, a, i, 1 );
             break;
 
         default: /* the rest of the B types */
@@ -3961,12 +3961,12 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
                 }
                 break;
             case D_16x8:
-                x264_mb_cache_mv_b16x8( h, a, 0, 1 );
-                x264_mb_cache_mv_b16x8( h, a, 1, 1 );
+                mb_cache_mv_b16x8( h, a, 0, 1 );
+                mb_cache_mv_b16x8( h, a, 1, 1 );
                 break;
             case D_8x16:
-                x264_mb_cache_mv_b8x16( h, a, 0, 1 );
-                x264_mb_cache_mv_b8x16( h, a, 1, 1 );
+                mb_cache_mv_b8x16( h, a, 0, 1 );
+                mb_cache_mv_b8x16( h, a, 1, 1 );
                 break;
             default:
                 x264_log( h, X264_LOG_ERROR, "internal error (invalid MB type)\n" );
@@ -3995,10 +3995,10 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a  )
                 x264_log( h, X264_LOG_DEBUG, "mb_xy: %d,%d \n", h->mb.i_mb_x, h->mb.i_mb_y);
                 x264_log( h, X264_LOG_DEBUG, "completed: %d \n", completed );
                 x264_log( h, X264_LOG_WARNING, "recovering by using intra mode\n");
-                x264_mb_analyse_intra( h, a, COST_MAX );
+                mb_analyse_intra( h, a, COST_MAX );
                 h->mb.i_type = I_16x16;
                 h->mb.i_intra16x16_pred_mode = a->i_predict16x16;
-                x264_mb_analyse_intra_chroma( h, a );
+                mb_analyse_intra_chroma( h, a );
             }
         }
     }
index 9debd1e..2465a5e 100644 (file)
@@ -32,7 +32,7 @@
 #define RDO_SKIP_BS 0
 #endif
 
-static inline void x264_cabac_mb_type_intra( x264_t *h, x264_cabac_t *cb, int i_mb_type,
+static inline void cabac_mb_type_intra( x264_t *h, x264_cabac_t *cb, int i_mb_type,
                     int ctx0, int ctx1, int ctx2, int ctx3, int ctx4, int ctx5 )
 {
     if( i_mb_type == I_4x4 || i_mb_type == I_8x8 )
@@ -67,7 +67,7 @@ static inline void x264_cabac_mb_type_intra( x264_t *h, x264_cabac_t *cb, int i_
 }
 
 #if !RDO_SKIP_BS
-static void x264_cabac_field_decoding_flag( x264_t *h, x264_cabac_t *cb )
+static void cabac_field_decoding_flag( x264_t *h, x264_cabac_t *cb )
 {
     int ctx = 0;
     ctx += h->mb.field_decoding_flag & !!h->mb.i_mb_x;
@@ -80,7 +80,7 @@ static void x264_cabac_field_decoding_flag( x264_t *h, x264_cabac_t *cb )
 }
 #endif
 
-static void x264_cabac_intra4x4_pred_mode( x264_cabac_t *cb, int i_pred, int i_mode )
+static void cabac_intra4x4_pred_mode( x264_cabac_t *cb, int i_pred, int i_mode )
 {
     if( i_pred == i_mode )
         x264_cabac_encode_decision( cb, 68, 1 );
@@ -95,7 +95,7 @@ static void x264_cabac_intra4x4_pred_mode( x264_cabac_t *cb, int i_pred, int i_m
     }
 }
 
-static void x264_cabac_intra_chroma_pred_mode( x264_t *h, x264_cabac_t *cb )
+static void cabac_intra_chroma_pred_mode( x264_t *h, x264_cabac_t *cb )
 {
     int i_mode = x264_mb_chroma_pred_mode_fix[h->mb.i_chroma_pred_mode];
     int ctx = 0;
@@ -115,7 +115,7 @@ static void x264_cabac_intra_chroma_pred_mode( x264_t *h, x264_cabac_t *cb )
     }
 }
 
-static void x264_cabac_cbp_luma( x264_t *h, x264_cabac_t *cb )
+static void cabac_cbp_luma( x264_t *h, x264_cabac_t *cb )
 {
     int cbp = h->mb.i_cbp_luma;
     int cbp_l = h->mb.cache.i_cbp_left;
@@ -126,7 +126,7 @@ static void x264_cabac_cbp_luma( x264_t *h, x264_cabac_t *cb )
     x264_cabac_encode_decision_noup( cb, 76 - ((cbp   >> 2) & 1) - ((cbp   >> 0) & 2), (cbp >> 3) & 1 );
 }
 
-static void x264_cabac_cbp_chroma( x264_t *h, x264_cabac_t *cb )
+static void cabac_cbp_chroma( x264_t *h, x264_cabac_t *cb )
 {
     int cbp_a = h->mb.cache.i_cbp_left & 0x30;
     int cbp_b = h->mb.cache.i_cbp_top  & 0x30;
@@ -147,7 +147,7 @@ static void x264_cabac_cbp_chroma( x264_t *h, x264_cabac_t *cb )
     }
 }
 
-static void x264_cabac_qp_delta( x264_t *h, x264_cabac_t *cb )
+static void cabac_qp_delta( x264_t *h, x264_cabac_t *cb )
 {
     int i_dqp = h->mb.i_qp - h->mb.i_last_qp;
     int ctx;
@@ -195,7 +195,7 @@ void x264_cabac_mb_skip( x264_t *h, int b_skip )
 }
 #endif
 
-static inline void x264_cabac_subpartition_p( x264_cabac_t *cb, int i_sub )
+static inline void cabac_subpartition_p( x264_cabac_t *cb, int i_sub )
 {
     if( i_sub == D_L0_8x8 )
     {
@@ -212,7 +212,7 @@ static inline void x264_cabac_subpartition_p( x264_cabac_t *cb, int i_sub )
     }
 }
 
-static ALWAYS_INLINE void x264_cabac_subpartition_b( x264_cabac_t *cb, int i_sub )
+static ALWAYS_INLINE void cabac_subpartition_b( x264_cabac_t *cb, int i_sub )
 {
     if( i_sub == D_DIRECT_8x8 )
     {
@@ -232,13 +232,13 @@ static ALWAYS_INLINE void x264_cabac_subpartition_b( x264_cabac_t *cb, int i_sub
     x264_cabac_encode_decision( cb, 39, i_sub == D_L1_8x8 );
 }
 
-static ALWAYS_INLINE void x264_cabac_transform_size( x264_t *h, x264_cabac_t *cb )
+static ALWAYS_INLINE void cabac_transform_size( x264_t *h, x264_cabac_t *cb )
 {
     int ctx = 399 + h->mb.cache.i_neighbour_transform_size;
     x264_cabac_encode_decision_noup( cb, ctx, h->mb.b_transform_8x8 );
 }
 
-static ALWAYS_INLINE void x264_cabac_ref_internal( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int bframe )
+static ALWAYS_INLINE void cabac_ref_internal( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int bframe )
 {
     const int i8 = x264_scan8[idx];
     const int i_refa = h->mb.cache.ref[i_list][i8 - 1];
@@ -258,16 +258,16 @@ static ALWAYS_INLINE void x264_cabac_ref_internal( x264_t *h, x264_cabac_t *cb,
     x264_cabac_encode_decision( cb, 54 + ctx, 0 );
 }
 
-static NOINLINE void x264_cabac_ref_p( x264_t *h, x264_cabac_t *cb, int idx )
+static NOINLINE void cabac_ref_p( x264_t *h, x264_cabac_t *cb, int idx )
 {
-    x264_cabac_ref_internal( h, cb, 0, idx, 0 );
+    cabac_ref_internal( h, cb, 0, idx, 0 );
 }
-static NOINLINE void x264_cabac_ref_b( x264_t *h, x264_cabac_t *cb, int i_list, int idx )
+static NOINLINE void cabac_ref_b( x264_t *h, x264_cabac_t *cb, int i_list, int idx )
 {
-    x264_cabac_ref_internal( h, cb, i_list, idx, 1 );
+    cabac_ref_internal( h, cb, i_list, idx, 1 );
 }
 
-static ALWAYS_INLINE int x264_cabac_mvd_cpn( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int l, int mvd, int ctx )
+static ALWAYS_INLINE int cabac_mvd_cpn( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int l, int mvd, int ctx )
 {
     int ctxbase = l ? 47 : 40;
 
@@ -326,7 +326,7 @@ static ALWAYS_INLINE int x264_cabac_mvd_cpn( x264_t *h, x264_cabac_t *cb, int i_
     return X264_MIN( i_abs, 66 );
 }
 
-static NOINLINE uint16_t x264_cabac_mvd( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int width )
+static NOINLINE uint16_t cabac_mvd( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int width )
 {
     ALIGNED_4( int16_t mvp[2] );
     int mdx, mdy;
@@ -339,46 +339,46 @@ static NOINLINE uint16_t x264_cabac_mvd( x264_t *h, x264_cabac_t *cb, int i_list
                                        h->mb.cache.mvd[i_list][x264_scan8[idx] - 8]);
 
     /* encode */
-    mdx = x264_cabac_mvd_cpn( h, cb, i_list, idx, 0, mdx, amvd&0xFF );
-    mdy = x264_cabac_mvd_cpn( h, cb, i_list, idx, 1, mdy, amvd>>8 );
+    mdx = cabac_mvd_cpn( h, cb, i_list, idx, 0, mdx, amvd&0xFF );
+    mdy = cabac_mvd_cpn( h, cb, i_list, idx, 1, mdy, amvd>>8 );
 
     return pack8to16(mdx,mdy);
 }
 
-#define x264_cabac_mvd(h,cb,i_list,idx,width,height)\
+#define cabac_mvd(h,cb,i_list,idx,width,height)\
 do\
 {\
-    uint16_t mvd = x264_cabac_mvd(h,cb,i_list,idx,width);\
+    uint16_t mvd = cabac_mvd(h,cb,i_list,idx,width);\
     x264_macroblock_cache_mvd( h, block_idx_x[idx], block_idx_y[idx], width, height, i_list, mvd );\
 } while( 0 )
 
-static inline void x264_cabac_8x8_mvd( x264_t *h, x264_cabac_t *cb, int i )
+static inline void cabac_8x8_mvd( x264_t *h, x264_cabac_t *cb, int i )
 {
     switch( h->mb.i_sub_partition[i] )
     {
         case D_L0_8x8:
-            x264_cabac_mvd( h, cb, 0, 4*i, 2, 2 );
+            cabac_mvd( h, cb, 0, 4*i, 2, 2 );
             break;
         case D_L0_8x4:
-            x264_cabac_mvd( h, cb, 0, 4*i+0, 2, 1 );
-            x264_cabac_mvd( h, cb, 0, 4*i+2, 2, 1 );
+            cabac_mvd( h, cb, 0, 4*i+0, 2, 1 );
+            cabac_mvd( h, cb, 0, 4*i+2, 2, 1 );
             break;
         case D_L0_4x8:
-            x264_cabac_mvd( h, cb, 0, 4*i+0, 1, 2 );
-            x264_cabac_mvd( h, cb, 0, 4*i+1, 1, 2 );
+            cabac_mvd( h, cb, 0, 4*i+0, 1, 2 );
+            cabac_mvd( h, cb, 0, 4*i+1, 1, 2 );
             break;
         case D_L0_4x4:
-            x264_cabac_mvd( h, cb, 0, 4*i+0, 1, 1 );
-            x264_cabac_mvd( h, cb, 0, 4*i+1, 1, 1 );
-            x264_cabac_mvd( h, cb, 0, 4*i+2, 1, 1 );
-            x264_cabac_mvd( h, cb, 0, 4*i+3, 1, 1 );
+            cabac_mvd( h, cb, 0, 4*i+0, 1, 1 );
+            cabac_mvd( h, cb, 0, 4*i+1, 1, 1 );
+            cabac_mvd( h, cb, 0, 4*i+2, 1, 1 );
+            cabac_mvd( h, cb, 0, 4*i+3, 1, 1 );
             break;
         default:
             assert(0);
     }
 }
 
-static ALWAYS_INLINE void x264_cabac_mb_header_i( x264_t *h, x264_cabac_t *cb, int i_mb_type, int slice_type, int chroma )
+static ALWAYS_INLINE void cabac_mb_header_i( x264_t *h, x264_cabac_t *cb, int i_mb_type, int slice_type, int chroma )
 {
     if( slice_type == SLICE_TYPE_I )
     {
@@ -388,7 +388,7 @@ static ALWAYS_INLINE void x264_cabac_mb_header_i( x264_t *h, x264_cabac_t *cb, i
         if( (h->mb.i_neighbour & MB_TOP) && h->mb.i_mb_type_top != I_4x4 )
             ctx++;
 
-        x264_cabac_mb_type_intra( h, cb, i_mb_type, 3+ctx, 3+3, 3+4, 3+5, 3+6, 3+7 );
+        cabac_mb_type_intra( h, cb, i_mb_type, 3+ctx, 3+3, 3+4, 3+5, 3+6, 3+7 );
     }
     else if( slice_type == SLICE_TYPE_P )
     {
@@ -396,7 +396,7 @@ static ALWAYS_INLINE void x264_cabac_mb_header_i( x264_t *h, x264_cabac_t *cb, i
         x264_cabac_encode_decision_noup( cb, 14, 1 );
 
         /* suffix */
-        x264_cabac_mb_type_intra( h, cb, i_mb_type, 17+0, 17+1, 17+2, 17+2, 17+3, 17+3 );
+        cabac_mb_type_intra( h, cb, i_mb_type, 17+0, 17+1, 17+2, 17+2, 17+3, 17+3 );
     }
     else if( slice_type == SLICE_TYPE_B )
     {
@@ -408,7 +408,7 @@ static ALWAYS_INLINE void x264_cabac_mb_header_i( x264_t *h, x264_cabac_t *cb, i
         x264_cabac_encode_decision( cb, 27+5,   1 );
 
         /* suffix */
-        x264_cabac_mb_type_intra( h, cb, i_mb_type, 32+0, 32+1, 32+2, 32+2, 32+3, 32+3 );
+        cabac_mb_type_intra( h, cb, i_mb_type, 32+0, 32+1, 32+2, 32+2, 32+3, 32+3 );
     }
 
     if( i_mb_type == I_PCM )
@@ -417,22 +417,22 @@ static ALWAYS_INLINE void x264_cabac_mb_header_i( x264_t *h, x264_cabac_t *cb, i
     if( i_mb_type != I_16x16 )
     {
         if( h->pps->b_transform_8x8_mode )
-            x264_cabac_transform_size( h, cb );
+            cabac_transform_size( h, cb );
 
         int di = h->mb.b_transform_8x8 ? 4 : 1;
         for( int i = 0; i < 16; i += di )
         {
             const int i_pred = x264_mb_predict_intra4x4_mode( h, i );
             const int i_mode = x264_mb_pred_mode4x4_fix( h->mb.cache.intra4x4_pred_mode[x264_scan8[i]] );
-            x264_cabac_intra4x4_pred_mode( cb, i_pred, i_mode );
+            cabac_intra4x4_pred_mode( cb, i_pred, i_mode );
         }
     }
 
     if( chroma )
-        x264_cabac_intra_chroma_pred_mode( h, cb );
+        cabac_intra_chroma_pred_mode( h, cb );
 }
 
-static ALWAYS_INLINE void x264_cabac_mb_header_p( x264_t *h, x264_cabac_t *cb, int i_mb_type, int chroma )
+static ALWAYS_INLINE void cabac_mb_header_p( x264_t *h, x264_cabac_t *cb, int i_mb_type, int chroma )
 {
     if( i_mb_type == P_L0 )
     {
@@ -442,8 +442,8 @@ static ALWAYS_INLINE void x264_cabac_mb_header_p( x264_t *h, x264_cabac_t *cb, i
             x264_cabac_encode_decision_noup( cb, 15, 0 );
             x264_cabac_encode_decision_noup( cb, 16, 0 );
             if( h->mb.pic.i_fref[0] > 1 )
-                x264_cabac_ref_p( h, cb, 0 );
-            x264_cabac_mvd( h, cb, 0, 0, 4, 4 );
+                cabac_ref_p( h, cb, 0 );
+            cabac_mvd( h, cb, 0, 0, 4, 4 );
         }
         else if( h->mb.i_partition == D_16x8 )
         {
@@ -451,11 +451,11 @@ static ALWAYS_INLINE void x264_cabac_mb_header_p( x264_t *h, x264_cabac_t *cb, i
             x264_cabac_encode_decision_noup( cb, 17, 1 );
             if( h->mb.pic.i_fref[0] > 1 )
             {
-                x264_cabac_ref_p( h, cb, 0 );
-                x264_cabac_ref_p( h, cb, 8 );
+                cabac_ref_p( h, cb, 0 );
+                cabac_ref_p( h, cb, 8 );
             }
-            x264_cabac_mvd( h, cb, 0, 0, 4, 2 );
-            x264_cabac_mvd( h, cb, 0, 8, 4, 2 );
+            cabac_mvd( h, cb, 0, 0, 4, 2 );
+            cabac_mvd( h, cb, 0, 8, 4, 2 );
         }
         else //if( h->mb.i_partition == D_8x16 )
         {
@@ -463,11 +463,11 @@ static ALWAYS_INLINE void x264_cabac_mb_header_p( x264_t *h, x264_cabac_t *cb, i
             x264_cabac_encode_decision_noup( cb, 17, 0 );
             if( h->mb.pic.i_fref[0] > 1 )
             {
-                x264_cabac_ref_p( h, cb, 0 );
-                x264_cabac_ref_p( h, cb, 4 );
+                cabac_ref_p( h, cb, 0 );
+                cabac_ref_p( h, cb, 4 );
             }
-            x264_cabac_mvd( h, cb, 0, 0, 2, 4 );
-            x264_cabac_mvd( h, cb, 0, 4, 2, 4 );
+            cabac_mvd( h, cb, 0, 0, 2, 4 );
+            cabac_mvd( h, cb, 0, 4, 2, 4 );
         }
     }
     else if( i_mb_type == P_8x8 )
@@ -478,25 +478,25 @@ static ALWAYS_INLINE void x264_cabac_mb_header_p( x264_t *h, x264_cabac_t *cb, i
 
         /* sub mb type */
         for( int i = 0; i < 4; i++ )
-            x264_cabac_subpartition_p( cb, h->mb.i_sub_partition[i] );
+            cabac_subpartition_p( cb, h->mb.i_sub_partition[i] );
 
         /* ref 0 */
         if( h->mb.pic.i_fref[0] > 1 )
         {
-            x264_cabac_ref_p( h, cb,  0 );
-            x264_cabac_ref_p( h, cb,  4 );
-            x264_cabac_ref_p( h, cb,  8 );
-            x264_cabac_ref_p( h, cb, 12 );
+            cabac_ref_p( h, cb,  0 );
+            cabac_ref_p( h, cb,  4 );
+            cabac_ref_p( h, cb,  8 );
+            cabac_ref_p( h, cb, 12 );
         }
 
         for( int i = 0; i < 4; i++ )
-            x264_cabac_8x8_mvd( h, cb, i );
+            cabac_8x8_mvd( h, cb, i );
     }
     else /* intra */
-        x264_cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_P, chroma );
+        cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_P, chroma );
 }
 
-static ALWAYS_INLINE void x264_cabac_mb_header_b( x264_t *h, x264_cabac_t *cb, int i_mb_type, int chroma )
+static ALWAYS_INLINE void cabac_mb_header_b( x264_t *h, x264_cabac_t *cb, int i_mb_type, int chroma )
 {
     int ctx = 0;
     if( (h->mb.i_neighbour & MB_LEFT) && h->mb.i_mb_type_left[0] != B_SKIP && h->mb.i_mb_type_left[0] != B_DIRECT )
@@ -521,26 +521,26 @@ static ALWAYS_INLINE void x264_cabac_mb_header_b( x264_t *h, x264_cabac_t *cb, i
 
         /* sub mb type */
         for( int i = 0; i < 4; i++ )
-            x264_cabac_subpartition_b( cb, h->mb.i_sub_partition[i] );
+            cabac_subpartition_b( cb, h->mb.i_sub_partition[i] );
 
         /* ref */
         if( h->mb.pic.i_fref[0] > 1 )
             for( int i = 0; i < 4; i++ )
                 if( x264_mb_partition_listX_table[0][ h->mb.i_sub_partition[i] ] )
-                    x264_cabac_ref_b( h, cb, 0, 4*i );
+                    cabac_ref_b( h, cb, 0, 4*i );
 
         if( h->mb.pic.i_fref[1] > 1 )
             for( int i = 0; i < 4; i++ )
                 if( x264_mb_partition_listX_table[1][ h->mb.i_sub_partition[i] ] )
-                    x264_cabac_ref_b( h, cb, 1, 4*i );
+                    cabac_ref_b( h, cb, 1, 4*i );
 
         for( int i = 0; i < 4; i++ )
             if( x264_mb_partition_listX_table[0][ h->mb.i_sub_partition[i] ] )
-                x264_cabac_mvd( h, cb, 0, 4*i, 2, 2 );
+                cabac_mvd( h, cb, 0, 4*i, 2, 2 );
 
         for( int i = 0; i < 4; i++ )
             if( x264_mb_partition_listX_table[1][ h->mb.i_sub_partition[i] ] )
-                x264_cabac_mvd( h, cb, 1, 4*i, 2, 2 );
+                cabac_mvd( h, cb, 1, 4*i, 2, 2 );
     }
     else if( i_mb_type >= B_L0_L0 && i_mb_type <= B_BI_BI )
     {
@@ -576,40 +576,40 @@ static ALWAYS_INLINE void x264_cabac_mb_header_b( x264_t *h, x264_cabac_t *cb, i
         if( h->mb.pic.i_fref[0] > 1 )
         {
             if( b_list[0][0] )
-                x264_cabac_ref_b( h, cb, 0, 0 );
+                cabac_ref_b( h, cb, 0, 0 );
             if( b_list[0][1] && h->mb.i_partition != D_16x16 )
-                x264_cabac_ref_b( h, cb, 0, 8 >> (h->mb.i_partition == D_8x16) );
+                cabac_ref_b( h, cb, 0, 8 >> (h->mb.i_partition == D_8x16) );
         }
         if( h->mb.pic.i_fref[1] > 1 )
         {
             if( b_list[1][0] )
-                x264_cabac_ref_b( h, cb, 1, 0 );
+                cabac_ref_b( h, cb, 1, 0 );
             if( b_list[1][1] && h->mb.i_partition != D_16x16 )
-                x264_cabac_ref_b( h, cb, 1, 8 >> (h->mb.i_partition == D_8x16) );
+                cabac_ref_b( h, cb, 1, 8 >> (h->mb.i_partition == D_8x16) );
         }
         for( int i_list = 0; i_list < 2; i_list++ )
         {
             if( h->mb.i_partition == D_16x16 )
             {
-                if( b_list[i_list][0] ) x264_cabac_mvd( h, cb, i_list, 0, 4, 4 );
+                if( b_list[i_list][0] ) cabac_mvd( h, cb, i_list, 0, 4, 4 );
             }
             else if( h->mb.i_partition == D_16x8 )
             {
-                if( b_list[i_list][0] ) x264_cabac_mvd( h, cb, i_list, 0, 4, 2 );
-                if( b_list[i_list][1] ) x264_cabac_mvd( h, cb, i_list, 8, 4, 2 );
+                if( b_list[i_list][0] ) cabac_mvd( h, cb, i_list, 0, 4, 2 );
+                if( b_list[i_list][1] ) cabac_mvd( h, cb, i_list, 8, 4, 2 );
             }
             else //if( h->mb.i_partition == D_8x16 )
             {
-                if( b_list[i_list][0] ) x264_cabac_mvd( h, cb, i_list, 0, 2, 4 );
-                if( b_list[i_list][1] ) x264_cabac_mvd( h, cb, i_list, 4, 2, 4 );
+                if( b_list[i_list][0] ) cabac_mvd( h, cb, i_list, 0, 2, 4 );
+                if( b_list[i_list][1] ) cabac_mvd( h, cb, i_list, 4, 2, 4 );
             }
         }
     }
     else /* intra */
-        x264_cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_B, chroma );
+        cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_B, chroma );
 }
 
-static int ALWAYS_INLINE x264_cabac_cbf_ctxidxinc( x264_t *h, int i_cat, int i_idx, int b_intra, int b_dc )
+static int ALWAYS_INLINE 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};
 
@@ -709,7 +709,7 @@ static const uint8_t coeff_abs_level_transition[2][8] = {
 };
 
 #if !RDO_SKIP_BS
-static ALWAYS_INLINE void x264_cabac_block_residual_internal( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l, int chroma422dc )
+static ALWAYS_INLINE void cabac_block_residual_internal( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l, int chroma422dc )
 {
     int ctx_sig = x264_significant_coeff_flag_offset[MB_INTERLACED][ctx_block_cat];
     int ctx_last = x264_last_coeff_flag_offset[MB_INTERLACED][ctx_block_cat];
@@ -796,10 +796,10 @@ static ALWAYS_INLINE void x264_cabac_block_residual_internal( x264_t *h, x264_ca
 
 void x264_cabac_block_residual_c( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
 {
-    x264_cabac_block_residual_internal( h, cb, ctx_block_cat, l, 0 );
+    cabac_block_residual_internal( h, cb, ctx_block_cat, l, 0 );
 }
 
-static void ALWAYS_INLINE x264_cabac_block_residual( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
+static void ALWAYS_INLINE 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 );
@@ -807,19 +807,19 @@ static void ALWAYS_INLINE x264_cabac_block_residual( x264_t *h, x264_cabac_t *cb
     x264_cabac_block_residual_c( h, cb, ctx_block_cat, l );
 #endif
 }
-static void x264_cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
+static void cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
 {
     /* Template a version specifically for chroma 4:2:2 DC in order to avoid
      * slowing down everything else due to the added complexity. */
-    x264_cabac_block_residual_internal( h, cb, DCT_CHROMA_DC, l, 1 );
+    cabac_block_residual_internal( h, cb, DCT_CHROMA_DC, l, 1 );
 }
-#define x264_cabac_block_residual_8x8( h, cb, cat, l ) x264_cabac_block_residual( h, cb, cat, l )
+#define cabac_block_residual_8x8( h, cb, cat, l ) cabac_block_residual( h, cb, cat, l )
 #else
 
 /* 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 x264_cabac_block_residual_internal( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l, int b_8x8, int chroma422dc )
+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 )
 {
     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];
@@ -906,14 +906,14 @@ static void ALWAYS_INLINE x264_cabac_block_residual_internal( x264_t *h, x264_ca
 
 void x264_cabac_block_residual_8x8_rd_c( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
 {
-    x264_cabac_block_residual_internal( h, cb, ctx_block_cat, l, 1, 0 );
+    cabac_block_residual_internal( h, cb, ctx_block_cat, l, 1, 0 );
 }
 void x264_cabac_block_residual_rd_c( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
 {
-    x264_cabac_block_residual_internal( h, cb, ctx_block_cat, l, 0, 0 );
+    cabac_block_residual_internal( h, cb, ctx_block_cat, l, 0, 0 );
 }
 
-static ALWAYS_INLINE void x264_cabac_block_residual_8x8( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
+static ALWAYS_INLINE void cabac_block_residual_8x8( 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_8x8_rd_internal( l, MB_INTERLACED, ctx_block_cat, cb );
@@ -921,7 +921,7 @@ static ALWAYS_INLINE void x264_cabac_block_residual_8x8( x264_t *h, x264_cabac_t
     x264_cabac_block_residual_8x8_rd_c( h, cb, ctx_block_cat, l );
 #endif
 }
-static ALWAYS_INLINE void x264_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_rd_internal( l, MB_INTERLACED, ctx_block_cat, cb );
@@ -930,38 +930,38 @@ static ALWAYS_INLINE void x264_cabac_block_residual( x264_t *h, x264_cabac_t *cb
 #endif
 }
 
-static void x264_cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
+static void cabac_block_residual_422_dc( x264_t *h, x264_cabac_t *cb, int ctx_block_cat, dctcoef *l )
 {
-    x264_cabac_block_residual_internal( h, cb, DCT_CHROMA_DC, l, 0, 1 );
+    cabac_block_residual_internal( h, cb, DCT_CHROMA_DC, l, 0, 1 );
 }
 #endif
 
-#define x264_cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, b_dc, name )\
+#define cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, b_dc, name )\
 do\
 {\
-    int ctxidxinc = x264_cabac_cbf_ctxidxinc( h, ctx_block_cat, i_idx, b_intra, b_dc );\
+    int ctxidxinc = cabac_cbf_ctxidxinc( h, ctx_block_cat, i_idx, b_intra, b_dc );\
     if( h->mb.cache.non_zero_count[x264_scan8[i_idx]] )\
     {\
         x264_cabac_encode_decision( cb, ctxidxinc, 1 );\
-        x264_cabac_block_residual##name( h, cb, ctx_block_cat, l );\
+        cabac_block_residual##name( h, cb, ctx_block_cat, l );\
     }\
     else\
         x264_cabac_encode_decision( cb, ctxidxinc, 0 );\
 } while( 0 )
 
-#define x264_cabac_block_residual_dc_cbf( h, cb, ctx_block_cat, i_idx, l, b_intra )\
-    x264_cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, 1, )
+#define cabac_block_residual_dc_cbf( h, cb, ctx_block_cat, i_idx, l, b_intra )\
+    cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, 1, )
 
-#define x264_cabac_block_residual_cbf( h, cb, ctx_block_cat, i_idx, l, b_intra )\
-    x264_cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, 0, )
+#define cabac_block_residual_cbf( h, cb, ctx_block_cat, i_idx, l, b_intra )\
+    cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, 0, )
 
-#define x264_cabac_block_residual_8x8_cbf( h, cb, ctx_block_cat, i_idx, l, b_intra )\
-    x264_cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, 0, _8x8 )
+#define cabac_block_residual_8x8_cbf( h, cb, ctx_block_cat, i_idx, l, b_intra )\
+    cabac_block_residual_cbf_internal( h, cb, ctx_block_cat, i_idx, l, b_intra, 0, _8x8 )
 
-#define x264_cabac_block_residual_422_dc_cbf( h, cb, ch, b_intra )\
-    x264_cabac_block_residual_cbf_internal( h, cb, DCT_CHROMA_DC, CHROMA_DC+(ch), h->dct.chroma_dc[ch], b_intra, 1, _422_dc )
+#define cabac_block_residual_422_dc_cbf( h, cb, ch, b_intra )\
+    cabac_block_residual_cbf_internal( h, cb, DCT_CHROMA_DC, CHROMA_DC+(ch), h->dct.chroma_dc[ch], b_intra, 1, _422_dc )
 
-static ALWAYS_INLINE void x264_macroblock_write_cabac_internal( x264_t *h, x264_cabac_t *cb, int plane_count, int chroma )
+static ALWAYS_INLINE void macroblock_write_cabac_internal( x264_t *h, x264_cabac_t *cb, int plane_count, int chroma )
 {
     const int i_mb_type = h->mb.i_type;
 
@@ -972,16 +972,16 @@ static ALWAYS_INLINE void x264_macroblock_write_cabac_internal( x264_t *h, x264_
     if( SLICE_MBAFF &&
         (!(h->mb.i_mb_y & 1) || IS_SKIP(h->mb.type[h->mb.i_mb_xy - h->mb.i_mb_stride])) )
     {
-        x264_cabac_field_decoding_flag( h, cb );
+        cabac_field_decoding_flag( h, cb );
     }
 #endif
 
     if( h->sh.i_type == SLICE_TYPE_P )
-        x264_cabac_mb_header_p( h, cb, i_mb_type, chroma );
+        cabac_mb_header_p( h, cb, i_mb_type, chroma );
     else if( h->sh.i_type == SLICE_TYPE_B )
-        x264_cabac_mb_header_b( h, cb, i_mb_type, chroma );
+        cabac_mb_header_b( h, cb, i_mb_type, chroma );
     else //if( h->sh.i_type == SLICE_TYPE_I )
-        x264_cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_I, chroma );
+        cabac_mb_header_i( h, cb, i_mb_type, SLICE_TYPE_I, chroma );
 
 #if !RDO_SKIP_BS
     i_mb_pos_tex = x264_cabac_pos( cb );
@@ -1012,20 +1012,20 @@ static ALWAYS_INLINE void x264_macroblock_write_cabac_internal( x264_t *h, x264_
 
     if( i_mb_type != I_16x16 )
     {
-        x264_cabac_cbp_luma( h, cb );
+        cabac_cbp_luma( h, cb );
         if( chroma )
-            x264_cabac_cbp_chroma( h, cb );
+            cabac_cbp_chroma( h, cb );
     }
 
     if( x264_mb_transform_8x8_allowed( h ) && h->mb.i_cbp_luma )
     {
-        x264_cabac_transform_size( h, cb );
+        cabac_transform_size( h, cb );
     }
 
     if( h->mb.i_cbp_luma || (chroma && h->mb.i_cbp_chroma) || i_mb_type == I_16x16 )
     {
         const int b_intra = IS_INTRA( i_mb_type );
-        x264_cabac_qp_delta( h, cb );
+        cabac_qp_delta( h, cb );
 
         /* write residual */
         if( i_mb_type == I_16x16 )
@@ -1033,12 +1033,12 @@ static ALWAYS_INLINE void x264_macroblock_write_cabac_internal( x264_t *h, x264_
             /* DC Luma */
             for( int p = 0; p < plane_count; p++ )
             {
-                x264_cabac_block_residual_dc_cbf( h, cb, ctx_cat_plane[DCT_LUMA_DC][p], LUMA_DC+p, h->dct.luma16x16_dc[p], 1 );
+                cabac_block_residual_dc_cbf( h, cb, ctx_cat_plane[DCT_LUMA_DC][p], LUMA_DC+p, h->dct.luma16x16_dc[p], 1 );
 
                 /* AC Luma */
                 if( h->mb.i_cbp_luma )
                     for( int i = p*16; i < p*16+16; i++ )
-                        x264_cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_AC][p], i, h->dct.luma4x4[i]+1, 1 );
+                        cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_AC][p], i, h->dct.luma4x4[i]+1, 1 );
             }
         }
         else if( h->mb.b_transform_8x8 )
@@ -1086,14 +1086,14 @@ if( (h->mb.i_neighbour & MB_TOP) && !h->mb.mb_transform_size[h->mb.i_mb_top_xy]
 
                 for( int p = 0; p < 3; p++ )
                     FOREACH_BIT( i, 0, h->mb.i_cbp_luma )
-                        x264_cabac_block_residual_8x8_cbf( h, cb, ctx_cat_plane[DCT_LUMA_8x8][p], i*4+p*16, h->dct.luma8x8[i+p*4], b_intra );
+                        cabac_block_residual_8x8_cbf( h, cb, ctx_cat_plane[DCT_LUMA_8x8][p], i*4+p*16, h->dct.luma8x8[i+p*4], b_intra );
 
                 MUNGE_8x8_NNZ( RESTORE )
             }
             else
             {
                 FOREACH_BIT( i, 0, h->mb.i_cbp_luma )
-                    x264_cabac_block_residual_8x8( h, cb, DCT_LUMA_8x8, h->dct.luma8x8[i] );
+                    cabac_block_residual_8x8( h, cb, DCT_LUMA_8x8, h->dct.luma8x8[i] );
             }
         }
         else
@@ -1101,20 +1101,20 @@ if( (h->mb.i_neighbour & MB_TOP) && !h->mb.mb_transform_size[h->mb.i_mb_top_xy]
             for( int p = 0; p < plane_count; p++ )
                 FOREACH_BIT( i8x8, 0, h->mb.i_cbp_luma )
                     for( int i = 0; i < 4; i++ )
-                        x264_cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], i+i8x8*4+p*16, h->dct.luma4x4[i+i8x8*4+p*16], b_intra );
+                        cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], i+i8x8*4+p*16, h->dct.luma4x4[i+i8x8*4+p*16], b_intra );
         }
 
         if( chroma && h->mb.i_cbp_chroma ) /* Chroma DC residual present */
         {
             if( CHROMA_FORMAT == CHROMA_422 )
             {
-                x264_cabac_block_residual_422_dc_cbf( h, cb, 0, b_intra );
-                x264_cabac_block_residual_422_dc_cbf( h, cb, 1, b_intra );
+                cabac_block_residual_422_dc_cbf( h, cb, 0, b_intra );
+                cabac_block_residual_422_dc_cbf( h, cb, 1, b_intra );
             }
             else
             {
-                x264_cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+0, h->dct.chroma_dc[0], b_intra );
-                x264_cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+1, h->dct.chroma_dc[1], b_intra );
+                cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+0, h->dct.chroma_dc[0], b_intra );
+                cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+1, h->dct.chroma_dc[1], b_intra );
             }
 
             if( h->mb.i_cbp_chroma == 2 ) /* Chroma AC residual present */
@@ -1122,7 +1122,7 @@ if( (h->mb.i_neighbour & MB_TOP) && !h->mb.mb_transform_size[h->mb.i_mb_top_xy]
                 int step = 8 << CHROMA_V_SHIFT;
                 for( int i = 16; i < 3*16; i += step )
                     for( int j = i; j < i+4; j++ )
-                        x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, j, h->dct.luma4x4[j]+1, b_intra );
+                        cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, j, h->dct.luma4x4[j]+1, b_intra );
             }
         }
     }
@@ -1135,9 +1135,9 @@ if( (h->mb.i_neighbour & MB_TOP) && !h->mb.mb_transform_size[h->mb.i_mb_top_xy]
 void x264_macroblock_write_cabac( x264_t *h, x264_cabac_t *cb )
 {
     if( CHROMA444 )
-        x264_macroblock_write_cabac_internal( h, cb, 3, 0 );
+        macroblock_write_cabac_internal( h, cb, 3, 0 );
     else
-        x264_macroblock_write_cabac_internal( h, cb, 1, 1 );
+        macroblock_write_cabac_internal( h, cb, 1, 1 );
 }
 
 #if RDO_SKIP_BS
@@ -1148,7 +1148,7 @@ void x264_macroblock_write_cabac( x264_t *h, x264_cabac_t *cb )
  * only writes subpartition for p8x8, needed for sub-8x8 mode decision RDO
  * works on all partition sizes except 16x16
  *****************************************************************************/
-static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int i_pixel )
+static void 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 b_8x16 = h->mb.i_partition == D_8x16;
@@ -1156,22 +1156,22 @@ static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int
 
     if( i_mb_type == P_8x8 )
     {
-        x264_cabac_8x8_mvd( h, cb, i8 );
-        x264_cabac_subpartition_p( cb, h->mb.i_sub_partition[i8] );
+        cabac_8x8_mvd( h, cb, i8 );
+        cabac_subpartition_p( cb, h->mb.i_sub_partition[i8] );
     }
     else if( i_mb_type == P_L0 )
-        x264_cabac_mvd( h, cb, 0, 4*i8, 4>>b_8x16, 2<<b_8x16 );
+        cabac_mvd( h, cb, 0, 4*i8, 4>>b_8x16, 2<<b_8x16 );
     else if( i_mb_type > B_DIRECT && i_mb_type < B_8x8 )
     {
-        if( x264_mb_type_list_table[ i_mb_type ][0][!!i8] ) x264_cabac_mvd( h, cb, 0, 4*i8, 4>>b_8x16, 2<<b_8x16 );
-        if( x264_mb_type_list_table[ i_mb_type ][1][!!i8] ) x264_cabac_mvd( h, cb, 1, 4*i8, 4>>b_8x16, 2<<b_8x16 );
+        if( x264_mb_type_list_table[ i_mb_type ][0][!!i8] ) cabac_mvd( h, cb, 0, 4*i8, 4>>b_8x16, 2<<b_8x16 );
+        if( x264_mb_type_list_table[ i_mb_type ][1][!!i8] ) cabac_mvd( h, cb, 1, 4*i8, 4>>b_8x16, 2<<b_8x16 );
     }
     else //if( i_mb_type == B_8x8 )
     {
         if( x264_mb_partition_listX_table[0][ h->mb.i_sub_partition[i8] ] )
-            x264_cabac_mvd( h, cb, 0, 4*i8, 2, 2 );
+            cabac_mvd( h, cb, 0, 4*i8, 2, 2 );
         if( x264_mb_partition_listX_table[1][ h->mb.i_sub_partition[i8] ] )
-            x264_cabac_mvd( h, cb, 1, 4*i8, 2, 2 );
+            cabac_mvd( h, cb, 1, 4*i8, 2, 2 );
     }
 
     for( int j = (i_pixel < PIXEL_8x8); j >= 0; j-- )
@@ -1182,14 +1182,14 @@ static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int
             {
                 if( CHROMA444 )
                     for( int p = 0; p < 3; p++ )
-                        x264_cabac_block_residual_8x8_cbf( h, cb, ctx_cat_plane[DCT_LUMA_8x8][p], i8*4+p*16, h->dct.luma8x8[i8+p*4], 0 );
+                        cabac_block_residual_8x8_cbf( h, cb, ctx_cat_plane[DCT_LUMA_8x8][p], i8*4+p*16, h->dct.luma8x8[i8+p*4], 0 );
                 else
-                    x264_cabac_block_residual_8x8( h, cb, DCT_LUMA_8x8, h->dct.luma8x8[i8] );
+                    cabac_block_residual_8x8( h, cb, DCT_LUMA_8x8, h->dct.luma8x8[i8] );
             }
             else
                 for( int p = 0; p < plane_count; p++ )
                     for( int i4 = 0; i4 < 4; i4++ )
-                        x264_cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], i4+i8*4+p*16, h->dct.luma4x4[i4+i8*4+p*16], 0 );
+                        cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], i4+i8*4+p*16, h->dct.luma4x4[i4+i8*4+p*16], 0 );
         }
 
         if( h->mb.i_cbp_chroma )
@@ -1197,15 +1197,15 @@ static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int
             if( CHROMA_FORMAT == CHROMA_422 )
             {
                 int offset = (5*i8) & 0x09;
-                x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 16+offset, h->dct.luma4x4[16+offset]+1, 0 );
-                x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 18+offset, h->dct.luma4x4[18+offset]+1, 0 );
-                x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 32+offset, h->dct.luma4x4[32+offset]+1, 0 );
-                x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 34+offset, h->dct.luma4x4[34+offset]+1, 0 );
+                cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 16+offset, h->dct.luma4x4[16+offset]+1, 0 );
+                cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 18+offset, h->dct.luma4x4[18+offset]+1, 0 );
+                cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 32+offset, h->dct.luma4x4[32+offset]+1, 0 );
+                cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 34+offset, h->dct.luma4x4[34+offset]+1, 0 );
             }
             else
             {
-                x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 16+i8, h->dct.luma4x4[16+i8]+1, 0 );
-                x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 32+i8, h->dct.luma4x4[32+i8]+1, 0 );
+                cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 16+i8, h->dct.luma4x4[16+i8]+1, 0 );
+                cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, 32+i8, h->dct.luma4x4[32+i8]+1, 0 );
             }
         }
 
@@ -1213,63 +1213,63 @@ static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int
     }
 }
 
-static void x264_subpartition_size_cabac( x264_t *h, x264_cabac_t *cb, int i4, int i_pixel )
+static void subpartition_size_cabac( x264_t *h, x264_cabac_t *cb, int i4, int i_pixel )
 {
     int b_8x4 = i_pixel == PIXEL_8x4;
     int plane_count = CHROMA444 ? 3 : 1;
     if( i_pixel == PIXEL_4x4 )
-        x264_cabac_mvd( h, cb, 0, i4, 1, 1 );
+        cabac_mvd( h, cb, 0, i4, 1, 1 );
     else
-        x264_cabac_mvd( h, cb, 0, i4, 1+b_8x4, 2-b_8x4 );
+        cabac_mvd( h, cb, 0, i4, 1+b_8x4, 2-b_8x4 );
     for( int p = 0; p < plane_count; p++ )
     {
-        x264_cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], p*16+i4, h->dct.luma4x4[p*16+i4], 0 );
+        cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], p*16+i4, h->dct.luma4x4[p*16+i4], 0 );
         if( i_pixel != PIXEL_4x4 )
-            x264_cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], p*16+i4+2-b_8x4, h->dct.luma4x4[p*16+i4+2-b_8x4], 0 );
+            cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], p*16+i4+2-b_8x4, h->dct.luma4x4[p*16+i4+2-b_8x4], 0 );
     }
 }
 
-static void x264_partition_i8x8_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int i_mode )
+static void partition_i8x8_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int i_mode )
 {
     const int i_pred = x264_mb_predict_intra4x4_mode( h, 4*i8 );
     i_mode = x264_mb_pred_mode4x4_fix( i_mode );
-    x264_cabac_intra4x4_pred_mode( cb, i_pred, i_mode );
-    x264_cabac_cbp_luma( h, cb );
+    cabac_intra4x4_pred_mode( cb, i_pred, i_mode );
+    cabac_cbp_luma( h, cb );
     if( h->mb.i_cbp_luma & (1 << i8) )
     {
         if( CHROMA444 )
             for( int p = 0; p < 3; p++ )
-                x264_cabac_block_residual_8x8_cbf( h, cb, ctx_cat_plane[DCT_LUMA_8x8][p], i8*4+p*16, h->dct.luma8x8[i8+p*4], 1 );
+                cabac_block_residual_8x8_cbf( h, cb, ctx_cat_plane[DCT_LUMA_8x8][p], i8*4+p*16, h->dct.luma8x8[i8+p*4], 1 );
         else
-            x264_cabac_block_residual_8x8( h, cb, DCT_LUMA_8x8, h->dct.luma8x8[i8] );
+            cabac_block_residual_8x8( h, cb, DCT_LUMA_8x8, h->dct.luma8x8[i8] );
     }
 }
 
-static void x264_partition_i4x4_size_cabac( x264_t *h, x264_cabac_t *cb, int i4, int i_mode )
+static void partition_i4x4_size_cabac( x264_t *h, x264_cabac_t *cb, int i4, int i_mode )
 {
     const int i_pred = x264_mb_predict_intra4x4_mode( h, i4 );
     int plane_count = CHROMA444 ? 3 : 1;
     i_mode = x264_mb_pred_mode4x4_fix( i_mode );
-    x264_cabac_intra4x4_pred_mode( cb, i_pred, i_mode );
+    cabac_intra4x4_pred_mode( cb, i_pred, i_mode );
     for( int p = 0; p < plane_count; p++ )
-        x264_cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], i4+p*16, h->dct.luma4x4[i4+p*16], 1 );
+        cabac_block_residual_cbf( h, cb, ctx_cat_plane[DCT_LUMA_4x4][p], i4+p*16, h->dct.luma4x4[i4+p*16], 1 );
 }
 
-static void x264_chroma_size_cabac( x264_t *h, x264_cabac_t *cb )
+static void chroma_size_cabac( x264_t *h, x264_cabac_t *cb )
 {
-    x264_cabac_intra_chroma_pred_mode( h, cb );
-    x264_cabac_cbp_chroma( h, cb );
+    cabac_intra_chroma_pred_mode( h, cb );
+    cabac_cbp_chroma( h, cb );
     if( h->mb.i_cbp_chroma )
     {
         if( CHROMA_FORMAT == CHROMA_422 )
         {
-            x264_cabac_block_residual_422_dc_cbf( h, cb, 0, 1 );
-            x264_cabac_block_residual_422_dc_cbf( h, cb, 1, 1 );
+            cabac_block_residual_422_dc_cbf( h, cb, 0, 1 );
+            cabac_block_residual_422_dc_cbf( h, cb, 1, 1 );
         }
         else
         {
-            x264_cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+0, h->dct.chroma_dc[0], 1 );
-            x264_cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+1, h->dct.chroma_dc[1], 1 );
+            cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+0, h->dct.chroma_dc[0], 1 );
+            cabac_block_residual_dc_cbf( h, cb, DCT_CHROMA_DC, CHROMA_DC+1, h->dct.chroma_dc[1], 1 );
         }
 
         if( h->mb.i_cbp_chroma == 2 )
@@ -1277,7 +1277,7 @@ static void x264_chroma_size_cabac( x264_t *h, x264_cabac_t *cb )
             int step = 8 << CHROMA_V_SHIFT;
             for( int i = 16; i < 3*16; i += step )
                 for( int j = i; j < i+4; j++ )
-                    x264_cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, j, h->dct.luma4x4[j]+1, 1 );
+                    cabac_block_residual_cbf( h, cb, DCT_CHROMA_AC, j, h->dct.luma4x4[j]+1, 1 );
         }
     }
 }
index 0150b24..6d04f60 100644 (file)
@@ -67,7 +67,7 @@ static const uint8_t subpartition_b_to_golomb[13]=
 /****************************************************************************
  * x264_cavlc_block_residual:
  ****************************************************************************/
-static inline int x264_cavlc_block_residual_escape( x264_t *h, int i_suffix_length, int level )
+static inline int cavlc_block_residual_escape( x264_t *h, int i_suffix_length, int level )
 {
     bs_t *s = &h->out.bs;
     static const uint16_t next_suffix[7] = { 0, 3, 6, 12, 24, 48, 0xffff };
@@ -118,7 +118,7 @@ static inline int x264_cavlc_block_residual_escape( x264_t *h, int i_suffix_leng
     return i_suffix_length;
 }
 
-static int x264_cavlc_block_residual_internal( x264_t *h, int ctx_block_cat, dctcoef *l, int nC )
+static int cavlc_block_residual_internal( x264_t *h, int ctx_block_cat, dctcoef *l, int nC )
 {
     bs_t *s = &h->out.bs;
     static const uint8_t ctz_index[8] = {3,0,1,0,2,0,1,0};
@@ -163,7 +163,7 @@ static int x264_cavlc_block_residual_internal( x264_t *h, int ctx_block_cat, dct
             i_suffix_length = x264_level_token[i_suffix_length][val_original].i_next;
         }
         else
-            i_suffix_length = x264_cavlc_block_residual_escape( h, i_suffix_length, val-LEVEL_TABLE_SIZE/2 );
+            i_suffix_length = cavlc_block_residual_escape( h, i_suffix_length, val-LEVEL_TABLE_SIZE/2 );
         for( int i = i_trailing+1; i < i_total; i++ )
         {
             val = runlevel.level[i] + LEVEL_TABLE_SIZE/2;
@@ -173,7 +173,7 @@ static int x264_cavlc_block_residual_internal( x264_t *h, int ctx_block_cat, dct
                 i_suffix_length = x264_level_token[i_suffix_length][val].i_next;
             }
             else
-                i_suffix_length = x264_cavlc_block_residual_escape( h, i_suffix_length, val-LEVEL_TABLE_SIZE/2 );
+                i_suffix_length = cavlc_block_residual_escape( h, i_suffix_length, val-LEVEL_TABLE_SIZE/2 );
         }
     }
 
@@ -205,10 +205,10 @@ static const uint8_t ct_index[17] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,3};
     if( !*nnz )\
         bs_write_vlc( &h->out.bs, x264_coeff0_token[nC] );\
     else\
-        *nnz = x264_cavlc_block_residual_internal(h,cat,l,nC);\
+        *nnz = cavlc_block_residual_internal(h,cat,l,nC);\
 }
 
-static void x264_cavlc_qp_delta( x264_t *h )
+static void cavlc_qp_delta( x264_t *h )
 {
     bs_t *s = &h->out.bs;
     int i_dqp = h->mb.i_qp - h->mb.i_last_qp;
@@ -238,7 +238,7 @@ static void x264_cavlc_qp_delta( x264_t *h )
     bs_write_se( s, i_dqp );
 }
 
-static void x264_cavlc_mvd( x264_t *h, int i_list, int idx, int width )
+static void cavlc_mvd( x264_t *h, int i_list, int idx, int width )
 {
     bs_t *s = &h->out.bs;
     ALIGNED_4( int16_t mvp[2] );
@@ -247,31 +247,31 @@ static void x264_cavlc_mvd( x264_t *h, int i_list, int idx, int width )
     bs_write_se( s, h->mb.cache.mv[i_list][x264_scan8[idx]][1] - mvp[1] );
 }
 
-static inline void x264_cavlc_8x8_mvd( x264_t *h, int i )
+static inline void cavlc_8x8_mvd( x264_t *h, int i )
 {
     switch( h->mb.i_sub_partition[i] )
     {
         case D_L0_8x8:
-            x264_cavlc_mvd( h, 0, 4*i, 2 );
+            cavlc_mvd( h, 0, 4*i, 2 );
             break;
         case D_L0_8x4:
-            x264_cavlc_mvd( h, 0, 4*i+0, 2 );
-            x264_cavlc_mvd( h, 0, 4*i+2, 2 );
+            cavlc_mvd( h, 0, 4*i+0, 2 );
+            cavlc_mvd( h, 0, 4*i+2, 2 );
             break;
         case D_L0_4x8:
-            x264_cavlc_mvd( h, 0, 4*i+0, 1 );
-            x264_cavlc_mvd( h, 0, 4*i+1, 1 );
+            cavlc_mvd( h, 0, 4*i+0, 1 );
+            cavlc_mvd( h, 0, 4*i+1, 1 );
             break;
         case D_L0_4x4:
-            x264_cavlc_mvd( h, 0, 4*i+0, 1 );
-            x264_cavlc_mvd( h, 0, 4*i+1, 1 );
-            x264_cavlc_mvd( h, 0, 4*i+2, 1 );
-            x264_cavlc_mvd( h, 0, 4*i+3, 1 );
+            cavlc_mvd( h, 0, 4*i+0, 1 );
+            cavlc_mvd( h, 0, 4*i+1, 1 );
+            cavlc_mvd( h, 0, 4*i+2, 1 );
+            cavlc_mvd( h, 0, 4*i+3, 1 );
             break;
     }
 }
 
-static ALWAYS_INLINE void x264_cavlc_macroblock_luma_residual( x264_t *h, int plane_count )
+static ALWAYS_INLINE void cavlc_macroblock_luma_residual( x264_t *h, int plane_count )
 {
     if( h->mb.b_transform_8x8 )
     {
@@ -290,7 +290,7 @@ static ALWAYS_INLINE void x264_cavlc_macroblock_luma_residual( x264_t *h, int pl
 }
 
 #if RDO_SKIP_BS
-static ALWAYS_INLINE void x264_cavlc_partition_luma_residual( x264_t *h, int i8, int p )
+static ALWAYS_INLINE void cavlc_partition_luma_residual( x264_t *h, int i8, int p )
 {
     if( h->mb.b_transform_8x8 && h->mb.cache.non_zero_count[x264_scan8[i8*4]] )
         h->zigzagf.interleave_8x8_cavlc( h->dct.luma4x4[i8*4+p*16], h->dct.luma8x8[i8+p*4],
@@ -302,7 +302,7 @@ static ALWAYS_INLINE void x264_cavlc_partition_luma_residual( x264_t *h, int i8,
 }
 #endif
 
-static void x264_cavlc_mb_header_i( x264_t *h, int i_mb_type, int i_mb_i_offset, int chroma )
+static void cavlc_mb_header_i( x264_t *h, int i_mb_type, int i_mb_i_offset, int chroma )
 {
     bs_t *s = &h->out.bs;
     if( i_mb_type == I_16x16 )
@@ -334,7 +334,7 @@ static void x264_cavlc_mb_header_i( x264_t *h, int i_mb_type, int i_mb_i_offset,
         bs_write_ue( s, x264_mb_chroma_pred_mode_fix[h->mb.i_chroma_pred_mode] );
 }
 
-static ALWAYS_INLINE void x264_cavlc_mb_header_p( x264_t *h, int i_mb_type, int chroma )
+static ALWAYS_INLINE void cavlc_mb_header_p( x264_t *h, int i_mb_type, int chroma )
 {
     bs_t *s = &h->out.bs;
     if( i_mb_type == P_L0 )
@@ -345,7 +345,7 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_p( x264_t *h, int i_mb_type, int
 
             if( h->mb.pic.i_fref[0] > 1 )
                 bs_write_te( s, h->mb.pic.i_fref[0] - 1, h->mb.cache.ref[0][x264_scan8[0]] );
-            x264_cavlc_mvd( h, 0, 0, 4 );
+            cavlc_mvd( h, 0, 0, 4 );
         }
         else if( h->mb.i_partition == D_16x8 )
         {
@@ -355,8 +355,8 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_p( x264_t *h, int i_mb_type, int
                 bs_write_te( s, h->mb.pic.i_fref[0] - 1, h->mb.cache.ref[0][x264_scan8[0]] );
                 bs_write_te( s, h->mb.pic.i_fref[0] - 1, h->mb.cache.ref[0][x264_scan8[8]] );
             }
-            x264_cavlc_mvd( h, 0, 0, 4 );
-            x264_cavlc_mvd( h, 0, 8, 4 );
+            cavlc_mvd( h, 0, 0, 4 );
+            cavlc_mvd( h, 0, 8, 4 );
         }
         else if( h->mb.i_partition == D_8x16 )
         {
@@ -366,8 +366,8 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_p( x264_t *h, int i_mb_type, int
                 bs_write_te( s, h->mb.pic.i_fref[0] - 1, h->mb.cache.ref[0][x264_scan8[0]] );
                 bs_write_te( s, h->mb.pic.i_fref[0] - 1, h->mb.cache.ref[0][x264_scan8[4]] );
             }
-            x264_cavlc_mvd( h, 0, 0, 2 );
-            x264_cavlc_mvd( h, 0, 4, 2 );
+            cavlc_mvd( h, 0, 0, 2 );
+            cavlc_mvd( h, 0, 4, 2 );
         }
     }
     else if( i_mb_type == P_8x8 )
@@ -402,13 +402,13 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_p( x264_t *h, int i_mb_type, int
         }
 
         for( int i = 0; i < 4; i++ )
-            x264_cavlc_8x8_mvd( h, i );
+            cavlc_8x8_mvd( h, i );
     }
     else //if( IS_INTRA( i_mb_type ) )
-        x264_cavlc_mb_header_i( h, i_mb_type, 5, chroma );
+        cavlc_mb_header_i( h, i_mb_type, 5, chroma );
 }
 
-static ALWAYS_INLINE void x264_cavlc_mb_header_b( x264_t *h, int i_mb_type, int chroma )
+static ALWAYS_INLINE void cavlc_mb_header_b( x264_t *h, int i_mb_type, int chroma )
 {
     bs_t *s = &h->out.bs;
     if( i_mb_type == B_8x8 )
@@ -432,10 +432,10 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_b( x264_t *h, int i_mb_type, int
         /* mvd */
         for( int i = 0; i < 4; i++ )
             if( x264_mb_partition_listX_table[0][ h->mb.i_sub_partition[i] ] )
-                x264_cavlc_mvd( h, 0, 4*i, 2 );
+                cavlc_mvd( h, 0, 4*i, 2 );
         for( int i = 0; i < 4; i++ )
             if( x264_mb_partition_listX_table[1][ h->mb.i_sub_partition[i] ] )
-                x264_cavlc_mvd( h, 1, 4*i, 2 );
+                cavlc_mvd( h, 1, 4*i, 2 );
     }
     else if( i_mb_type >= B_L0_L0 && i_mb_type <= B_BI_BI )
     {
@@ -450,8 +450,8 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_b( x264_t *h, int i_mb_type, int
         {
             if( i_ref0_max && b_list[0][0] ) bs_write_te( s, i_ref0_max, h->mb.cache.ref[0][x264_scan8[0]] );
             if( i_ref1_max && b_list[1][0] ) bs_write_te( s, i_ref1_max, h->mb.cache.ref[1][x264_scan8[0]] );
-            if( b_list[0][0] ) x264_cavlc_mvd( h, 0, 0, 4 );
-            if( b_list[1][0] ) x264_cavlc_mvd( h, 1, 0, 4 );
+            if( b_list[0][0] ) cavlc_mvd( h, 0, 0, 4 );
+            if( b_list[1][0] ) cavlc_mvd( h, 1, 0, 4 );
         }
         else
         {
@@ -461,24 +461,24 @@ static ALWAYS_INLINE void x264_cavlc_mb_header_b( x264_t *h, int i_mb_type, int
             if( i_ref1_max && b_list[1][1] ) bs_write_te( s, i_ref1_max, h->mb.cache.ref[1][x264_scan8[12]] );
             if( h->mb.i_partition == D_16x8 )
             {
-                if( b_list[0][0] ) x264_cavlc_mvd( h, 0, 0, 4 );
-                if( b_list[0][1] ) x264_cavlc_mvd( h, 0, 8, 4 );
-                if( b_list[1][0] ) x264_cavlc_mvd( h, 1, 0, 4 );
-                if( b_list[1][1] ) x264_cavlc_mvd( h, 1, 8, 4 );
+                if( b_list[0][0] ) cavlc_mvd( h, 0, 0, 4 );
+                if( b_list[0][1] ) cavlc_mvd( h, 0, 8, 4 );
+                if( b_list[1][0] ) cavlc_mvd( h, 1, 0, 4 );
+                if( b_list[1][1] ) cavlc_mvd( h, 1, 8, 4 );
             }
             else //if( h->mb.i_partition == D_8x16 )
             {
-                if( b_list[0][0] ) x264_cavlc_mvd( h, 0, 0, 2 );
-                if( b_list[0][1] ) x264_cavlc_mvd( h, 0, 4, 2 );
-                if( b_list[1][0] ) x264_cavlc_mvd( h, 1, 0, 2 );
-                if( b_list[1][1] ) x264_cavlc_mvd( h, 1, 4, 2 );
+                if( b_list[0][0] ) cavlc_mvd( h, 0, 0, 2 );
+                if( b_list[0][1] ) cavlc_mvd( h, 0, 4, 2 );
+                if( b_list[1][0] ) cavlc_mvd( h, 1, 0, 2 );
+                if( b_list[1][1] ) cavlc_mvd( h, 1, 4, 2 );
             }
         }
     }
     else if( i_mb_type == B_DIRECT )
         bs_write1( s, 1 );
     else //if( IS_INTRA( i_mb_type ) )
-        x264_cavlc_mb_header_i( h, i_mb_type, 23, chroma );
+        cavlc_mb_header_i( h, i_mb_type, 23, chroma );
 }
 
 /*****************************************************************************
@@ -536,11 +536,11 @@ void x264_macroblock_write_cavlc( x264_t *h )
 #endif
 
     if( h->sh.i_type == SLICE_TYPE_P )
-        x264_cavlc_mb_header_p( h, i_mb_type, chroma );
+        cavlc_mb_header_p( h, i_mb_type, chroma );
     else if( h->sh.i_type == SLICE_TYPE_B )
-        x264_cavlc_mb_header_b( h, i_mb_type, chroma );
+        cavlc_mb_header_b( h, i_mb_type, chroma );
     else //if( h->sh.i_type == SLICE_TYPE_I )
-        x264_cavlc_mb_header_i( h, i_mb_type, 0, chroma );
+        cavlc_mb_header_i( h, i_mb_type, 0, chroma );
 
 #if !RDO_SKIP_BS
     i_mb_pos_tex = bs_pos( s );
@@ -557,7 +557,7 @@ void x264_macroblock_write_cavlc( x264_t *h )
 
     if( i_mb_type == I_16x16 )
     {
-        x264_cavlc_qp_delta( h );
+        cavlc_qp_delta( h );
 
         /* DC Luma */
         for( int p = 0; p < plane_count; p++ )
@@ -572,8 +572,8 @@ void x264_macroblock_write_cavlc( x264_t *h )
     }
     else if( h->mb.i_cbp_luma | h->mb.i_cbp_chroma )
     {
-        x264_cavlc_qp_delta( h );
-        x264_cavlc_macroblock_luma_residual( h, plane_count );
+        cavlc_qp_delta( h );
+        cavlc_macroblock_luma_residual( h, plane_count );
     }
     if( h->mb.i_cbp_chroma )
     {
@@ -602,7 +602,7 @@ void x264_macroblock_write_cavlc( x264_t *h )
  * only writes subpartition for p8x8, needed for sub-8x8 mode decision RDO
  * works on all partition sizes except 16x16
  *****************************************************************************/
-static int x264_partition_size_cavlc( x264_t *h, int i8, int i_pixel )
+static int partition_size_cavlc( x264_t *h, int i8, int i_pixel )
 {
     bs_t *s = &h->out.bs;
     const int i_mb_type = h->mb.i_type;
@@ -614,28 +614,28 @@ static int x264_partition_size_cavlc( x264_t *h, int i8, int i_pixel )
 
     if( i_mb_type == P_8x8 )
     {
-        x264_cavlc_8x8_mvd( h, i8 );
+        cavlc_8x8_mvd( h, i8 );
         bs_write_ue( s, subpartition_p_to_golomb[ h->mb.i_sub_partition[i8] ] );
     }
     else if( i_mb_type == P_L0 )
-        x264_cavlc_mvd( h, 0, 4*i8, 4>>b_8x16 );
+        cavlc_mvd( h, 0, 4*i8, 4>>b_8x16 );
     else if( i_mb_type > B_DIRECT && i_mb_type < B_8x8 )
     {
-        if( x264_mb_type_list_table[ i_mb_type ][0][!!i8] ) x264_ca