[vlc-commits] [Git][videolan/vlc][master] 7 commits: meson: remove outdated comments

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Nov 22 11:33:04 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f3e42158 by Steve Lhomme at 2024-11-22T10:43:46+00:00
meson: remove outdated comments

- the ssp option has been added in 6b1f7dc26554e92351f9513359332664358eb540
- the pdb enabling is done outside of meson

- - - - -
1a12715f by Steve Lhomme at 2024-11-22T10:43:46+00:00
meson: add sse option

- - - - -
e91fc669 by Steve Lhomme at 2024-11-22T10:43:46+00:00
meson: add avx option

- - - - -
f1a06922 by Steve Lhomme at 2024-11-22T10:43:46+00:00
meson: add update-check option

- - - - -
dcecf659 by Steve Lhomme at 2024-11-22T10:43:46+00:00
meson: add merge-ffmpeg option

- - - - -
96ba69a1 by Steve Lhomme at 2024-11-22T10:43:46+00:00
package/win32: only enable/disable NLS once

It's on by default, so not needed in configure.sh.

- - - - -
a7cb81e6 by Steve Lhomme at 2024-11-22T10:43:46+00:00
package/win32: enable the same options as autotools by default in meson

- - - - -


11 changed files:

- buildsystem/simd_checks/meson.build
- extras/package/win32/build.sh
- extras/package/win32/configure.sh
- meson_options.txt
- modules/access/meson.build
- modules/codec/meson.build
- modules/demux/meson.build
- modules/gui/qt/meson.build
- modules/packetizer/meson.build
- src/meson.build
- test/src/meson.build


Changes:

=====================================
buildsystem/simd_checks/meson.build
=====================================
@@ -1,7 +1,14 @@
 # SIMD checks
 
+enable_sse = false
+enable_avx = false
+if host_machine.cpu_family().startswith('x86')
+    enable_sse = get_option('sse').allowed()
+    enable_avx = get_option('avx').allowed()
+endif
+
 # Check for fully workin SSE2 intrinsics
