[vlc-commits] [Git][videolan/vlc][master] x264/x262: purge obsolete disable-SIMD bits

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jul 23 05:33:18 UTC 2021



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
81204466 by Lyndon Brown at 2021-07-23T05:18:30+00:00
x264/x262: purge obsolete disable-SIMD bits

a call made to `x264_param_default[_mpeg2]()` triggers cpu feature
detection built into the x262/x264 lib, setting up the default value of the
cpu flags 'param' attribute. the block of code deleted here pointlessly
tried to subsequently remove a certain subset of flags from this where the
vlc detection found those features to not be available.

this dates back to before VLC v1.2 when we had core options that gave users
a means of disabling use of individual SIMD variants - this block of code
would apply such user choices to the use of the x262/x264 lib.

those options were removed in 1081b213dcceebafa6586eef0019d7993a6d2ab9 for
v1.2, but blocks of code like this were left behind. some adjustments to
the cpu detection code were done for v1.3, which touched these code blocks,
but seems to not have involved evaluating their necessity.

without those old options, this block of code is utterly pointless,
achieving nothing.

- - - - -


1 changed file:

- modules/codec/x264.c


Changes:

=====================================
modules/codec/x264.c
=====================================
@@ -1306,17 +1306,6 @@ static int  Open ( vlc_object_t *p_this )
         x264_param_apply_profile( &p_sys->param, psz_val );
     free( psz_val );
 
-#if defined (__i386__) || defined (__x86_64__)
-    if( !vlc_CPU_MMX() )
-        p_sys->param.cpu &= ~X264_CPU_MMX;
-    if( !vlc_CPU_MMXEXT() )
-        p_sys->param.cpu &= ~X264_CPU_MMXEXT;
-    if( !vlc_CPU_SSE() )
-        p_sys->param.cpu &= ~X264_CPU_SSE;
-    if( !vlc_CPU_SSE2() )
-        p_sys->param.cpu &= ~X264_CPU_SSE2;
-#endif
-
     /* BUILD 29 adds support for multi-threaded encoding while BUILD 49 (r543)
        also adds support for threads = 0 for automatically selecting an optimal
        value (cores * 1.5) based on detected CPUs. Default behavior for x264 is



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/81204466970a80c8b26a42ac70820bd162b638a2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/81204466970a80c8b26a42ac70820bd162b638a2
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list