]> git.sesse.net Git - x264/commitdiff
Disable mbtree asm with cpu-independent option
authorAnton Mitrofanov <BugMaster@narod.ru>
Tue, 26 Mar 2013 14:56:21 +0000 (18:56 +0400)
committerFiona Glaser <fiona@x264.com>
Tue, 23 Apr 2013 18:47:28 +0000 (11:47 -0700)
Results vary between versions because of different rounding results.

common/mc.c
common/mc.h
encoder/encoder.c
tools/checkasm.c

index a44c2afae31ddc415f5e2aff6d1b2a9541331713..6810484026f8e19e53d2e3d06a328393f7314486 100644 (file)
@@ -469,7 +469,7 @@ static void mbtree_propagate_cost( int *dst, uint16_t *propagate_in, uint16_t *i
     }
 }
 
-void x264_mc_init( int cpu, x264_mc_functions_t *pf )
+void x264_mc_init( int cpu, x264_mc_functions_t *pf, int cpu_independent )
 {
     pf->mc_luma   = mc_luma;
     pf->get_ref   = get_ref;
@@ -534,6 +534,9 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf )
 #if HAVE_ARMV6
     x264_mc_init_arm( cpu, pf );
 #endif
+
+    if( cpu_independent )
+        pf->mbtree_propagate_cost = mbtree_propagate_cost;
 }
 
 void x264_frame_filter( x264_t *h, x264_frame_t *frame, int mb_y, int b_end )
index 018e2faccddbf318d69e2314b35d292a9d589ec2..262e20169e175ca1ebd73a1749b82510c7fdbd5d 100644 (file)
@@ -123,6 +123,6 @@ typedef struct
                                    uint16_t *inter_costs, uint16_t *inv_qscales, float *fps_factor, int len );
 } x264_mc_functions_t;
 
-void x264_mc_init( int cpu, x264_mc_functions_t *pf );
+void x264_mc_init( int cpu, x264_mc_functions_t *pf, int cpu_independent );
 
 #endif
index 7e5ebcaef6a7417c17474dcd09b0aa5f0305ef5c..824e0304beefb330b9f4596b8bd3f4874b10a3aa 100644 (file)
@@ -1263,7 +1263,7 @@ x264_t *x264_encoder_open( x264_param_t *param )
     x264_dct_init( h->param.cpu, &h->dctf );
     x264_zigzag_init( h->param.cpu, &h->zigzagf_progressive, &h->zigzagf_interlaced );
     memcpy( &h->zigzagf, PARAM_INTERLACED ? &h->zigzagf_interlaced : &h->zigzagf_progressive, sizeof(h->zigzagf) );
-    x264_mc_init( h->param.cpu, &h->mc );
+    x264_mc_init( h->param.cpu, &h->mc, h->param.b_cpu_independent );
     x264_quant_init( h, h->param.cpu, &h->quantf );
     x264_deblock_init( h->param.cpu, &h->loopf, PARAM_INTERLACED );
     x264_bitstream_init( h->param.cpu, &h->bsf );
index c8e01d2bf28c37189f327bd9133fa66feb758bee..ec7740f1a385b3c5a547fd70505c4efdf863a604 100644 (file)
@@ -1120,9 +1120,9 @@ static int check_mc( int cpu_ref, int cpu_new )
 
     int ret = 0, ok, used_asm;
 
-    x264_mc_init( 0, &mc_c );
-    x264_mc_init( cpu_ref, &mc_ref );
-    x264_mc_init( cpu_new, &mc_a );
+    x264_mc_init( 0, &mc_c, 0 );
+    x264_mc_init( cpu_ref, &mc_ref, 0 );
+    x264_mc_init( cpu_new, &mc_a, 0 );
     x264_pixel_init( 0, &pixf );
 
 #define MC_TEST_LUMA( w, h ) \