-have_sse2_intrinsics = cc.compiles('''
+have_sse2_intrinsics = enable_sse and cc.compiles('''
     #include <emmintrin.h>
     #include <stdint.h>
     uint64_t frobzor;
@@ -23,7 +30,7 @@ if have_sse2_intrinsics
 endif
 
 # Check for SSE2 inline assembly support
-can_compile_sse2 = cc.compiles('''
+can_compile_sse2 = enable_sse and cc.compiles('''
     void f() {
         void *p;
         asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
@@ -35,7 +42,7 @@ endif
 have_sse2 = can_compile_sse2
 
 # Check for SSE3 inline assembly support
-can_compile_sse3 = cc.compiles('''
+can_compile_sse3 = enable_sse and cc.compiles('''
     void f() {
         void *p;
         asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
@@ -46,7 +53,7 @@ if can_compile_sse3
 endif
 
 # Check for SSSE3 inline assembly support
-can_compile_2_sse3 = cc.compiles('''
+can_compile_2_sse3 = enable_sse and cc.compiles('''
     void f() {
         void *p;
         asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
@@ -58,7 +65,7 @@ endif
 have_sse3 = can_compile_sse3 and can_compile_2_sse3
 
 # Check for SSE4.1 inline assembly support
-can_compile_sse4_1 = cc.compiles('''
+can_compile_sse4_1 = enable_sse and cc.compiles('''
     void f() {
         void *p;
         asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
@@ -70,7 +77,7 @@ endif
 have_sse4_1 = can_compile_sse4_1
 
 # Check for SSE4.2 inline assembly support
-can_compile_sse4_2 = cc.compiles('''
+can_compile_sse4_2 = enable_sse and cc.compiles('''
     void f() {
         void *p;
         asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
@@ -82,7 +89,7 @@ endif
 have_sse4_2 = can_compile_sse4_2
 
 # Check for SSE4A inline assembly support
-can_compile_sse4A = cc.compiles('''
+can_compile_sse4A = enable_sse and cc.compiles('''
     void f() {
         void *p;
         asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
@@ -94,7 +101,7 @@ endif
 have_sse4A = can_compile_sse4A
 
 # Check for fully workin AVX2 intrinsics
-have_avx2_intrinsics = cc.compiles('''
+have_avx2_intrinsics = enable_avx and cc.compiles('''
     #include <immintrin.h>
     #include <stdint.h>
     uint64_t frobzor;
@@ -116,7 +123,7 @@ if have_avx2_intrinsics
 endif
 
 # Check for AVX inline assembly support
-can_compile_avx = cc.compiles('''
+can_compile_avx = enable_avx and cc.compiles('''
     void f() {
         void *p;
         asm volatile("vxorps %%ymm1,%%ymm2,%%ymm3"::"r"(p):"ymm1", "ymm2", "ymm3");
@@ -128,7 +135,7 @@ endif
 have_avx = can_compile_avx
 
 # Check for AVX2 inline assembly support
-can_compile_avx2 = cc.compiles('''
+can_compile_avx2 = enable_avx and cc.compiles('''
     void f() {
         void *p;
         asm volatile("vpunpckhqdq %%ymm1,%%ymm2,%%ymm3"::"r"(p):"ymm1", "ymm2", "ymm3");


=====================================
extras/package/win32/build.sh
=====================================
@@ -445,6 +445,12 @@ else
 fi
 cd ../..
 
+# configuration matching configure.sh (goom is called goom2, theora is theoradec+theoraenc)
+MCONFIGFLAGS="-Dupdate-check=enabled -Dlua=enabled -Dflac=enabled -Dtheoradec=enabled -Dtheoraenc=enabled \
+    -Davcodec=enabled -Dmerge-ffmpeg=true \
+    -Dlibass=enabled -Dschroedinger=enabled -Dshout=enabled -Dgoom2=enabled \
+    -Dsse=enabled -Dlibcddb=enabled -Dzvbi=enabled -Dtelx=disabled $MCONFIGFLAGS"
+
 MCONFIGFLAGS="$MCONFIGFLAGS --prefer-static"
 if [ "$RELEASE" != "yes" ]; then
      CONFIGFLAGS="$CONFIGFLAGS --enable-debug"
@@ -456,6 +462,9 @@ fi
 if [ "$I18N" != "yes" ]; then
      CONFIGFLAGS="$CONFIGFLAGS --disable-nls"
      MCONFIGFLAGS="$MCONFIGFLAGS -Dnls=disabled"
+else
+     CONFIGFLAGS="$CONFIGFLAGS --enable-nls"
+     MCONFIGFLAGS="$MCONFIGFLAGS -Dnls=enabled"
 fi
 if [ -n "$BREAKPAD" ]; then
      CONFIGFLAGS="$CONFIGFLAGS --with-breakpad=$BREAKPAD"


=====================================
extras/package/win32/configure.sh
=====================================
@@ -12,7 +12,6 @@ OPTIONS="
       --enable-goom
       --enable-sse
       --enable-libcddb
-      --enable-zvbi --disable-telx
-      --enable-nls"
+      --enable-zvbi --disable-telx"
 
 sh "$(dirname $0)"/../../../configure ${OPTIONS}  "$@"


=====================================
meson_options.txt
=====================================
@@ -65,6 +65,11 @@ option('winstore_app',
     value : false,
     description : 'Build targeted for Windows Store apps')
 
+option('update-check',
+    type : 'feature',
+    value : 'disabled',
+    description : 'update checking system')
+
 option('rust',
     type : 'feature',
     value : 'disabled',
@@ -80,15 +85,19 @@ option('vendored_rust_deps',
     value : 'no',
     description : 'Should use vendored sources: `no`, `yes` or PATH_TO_VENDORED_SOURCES')
 
-# TODO: Missing pdb option, this should probably be solved in meson itself
+option('sse',
+    type : 'feature',
+    value : 'auto',
+    description : 'SSE (2-4) optimizations')
+
+option('avx',
+    type : 'feature',
+    value : 'auto',
+    description : 'AVX (1-2) optimizations')
 
-# TODO: Missing ssp option
-# TODO: Missing sse option
-# TODO: Missing avx option
 # TODO: Missing neon option
 # TODO: Missing sve option
 # TODO: Missing altivec option
-# TODO: Missing update-check option
 
 # Font options
 
@@ -175,6 +184,11 @@ option('avcodec',
     value : 'enabled',
     description : 'Enable/disable avcodec support')
 
+option('merge-ffmpeg',
+    type : 'boolean',
+    value : false,
+    description : 'merge FFmpeg-based plugins')
+
 option('libva',
     type: 'feature',
     value: 'auto',


=====================================
modules/access/meson.build
=====================================
@@ -491,7 +491,8 @@ if avformat_dep.found()
         'name' : 'avio',
         'sources' : files('avio.c'),
         'dependencies' : [avutil_dep, avformat_dep, m_lib],
-        'link_args' : symbolic_linkargs
+        'link_args' : symbolic_linkargs,
+        'enabled' : not get_option('merge-ffmpeg')
     }
 endif
 


=====================================
modules/codec/meson.build
=====================================
@@ -583,7 +583,19 @@ if get_option('stream_outputs')
     avcodec_extra_sources += 'avcodec/encoder.c'
 endif
 
-# TODO: Implement the merge-ffmpeg option
+avcodec_deps = [ avutil_dep, avcodec_dep ]
+avcodec_cargs = []
+if get_option('merge-ffmpeg')
+    avcodec_extra_sources += [
+        '../demux/avformat/demux.c',
+        '../access/avio.c',
+        '../packetizer/avparser.c' ]
+    avcodec_deps += [ avformat_dep, m_lib ]
+    avcodec_cargs += '-DMERGE_FFMPEG'
+    if get_option('stream_outputs')
+        avcodec_extra_sources += '../demux/avformat/mux.c'
+    endif
+endif
 
 vlc_modules += {
     'name' : 'avcodec',
@@ -598,7 +610,8 @@ vlc_modules += {
             '../packetizer/av1.h',
             avcodec_extra_sources
     ),
-    'dependencies' : [avutil_dep, avcodec_dep],
+    'dependencies' : avcodec_deps,
+    'c_args' : avcodec_cargs,
     'link_with' : [libavcodec_common],
     'link_args' : symbolic_linkargs,
     'enabled' : avcodec_dep.found(),


=====================================
modules/demux/meson.build
=====================================
@@ -239,7 +239,8 @@ if avformat_dep.found()
         ),
         'dependencies' : [avformat_dep, avutil_dep],
         'link_with' : [libavcodec_common],
-        'link_args' : symbolic_linkargs
+        'link_args' : symbolic_linkargs,
+        'enabled' : not get_option('merge-ffmpeg'),
     }
 endif
 


=====================================
modules/gui/qt/meson.build
=====================================
@@ -1061,6 +1061,10 @@ if qt6_dep.found()
         endif
     endif
 
+    if get_option('update-check').allowed() and gcrypt_dep.found()
+        qt_extra_flags += '-DUPDATE_CHECK'
+    endif
+
     if (xcb_dep.found() and xcb_render_dep.found() and xcb_xfixes_dep.found())
 
         vlc_modules += {


=====================================
modules/packetizer/meson.build
=====================================
@@ -99,6 +99,7 @@ if avcodec_dep.found()
         'name' : 'packetizer_avparser',
         'sources' : files('avparser.c'),
         'dependencies' : [avutil_dep, avcodec_dep],
-        'link_with' : [libavcodec_common]
+        'link_with' : [libavcodec_common],
+        'enabled' : not get_option('merge-ffmpeg'),
     }
 endif


=====================================
src/meson.build
=====================================
@@ -369,6 +369,15 @@ elif host_system == 'linux'
     endif
 endif
 
+if get_option('update-check').allowed()
+    if not gcrypt_dep.found()
+        error('libgcrypt is required for update checking system')
+    endif
+    libvlccore_sources += [ 'misc/update.c', 'misc/update_crypto.c' ]
+    vlccore_cargs += '-DUPDATE_CHECK'
+    libvlccore_deps += gcrypt_dep
+endif
+
 libvlccore = library(
     'vlccore',
     libvlccore_sources, vlc_about, fourcc, rev_target,


=====================================
test/src/meson.build
=====================================
@@ -35,7 +35,7 @@ vlc_tests += {
     'link_with' : [libvlc, libvlccore],
 }
 
-if gcrypt_dep.found()
+if gcrypt_dep.found() and get_option('update-check').allowed()
     vlc_tests += {
         'name' : 'test_src_crypto_update',
         'sources' : files('crypto/update.c'),



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3d75d3df86eccdcd799449ee68118dfc6ae9f63a...a7cb81e63df9ec9965aeae7c9673f63d03d1df03

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3d75d3df86eccdcd799449ee68118dfc6ae9f63a...a7cb81e63df9ec9965aeae7c9673f63d03d1df03
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list