We truncated the diff of some files because they were too big.
If you want to see the full diff for every file, click here.
Changes of Revision 88
obs-studio.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Wed Jan 06 18:27:38 UTC 2021 - jimmy@boombatower.com
4
+
5
+- Update to version 26.1.1:
6
+ * win-dshow: Fix dshowcapture not linking audio of certain devices
7
+ * linux-jack: fix deadlock when closing the client
8
+ * linux-jack: mark ports as JackPortIsTerminal
9
+ * linux-jack: fix timestamp calculation
10
+ * obs-browser: Initialize CEF early to fix macOS crash
11
+ * libobs: Update version to 26.1.1
12
+ * rtmp-services: Add Loola.tv service
13
+ * rtmp-services: Fix json formatting
14
+ * libobs: Avoid unnecessary mallocs in audio processing
15
+ * UI: Fix padding on Acri context bar buttons
16
+ * image-source: Fix slideshow transition bug when randomized
17
+ * docs/sphinx: Add missing obs_frontend_open_projector
18
+ * libobs: Update to SIMDe 0.7.1
19
+ * libobs: Set lock state when duplicating scene item
20
+ * libobs: Add definitions in ARCH_SIMD_DEFINES
21
+ * cmake: Add ARCH_SIMD_DEFINES variable
22
+ * coreaudio-encoder: Fix cmake for mingw
23
+ * Revert "UI: Only apply new scaling behavior on newer installs"
24
+ * UI: Only apply new scaling behavior on newer installs
25
+ * UI: Support fractional scaling for Canvas/Base size
26
+ * mac-virtualcam: Remove unnecessary logging
27
+ * mac-virtualcam: Mark parameters as unused
28
+ * image-source: Add .webp to "All formats" option
29
+ * image-source: Add webp to file filter
30
+ * CI: Remove jack, speex and fdk-aac from default builds for macOS
31
+ * libobs, obs-ffmpeg: Use correct value for EINVAL error check
32
+ * UI/updater: Increase number of download workers
33
+ * UI/updater: Enable HTTP2 and TLS 1.3
34
+ * UI: Fix name of kab-KAB locale
35
+ * decklink: Fix automatic pixel format detection
36
+ * CI: Fix macOS 10.13 crashes due to unsupported library symbols
37
+ * UI/installer: Add additional VS2019 DLL check
38
+ * mac-virtualcam: Fix file mode
39
+ * CI: Run make with -j$(nproc)
40
+ * CI: Remove obsolete and unused files
41
+ * libobs: Add texture sharing support for macOS/OpenGL
42
+ * CI: Add necessary changes for CEF 4183
43
+ * UI/updater: Move in-use files away before writing
44
+ * UI/updater: Always clean up temporary files
45
+ * UI: Remove Smashcast from AutoConfig
46
+ * rtmp-services: Remove Smashcast
47
+
48
+-------------------------------------------------------------------
49
Tue Dec 15 23:25:38 UTC 2020 - Jimmy Berry <jimmy@boombatower.com>
50
51
- Add modinfo-use-full-path.patch for new v4l2lookback support.
52
obs-studio.spec
Changed
8
1
2
Name: obs-studio
3
-Version: 26.1.0
4
+Version: 26.1.1
5
Release: 0
6
Summary: A recording/broadcasting program
7
Group: Productivity/Multimedia/Video/Editors and Convertors
8
_service
Changed
10
1
2
<services>
3
<service name="tar_scm" mode="disabled">
4
<param name="versionformat">@PARENT_TAG@</param>
5
- <param name="revision">refs/tags/26.1.0</param>
6
+ <param name="revision">refs/tags/26.1.1</param>
7
<param name="url">git://github.com/jp9000/obs-studio.git</param>
8
<param name="scm">git</param>
9
<param name="changesgenerate">enable</param>
10
_servicedata
Changed
9
1
2
<servicedata>
3
<service name="tar_scm">
4
<param name="url">git://github.com/jp9000/obs-studio.git</param>
5
- <param name="changesrevision">38ad3ba18fc27846e122bd56f589ccb34c4578e2</param>
6
+ <param name="changesrevision">dffa8221124106bc2a4c92e5f5d0fa21128a61f6</param>
7
</service>
8
</servicedata>
9
obs-studio-26.1.0.tar.xz/CI/before-deploy-osx.sh
Deleted
116
1
2
-hr() {
3
- echo "───────────────────────────────────────────────────"
4
- echo $1
5
- echo "───────────────────────────────────────────────────"
6
-}
7
-
8
-# Exit if something fails
9
-set -e
10
-
11
-# Generate file name variables
12
-export GIT_TAG=$(git describe --abbrev=0)
13
-export GIT_HASH=$(git rev-parse --short HEAD)
14
-export FILE_DATE=$(date +%Y-%m-%d.%H-%M-%S)
15
-export FILENAME=$FILE_DATE-$GIT_HASH-$TRAVIS_BRANCH-osx.dmg
16
-
17
-echo "git tag: $GIT_TAG"
18
-
19
-cd ./build
20
-
21
-# Move obslua
22
-hr "Moving OBS LUA"
23
-mv ./rundir/RelWithDebInfo/data/obs-scripting/obslua.so ./rundir/RelWithDebInfo/bin/
24
-
25
-# Move obspython
26
-hr "Moving OBS Python"
27
-# mv ./rundir/RelWithDebInfo/data/obs-scripting/_obspython.so ./rundir/RelWithDebInfo/bin/
28
-# mv ./rundir/RelWithDebInfo/data/obs-scripting/obspython.py ./rundir/RelWithDebInfo/bin/
29
-
30
-# Package everything into a nice .app
31
-hr "Packaging .app"
32
-STABLE=false
33
-if [ -n "${TRAVIS_TAG}" ]; then
34
- STABLE=true
35
-fi
36
-
37
-#sudo python ../CI/install/osx/build_app.py --public-key ../CI/install/osx/OBSPublicDSAKey.pem --sparkle-framework ../../sparkle/Sparkle.framework --stable=$STABLE
38
-
39
-../CI/install/osx/packageApp.sh
40
-
41
-# fix obs outputs plugin it doesn't play nicely with dylibBundler at the moment
42
-if [ -f /usr/local/opt/mbedtls/lib/libmbedtls.12.dylib ]; then
43
- cp /usr/local/opt/mbedtls/lib/libmbedtls.12.dylib ./OBS.app/Contents/Frameworks/
44
- cp /usr/local/opt/mbedtls/lib/libmbedcrypto.3.dylib ./OBS.app/Contents/Frameworks/
45
- cp /usr/local/opt/mbedtls/lib/libmbedx509.0.dylib ./OBS.app/Contents/Frameworks/
46
- chmod +w ./OBS.app/Contents/Frameworks/*.dylib
47
- install_name_tool -id @executable_path/../Frameworks/libmbedtls.12.dylib ./OBS.app/Contents/Frameworks/libmbedtls.12.dylib
48
- install_name_tool -id @executable_path/../Frameworks/libmbedcrypto.3.dylib ./OBS.app/Contents/Frameworks/libmbedcrypto.3.dylib
49
- install_name_tool -id @executable_path/../Frameworks/libmbedx509.0.dylib ./OBS.app/Contents/Frameworks/libmbedx509.0.dylib
50
- install_name_tool -change libmbedtls.12.dylib @executable_path/../Frameworks/libmbedtls.12.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
51
- install_name_tool -change libmbedcrypto.3.dylib @executable_path/../Frameworks/libmbedcrypto.3.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
52
- install_name_tool -change libmbedx509.0.dylib @executable_path/../Frameworks/libmbedx509.0.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
53
-elif [ -f /usr/local/opt/mbedtls/lib/libmbedtls.13.dylib ]; then
54
- cp /usr/local/opt/mbedtls/lib/libmbedtls.13.dylib ./OBS.app/Contents/Frameworks/
55
- cp /usr/local/opt/mbedtls/lib/libmbedcrypto.5.dylib ./OBS.app/Contents/Frameworks/
56
- cp /usr/local/opt/mbedtls/lib/libmbedx509.1.dylib ./OBS.app/Contents/Frameworks/
57
- chmod +w ./OBS.app/Contents/Frameworks/*.dylib
58
- install_name_tool -id @executable_path/../Frameworks/libmbedtls.13.dylib ./OBS.app/Contents/Frameworks/libmbedtls.13.dylib
59
- install_name_tool -id @executable_path/../Frameworks/libmbedcrypto.5.dylib ./OBS.app/Contents/Frameworks/libmbedcrypto.5.dylib
60
- install_name_tool -id @executable_path/../Frameworks/libmbedx509.1.dylib ./OBS.app/Contents/Frameworks/libmbedx509.1.dylib
61
- install_name_tool -change libmbedtls.13.dylib @executable_path/../Frameworks/libmbedtls.13.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
62
- install_name_tool -change libmbedcrypto.5.dylib @executable_path/../Frameworks/libmbedcrypto.5.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
63
- install_name_tool -change libmbedx509.1.dylib @executable_path/../Frameworks/libmbedx509.1.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
64
-fi
65
-
66
-install_name_tool -change /usr/local/opt/curl/lib/libcurl.4.dylib @executable_path/../Frameworks/libcurl.4.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
67
-install_name_tool -change @rpath/libobs.0.dylib @executable_path/../Frameworks/libobs.0.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
68
-install_name_tool -change /tmp/obsdeps/bin/libjansson.4.dylib @executable_path/../Frameworks/libjansson.4.dylib ./OBS.app/Contents/Plugins/obs-outputs.so
69
-
70
-# copy sparkle into the app
71
-hr "Copying Sparkle.framework"
72
-cp -R ../../sparkle/Sparkle.framework ./OBS.app/Contents/Frameworks/
73
-install_name_tool -change @rpath/Sparkle.framework/Versions/A/Sparkle @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle ./OBS.app/Contents/MacOS/obs
74
-
75
-# Copy Chromium embedded framework to app Frameworks directory
76
-hr "Copying Chromium Embedded Framework.framework"
77
-sudo mkdir -p OBS.app/Contents/Frameworks
78
-sudo cp -R ../../cef_binary_${CEF_BUILD_VERSION}_macosx64/Release/Chromium\ Embedded\ Framework.framework OBS.app/Contents/Frameworks/
79
-
80
-install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./OBS.app/Contents/Plugins/obs-browser.so
81
-install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./OBS.app/Contents/Plugins/obs-browser.so
82
-install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./OBS.app/Contents/Plugins/obs-browser.so
83
-
84
-cp ../CI/install/osx/OBSPublicDSAKey.pem OBS.app/Contents/Resources
85
-
86
-# edit plist
87
-plutil -insert CFBundleVersion -string $GIT_TAG ./OBS.app/Contents/Info.plist
88
-plutil -insert CFBundleShortVersionString -string $GIT_TAG ./OBS.app/Contents/Info.plist
89
-plutil -insert OBSFeedsURL -string https://obsproject.com/osx_update/feeds.xml ./OBS.app/Contents/Info.plist
90
-plutil -insert SUFeedURL -string https://obsproject.com/osx_update/stable/updates.xml ./OBS.app/Contents/Info.plist
91
-plutil -insert SUPublicDSAKeyFile -string OBSPublicDSAKey.pem ./OBS.app/Contents/Info.plist
92
-
93
-dmgbuild -s ../CI/install/osx/settings.json "OBS" obs.dmg
94
-
95
-if [ -v "$TRAVIS" ]; then
96
- # Signing stuff
97
- hr "Decrypting Cert"
98
- openssl aes-256-cbc -K $encrypted_dd3c7f5e9db9_key -iv $encrypted_dd3c7f5e9db9_iv -in ../CI/osxcert/Certificates.p12.enc -out Certificates.p12 -d
99
- hr "Creating Keychain"
100
- security create-keychain -p mysecretpassword build.keychain
101
- security default-keychain -s build.keychain
102
- security unlock-keychain -p mysecretpassword build.keychain
103
- security set-keychain-settings -t 3600 -u build.keychain
104
- hr "Importing certs into keychain"
105
- security import ./Certificates.p12 -k build.keychain -T /usr/bin/productsign -P ""
106
- # macOS 10.12+
107
- security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain
108
-fi
109
-
110
-cp ./OBS.dmg ./$FILENAME
111
-
112
-# Move to the folder that travis uses to upload artifacts from
113
-hr "Moving package to nightly folder for distribution"
114
-mkdir ../nightly
115
-sudo mv ./$FILENAME ../nightly
116
obs-studio-26.1.0.tar.xz/CI/before-script-osx.sh
Deleted
19
1
2
-# Make sure ccache is found
3
-export PATH=/usr/local/opt/ccache/libexec:$PATH
4
-
5
-git fetch --tags
6
-
7
-mkdir build
8
-cd build
9
-cmake -DENABLE_SPARKLE_UPDATER=ON \
10
--DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
11
--DDISABLE_PYTHON=ON \
12
--DQTDIR=/usr/local/Cellar/qt/5.14.1 \
13
--DDepsPath=/tmp/obsdeps \
14
--DVLCPath=$PWD/../../vlc-3.0.8 \
15
--DBUILD_BROWSER=ON \
16
--DBROWSER_DEPLOY=ON \
17
--DWITH_RTMPS=ON \
18
--DCEF_ROOT_DIR=$PWD/../../cef_binary_${CEF_BUILD_VERSION}_macosx64 ..
19
obs-studio-26.1.0.tar.xz/CI/install
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/install-dependencies-osx.sh
Deleted
83
1
2
-hr() {
3
- echo "───────────────────────────────────────────────────"
4
- echo $1
5
- echo "───────────────────────────────────────────────────"
6
-}
7
-
8
-# Exit if something fails
9
-set -e
10
-
11
-# Echo all commands before executing
12
-set -v
13
-
14
-if [[ $TRAVIS ]]; then
15
- git fetch --unshallow
16
-fi
17
-
18
-git fetch origin --tags
19
-
20
-# Leave obs-studio folder
21
-cd ../
22
-
23
-# Install Packages app so we can build a package later
24
-# http://s.sudre.free.fr/Software/Packages/about.html
25
-hr "Downloading Packages app"
26
-wget --quiet --retry-connrefused --waitretry=1 https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
27
-sudo installer -pkg ./Packages.pkg -target /
28
-
29
-brew update
30
-
31
-#Base OBS Deps and ccache
32
-for DEPENDENCY in jack speexdsp ccache mbedtls freetype fdk-aac cmocka; do
33
- if [ ! -d "$(brew --cellar)/${DEPENDENCY}" ]; then
34
- brew install $DEPENDENCY
35
- else
36
- brew upgrade $DEPENDENCY
37
- fi
38
-done
39
-
40
-brew install https://gist.githubusercontent.com/DDRBoxman/9c7a2b08933166f4b61ed9a44b242609/raw/ef4de6c587c6bd7f50210eccd5bd51ff08e6de13/qt.rb
41
-if [ -d "$(brew --cellar)/swig" ]; then
42
- brew unlink swig
43
-fi
44
-brew install https://gist.githubusercontent.com/DDRBoxman/4cada55c51803a2f963fa40ce55c9d3e/raw/572c67e908bfbc1bcb8c476ea77ea3935133f5b5/swig.rb
45
-
46
-pip install dmgbuild
47
-
48
-export PATH=/usr/local/opt/ccache/libexec:$PATH
49
-ccache -s || echo "CCache is not available."
50
-
51
-# Fetch and untar prebuilt OBS deps that are compatible with older versions of OSX
52
-hr "Downloading OBS deps"
53
-wget --quiet --retry-connrefused --waitretry=1 https://github.com/obsproject/obs-deps/releases/download/2020-04-24/osx-deps-2020-04-24.tar.gz
54
-tar -xf ./osx-deps-2020-04-24.tar.gz -C /tmp
55
-
56
-# Fetch vlc codebase
57
-hr "Downloading VLC repo"
58
-wget --quiet --retry-connrefused --waitretry=1 https://downloads.videolan.org/vlc/3.0.8/vlc-3.0.8.tar.xz
59
-tar -xf vlc-3.0.8.tar.xz
60
-
61
-# Get sparkle
62
-hr "Downloading Sparkle framework"
63
-wget --quiet --retry-connrefused --waitretry=1 -O sparkle.tar.bz2 https://github.com/sparkle-project/Sparkle/releases/download/1.23.0/Sparkle-1.23.0.tar.bz2
64
-mkdir ./sparkle
65
-tar -xf ./sparkle.tar.bz2 -C ./sparkle
66
-sudo cp -R ./sparkle/Sparkle.framework /Library/Frameworks/Sparkle.framework
67
-
68
-# CEF Stuff
69
-hr "Downloading CEF"
70
-wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3-us-west-2.amazonaws.com/cef_binary_${CEF_BUILD_VERSION}_macosx64.tar.bz2
71
-tar -xf ./cef_binary_${CEF_BUILD_VERSION}_macosx64.tar.bz2
72
-cd ./cef_binary_${CEF_BUILD_VERSION}_macosx64
73
-# remove a broken test
74
-sed -i '.orig' '/add_subdirectory(tests\/ceftests)/d' ./CMakeLists.txt
75
-# target 10.11
76
-sed -i '.orig' s/\"10.9\"/\"10.11\"/ ./cmake/cef_variables.cmake
77
-mkdir build
78
-cd ./build
79
-cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 ..
80
-make -j4
81
-mkdir libcef_dll
82
-cd ../../
83
obs-studio-26.1.0.tar.xz/CI/install/osx
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/install/osx/CMakeLists.pkgproj
Deleted
201
1
2
-<?xml version="1.0" encoding="UTF-8"?>
3
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4
-<plist version="1.0">
5
-<dict>
6
- <key>PACKAGES</key>
7
- <array>
8
- <dict>
9
- <key>PACKAGE_FILES</key>
10
- <dict>
11
- <key>DEFAULT_INSTALL_LOCATION</key>
12
- <string>/</string>
13
- <key>HIERARCHY</key>
14
- <dict>
15
- <key>CHILDREN</key>
16
- <array>
17
- <dict>
18
- <key>CHILDREN</key>
19
- <array>
20
- <dict>
21
- <key>CHILDREN</key>
22
- <array/>
23
- <key>GID</key>
24
- <integer>80</integer>
25
- <key>PATH</key>
26
- <string>../../../build/OBS.app</string>
27
- <key>PATH_TYPE</key>
28
- <integer>3</integer>
29
- <key>PERMISSIONS</key>
30
- <integer>493</integer>
31
- <key>TYPE</key>
32
- <integer>3</integer>
33
- <key>UID</key>
34
- <integer>0</integer>
35
- </dict>
36
- <dict>
37
- <key>CHILDREN</key>
38
- <array/>
39
- <key>GID</key>
40
- <integer>80</integer>
41
- <key>PATH</key>
42
- <string>Utilities</string>
43
- <key>PATH_TYPE</key>
44
- <integer>0</integer>
45
- <key>PERMISSIONS</key>
46
- <integer>493</integer>
47
- <key>TYPE</key>
48
- <integer>1</integer>
49
- <key>UID</key>
50
- <integer>0</integer>
51
- </dict>
52
- </array>
53
- <key>GID</key>
54
- <integer>80</integer>
55
- <key>PATH</key>
56
- <string>Applications</string>
57
- <key>PATH_TYPE</key>
58
- <integer>0</integer>
59
- <key>PERMISSIONS</key>
60
- <integer>509</integer>
61
- <key>TYPE</key>
62
- <integer>1</integer>
63
- <key>UID</key>
64
- <integer>0</integer>
65
- </dict>
66
- <dict>
67
- <key>CHILDREN</key>
68
- <array>
69
- <dict>
70
- <key>CHILDREN</key>
71
- <array>
72
- <dict>
73
- <key>CHILDREN</key>
74
- <array>
75
- <dict>
76
- <key>CHILDREN</key>
77
- <array>
78
- <dict>
79
- <key>CHILDREN</key>
80
- <array>
81
- <dict>
82
- <key>CHILDREN</key>
83
- <array>
84
- <dict>
85
- <key>CHILDREN</key>
86
- <array/>
87
- <key>GID</key>
88
- <integer>80</integer>
89
- <key>PATH</key>
90
- <string>../../../build/plugins/obs-browser/obs-browser-page</string>
91
- <key>PATH_TYPE</key>
92
- <integer>3</integer>
93
- <key>PERMISSIONS</key>
94
- <integer>493</integer>
95
- <key>TYPE</key>
96
- <integer>3</integer>
97
- <key>UID</key>
98
- <integer>0</integer>
99
- </dict>
100
- <dict>
101
- <key>CHILDREN</key>
102
- <array/>
103
- <key>GID</key>
104
- <integer>80</integer>
105
- <key>PATH</key>
106
- <string>../../../build/plugins/obs-browser/obs-browser.so</string>
107
- <key>PATH_TYPE</key>
108
- <integer>3</integer>
109
- <key>PERMISSIONS</key>
110
- <integer>493</integer>
111
- <key>TYPE</key>
112
- <integer>3</integer>
113
- <key>UID</key>
114
- <integer>0</integer>
115
- </dict>
116
- </array>
117
- <key>GID</key>
118
- <integer>80</integer>
119
- <key>PATH</key>
120
- <string>bin</string>
121
- <key>PATH_TYPE</key>
122
- <integer>0</integer>
123
- <key>PERMISSIONS</key>
124
- <integer>493</integer>
125
- <key>TYPE</key>
126
- <integer>2</integer>
127
- <key>UID</key>
128
- <integer>0</integer>
129
- </dict>
130
- </array>
131
- <key>GID</key>
132
- <integer>80</integer>
133
- <key>PATH</key>
134
- <string>obs-browser</string>
135
- <key>PATH_TYPE</key>
136
- <integer>0</integer>
137
- <key>PERMISSIONS</key>
138
- <integer>493</integer>
139
- <key>TYPE</key>
140
- <integer>2</integer>
141
- <key>UID</key>
142
- <integer>0</integer>
143
- </dict>
144
- </array>
145
- <key>GID</key>
146
- <integer>80</integer>
147
- <key>PATH</key>
148
- <string>plugins</string>
149
- <key>PATH_TYPE</key>
150
- <integer>0</integer>
151
- <key>PERMISSIONS</key>
152
- <integer>493</integer>
153
- <key>TYPE</key>
154
- <integer>2</integer>
155
- <key>UID</key>
156
- <integer>0</integer>
157
- </dict>
158
- </array>
159
- <key>GID</key>
160
- <integer>80</integer>
161
- <key>PATH</key>
162
- <string>obs-studio</string>
163
- <key>PATH_TYPE</key>
164
- <integer>0</integer>
165
- <key>PERMISSIONS</key>
166
- <integer>493</integer>
167
- <key>TYPE</key>
168
- <integer>2</integer>
169
- <key>UID</key>
170
- <integer>0</integer>
171
- </dict>
172
- </array>
173
- <key>GID</key>
174
- <integer>80</integer>
175
- <key>PATH</key>
176
- <string>Application Support</string>
177
- <key>PATH_TYPE</key>
178
- <integer>0</integer>
179
- <key>PERMISSIONS</key>
180
- <integer>493</integer>
181
- <key>TYPE</key>
182
- <integer>1</integer>
183
- <key>UID</key>
184
- <integer>0</integer>
185
- </dict>
186
- <dict>
187
- <key>CHILDREN</key>
188
- <array/>
189
- <key>GID</key>
190
- <integer>0</integer>
191
- <key>PATH</key>
192
- <string>Documentation</string>
193
- <key>PATH_TYPE</key>
194
- <integer>0</integer>
195
- <key>PERMISSIONS</key>
196
- <integer>493</integer>
197
- <key>TYPE</key>
198
- <integer>1</integer>
199
- <key>UID</key>
200
- <integer>0</integer>
201
obs-studio-26.1.0.tar.xz/CI/install/osx/Info.plist
Deleted
30
1
2
-<?xml version="1.0" encoding="UTF-8"?>
3
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4
-<plist version="1.0">
5
-<dict>
6
- <key>CFBundleIconFile</key>
7
- <string>obs.icns</string>
8
- <key>CFBundleName</key>
9
- <string>OBS</string>
10
- <key>CFBundleGetInfoString</key>
11
- <string>OBS - Free and Open Source Streaming/Recording Software</string>
12
- <key>CFBundleExecutable</key>
13
- <string>obs</string>
14
- <key>CFBundleIdentifier</key>
15
- <string>com.obsproject.obs-studio</string>
16
- <key>CFBundlePackageType</key>
17
- <string>APPL</string>
18
- <key>LSMinimumSystemVersion</key>
19
- <string>10.8.5</string>
20
- <key>NSHighResolutionCapable</key>
21
- <true/>
22
- <key>LSAppNapIsDisabled</key>
23
- <true/>
24
- <key>NSCameraUsageDescription</key>
25
- <string>OBS needs to access the camera to enable camera sources to work.</string>
26
- <key>NSMicrophoneUsageDescription</key>
27
- <string>OBS needs to access the microphone to enable audio input.</string>
28
-</dict>
29
-</plist>
30
obs-studio-26.1.0.tar.xz/CI/install/osx/OBSPublicDSAKey.pem
Deleted
38
1
2
------BEGIN PUBLIC KEY-----
3
-MIIGPDCCBC4GByqGSM44BAEwggQhAoICAQCZZZ2y7H2GJmMfP4KQihJTJOoiGNUw
4
-mue6sqMbH+utRykRnSKBZux6R665eRFMpNgrgFO1TLLGbdD2U31KiGtCvFJOmOl3
5
-+QP055BuXjEG36NU7AWEFLAlbDlr/2D3oumq3Ib3iMnnr9RrVztJ2VFOvVio1eWr
6
-ZxboVwKPK8D6BqsWiv15vbYlJnTC4Fls6ySmdjVBxwoPlTaMu1ysi5DfbIZ93s5u
7
-aQt1FvXuWtPBWjyVUORcNbcWf49E5R2pV0OSBK95Hw2/wXz4vmj+w92dTePGnVaW
8
-Me4CoF5PIeZILwp6DCLStX4eW2WG1NChJTC8zeQ/3bMMoGyKM/MadyvrDqMywsKY
9
-caxkIwHrDKOEdXXGo80dIwZMMLipPA8DKhx5ojphfkeXjIhKSx+49knXT3ED5okE
10
-Wai7tGUXj/8D8sGh+7b+AVsdujvr4v8WQaZiKUOZ2IIHOg3VLz9T9v0zet1Yt987
11
-KNymFcp2CHeJ6KnDP/ZGQ6Nl0HsPxUgscsXV+R2FEc8Q1j0Ukkuxnopa0E4/huUu
12
-gjyRzpXD734qFMDf7LcXca6qNjBor6gVj5sRyRKCpZ+KQfMUlr8jp506ztYSyeJu
13
-dxJV30tQgztwkbrs02CqOt4Z3Peo6sdht7hWKSPVwmja3tq8/TfUSSoo6wKYN9/w
14
-Mf3dVeRF8hCzJQIVAJnzuzmzQhCKPiQnl3jh5qGII2XfAoICAQCCVATAff89ceHj
15
-ROHEbHTQFpVxJ/kRZPfxnU46DSw79Tih7tthV68oakPSOTP3cx/Tga0GwogarZ9N
16
-F2VVan5w9OQSSewXsr5UDT5bnmJF+h+JB7TMy+sXZBYobUqjlUd5VtKc8RsN86P4
17
-s7xbK0mA+hfe+27r18JT81/eH3xUfh7UOUGSdMN2Ch9f7RFSMZIgUAZUzu2K3ODp
18
-hPgtc2QJ8QVAp7GLvQgw8ZUME/ChZslyBIyJvYgUIxfxlgRWYro5pQT7/ngkgdXo
19
-wlghHKkldwMuY3zaFdhPnFNuEUEtc18ILsbz0+AnagCUd6n+3safskCRqLIHMOY6
20
-iLBSZPX9hJQhVCqSqz1VNDDww8FNa/fojJ1Lr/TI0I+0Ib2pCiY2LChXUqGY5SLZ
21
-2KNs5qFsyZP+I0L8YsGwqvUYyFwk7Ok224n0NtaOwqpLCrtXd/i6DaDNiaoJuwJC
22
-1ELCfaZivorgkC5rhBt2H7qWUAR+EtrFE/gb0k/G5EIhjYql7onGbX+G2re38vQA
23
-fg1pzguhig2dafP/BxMLZrn1Gg61xzmEYPuS9gclktaf675srv8GVb46VkOxXL+D
24
-YvTmpJPP7UUOVlmAMCo4j4y09MW3jq9TDp42VTLeZVubyjslGnavlnq1O+ZyXUye
25
-1FMeby65sIbSHHHwoFnRv3hLSEXI5gOCAgYAAoICAQCUkYnZkPfHfOJZI403xUYP
26
-CE/bLpkza074Xo6EXElsWRnpQgNTx+JFOvItgj3v0OkIqDin9UredKOwfkiftslV
27
-jxUVKA6I5kwnGvCpvTpQMLyLjq+VQr+J2D6eId6tV/iajhdu5r4JThU8KllT7Ywb
28
-NAur34ftLNCVAMRUaDNeEoHfePgderW384e+lbvpmtifmBluammGSxxRtUsdjvJZ
29
-BFkhaJu86CKxcU7D1lbPVOtV/jaxz6d16VdGcfBdi2LzXZzZtYpT9XGPX3NF+xii
30
-spAURWsoe11LTRXF+eJhgCm5iIDN3kh1HEQKYKAVpmrcM0aFzk/NpS+tFyU72vaq
31
-IRSSJw/aa1oELOAakG5oPldc4RcYWl32sbnVwXHO7TZvgTrBSC10o65MAC5CHP/s
32
-b07heDYAIt7re7szvOYq+c/9zAMAlu3pcO8MqaXYMmybdHBXHQ2b+DdJWHmIUWcX
33
-CbUzr09vzGkJAvqsXqbmJPr8aixrO75DhT0iDTILLWe/GWK51nf+Tg0pNxVgGyAl
34
-BqvRqqo7SSDu9FMkwQesFFHhuoHLyEHwVPJ+sMQTNwQcm9c6YuW8EYDRSkeKLWYk
35
-3fkjG+Pe9uVE8a1taDg3FjSY0UqjUT6XMw+i0Lajyus2L6wFBwrrGM6E4xa6x1CC
36
-MGjmuSOlPA1umQsToIcO4g==
37
------END PUBLIC KEY-----
38
obs-studio-26.1.0.tar.xz/CI/install/osx/SyphonInject.pkg
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.png
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/QuickLook
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/QuickLook/Icon.tiff
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/QuickLook/Preview.tiff
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/QuickLook/Thumbnail.tiff
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/data
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/data/556CF265-5721-4F18-BE83-8CF39483B4C2
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/data/8CA689C3-ED2A-459E-952C-E08026CFCD07
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.pxd/metadata.info
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background.tiff
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/background@2x.png
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/buildDMG
Deleted
3
1
2
-dmgbuild -s ./settings.json "OBS" obs.dmg
3
obs-studio-26.1.0.tar.xz/CI/install/osx/build_app.py
Deleted
201
1
2
-#!/usr/bin/env python
3
-
4
-candidate_paths = "bin obs-plugins data".split()
5
-
6
-plist_path = "../cmake/osxbundle/Info.plist"
7
-icon_path = "../cmake/osxbundle/obs.icns"
8
-run_path = "../cmake/osxbundle/obslaunch.sh"
9
-
10
-#not copied
11
-blacklist = """/usr /System""".split()
12
-
13
-#copied
14
-whitelist = """/usr/local""".split()
15
-
16
-#
17
-#
18
-#
19
-
20
-
21
-from sys import argv
22
-from glob import glob
23
-from subprocess import check_output, call
24
-from collections import namedtuple
25
-from shutil import copy, copytree, rmtree
26
-from os import makedirs, rename, walk, path as ospath
27
-import plistlib
28
-
29
-import argparse
30
-
31
-def _str_to_bool(s):
32
- """Convert string to bool (in argparse context)."""
33
- if s.lower() not in ['true', 'false']:
34
- raise ValueError('Need bool; got %r' % s)
35
- return {'true': True, 'false': False}[s.lower()]
36
-
37
-def add_boolean_argument(parser, name, default=False):
38
- """Add a boolean argument to an ArgumentParser instance."""
39
- group = parser.add_mutually_exclusive_group()
40
- group.add_argument(
41
- '--' + name, nargs='?', default=default, const=True, type=_str_to_bool)
42
- group.add_argument('--no' + name, dest=name, action='store_false')
43
-
44
-parser = argparse.ArgumentParser(description='obs-studio package util')
45
-parser.add_argument('-d', '--base-dir', dest='dir', default='rundir/RelWithDebInfo')
46
-parser.add_argument('-n', '--build-number', dest='build_number', default='0')
47
-parser.add_argument('-k', '--public-key', dest='public_key', default='OBSPublicDSAKey.pem')
48
-parser.add_argument('-f', '--sparkle-framework', dest='sparkle', default=None)
49
-parser.add_argument('-b', '--base-url', dest='base_url', default='https://obsproject.com/osx_update')
50
-parser.add_argument('-u', '--user', dest='user', default='jp9000')
51
-parser.add_argument('-c', '--channel', dest='channel', default='master')
52
-add_boolean_argument(parser, 'stable', default=False)
53
-parser.add_argument('-p', '--prefix', dest='prefix', default='')
54
-args = parser.parse_args()
55
-
56
-def cmd(cmd):
57
- import subprocess
58
- import shlex
59
- return subprocess.check_output(shlex.split(cmd)).rstrip('\r\n')
60
-
61
-LibTarget = namedtuple("LibTarget", ("path", "external", "copy_as"))
62
-
63
-inspect = list()
64
-
65
-inspected = set()
66
-
67
-build_path = args.dir
68
-build_path = build_path.replace("\\ ", " ")
69
-
70
-def add(name, external=False, copy_as=None):
71
- if external and copy_as is None:
72
- copy_as = name.split("/")[-1]
73
- if name[0] != "/":
74
- name = build_path+"/"+name
75
- t = LibTarget(name, external, copy_as)
76
- if t in inspected:
77
- return
78
- inspect.append(t)
79
- inspected.add(t)
80
-
81
-
82
-for i in candidate_paths:
83
- print("Checking " + i)
84
- for root, dirs, files in walk(build_path+"/"+i):
85
- for file_ in files:
86
- if ".ini" in file_:
87
- continue
88
- if ".png" in file_:
89
- continue
90
- if ".effect" in file_:
91
- continue
92
- if ".py" in file_:
93
- continue
94
- if ".json" in file_:
95
- continue
96
- path = root + "/" + file_
97
- try:
98
- out = check_output("{0}otool -L '{1}'".format(args.prefix, path), shell=True,
99
- universal_newlines=True)
100
- if "is not an object file" in out:
101
- continue
102
- except:
103
- continue
104
- rel_path = path[len(build_path)+1:]
105
- print(repr(path), repr(rel_path))
106
- add(rel_path)
107
-
108
-def add_plugins(path, replace):
109
- for img in glob(path.replace(
110
- "lib/QtCore.framework/Versions/5/QtCore",
111
- "plugins/%s/*"%replace).replace(
112
- "Library/Frameworks/QtCore.framework/Versions/5/QtCore",
113
- "share/qt5/plugins/%s/*"%replace)):
114
- if "_debug" in img:
115
- continue
116
- add(img, True, img.split("plugins/")[-1])
117
-
118
-actual_sparkle_path = '@loader_path/Frameworks/Sparkle.framework/Versions/A/Sparkle'
119
-
120
-while inspect:
121
- target = inspect.pop()
122
- print("inspecting", repr(target))
123
- path = target.path
124
- if path[0] == "@":
125
- continue
126
- out = check_output("{0}otool -L '{1}'".format(args.prefix, path), shell=True,
127
- universal_newlines=True)
128
-
129
- if "QtCore" in path:
130
- add_plugins(path, "platforms")
131
- add_plugins(path, "imageformats")
132
- add_plugins(path, "accessible")
133
- add_plugins(path, "styles")
134
-
135
-
136
- for line in out.split("\n")[1:]:
137
- new = line.strip().split(" (")[0]
138
- if '@' in new and "sparkle.framework" in new.lower():
139
- actual_sparkle_path = new
140
- print "Using sparkle path:", repr(actual_sparkle_path)
141
- if not new or new[0] == "@" or new.endswith(path.split("/")[-1]):
142
- continue
143
- whitelisted = False
144
- for i in whitelist:
145
- if new.startswith(i):
146
- whitelisted = True
147
- if not whitelisted:
148
- blacklisted = False
149
- for i in blacklist:
150
- if new.startswith(i):
151
- blacklisted = True
152
- break
153
- if blacklisted:
154
- continue
155
- add(new, True)
156
-
157
-changes = list()
158
-for path, external, copy_as in inspected:
159
- if not external:
160
- continue #built with install_rpath hopefully
161
- changes.append("-change '%s' '@rpath/%s'"%(path, copy_as))
162
-changes = " ".join(changes)
163
-
164
-info = plistlib.readPlist(plist_path)
165
-
166
-latest_tag = cmd('git describe --tags --abbrev=0')
167
-log = cmd('git log --pretty=oneline {0}...HEAD'.format(latest_tag))
168
-
169
-from os import path
170
-# set version
171
-if args.stable:
172
- info["CFBundleVersion"] = latest_tag
173
- info["CFBundleShortVersionString"] = latest_tag
174
- info["SUFeedURL"] = '{0}/stable/updates.xml'.format(args.base_url)
175
-else:
176
- info["CFBundleVersion"] = args.build_number
177
- info["CFBundleShortVersionString"] = '{0}.{1}'.format(latest_tag, args.build_number)
178
- info["SUFeedURL"] = '{0}/{1}/{2}/updates.xml'.format(args.base_url, args.user, args.channel)
179
-
180
-info["SUPublicDSAKeyFile"] = path.basename(args.public_key)
181
-info["OBSFeedsURL"] = '{0}/feeds.xml'.format(args.base_url)
182
-
183
-app_name = info["CFBundleName"]+".app"
184
-icon_file = "tmp/Contents/Resources/%s"%info["CFBundleIconFile"]
185
-
186
-copytree(build_path, "tmp/Contents/Resources/", symlinks=True)
187
-copy(icon_path, icon_file)
188
-plistlib.writePlist(info, "tmp/Contents/Info.plist")
189
-makedirs("tmp/Contents/MacOS")
190
-copy(run_path, "tmp/Contents/MacOS/%s"%info["CFBundleExecutable"])
191
-try:
192
- copy(args.public_key, "tmp/Contents/Resources")
193
-except:
194
- pass
195
-
196
-if args.sparkle is not None:
197
- copytree(args.sparkle, "tmp/Contents/Frameworks/Sparkle.framework", symlinks=True)
198
-
199
-prefix = "tmp/Contents/Resources/"
200
-sparkle_path = '@loader_path/{0}/Frameworks/Sparkle.framework/Versions/A/Sparkle'
201
obs-studio-26.1.0.tar.xz/CI/install/osx/dylibBundler
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/makeRetinaBG
Deleted
3
1
2
-tiffutil -cathidpicheck background.png background@2x.png -out background.tiff
3
obs-studio-26.1.0.tar.xz/CI/install/osx/obs.icns
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/obs.png
Deleted
obs-studio-26.1.0.tar.xz/CI/install/osx/packageApp.sh
Deleted
79
1
2
-# Exit if something fails
3
-set -e
4
-
5
-rm -rf ./OBS.app
6
-
7
-mkdir OBS.app
8
-mkdir OBS.app/Contents
9
-mkdir OBS.app/Contents/MacOS
10
-mkdir OBS.app/Contents/PlugIns
11
-mkdir OBS.app/Contents/Resources
12
-
13
-cp -R rundir/RelWithDebInfo/bin/ ./OBS.app/Contents/MacOS
14
-cp -R rundir/RelWithDebInfo/data ./OBS.app/Contents/Resources
15
-cp ../CI/install/osx/obs.icns ./OBS.app/Contents/Resources
16
-cp -R rundir/RelWithDebInfo/obs-plugins/ ./OBS.app/Contents/PlugIns
17
-cp ../CI/install/osx/Info.plist ./OBS.app/Contents
18
-
19
-../CI/install/osx/dylibBundler -b -cd -d ./OBS.app/Contents/Frameworks -p @executable_path/../Frameworks/ \
20
--s ./OBS.app/Contents/MacOS \
21
--s /usr/local/opt/mbedtls/lib/ \
22
--x ./OBS.app/Contents/PlugIns/coreaudio-encoder.so \
23
--x ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so \
24
--x ./OBS.app/Contents/PlugIns/frontend-tools.so \
25
--x ./OBS.app/Contents/PlugIns/image-source.so \
26
--x ./OBS.app/Contents/PlugIns/linux-jack.so \
27
--x ./OBS.app/Contents/PlugIns/mac-avcapture.so \
28
--x ./OBS.app/Contents/PlugIns/mac-capture.so \
29
--x ./OBS.app/Contents/PlugIns/mac-decklink.so \
30
--x ./OBS.app/Contents/PlugIns/mac-syphon.so \
31
--x ./OBS.app/Contents/PlugIns/mac-vth264.so \
32
--x ./OBS.app/Contents/PlugIns/obs-browser.so \
33
--x ./OBS.app/Contents/PlugIns/obs-browser-page \
34
--x ./OBS.app/Contents/PlugIns/obs-ffmpeg.so \
35
--x ./OBS.app/Contents/PlugIns/obs-filters.so \
36
--x ./OBS.app/Contents/PlugIns/obs-transitions.so \
37
--x ./OBS.app/Contents/PlugIns/obs-vst.so \
38
--x ./OBS.app/Contents/PlugIns/rtmp-services.so \
39
--x ./OBS.app/Contents/MacOS/obs \
40
--x ./OBS.app/Contents/MacOS/obs-ffmpeg-mux \
41
--x ./OBS.app/Contents/MacOS/obslua.so \
42
--x ./OBS.app/Contents/PlugIns/obs-x264.so \
43
--x ./OBS.app/Contents/PlugIns/text-freetype2.so \
44
--x ./OBS.app/Contents/PlugIns/obs-libfdk.so
45
-# -x ./OBS.app/Contents/MacOS/_obspython.so \
46
-# -x ./OBS.app/Contents/PlugIns/obs-outputs.so \
47
-
48
-/usr/local/Cellar/qt/5.14.1/bin/macdeployqt ./OBS.app
49
-
50
-mv ./OBS.app/Contents/MacOS/libobs-opengl.so ./OBS.app/Contents/Frameworks
51
-
52
-rm -f -r ./OBS.app/Contents/Frameworks/QtNetwork.framework
53
-
54
-# put qt network in here becasuse streamdeck uses it
55
-cp -R /usr/local/opt/qt/lib/QtNetwork.framework ./OBS.app/Contents/Frameworks
56
-chmod -R +w ./OBS.app/Contents/Frameworks/QtNetwork.framework
57
-rm -r ./OBS.app/Contents/Frameworks/QtNetwork.framework/Headers
58
-rm -r ./OBS.app/Contents/Frameworks/QtNetwork.framework/Versions/5/Headers/
59
-chmod 644 ./OBS.app/Contents/Frameworks/QtNetwork.framework/Versions/5/Resources/Info.plist
60
-install_name_tool -id @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork ./OBS.app/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork
61
-install_name_tool -change /usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./OBS.app/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork
62
-
63
-
64
-# decklink ui qt
65
-install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so
66
-install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so
67
-install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so
68
-
69
-# frontend tools qt
70
-install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./OBS.app/Contents/PlugIns/frontend-tools.so
71
-install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./OBS.app/Contents/PlugIns/frontend-tools.so
72
-install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./OBS.app/Contents/PlugIns/frontend-tools.so
73
-
74
-# vst qt
75
-install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./OBS.app/Contents/PlugIns/obs-vst.so
76
-install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./OBS.app/Contents/PlugIns/obs-vst.so
77
-install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./OBS.app/Contents/PlugIns/obs-vst.so
78
-install_name_tool -change /usr/local/opt/qt/lib/QtMacExtras.framework/Versions/5/QtMacExtras @executable_path/../Frameworks/QtMacExtras.framework/Versions/5/QtMacExtras ./OBS.app/Contents/PlugIns/obs-vst.so
79
obs-studio-26.1.0.tar.xz/CI/install/osx/package_util.py
Deleted
96
1
2
-def cmd(cmd):
3
- import subprocess
4
- import shlex
5
- return subprocess.check_output(shlex.split(cmd)).rstrip('\r\n')
6
-
7
-def get_tag_info(tag):
8
- rev = cmd('git rev-parse {0}'.format(latest_tag))
9
- anno = cmd('git cat-file -p {0}'.format(rev))
10
- tag_info = []
11
- for i, v in enumerate(anno.splitlines()):
12
- if i <= 4:
13
- continue
14
- tag_info.append(v.lstrip())
15
-
16
- return tag_info
17
-
18
-def gen_html(github_user, latest_tag):
19
-
20
- url = 'https://github.com/{0}/obs-studio/commit/%H'.format(github_user)
21
-
22
- with open('readme.html', 'w') as f:
23
- f.write("<html><body>")
24
- log_cmd = """git log {0}...HEAD --pretty=format:'<li>• <a href="{1}">(view)</a> %s</li>'"""
25
- log_res = cmd(log_cmd.format(latest_tag, url))
26
- if len(log_res.splitlines()):
27
- f.write('<p>Changes since {0}: (Newest to oldest)</p>'.format(latest_tag))
28
- f.write(log_res)
29
-
30
- ul = False
31
- f.write('<p>')
32
- import re
33
-
34
- for l in get_tag_info(latest_tag):
35
- if not len(l):
36
- continue
37
- if l.startswith('*'):
38
- ul = True
39
- if not ul:
40
- f.write('<ul>')
41
- f.write('<li>• {0}</li>'.format(re.sub(r'^(\s*)?[*](\s*)?', '', l)))
42
- else:
43
- if ul:
44
- f.write('</ul><p/>')
45
- ul = False
46
- f.write('<p>{0}</p>'.format(l))
47
- if ul:
48
- f.write('</ul>')
49
- f.write('</p></body></html>')
50
-
51
- cmd('textutil -convert rtf readme.html -output readme.rtf')
52
- cmd("""sed -i '' 's/Times-Roman/Verdana/g' readme.rtf""")
53
-
54
-def save_manifest(latest_tag, user, jenkins_build, branch, stable):
55
- log = cmd('git log --pretty=oneline {0}...HEAD'.format(latest_tag))
56
- manifest = {}
57
- manifest['commits'] = []
58
- for v in log.splitlines():
59
- manifest['commits'].append(v)
60
- manifest['tag'] = {
61
- 'name': latest_tag,
62
- 'description': get_tag_info(latest_tag)
63
- }
64
-
65
- manifest['version'] = cmd('git rev-list HEAD --count')
66
- manifest['sha1'] = cmd('git rev-parse HEAD')
67
- manifest['jenkins_build'] = jenkins_build
68
-
69
- manifest['user'] = user
70
- manifest['branch'] = branch
71
- manifest['stable'] = stable
72
-
73
- import cPickle
74
- with open('manifest', 'w') as f:
75
- cPickle.dump(manifest, f)
76
-
77
-def prepare_pkg(project, package_id):
78
- cmd('packagesutil --file "{0}" set package-1 identifier {1}'.format(project, package_id))
79
- cmd('packagesutil --file "{0}" set package-1 version {1}'.format(project, '1.0'))
80
-
81
-
82
-import argparse
83
-parser = argparse.ArgumentParser(description='obs-studio package util')
84
-parser.add_argument('-u', '--user', dest='user', default='jp9000')
85
-parser.add_argument('-p', '--package-id', dest='package_id', default='org.obsproject.pkg.obs-studio')
86
-parser.add_argument('-f', '--project-file', dest='project', default='OBS.pkgproj')
87
-parser.add_argument('-j', '--jenkins-build', dest='jenkins_build', default='0')
88
-parser.add_argument('-b', '--branch', dest='branch', default='master')
89
-parser.add_argument('-s', '--stable', dest='stable', required=False, action='store_true', default=False)
90
-args = parser.parse_args()
91
-
92
-latest_tag = cmd('git describe --tags --abbrev=0')
93
-gen_html(args.user, latest_tag)
94
-prepare_pkg(args.project, args.package_id)
95
-save_manifest(latest_tag, args.user, args.jenkins_build, args.branch, args.stable)
96
obs-studio-26.1.0.tar.xz/CI/install/osx/post-install.sh
Deleted
3
1
2
-#!/usr/bin/env bash
3
obs-studio-26.1.0.tar.xz/CI/install/osx/settings.json
Deleted
15
1
2
-{
3
- "title": "OBS",
4
- "background": "../CI/install/osx/background.tiff",
5
- "format": "UDZO",
6
- "compression-level": 9,
7
- "window": { "position": { "x": 100, "y": 100 },
8
- "size": { "width": 540, "height": 380 } },
9
- "contents": [
10
- { "x": 120, "y": 180, "type": "file",
11
- "path": "./OBS.app" },
12
- { "x": 420, "y": 180, "type": "link", "path": "/Applications" }
13
- ]
14
-}
15
obs-studio-26.1.0.tar.xz/CI/osxcert
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/osxcert/Certificates.p12.enc
Deleted
obs-studio-26.1.0.tar.xz/CI/util
Deleted
2
1
-(directory)
2
obs-studio-26.1.0.tar.xz/CI/util/build-package-deps-osx.sh
Deleted
163
1
2
-#!/usr/bin/env bash
3
-
4
-set -e
5
-
6
-# This script builds a tar file that contains a bunch of deps that OBS needs for
7
-# advanced functionality on OSX. Currently this tar file is pulled down off of s3
8
-# and used in the CI build process on travis.
9
-# Mostly this sets build flags to compile with older SDKS and make sure that
10
-# the libs are portable.
11
-
12
-exists()
13
-{
14
- command -v "$1" >/dev/null 2>&1
15
-}
16
-
17
-if ! exists nasm; then
18
- echo "nasm not found. Try brew install nasm"
19
- exit
20
-fi
21
-
22
-CURDIR=$(pwd)
23
-
24
-# the temp directory
25
-WORK_DIR=`mktemp -d`
26
-
27
-# deletes the temp directory
28
-function cleanup {
29
- #rm -rf "$WORK_DIR"
30
- echo "Deleted temp working directory $WORK_DIR"
31
-}
32
-
33
-# register the cleanup function to be called on the EXIT signal
34
-trap cleanup EXIT
35
-
36
-cd $WORK_DIR
37
-
38
-DEPS_DEST=$WORK_DIR/obsdeps
39
-
40
-# make dest dirs
41
-mkdir $DEPS_DEST
42
-mkdir $DEPS_DEST/bin
43
-mkdir $DEPS_DEST/include
44
-mkdir $DEPS_DEST/lib
45
-
46
-# OSX COMPAT
47
-export MACOSX_DEPLOYMENT_TARGET=10.11
48
-
49
-# If you need an olders SDK and Xcode won't give it to you
50
-# https://github.com/phracker/MacOSX-SDKs
51
-
52
-# libopus
53
-curl -L -O https://ftp.osuosl.org/pub/xiph/releases/opus/opus-1.2.1.tar.gz
54
-tar -xf opus-1.2.1.tar.gz
55
-cd ./opus-1.2.1
56
-mkdir build
57
-cd ./build
58
-../configure --disable-shared --enable-static --prefix="/tmp/obsdeps"
59
-make -j 12
60
-make install
61
-
62
-cd $WORK_DIR
63
-
64
-# libogg
65
-curl -L -O https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.3.tar.gz
66
-tar -xf libogg-1.3.3.tar.gz
67
-cd ./libogg-1.3.3
68
-mkdir build
69
-cd ./build
70
-../configure --disable-shared --enable-static --prefix="/tmp/obsdeps"
71
-make -j 12
72
-make install
73
-
74
-cd $WORK_DIR
75
-
76
-# libvorbis
77
-curl -L -O https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.6.tar.gz
78
-tar -xf libvorbis-1.3.6.tar.gz
79
-cd ./libvorbis-1.3.6
80
-mkdir build
81
-cd ./build
82
-../configure --disable-shared --enable-static --prefix="/tmp/obsdeps"
83
-make -j 12
84
-make install
85
-
86
-cd $WORK_DIR
87
-
88
-# libvpx
89
-curl -L -O https://chromium.googlesource.com/webm/libvpx/+archive/v1.7.0.tar.gz
90
-mkdir -p ./libvpx-v1.7.0
91
-tar -xf v1.7.0.tar.gz -C $PWD/libvpx-v1.7.0
92
-cd ./libvpx-v1.7.0
93
-mkdir -p build
94
-cd ./build
95
-../configure --disable-shared --prefix="/tmp/obsdeps" --libdir="/tmp/obsdeps/lib"
96
-make -j 12
97
-make install
98
-
99
-cd $WORK_DIR
100
-
101
-# x264
102
-git clone git://git.videolan.org/x264.git
103
-cd ./x264
104
-git checkout origin/stable
105
-mkdir build
106
-cd ./build
107
-../configure --extra-ldflags="-mmacosx-version-min=10.11" --enable-static --prefix="/tmp/obsdeps"
108
-make -j 12
109
-make install
110
-../configure --extra-ldflags="-mmacosx-version-min=10.11" --enable-shared --libdir="/tmp/obsdeps/bin" --prefix="/tmp/obsdeps"
111
-make -j 12
112
-ln -f -s libx264.*.dylib libx264.dylib
113
-find . -name \*.dylib -exec cp \{\} $DEPS_DEST/bin/ \;
114
-rsync -avh --include="*/" --include="*.h" --exclude="*" ../* $DEPS_DEST/include/
115
-rsync -avh --include="*/" --include="*.h" --exclude="*" ./* $DEPS_DEST/include/
116
-
117
-cd $WORK_DIR
118
-
119
-# janson
120
-curl -L -O http://www.digip.org/jansson/releases/jansson-2.11.tar.gz
121
-tar -xf jansson-2.11.tar.gz
122
-cd jansson-2.11
123
-mkdir build
124
-cd ./build
125
-../configure --libdir="/tmp/obsdeps/bin" --enable-shared --disable-static
126
-make -j 12
127
-find . -name \*.dylib -exec cp \{\} $DEPS_DEST/bin/ \;
128
-rsync -avh --include="*/" --include="*.h" --exclude="*" ../* $DEPS_DEST/include/
129
-rsync -avh --include="*/" --include="*.h" --exclude="*" ./* $DEPS_DEST/include/
130
-
131
-cd $WORK_DIR
132
-
133
-export LDFLAGS="-L/tmp/obsdeps/lib"
134
-export CFLAGS="-I/tmp/obsdeps/include"
135
-
136
-# FFMPEG
137
-curl -L -O https://github.com/FFmpeg/FFmpeg/archive/n4.0.2.zip
138
-unzip ./n4.0.2.zip
139
-cd ./FFmpeg-n4.0.2
140
-mkdir build
141
-cd ./build
142
-../configure --pkg-config-flags="--static" --extra-ldflags="-mmacosx-version-min=10.11" --enable-shared --disable-static --shlibdir="/tmp/obsdeps/bin" --enable-gpl --disable-doc --enable-libx264 --enable-libopus --enable-libvorbis --enable-libvpx --disable-outdev=sdl
143
-make -j 12
144
-find . -name \*.dylib -exec cp \{\} $DEPS_DEST/bin/ \;
145
-rsync -avh --include="*/" --include="*.h" --exclude="*" ../* $DEPS_DEST/include/
146
-rsync -avh --include="*/" --include="*.h" --exclude="*" ./* $DEPS_DEST/include/
147
-
148
-#luajit
149
-curl -L -O https://luajit.org/download/LuaJIT-2.0.5.tar.gz
150
-tar -xf LuaJIT-2.0.5.tar.gz
151
-cd LuaJIT-2.0.5
152
-make PREFIX=/tmp/obsdeps
153
-make PREFIX=/tmp/obsdeps install
154
-find /tmp/obsdeps/lib -name libluajit\*.dylib -exec cp \{\} $DEPS_DEST/lib/ \;
155
-rsync -avh --include="*/" --include="*.h" --exclude="*" src/* $DEPS_DEST/include/
156
-make PREFIX=/tmp/obsdeps uninstall
157
-
158
-cd $WORK_DIR
159
-
160
-tar -czf osx-deps.tar.gz obsdeps
161
-
162
-cp ./osx-deps.tar.gz $CURDIR
163
obs-studio-26.1.0.tar.xz/CI/util/win32.sh
Deleted
71
1
2
-#/bin/bash
3
-
4
-cd x264
5
-make clean
6
-LDFLAGS="-static-libgcc" ./configure --enable-shared --enable-win32thread --disable-avs --disable-ffms --disable-gpac --disable-interlaced --disable-lavf --cross-prefix=i686-w64-mingw32- --host=i686-pc-mingw32 --prefix="/home/jim/packages/win32"
7
-make -j6 fprofiled VIDS="CITY_704x576_60_orig_01.yuv"
8
-make install
9
-i686-w64-mingw32-dlltool -z /home/jim/packages/win32/bin/x264.orig.def --export-all-symbols /home/jim/packages/win32/bin/libx264-148.dll
10
-grep "EXPORTS\|x264" /home/jim/packages/win32/bin/x264.orig.def > /home/jim/packages/win32/bin/x264.def
11
-rm -f /home/jim/packages/win32/bin/x264.org.def
12
-sed -i -e "/\\t.*DATA/d" -e "/\\t\".*/d" -e "s/\s@.*//" /home/jim/packages/win32/bin/x264.def
13
-i686-w64-mingw32-dlltool -m i386 -d /home/jim/packages/win32/bin/x264.def -l /home/jim/packages/win32/bin/x264.lib -D /home/jim/win32/packages/bin/libx264-148.dll
14
-cd ..
15
-
16
-cd opus
17
-make clean
18
-LDFLAGS="-static-libgcc" ./configure -host=i686-w64-mingw32 --prefix="/home/jim/packages/win32" --enable-shared
19
-make -j6
20
-make install
21
-cd ..
22
-
23
-cd zlib/build32
24
-make clean
25
-cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_INSTALL_PREFIX=/home/jim/packages/win32 -DINSTALL_PKGCONFIG_DIR=/home/jim/packages/win32/lib/pkgconfig -DCMAKE_RC_COMPILER=i686-w64-mingw32-windres -DCMAKE_SHARED_LINKER_FLAGS="-static-libgcc"
26
-make -j6
27
-make install
28
-mv ../../win32/lib/libzlib.dll.a ../../win32/lib/libz.dll.a
29
-mv ../../win32/lib/libzlibstatic.a ../../win32/lib/libz.a
30
-cp ../win32/zlib.def /home/jim/packages/win32/bin
31
-i686-w64-mingw32-dlltool -m i386 -d ../win32/zlib.def -l /home/jim/packages/win32/bin/zlib.lib -D /home/jim/win32/packages/bin/zlib.dll
32
-cd ../..
33
-
34
-cd libpng
35
-make clean
36
-PKG_CONFIG_PATH="/home/jim/packages/win32/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win32/lib -static-libgcc" CPPFLAGS="-I/home/jim/packages/win32/include" ./configure -host=i686-w64-mingw32 --prefix="/home/jim/packages/win32" --enable-shared
37
-make -j6
38
-make install
39
-cd ..
40
-
41
-cd libogg
42
-make clean
43
-PKG_CONFIG_PATH="/home/jim/packages/win32/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win32/lib -static-libgcc" CPPFLAGS="-I/home/jim/packages/win32/include" ./configure -host=i686-w64-mingw32 --prefix="/home/jim/packages/win32" --enable-shared
44
-make -j6
45
-make install
46
-cd ..
47
-
48
-cd libvorbis
49
-make clean
50
-PKG_CONFIG_PATH="/home/jim/packages/win32/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win32/lib -static-libgcc" CPPFLAGS="-I/home/jim/packages/win32/include" ./configure -host=i686-w64-mingw32 --prefix="/home/jim/packages/win32" --enable-shared --with-ogg="/home/jim/packages/win32"
51
-make -j6
52
-make install
53
-cd ..
54
-
55
-cd libvpxbuild
56
-make clean
57
-PKG_CONFIG_PATH="/home/jim/packages/win32/lib/pkgconfig" CROSS=i686-w64-mingw32- LDFLAGS="-static-libgcc" ../libvpx/configure --prefix=/home/jim/packages/win32 --enable-vp8 --enable-vp9 --disable-docs --disable-examples --enable-shared --disable-static --enable-runtime-cpu-detect --enable-realtime-only --disable-install-bins --disable-install-docs --disable-unit-tests --target=x86-win32-gcc
58
-make -j6
59
-make install
60
-i686-w64-mingw32-dlltool -m i386 -d libvpx.def -l /home/jim/packages/win32/bin/vpx.lib -D /home/jim/win32/packages/bin/libvpx-1.dll
61
-cd ..
62
-
63
-cd ffmpeg
64
-make clean
65
-cp /media/sf_linux/nvEncodeAPI.h /home/jim/packages/win32/include
66
-PKG_CONFIG_PATH="/home/jim/packages/win32/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win32/lib -static-libgcc" CFLAGS="-I/home/jim/packages/win32/include" ./configure --enable-memalign-hack --enable-gpl --disable-programs --disable-doc --arch=x86 --enable-shared --enable-nvenc --enable-libx264 --enable-libopus --enable-libvorbis --enable-libvpx --disable-debug --cross-prefix=i686-w64-mingw32- --target-os=mingw32 --pkg-config=pkg-config --prefix="/home/jim/packages/win32" --disable-postproc
67
-read -n1 -r -p "Press any key to continue building FFmpeg..." key
68
-make -j6
69
-make install
70
-cd ..
71
obs-studio-26.1.0.tar.xz/CI/util/win64.sh
Deleted
71
1
2
-#/bin/bash
3
-
4
-cd x264
5
-make clean
6
-LDFLAGS="-static-libgcc" ./configure --enable-shared --enable-win32thread --disable-avs --disable-ffms --disable-gpac --disable-interlaced --disable-lavf --cross-prefix=x86_64-w64-mingw32- --host=x86_64-pc-mingw32 --prefix="/home/jim/packages/win64"
7
-make -j6 fprofiled VIDS="CITY_704x576_60_orig_01.yuv"
8
-make install
9
-x86_64-w64-mingw32-dlltool -z /home/jim/packages/win64/bin/x264.orig.def --export-all-symbols /home/jim/packages/win64/bin/libx264-148.dll
10
-grep "EXPORTS\|x264" /home/jim/packages/win64/bin/x264.orig.def > /home/jim/packages/win64/bin/x264.def
11
-rm -f /home/jim/packages/win64/bin/x264.org.def
12
-sed -i -e "/\\t.*DATA/d" -e "/\\t\".*/d" -e "s/\s@.*//" /home/jim/packages/win64/bin/x264.def
13
-x86_64-w64-mingw32-dlltool -m i386:x86-64 -d /home/jim/packages/win64/bin/x264.def -l /home/jim/packages/win64/bin/x264.lib -D /home/jim/win64/packages/bin/libx264-148.dll
14
-cd ..
15
-
16
-cd opus
17
-make clean
18
-LDFLAGS="-static-libgcc" ./configure -host=x86_64-w64-mingw32 --prefix="/home/jim/packages/win64" --enable-shared
19
-make -j6
20
-make install
21
-cd ..
22
-
23
-cd zlib/build64
24
-make clean
25
-cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_INSTALL_PREFIX=/home/jim/packages/win64 -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres -DCMAKE_SHARED_LINKER_FLAGS="-static-libgcc"
26
-make -j6
27
-make install
28
-mv ../../win64/lib/libzlib.dll.a ../../win64/lib/libz.dll.a
29
-mv ../../win64/lib/libzlibstatic.a ../../win64/lib/libz.a
30
-cp ../win64/zlib.def /home/jim/packages/win64/bin
31
-x86_64-w64-mingw32-dlltool -m i386:x86-64 -d ../win32/zlib.def -l /home/jim/packages/win64/bin/zlib.lib -D /home/jim/win64/packages/bin/zlib.dll
32
-cd ../..
33
-
34
-cd libpng
35
-make clean
36
-PKG_CONFIG_PATH="/home/jim/packages/win64/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win64/lib" CPPFLAGS="-I/home/jim/packages/win64/include" ./configure -host=x86_64-w64-mingw32 --prefix="/home/jim/packages/win64" --enable-shared
37
-make -j6
38
-make install
39
-cd ..
40
-
41
-cd libogg
42
-make clean
43
-PKG_CONFIG_PATH="/home/jim/packages/win64/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win64/lib -static-libgcc" CPPFLAGS="-I/home/jim/packages/win64/include" ./configure -host=x86_64-w64-mingw32 --prefix="/home/jim/packages/win64" --enable-shared
44
-make -j6
45
-make install
46
-cd ..
47
-
48
-cd libvorbis
49
-make clean
50
-PKG_CONFIG_PATH="/home/jim/packages/win64/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win64/lib -static-libgcc" CPPFLAGS="-I/home/jim/packages/win64/include" ./configure -host=x86_64-w64-mingw32 --prefix="/home/jim/packages/win64" --enable-shared --with-ogg="/home/jim/packages/win64"
51
-make -j6
52
-make install
53
-cd ..
54
-
55
-cd libvpxbuild
56
-make clean
57
-PKG_CONFIG_PATH="/home/jim/packages/win64/lib/pkgconfig" CROSS=x86_64-w64-mingw32- LDFLAGS="-static-libgcc" ../libvpx/configure --prefix=/home/jim/packages/win64 --enable-vp8 --enable-vp9 --disable-docs --disable-examples --enable-shared --disable-static --enable-runtime-cpu-detect --enable-realtime-only --disable-install-bins --disable-install-docs --disable-unit-tests --target=x86_64-win64-gcc
58
-make -j6
59
-make install
60
-x86_64-w64-mingw32-dlltool -m i386:x86-64 -d libvpx.def -l /home/jim/packages/win64/bin/vpx.lib -D /home/jim/win64/packages/bin/libvpx-1.dll
61
-cd ..
62
-
63
-cd ffmpeg
64
-make clean
65
-cp /media/sf_linux/nvEncodeAPI.h /home/jim/packages/win64/include
66
-PKG_CONFIG_PATH="/home/jim/packages/win64/lib/pkgconfig" LDFLAGS="-L/home/jim/packages/win64/lib" CPPFLAGS="-I/home/jim/packages/win64/include" ./configure --enable-memalign-hack --enable-gpl --disable-doc --arch=x86_64 --enable-shared --enable-nvenc --enable-libx264 --enable-libopus --enable-libvorbis --enable-libvpx --disable-debug --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32 --pkg-config=pkg-config --prefix="/home/jim/packages/win64" --disable-postproc
67
-read -n1 -r -p "Press any key to continue building FFmpeg..." key
68
-make -j6
69
-make install
70
-cd ..
71
obs-studio-26.1.0.tar.xz/libobs/util/simde/mmx.h
Deleted
201
1
2
-/* SPDX-License-Identifier: MIT
3
- *
4
- * Permission is hereby granted, free of charge, to any person
5
- * obtaining a copy of this software and associated documentation
6
- * files (the "Software"), to deal in the Software without
7
- * restriction, including without limitation the rights to use, copy,
8
- * modify, merge, publish, distribute, sublicense, and/or sell copies
9
- * of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be
13
- * included in all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- *
24
- * Copyright:
25
- * 2017-2020 Evan Nemerson <evan@nemerson.com>
26
- */
27
-
28
-#if !defined(SIMDE_X86_MMX_H)
29
-#define SIMDE_X86_MMX_H
30
-
31
-#include "simde-common.h"
32
-
33
-#if !defined(SIMDE_X86_MMX_NATIVE) && defined(SIMDE_ENABLE_NATIVE_ALIASES)
34
-#define SIMDE_X86_MMX_ENABLE_NATIVE_ALIASES
35
-#endif
36
-
37
-HEDLEY_DIAGNOSTIC_PUSH
38
-SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
39
-
40
-#if defined(SIMDE_X86_MMX_NATIVE)
41
-#define SIMDE_X86_MMX_USE_NATIVE_TYPE
42
-#elif defined(SIMDE_X86_SSE_NATIVE)
43
-#define SIMDE_X86_MMX_USE_NATIVE_TYPE
44
-#endif
45
-
46
-#if defined(SIMDE_X86_MMX_USE_NATIVE_TYPE)
47
-#include <mmintrin.h>
48
-#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
49
-#include <arm_neon.h>
50
-#endif
51
-
52
-#include <stdint.h>
53
-#include <limits.h>
54
-
55
-SIMDE_BEGIN_DECLS_
56
-
57
-typedef union {
58
-#if defined(SIMDE_VECTOR_SUBSCRIPT)
59
- SIMDE_ALIGN(8) int8_t i8 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
60
- SIMDE_ALIGN(8) int16_t i16 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
61
- SIMDE_ALIGN(8) int32_t i32 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
62
- SIMDE_ALIGN(8) int64_t i64 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
63
- SIMDE_ALIGN(8) uint8_t u8 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
64
- SIMDE_ALIGN(8) uint16_t u16 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
65
- SIMDE_ALIGN(8) uint32_t u32 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
66
- SIMDE_ALIGN(8) uint64_t u64 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
67
- SIMDE_ALIGN(8) simde_float32 f32 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
68
- SIMDE_ALIGN(8) int_fast32_t i32f SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
69
- SIMDE_ALIGN(8) uint_fast32_t u32f SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
70
-#else
71
- SIMDE_ALIGN(8) int8_t i8[8];
72
- SIMDE_ALIGN(8) int16_t i16[4];
73
- SIMDE_ALIGN(8) int32_t i32[2];
74
- SIMDE_ALIGN(8) int64_t i64[1];
75
- SIMDE_ALIGN(8) uint8_t u8[8];
76
- SIMDE_ALIGN(8) uint16_t u16[4];
77
- SIMDE_ALIGN(8) uint32_t u32[2];
78
- SIMDE_ALIGN(8) uint64_t u64[1];
79
- SIMDE_ALIGN(8) simde_float32 f32[2];
80
- SIMDE_ALIGN(8) int_fast32_t i32f[8 / sizeof(int_fast32_t)];
81
- SIMDE_ALIGN(8) uint_fast32_t u32f[8 / sizeof(uint_fast32_t)];
82
-#endif
83
-
84
-#if defined(SIMDE_X86_MMX_USE_NATIVE_TYPE)
85
- __m64 n;
86
-#endif
87
-#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
88
- int8x8_t neon_i8;
89
- int16x4_t neon_i16;
90
- int32x2_t neon_i32;
91
- int64x1_t neon_i64;
92
- uint8x8_t neon_u8;
93
- uint16x4_t neon_u16;
94
- uint32x2_t neon_u32;
95
- uint64x1_t neon_u64;
96
- float32x2_t neon_f32;
97
-#endif
98
-} simde__m64_private;
99
-
100
-#if defined(SIMDE_X86_MMX_USE_NATIVE_TYPE)
101
-typedef __m64 simde__m64;
102
-#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
103
-typedef int32x2_t simde__m64;
104
-#elif defined(SIMDE_VECTOR_SUBSCRIPT)
105
-typedef int32_t simde__m64 SIMDE_ALIGN(8) SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
106
-#else
107
-typedef simde__m64_private simde__m64;
108
-#endif
109
-
110
-#if !defined(SIMDE_X86_MMX_USE_NATIVE_TYPE) && \
111
- defined(SIMDE_ENABLE_NATIVE_ALIASES)
112
-#define SIMDE_X86_MMX_ENABLE_NATIVE_ALIASES
113
-typedef simde__m64 __m64;
114
-#endif
115
-
116
-HEDLEY_STATIC_ASSERT(8 == sizeof(simde__m64), "__m64 size incorrect");
117
-HEDLEY_STATIC_ASSERT(8 == sizeof(simde__m64_private), "__m64 size incorrect");
118
-#if defined(SIMDE_CHECK_ALIGNMENT) && defined(SIMDE_ALIGN_OF)
119
-HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m64) == 8,
120
- "simde__m64 is not 8-byte aligned");
121
-HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m64_private) == 8,
122
- "simde__m64_private is not 8-byte aligned");
123
-#endif
124
-
125
-SIMDE_FUNCTION_ATTRIBUTES
126
-simde__m64 simde__m64_from_private(simde__m64_private v)
127
-{
128
- simde__m64 r;
129
- simde_memcpy(&r, &v, sizeof(r));
130
- return r;
131
-}
132
-
133
-SIMDE_FUNCTION_ATTRIBUTES
134
-simde__m64_private simde__m64_to_private(simde__m64 v)
135
-{
136
- simde__m64_private r;
137
- simde_memcpy(&r, &v, sizeof(r));
138
- return r;
139
-}
140
-
141
-#define SIMDE_X86_GENERATE_CONVERSION_FUNCTION(simde_type, source_type, isax, \
142
- fragment) \
143
- SIMDE_FUNCTION_ATTRIBUTES \
144
- simde__##simde_type simde__##simde_type##_from_##isax##_##fragment( \
145
- source_type value) \
146
- { \
147
- simde__##simde_type##_private r_; \
148
- r_.isax##_##fragment = value; \
149
- return simde__##simde_type##_from_private(r_); \
150
- } \
151
- \
152
- SIMDE_FUNCTION_ATTRIBUTES \
153
- source_type simde__##simde_type##_to_##isax##_##fragment( \
154
- simde__##simde_type value) \
155
- { \
156
- simde__##simde_type##_private r_ = \
157
- simde__##simde_type##_to_private(value); \
158
- return r_.isax##_##fragment; \
159
- }
160
-
161
-#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
162
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int8x8_t, neon, i8)
163
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int16x4_t, neon, i16)
164
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int32x2_t, neon, i32)
165
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int64x1_t, neon, i64)
166
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint8x8_t, neon, u8)
167
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint16x4_t, neon, u16)
168
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint32x2_t, neon, u32)
169
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint64x1_t, neon, u64)
170
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, float32x2_t, neon, f32)
171
-#endif /* defined(SIMDE_ARM_NEON_A32V7_NATIVE) */
172
-
173
-SIMDE_FUNCTION_ATTRIBUTES
174
-simde__m64 simde_mm_add_pi8(simde__m64 a, simde__m64 b)
175
-{
176
-#if defined(SIMDE_X86_MMX_NATIVE)
177
- return _mm_add_pi8(a, b);
178
-#else
179
- simde__m64_private r_;
180
- simde__m64_private a_ = simde__m64_to_private(a);
181
- simde__m64_private b_ = simde__m64_to_private(b);
182
-
183
-#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
184
- r_.neon_i8 = vadd_s8(a_.neon_i8, b_.neon_i8);
185
-#elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
186
- r_.i8 = a_.i8 + b_.i8;
187
-#else
188
- SIMDE_VECTORIZE
189
- for (size_t i = 0; i < (sizeof(r_.i8) / sizeof(r_.i8[0])); i++) {
190
- r_.i8[i] = a_.i8[i] + b_.i8[i];
191
- }
192
-#endif
193
-
194
- return simde__m64_from_private(r_);
195
-#endif
196
-}
197
-#define simde_m_paddb(a, b) simde_mm_add_pi8(a, b)
198
-#if defined(SIMDE_X86_MMX_ENABLE_NATIVE_ALIASES)
199
-#define _mm_add_pi8(a, b) simde_mm_add_pi8(a, b)
200
-#define _m_paddb(a, b) simde_m_paddb(a, b)
201
obs-studio-26.1.0.tar.xz/libobs/util/simde/sse.h
Deleted
201
1
2
-/* SPDX-License-Identifier: MIT
3
- *
4
- * Permission is hereby granted, free of charge, to any person
5
- * obtaining a copy of this software and associated documentation
6
- * files (the "Software"), to deal in the Software without
7
- * restriction, including without limitation the rights to use, copy,
8
- * modify, merge, publish, distribute, sublicense, and/or sell copies
9
- * of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be
13
- * included in all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- *
24
- * Copyright:
25
- * 2017-2020 Evan Nemerson <evan@nemerson.com>
26
- * 2015-2017 John W. Ratcliff <jratcliffscarab@gmail.com>
27
- * 2015 Brandon Rowlett <browlett@nvidia.com>
28
- * 2015 Ken Fast <kfast@gdeb.com>
29
- */
30
-
31
-#if !defined(SIMDE_X86_SSE_H)
32
-#define SIMDE_X86_SSE_H
33
-
34
-#include "mmx.h"
35
-
36
-#if !defined(SIMDE_X86_AVX512F_NATIVE) && defined(SIMDE_ENABLE_NATIVE_ALIASES)
37
-#define SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES
38
-#endif
39
-
40
-#if defined(_WIN32)
41
-#include <windows.h>
42
-#endif
43
-
44
-HEDLEY_DIAGNOSTIC_PUSH
45
-SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
46
-SIMDE_BEGIN_DECLS_
47
-
48
-typedef union {
49
-#if defined(SIMDE_VECTOR_SUBSCRIPT)
50
- SIMDE_ALIGN(16) int8_t i8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
51
- SIMDE_ALIGN(16) int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
52
- SIMDE_ALIGN(16) int32_t i32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
53
- SIMDE_ALIGN(16) int64_t i64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
54
- SIMDE_ALIGN(16) uint8_t u8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
55
- SIMDE_ALIGN(16) uint16_t u16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
56
- SIMDE_ALIGN(16) uint32_t u32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
57
- SIMDE_ALIGN(16) uint64_t u64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
58
-#if defined(SIMDE_HAVE_INT128_)
59
- SIMDE_ALIGN(16) simde_int128 i128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
60
- SIMDE_ALIGN(16) simde_uint128 u128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
61
-#endif
62
- SIMDE_ALIGN(16) simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
63
- SIMDE_ALIGN(16) int_fast32_t i32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
64
- SIMDE_ALIGN(16) uint_fast32_t u32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
65
-#else
66
- SIMDE_ALIGN(16) int8_t i8[16];
67
- SIMDE_ALIGN(16) int16_t i16[8];
68
- SIMDE_ALIGN(16) int32_t i32[4];
69
- SIMDE_ALIGN(16) int64_t i64[2];
70
- SIMDE_ALIGN(16) uint8_t u8[16];
71
- SIMDE_ALIGN(16) uint16_t u16[8];
72
- SIMDE_ALIGN(16) uint32_t u32[4];
73
- SIMDE_ALIGN(16) uint64_t u64[2];
74
-#if defined(SIMDE_HAVE_INT128_)
75
- SIMDE_ALIGN(16) simde_int128 i128[1];
76
- SIMDE_ALIGN(16) simde_uint128 u128[1];
77
-#endif
78
- SIMDE_ALIGN(16) simde_float32 f32[4];
79
- SIMDE_ALIGN(16) int_fast32_t i32f[16 / sizeof(int_fast32_t)];
80
- SIMDE_ALIGN(16) uint_fast32_t u32f[16 / sizeof(uint_fast32_t)];
81
-#endif
82
-
83
- SIMDE_ALIGN(16) simde__m64_private m64_private[2];
84
- SIMDE_ALIGN(16) simde__m64 m64[2];
85
-
86
-#if defined(SIMDE_X86_SSE_NATIVE)
87
- SIMDE_ALIGN(16) __m128 n;
88
-#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
89
- SIMDE_ALIGN(16) int8x16_t neon_i8;
90
- SIMDE_ALIGN(16) int16x8_t neon_i16;
91
- SIMDE_ALIGN(16) int32x4_t neon_i32;
92
- SIMDE_ALIGN(16) int64x2_t neon_i64;
93
- SIMDE_ALIGN(16) uint8x16_t neon_u8;
94
- SIMDE_ALIGN(16) uint16x8_t neon_u16;
95
- SIMDE_ALIGN(16) uint32x4_t neon_u32;
96
- SIMDE_ALIGN(16) uint64x2_t neon_u64;
97
- SIMDE_ALIGN(16) float32x4_t neon_f32;
98
-#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
99
- SIMDE_ALIGN(16) float64x2_t neon_f64;
100
-#endif
101
-#elif defined(SIMDE_WASM_SIMD128_NATIVE)
102
- SIMDE_ALIGN(16) v128_t wasm_v128;
103
-#elif defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
104
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned char) altivec_u8;
105
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned short) altivec_u16;
106
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32;
107
- SIMDE_ALIGN(16)
108
- SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long) altivec_u64;
109
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed char) altivec_i8;
110
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed short) altivec_i16;
111
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32;
112
- SIMDE_ALIGN(16)
113
- SIMDE_POWER_ALTIVEC_VECTOR(signed long long) altivec_i64;
114
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(float) altivec_f32;
115
-#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
116
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(double) altivec_f64;
117
-#endif
118
-#endif
119
-} simde__m128_private;
120
-
121
-#if defined(SIMDE_X86_SSE_NATIVE)
122
-typedef __m128 simde__m128;
123
-#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
124
-typedef float32x4_t simde__m128;
125
-#elif defined(SIMDE_WASM_SIMD128_NATIVE)
126
-typedef v128_t simde__m128;
127
-#elif defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
128
-typedef SIMDE_POWER_ALTIVEC_VECTOR(float) simde__m128;
129
-#elif defined(SIMDE_VECTOR_SUBSCRIPT)
130
-typedef simde_float32 simde__m128 SIMDE_ALIGN(16)
131
- SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
132
-#else
133
-typedef simde__m128_private simde__m128;
134
-#endif
135
-
136
-#if !defined(SIMDE_X86_SSE_NATIVE) && defined(SIMDE_ENABLE_NATIVE_ALIASES)
137
-#define SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES
138
-typedef simde__m128 __m128;
139
-#endif
140
-
141
-HEDLEY_STATIC_ASSERT(16 == sizeof(simde__m128), "simde__m128 size incorrect");
142
-HEDLEY_STATIC_ASSERT(16 == sizeof(simde__m128_private),
143
- "simde__m128_private size incorrect");
144
-#if defined(SIMDE_CHECK_ALIGNMENT) && defined(SIMDE_ALIGN_OF)
145
-HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m128) == 16,
146
- "simde__m128 is not 16-byte aligned");
147
-HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m128_private) == 16,
148
- "simde__m128_private is not 16-byte aligned");
149
-#endif
150
-
151
-SIMDE_FUNCTION_ATTRIBUTES
152
-simde__m128 simde__m128_from_private(simde__m128_private v)
153
-{
154
- simde__m128 r;
155
- simde_memcpy(&r, &v, sizeof(r));
156
- return r;
157
-}
158
-
159
-SIMDE_FUNCTION_ATTRIBUTES
160
-simde__m128_private simde__m128_to_private(simde__m128 v)
161
-{
162
- simde__m128_private r;
163
- simde_memcpy(&r, &v, sizeof(r));
164
- return r;
165
-}
166
-
167
-#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
168
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int8x16_t, neon, i8)
169
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int16x8_t, neon, i16)
170
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int32x4_t, neon, i32)
171
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int64x2_t, neon, i64)
172
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint8x16_t, neon, u8)
173
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint16x8_t, neon, u16)
174
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint32x4_t, neon, u32)
175
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint64x2_t, neon, u64)
176
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, float32x4_t, neon, f32)
177
-#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
178
-SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, float64x2_t, neon, f64)
179
-#endif
180
-#endif /* defined(SIMDE_ARM_NEON_A32V7_NATIVE) */
181
-
182
-#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
183
-HEDLEY_DIAGNOSTIC_POP
184
-#endif
185
-
186
-SIMDE_FUNCTION_ATTRIBUTES
187
-simde__m128 simde_mm_set_ps(simde_float32 e3, simde_float32 e2,
188
- simde_float32 e1, simde_float32 e0)
189
-{
190
-#if defined(SIMDE_X86_SSE_NATIVE)
191
- return _mm_set_ps(e3, e2, e1, e0);
192
-#else
193
- simde__m128_private r_;
194
-
195
-#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
196
- SIMDE_ALIGN(16) simde_float32 data[4] = {e0, e1, e2, e3};
197
- r_.neon_f32 = vld1q_f32(data);
198
-#elif defined(SIMDE_WASM_SIMD128_NATIVE)
199
- r_.wasm_v128 = wasm_f32x4_make(e0, e1, e2, e3);
200
-#else
201
obs-studio-26.1.0.tar.xz/libobs/util/simde/sse2.h
Deleted
201
1
2
-/* SPDX-License-Identifier: MIT
3
- *
4
- * Permission is hereby granted, free of charge, to any person
5
- * obtaining a copy of this software and associated documentation
6
- * files (the "Software"), to deal in the Software without
7
- * restriction, including without limitation the rights to use, copy,
8
- * modify, merge, publish, distribute, sublicense, and/or sell copies
9
- * of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be
13
- * included in all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- *
24
- * Copyright:
25
- * 2017-2020 Evan Nemerson <evan@nemerson.com>
26
- * 2015-2017 John W. Ratcliff <jratcliffscarab@gmail.com>
27
- * 2015 Brandon Rowlett <browlett@nvidia.com>
28
- * 2015 Ken Fast <kfast@gdeb.com>
29
- * 2017 Hasindu Gamaarachchi <hasindu@unsw.edu.au>
30
- * 2018 Jeff Daily <jeff.daily@amd.com>
31
- */
32
-
33
-#if !defined(SIMDE_X86_SSE2_H)
34
-#define SIMDE_X86_SSE2_H
35
-
36
-#include "sse.h"
37
-
38
-#if !defined(SIMDE_X86_SSE2_NATIVE) && defined(SIMDE_ENABLE_NATIVE_ALIASES)
39
-#define SIMDE_X86_SSE2_ENABLE_NATIVE_ALIASES
40
-#endif
41
-
42
-HEDLEY_DIAGNOSTIC_PUSH
43
-SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
44
-SIMDE_BEGIN_DECLS_
45
-
46
-typedef union {
47
-#if defined(SIMDE_VECTOR_SUBSCRIPT)
48
- SIMDE_ALIGN(16) int8_t i8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
49
- SIMDE_ALIGN(16) int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
50
- SIMDE_ALIGN(16) int32_t i32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
51
- SIMDE_ALIGN(16) int64_t i64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
52
- SIMDE_ALIGN(16) uint8_t u8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
53
- SIMDE_ALIGN(16) uint16_t u16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
54
- SIMDE_ALIGN(16) uint32_t u32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
55
- SIMDE_ALIGN(16) uint64_t u64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
56
-#if defined(SIMDE_HAVE_INT128_)
57
- SIMDE_ALIGN(16) simde_int128 i128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
58
- SIMDE_ALIGN(16) simde_uint128 u128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
59
-#endif
60
- SIMDE_ALIGN(16) simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
61
- SIMDE_ALIGN(16) simde_float64 f64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
62
-
63
- SIMDE_ALIGN(16) int_fast32_t i32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
64
- SIMDE_ALIGN(16) uint_fast32_t u32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
65
-#else
66
- SIMDE_ALIGN(16) int8_t i8[16];
67
- SIMDE_ALIGN(16) int16_t i16[8];
68
- SIMDE_ALIGN(16) int32_t i32[4];
69
- SIMDE_ALIGN(16) int64_t i64[2];
70
- SIMDE_ALIGN(16) uint8_t u8[16];
71
- SIMDE_ALIGN(16) uint16_t u16[8];
72
- SIMDE_ALIGN(16) uint32_t u32[4];
73
- SIMDE_ALIGN(16) uint64_t u64[2];
74
-#if defined(SIMDE_HAVE_INT128_)
75
- SIMDE_ALIGN(16) simde_int128 i128[1];
76
- SIMDE_ALIGN(16) simde_uint128 u128[1];
77
-#endif
78
- SIMDE_ALIGN(16) simde_float32 f32[4];
79
- SIMDE_ALIGN(16) simde_float64 f64[2];
80
-
81
- SIMDE_ALIGN(16) int_fast32_t i32f[16 / sizeof(int_fast32_t)];
82
- SIMDE_ALIGN(16) uint_fast32_t u32f[16 / sizeof(uint_fast32_t)];
83
-#endif
84
-
85
- SIMDE_ALIGN(16) simde__m64_private m64_private[2];
86
- SIMDE_ALIGN(16) simde__m64 m64[2];
87
-
88
-#if defined(SIMDE_X86_SSE2_NATIVE)
89
- SIMDE_ALIGN(16) __m128i n;
90
-#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
91
- SIMDE_ALIGN(16) int8x16_t neon_i8;
92
- SIMDE_ALIGN(16) int16x8_t neon_i16;
93
- SIMDE_ALIGN(16) int32x4_t neon_i32;
94
- SIMDE_ALIGN(16) int64x2_t neon_i64;
95
- SIMDE_ALIGN(16) uint8x16_t neon_u8;
96
- SIMDE_ALIGN(16) uint16x8_t neon_u16;
97
- SIMDE_ALIGN(16) uint32x4_t neon_u32;
98
- SIMDE_ALIGN(16) uint64x2_t neon_u64;
99
- SIMDE_ALIGN(16) float32x4_t neon_f32;
100
-#if defined(SIMDE_ARCH_AARCH64)
101
- SIMDE_ALIGN(16) float64x2_t neon_f64;
102
-#endif
103
-#elif defined(SIMDE_WASM_SIMD128_NATIVE)
104
- SIMDE_ALIGN(16) v128_t wasm_v128;
105
-#elif defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
106
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed char) altivec_i8;
107
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed short) altivec_i16;
108
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32;
109
-#if defined(__UINT_FAST32_TYPE__)
110
- SIMDE_ALIGN(16)
111
- SIMDE_POWER_ALTIVEC_VECTOR(__INT_FAST32_TYPE__) altivec_i32f;
112
-#else
113
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32f;
114
-#endif
115
- SIMDE_ALIGN(16)
116
- SIMDE_POWER_ALTIVEC_VECTOR(signed long long) altivec_i64;
117
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned char) altivec_u8;
118
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned short) altivec_u16;
119
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32;
120
-#if defined(__UINT_FAST32_TYPE__)
121
- SIMDE_ALIGN(16) vector __UINT_FAST32_TYPE__ altivec_u32f;
122
-#else
123
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32f;
124
-#endif
125
- SIMDE_ALIGN(16)
126
- SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long) altivec_u64;
127
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(float) altivec_f32;
128
-#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
129
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(double) altivec_f64;
130
-#endif
131
-#endif
132
-} simde__m128i_private;
133
-
134
-typedef union {
135
-#if defined(SIMDE_VECTOR_SUBSCRIPT)
136
- SIMDE_ALIGN(16) int8_t i8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
137
- SIMDE_ALIGN(16) int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
138
- SIMDE_ALIGN(16) int32_t i32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
139
- SIMDE_ALIGN(16) int64_t i64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
140
- SIMDE_ALIGN(16) uint8_t u8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
141
- SIMDE_ALIGN(16) uint16_t u16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
142
- SIMDE_ALIGN(16) uint32_t u32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
143
- SIMDE_ALIGN(16) uint64_t u64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
144
- SIMDE_ALIGN(16) simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
145
- SIMDE_ALIGN(16) simde_float64 f64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
146
- SIMDE_ALIGN(16) int_fast32_t i32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
147
- SIMDE_ALIGN(16) uint_fast32_t u32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
148
-#else
149
- SIMDE_ALIGN(16) int8_t i8[16];
150
- SIMDE_ALIGN(16) int16_t i16[8];
151
- SIMDE_ALIGN(16) int32_t i32[4];
152
- SIMDE_ALIGN(16) int64_t i64[2];
153
- SIMDE_ALIGN(16) uint8_t u8[16];
154
- SIMDE_ALIGN(16) uint16_t u16[8];
155
- SIMDE_ALIGN(16) uint32_t u32[4];
156
- SIMDE_ALIGN(16) uint64_t u64[2];
157
- SIMDE_ALIGN(16) simde_float32 f32[4];
158
- SIMDE_ALIGN(16) simde_float64 f64[2];
159
- SIMDE_ALIGN(16) int_fast32_t i32f[16 / sizeof(int_fast32_t)];
160
- SIMDE_ALIGN(16) uint_fast32_t u32f[16 / sizeof(uint_fast32_t)];
161
-#endif
162
-
163
- SIMDE_ALIGN(16) simde__m64_private m64_private[2];
164
- SIMDE_ALIGN(16) simde__m64 m64[2];
165
-
166
-#if defined(SIMDE_X86_SSE2_NATIVE)
167
- SIMDE_ALIGN(16) __m128d n;
168
-#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
169
- SIMDE_ALIGN(16) int8x16_t neon_i8;
170
- SIMDE_ALIGN(16) int16x8_t neon_i16;
171
- SIMDE_ALIGN(16) int32x4_t neon_i32;
172
- SIMDE_ALIGN(16) int64x2_t neon_i64;
173
- SIMDE_ALIGN(16) uint8x16_t neon_u8;
174
- SIMDE_ALIGN(16) uint16x8_t neon_u16;
175
- SIMDE_ALIGN(16) uint32x4_t neon_u32;
176
- SIMDE_ALIGN(16) uint64x2_t neon_u64;
177
- SIMDE_ALIGN(16) float32x4_t neon_f32;
178
-#if defined(SIMDE_ARCH_AARCH64)
179
- SIMDE_ALIGN(16) float64x2_t neon_f64;
180
-#endif
181
-#elif defined(SIMDE_WASM_SIMD128_NATIVE)
182
- SIMDE_ALIGN(16) v128_t wasm_v128;
183
-#elif defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
184
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed char) altivec_i8;
185
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed short) altivec_i16;
186
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32;
187
-#if defined(__INT_FAST32_TYPE__)
188
- SIMDE_ALIGN(16)
189
- SIMDE_POWER_ALTIVEC_VECTOR(__INT_FAST32_TYPE__) altivec_i32f;
190
-#else
191
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32f;
192
-#endif
193
- SIMDE_ALIGN(16)
194
- SIMDE_POWER_ALTIVEC_VECTOR(signed long long) altivec_i64;
195
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned char) altivec_u8;
196
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned short) altivec_u16;
197
- SIMDE_ALIGN(16) SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32;
198
-#if defined(__UINT_FAST32_TYPE__)
199
- SIMDE_ALIGN(16) vector __UINT_FAST32_TYPE__ altivec_u32f;
200
-#else
201
obs-studio-26.1.0.tar.xz/libobs/util/sse2neon.h
Deleted
201
1
2
-#ifndef SSE2NEON_H
3
-#define SSE2NEON_H
4
-
5
-// This header file provides a simple API translation layer
6
-// between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions
7
-//
8
-// This header file does not yet translate all of the SSE intrinsics.
9
-//
10
-// Contributors to this work are:
11
-// John W. Ratcliff <jratcliffscarab@gmail.com>
12
-// Brandon Rowlett <browlett@nvidia.com>
13
-// Ken Fast <kfast@gdeb.com>
14
-// Eric van Beurden <evanbeurden@nvidia.com>
15
-// Alexander Potylitsin <apotylitsin@nvidia.com>
16
-// Hasindu Gamaarachchi <hasindu2008@gmail.com>
17
-// Jim Huang <jserv@biilabs.io>
18
-// Mark Cheng <marktwtn@biilabs.io>
19
-// Malcolm James MacLeod <malcolm@gulden.com>
20
-// Devin Hussey (easyaspi314) <husseydevin@gmail.com>
21
-// Sebastian Pop <spop@amazon.com>
22
-// Developer Ecosystem Engineering <DeveloperEcosystemEngineering@apple.com>
23
-// Danila Kutenin <danilak@google.com>
24
-
25
-/*
26
- * sse2neon is freely redistributable under the MIT License.
27
- *
28
- * Permission is hereby granted, free of charge, to any person obtaining a copy
29
- * of this software and associated documentation files (the "Software"), to deal
30
- * in the Software without restriction, including without limitation the rights
31
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
- * copies of the Software, and to permit persons to whom the Software is
33
- * furnished to do so, subject to the following conditions:
34
- *
35
- * The above copyright notice and this permission notice shall be included in
36
- * all copies or substantial portions of the Software.
37
- *
38
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
- * SOFTWARE.
45
- */
46
-
47
-#if defined(__GNUC__) || defined(__clang__)
48
-#pragma push_macro("FORCE_INLINE")
49
-#pragma push_macro("ALIGN_STRUCT")
50
-#define FORCE_INLINE static inline __attribute__((always_inline))
51
-#define ALIGN_STRUCT(x) __attribute__((aligned(x)))
52
-#else
53
-#error "Macro name collisions may happen with unsupported compiler."
54
-#ifdef FORCE_INLINE
55
-#undef FORCE_INLINE
56
-#endif
57
-#define FORCE_INLINE static inline
58
-#ifndef ALIGN_STRUCT
59
-#define ALIGN_STRUCT(x) __declspec(align(x))
60
-#endif
61
-#endif
62
-
63
-#include <stdint.h>
64
-#include <stdlib.h>
65
-
66
-#include <arm_neon.h>
67
-
68
-/* "__has_builtin" can be used to query support for built-in functions
69
- * provided by gcc/clang and other compilers that support it.
70
- */
71
-#ifndef __has_builtin /* GCC prior to 10 or non-clang compilers */
72
-/* Compatibility with gcc <= 9 */
73
-#if __GNUC__ <= 9
74
-#define __has_builtin(x) HAS##x
75
-#define HAS__builtin_popcount 1
76
-#define HAS__builtin_popcountll 1
77
-#else
78
-#define __has_builtin(x) 0
79
-#endif
80
-#endif
81
-
82
-/**
83
- * MACRO for shuffle parameter for _mm_shuffle_ps().
84
- * Argument fp3 is a digit[0123] that represents the fp from argument "b"
85
- * of mm_shuffle_ps that will be placed in fp3 of result. fp2 is the same
86
- * for fp2 in result. fp1 is a digit[0123] that represents the fp from
87
- * argument "a" of mm_shuffle_ps that will be places in fp1 of result.
88
- * fp0 is the same for fp0 of result.
89
- */
90
-#define _MM_SHUFFLE(fp3, fp2, fp1, fp0) \
91
- (((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | ((fp0)))
92
-
93
-/* indicate immediate constant argument in a given range */
94
-#define __constrange(a, b) const
95
-
96
-/* A few intrinsics accept traditional data types like ints or floats, but
97
- * most operate on data types that are specific to SSE.
98
- * If a vector type ends in d, it contains doubles, and if it does not have
99
- * a suffix, it contains floats. An integer vector type can contain any type
100
- * of integer, from chars to shorts to unsigned long longs.
101
- */
102
-typedef float32x2_t __m64;
103
-typedef float32x4_t __m128; /* 128-bit vector containing 4 floats */
104
-// On ARM 32-bit architecture, the float64x2_t is not supported.
105
-// The data type __m128d should be represented in a different way for related
106
-// intrinsic conversion.
107
-#if defined(__aarch64__)
108
-typedef float64x2_t __m128d; /* 128-bit vector containing 2 doubles */
109
-#else
110
-typedef float32x4_t __m128d;
111
-#endif
112
-typedef int64x1_t __m64i;
113
-typedef int64x2_t __m128i; /* 128-bit vector containing integers */
114
-
115
-/* type-safe casting between types */
116
-
117
-#define vreinterpretq_m128_f16(x) vreinterpretq_f32_f16(x)
118
-#define vreinterpretq_m128_f32(x) (x)
119
-#define vreinterpretq_m128_f64(x) vreinterpretq_f32_f64(x)
120
-
121
-#define vreinterpretq_m128_u8(x) vreinterpretq_f32_u8(x)
122
-#define vreinterpretq_m128_u16(x) vreinterpretq_f32_u16(x)
123
-#define vreinterpretq_m128_u32(x) vreinterpretq_f32_u32(x)
124
-#define vreinterpretq_m128_u64(x) vreinterpretq_f32_u64(x)
125
-
126
-#define vreinterpretq_m128_s8(x) vreinterpretq_f32_s8(x)
127
-#define vreinterpretq_m128_s16(x) vreinterpretq_f32_s16(x)
128
-#define vreinterpretq_m128_s32(x) vreinterpretq_f32_s32(x)
129
-#define vreinterpretq_m128_s64(x) vreinterpretq_f32_s64(x)
130
-
131
-#define vreinterpretq_f16_m128(x) vreinterpretq_f16_f32(x)
132
-#define vreinterpretq_f32_m128(x) (x)
133
-#define vreinterpretq_f64_m128(x) vreinterpretq_f64_f32(x)
134
-
135
-#define vreinterpretq_u8_m128(x) vreinterpretq_u8_f32(x)
136
-#define vreinterpretq_u16_m128(x) vreinterpretq_u16_f32(x)
137
-#define vreinterpretq_u32_m128(x) vreinterpretq_u32_f32(x)
138
-#define vreinterpretq_u64_m128(x) vreinterpretq_u64_f32(x)
139
-
140
-#define vreinterpretq_s8_m128(x) vreinterpretq_s8_f32(x)
141
-#define vreinterpretq_s16_m128(x) vreinterpretq_s16_f32(x)
142
-#define vreinterpretq_s32_m128(x) vreinterpretq_s32_f32(x)
143
-#define vreinterpretq_s64_m128(x) vreinterpretq_s64_f32(x)
144
-
145
-#define vreinterpretq_m128i_s8(x) vreinterpretq_s64_s8(x)
146
-#define vreinterpretq_m128i_s16(x) vreinterpretq_s64_s16(x)
147
-#define vreinterpretq_m128i_s32(x) vreinterpretq_s64_s32(x)
148
-#define vreinterpretq_m128i_s64(x) (x)
149
-
150
-#define vreinterpretq_m128i_u8(x) vreinterpretq_s64_u8(x)
151
-#define vreinterpretq_m128i_u16(x) vreinterpretq_s64_u16(x)
152
-#define vreinterpretq_m128i_u32(x) vreinterpretq_s64_u32(x)
153
-#define vreinterpretq_m128i_u64(x) vreinterpretq_s64_u64(x)
154
-
155
-#define vreinterpretq_s8_m128i(x) vreinterpretq_s8_s64(x)
156
-#define vreinterpretq_s16_m128i(x) vreinterpretq_s16_s64(x)
157
-#define vreinterpretq_s32_m128i(x) vreinterpretq_s32_s64(x)
158
-#define vreinterpretq_s64_m128i(x) (x)
159
-
160
-#define vreinterpretq_u8_m128i(x) vreinterpretq_u8_s64(x)
161
-#define vreinterpretq_u16_m128i(x) vreinterpretq_u16_s64(x)
162
-#define vreinterpretq_u32_m128i(x) vreinterpretq_u32_s64(x)
163
-#define vreinterpretq_u64_m128i(x) vreinterpretq_u64_s64(x)
164
-
165
-#define vreinterpret_m64i_s8(x) vreinterpret_s64_s8(x)
166
-#define vreinterpret_m64i_s16(x) vreinterpret_s64_s16(x)
167
-#define vreinterpret_m64i_s32(x) vreinterpret_s64_s32(x)
168
-#define vreinterpret_m64i_s64(x) (x)
169
-
170
-#define vreinterpret_m64i_u8(x) vreinterpret_s64_u8(x)
171
-#define vreinterpret_m64i_u16(x) vreinterpret_s64_u16(x)
172
-#define vreinterpret_m64i_u32(x) vreinterpret_s64_u32(x)
173
-#define vreinterpret_m64i_u64(x) vreinterpret_s64_u64(x)
174
-
175
-#define vreinterpret_u8_m64i(x) vreinterpret_u8_s64(x)
176
-#define vreinterpret_u16_m64i(x) vreinterpret_u16_s64(x)
177
-#define vreinterpret_u32_m64i(x) vreinterpret_u32_s64(x)
178
-#define vreinterpret_u64_m64i(x) vreinterpret_u64_s64(x)
179
-
180
-#define vreinterpret_s8_m64i(x) vreinterpret_s8_s64(x)
181
-#define vreinterpret_s16_m64i(x) vreinterpret_s16_s64(x)
182
-#define vreinterpret_s32_m64i(x) vreinterpret_s32_s64(x)
183
-#define vreinterpret_s64_m64i(x) (x)
184
-
185
-// A struct is defined in this header file called 'SIMDVec' which can be used
186
-// by applications which attempt to access the contents of an _m128 struct
187
-// directly. It is important to note that accessing the __m128 struct directly
188
-// is bad coding practice by Microsoft: @see:
189
-// https://msdn.microsoft.com/en-us/library/ayeb3ayc.aspx
190
-//
191
-// However, some legacy source code may try to access the contents of an __m128
192
-// struct directly so the developer can use the SIMDVec as an alias for it. Any
193
-// casting must be done manually by the developer, as you cannot cast or
194
-// otherwise alias the base NEON data type for intrinsic operations.
195
-//
196
-// union intended to allow direct access to an __m128 variable using the names
197
-// that the MSVC compiler provides. This union should really only be used when
198
-// trying to access the members of the vector as integer values. GCC/clang
199
-// allow native access to the float members through a simple array access
200
-// operator (in C since 4.6, in C++ since 4.8).
201
obs-studio-26.1.0.tar.xz/.github/workflows/main.yml -> obs-studio-26.1.1.tar.xz/.github/workflows/main.yml
Changed
153
1
2
runs-on: [macos-latest]
3
env:
4
MIN_MACOS_VERSION: '10.13'
5
- MACOS_DEPS_VERSION: '2020-12-11'
6
+ MACOS_DEPS_VERSION: '2020-12-22'
7
VLC_VERSION: '3.0.8'
8
SPARKLE_VERSION: '1.23.0'
9
QT_VERSION: '5.15.2'
10
11
shell: bash
12
run: |
13
if [ -d /usr/local/opt/openssl@1.0.2t ]; then
14
- brew uninstall openssl@1.0.2t
15
- brew untap local/openssl
16
+ brew uninstall openssl@1.0.2t
17
+ brew untap local/openssl
18
fi
19
20
if [ -d /usr/local/opt/python@2.7.17 ]; then
21
- brew uninstall python@2.7.17
22
- brew untap local/python2
23
+ brew uninstall python@2.7.17
24
+ brew untap local/python2
25
+ fi
26
+
27
+ if [ -d /usr/local/opt/speexdsp ]; then
28
+ brew unlink speexdsp
29
fi
30
brew bundle --file ./CI/scripts/macos/Brewfile
31
- name: 'Restore Chromium Embedded Framework from cache'
32
33
run: |
34
mkdir ./build
35
cd ./build
36
- cmake -DENABLE_UNIT_TESTS=YES -DENABLE_SPARKLE_UPDATER=ON -DDISABLE_PYTHON=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ env.MIN_MACOS_VERSION }} -DQTDIR="/tmp/obsdeps" -DSWIGDIR="/tmp/obsdeps" -DDepsPath="/tmp/obsdeps" -DVLCPath="${{ github.workspace }}/cmbuild/vlc-${{ env.VLC_VERSION }}" -DENABLE_VLC=ON -DBUILD_BROWSER=ON -DBROWSER_DEPLOY=ON -DWITH_RTMPS=ON -DCEF_ROOT_DIR="${{ github.workspace }}/cmbuild/cef_binary_${{ env.CEF_BUILD_VERSION }}_macosx64" ..
37
+ LEGACY_BROWSER="$(test "${{ env.CEF_BUILD_VERSION }}" -le 3770 && echo "ON" || echo "OFF")"
38
+ cmake -DENABLE_UNIT_TESTS=YES -DENABLE_SPARKLE_UPDATER=ON -DDISABLE_PYTHON=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ env.MIN_MACOS_VERSION }} -DQTDIR="/tmp/obsdeps" -DSWIGDIR="/tmp/obsdeps" -DDepsPath="/tmp/obsdeps" -DVLCPath="${{ github.workspace }}/cmbuild/vlc-${{ env.VLC_VERSION }}" -DENABLE_VLC=ON -DBUILD_BROWSER=ON -DBROWSER_LEGACY=$LEGACY_BROWSER -DWITH_RTMPS=ON -DCEF_ROOT_DIR="${{ github.workspace }}/cmbuild/cef_binary_${{ env.CEF_BUILD_VERSION }}_macosx64" ..
39
- name: 'Build'
40
shell: bash
41
working-directory: ${{ github.workspace }}/build
42
43
mkdir -p OBS.app/Contents/MacOS
44
mkdir OBS.app/Contents/PlugIns
45
mkdir OBS.app/Contents/Resources
46
+ mkdir OBS.app/Contents/Frameworks
47
48
cp rundir/RelWithDebInfo/bin/obs ./OBS.app/Contents/MacOS
49
cp rundir/RelWithDebInfo/bin/obs-ffmpeg-mux ./OBS.app/Contents/MacOS
50
+ if ! [ "${{ env.CEF_BUILD_VERSION }}" -le 3770 ]; then
51
+ cp -R "rundir/RelWithDebInfo/bin/OBS Helper.app" "./OBS.app/Contents/Frameworks/OBS Helper.app"
52
+ cp -R "rundir/RelWithDebInfo/bin/OBS Helper (GPU).app" "./OBS.app/Contents/Frameworks/OBS Helper (GPU).app"
53
+ cp -R "rundir/RelWithDebInfo/bin/OBS Helper (Plugin).app" "./OBS.app/Contents/Frameworks/OBS Helper (Plugin).app"
54
+ cp -R "rundir/RelWithDebInfo/bin/OBS Helper (Renderer).app" "./OBS.app/Contents/Frameworks/OBS Helper (Renderer).app"
55
+ fi
56
cp rundir/RelWithDebInfo/bin/libobsglad.0.dylib ./OBS.app/Contents/MacOS
57
cp -R rundir/RelWithDebInfo/data ./OBS.app/Contents/Resources
58
cp ../CI/scripts/macos/app/AppIcon.icns ./OBS.app/Contents/Resources
59
60
rm -rf ./OBS.app/Contents/Resources/data/obs-scripting/
61
fi
62
63
+ BUNDLE_PLUGINS=(
64
+ ./OBS.app/Contents/PlugIns/coreaudio-encoder.so
65
+ ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so
66
+ ./OBS.app/Contents/PlugIns/decklink-captions.so
67
+ ./OBS.app/Contents/PlugIns/frontend-tools.so
68
+ ./OBS.app/Contents/PlugIns/image-source.so
69
+ ./OBS.app/Contents/PlugIns/mac-avcapture.so
70
+ ./OBS.app/Contents/PlugIns/mac-capture.so
71
+ ./OBS.app/Contents/PlugIns/mac-decklink.so
72
+ ./OBS.app/Contents/PlugIns/mac-syphon.so
73
+ ./OBS.app/Contents/PlugIns/mac-vth264.so
74
+ ./OBS.app/Contents/PlugIns/mac-virtualcam.so
75
+ ./OBS.app/Contents/PlugIns/obs-browser.so
76
+ ./OBS.app/Contents/PlugIns/obs-ffmpeg.so
77
+ ./OBS.app/Contents/PlugIns/obs-filters.so
78
+ ./OBS.app/Contents/PlugIns/obs-transitions.so
79
+ ./OBS.app/Contents/PlugIns/obs-vst.so
80
+ ./OBS.app/Contents/PlugIns/rtmp-services.so
81
+ ./OBS.app/Contents/MacOS/obs-ffmpeg-mux
82
+ ./OBS.app/Contents/MacOS/obslua.so
83
+ ./OBS.app/Contents/PlugIns/obs-x264.so
84
+ ./OBS.app/Contents/PlugIns/text-freetype2.so
85
+ ./OBS.app/Contents/PlugIns/obs-outputs.so
86
+ )
87
+
88
+ if ! [ "${{ env.CEF_BUILD_VERSION }}" -le 3770 ]; then
89
../CI/scripts/macos/app/dylibBundler -cd -of -a ./OBS.app -q -f \
90
-s ./OBS.app/Contents/MacOS \
91
-s "${{ github.workspace }}/cmbuild/sparkle/Sparkle.framework" \
92
-s ./rundir/RelWithDebInfo/bin \
93
- -x ./OBS.app/Contents/PlugIns/coreaudio-encoder.so \
94
- -x ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so \
95
- -x ./OBS.app/Contents/PlugIns/decklink-captions.so \
96
- -x ./OBS.app/Contents/PlugIns/frontend-tools.so \
97
- -x ./OBS.app/Contents/PlugIns/image-source.so \
98
- -x ./OBS.app/Contents/PlugIns/linux-jack.so \
99
- -x ./OBS.app/Contents/PlugIns/mac-avcapture.so \
100
- -x ./OBS.app/Contents/PlugIns/mac-capture.so \
101
- -x ./OBS.app/Contents/PlugIns/mac-decklink.so \
102
- -x ./OBS.app/Contents/PlugIns/mac-syphon.so \
103
- -x ./OBS.app/Contents/PlugIns/mac-vth264.so \
104
- -x ./OBS.app/Contents/PlugIns/mac-virtualcam.so \
105
- -x ./OBS.app/Contents/PlugIns/obs-browser.so \
106
- -x ./OBS.app/Contents/PlugIns/obs-browser-page \
107
- -x ./OBS.app/Contents/PlugIns/obs-ffmpeg.so \
108
- -x ./OBS.app/Contents/PlugIns/obs-filters.so \
109
- -x ./OBS.app/Contents/PlugIns/obs-transitions.so \
110
- -x ./OBS.app/Contents/PlugIns/obs-vst.so \
111
- -x ./OBS.app/Contents/PlugIns/rtmp-services.so \
112
- -x ./OBS.app/Contents/MacOS/obs-ffmpeg-mux \
113
- -x ./OBS.app/Contents/MacOS/obslua.so \
114
- -x ./OBS.app/Contents/PlugIns/obs-x264.so \
115
- -x ./OBS.app/Contents/PlugIns/text-freetype2.so \
116
- -x ./OBS.app/Contents/PlugIns/obs-libfdk.so \
117
- -x ./OBS.app/Contents/PlugIns/obs-outputs.so
118
+ $(echo "${BUNDLE_PLUGINS[@]/#/-x }")
119
+ else
120
+ ../CI/scripts/macos/app/dylibBundler -cd -of -a ./OBS.app -q -f \
121
+ -s ./OBS.app/Contents/MacOS \
122
+ -s "${{ github.workspace }}/cmbuild/sparkle/Sparkle.framework" \
123
+ -s ./rundir/RelWithDebInfo/bin \
124
+ $(echo "${BUNDLE_PLUGINS[@]/#/-x }") \
125
+ -x ./OBS.app/Contents/PlugIns/obs-browser-page
126
+ fi
127
128
mv ./libobs-opengl/libobs-opengl.so ./OBS.app/Contents/Frameworks
129
130
131
codesign --force --options runtime --sign "${SIGN_IDENTITY:--}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libswiftshader_libEGL.dylib"
132
codesign --force --options runtime --sign "${SIGN_IDENTITY:--}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib"
133
codesign --force --options runtime --sign "${SIGN_IDENTITY:--}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libswiftshader_libGLESv2.dylib"
134
+ if ! [ "${{ env.CEF_BUILD_VERSION }}" -le 3770 ]; then
135
+ codesign --force --options runtime --sign "${SIGN_IDENTITY:--}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libvk_swiftshader.dylib"
136
+ fi
137
codesign --force --options runtime --sign "${SIGN_IDENTITY:--}" --deep "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework"
138
139
codesign --force --options runtime --deep --sign "${SIGN_IDENTITY:--}" "./OBS.app/Contents/Resources/data/obs-mac-virtualcam.plugin"
140
141
codesign --force --options runtime --entitlements "../CI/scripts/macos/app/entitlements.plist" --sign "${SIGN_IDENTITY:--}" --deep ./OBS.app
142
143
+ if ! [ "${{ env.CEF_BUILD_VERSION }}" -le 3770 ]; then
144
+ codesign --force --options runtime --sign "${SIGN_IDENTITY:--}" --deep "./OBS.app/Contents/Frameworks/OBS Helper.app"
145
+ codesign --force --options runtime --entitlements "../CI/scripts/macos/helpers/helper-gpu-entitlements.plist" --sign "${SIGN_IDENTITY:--}" --deep "./OBS.app/Contents/Frameworks/OBS Helper (GPU).app"
146
+ codesign --force --options runtime --entitlements "../CI/scripts/macos/helpers/helper-plugin-entitlements.plist" --sign "${SIGN_IDENTITY:--}" --deep "./OBS.app/Contents/Frameworks/OBS Helper (Plugin).app"
147
+ codesign --force --options runtime --entitlements "../CI/scripts/macos/helpers/helper-renderer-entitlements.plist" --sign "${SIGN_IDENTITY:--}" --deep "./OBS.app/Contents/Frameworks/OBS Helper (Renderer).app"
148
+ fi
149
+
150
codesign -dvv ./OBS.app
151
- name: 'Package'
152
if: success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1')
153
obs-studio-26.1.0.tar.xz/CI/full-build-macos.sh -> obs-studio-26.1.1.tar.xz/CI/full-build-macos.sh
Changed
162
1
2
CI_SPARKLE_VERSION=$(cat ${CI_WORKFLOW} | sed -En "s/[ ]+SPARKLE_VERSION: '([0-9\.]+)'/\1/p")
3
CI_QT_VERSION=$(cat ${CI_WORKFLOW} | sed -En "s/[ ]+QT_VERSION: '([0-9\.]+)'/\1/p" | head -1)
4
CI_MIN_MACOS_VERSION=$(cat ${CI_WORKFLOW} | sed -En "s/[ ]+MIN_MACOS_VERSION: '([0-9\.]+)'/\1/p")
5
+NPROC="${NPROC:-$(sysctl -n hw.ncpu)}"
6
7
BUILD_DEPS=(
8
"obs-deps ${MACOS_DEPS_VERSION:-${CI_DEPS_VERSION}}"
9
10
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MIN_MACOS_VERSION:-${CI_MIN_MACOS_VERSION}} \
11
..
12
step "Build..."
13
- make -j4
14
+ make -j${NPROC}
15
if [ ! -d libcef_dll ]; then mkdir libcef_dll; fi
16
}
17
18
19
-DDepsPath="/tmp/obsdeps" \
20
-DVLCPath="${DEPS_BUILD_DIR}/vlc-${VLC_VERSION:-${CI_VLC_VERSION}}" \
21
-DBUILD_BROWSER=ON \
22
- -DBROWSER_DEPLOY=ON \
23
+ -DBROWSER_LEGACY="$(test "${CEF_BUILD_VERSION:-${CI_CEF_VERSION}}" -le 3770 && echo "ON" || echo "OFF")" \
24
-DWITH_RTMPS=ON \
25
-DCEF_ROOT_DIR="${DEPS_BUILD_DIR}/cef_binary_${CEF_BUILD_VERSION:-${CI_CEF_VERSION}}_macosx64" \
26
-DCMAKE_BUILD_TYPE="${BUILD_CONFIG}" \
27
28
run_obs_build() {
29
ensure_dir "${CHECKOUT_DIR}/${BUILD_DIR}"
30
hr "Build OBS..."
31
- make -j4
32
+ make -j${NPROC}
33
}
34
35
## OBS BUNDLE AS MACOS APPLICATION ##
36
37
hr "Bundle dylibs for macOS application"
38
39
step "Run dylibBundler.."
40
- ${CI_SCRIPTS}/app/dylibbundler -cd -of -a ./OBS.app -q -f \
41
- -s ./OBS.app/Contents/MacOS \
42
- -s "${DEPS_BUILD_DIR}/sparkle/Sparkle.framework" \
43
- -s ./rundir/${BUILD_CONFIG}/bin/ \
44
- -x ./OBS.app/Contents/PlugIns/coreaudio-encoder.so \
45
- -x ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so \
46
- -x ./OBS.app/Contents/PlugIns/decklink-captions.so \
47
- -x ./OBS.app/Contents/PlugIns/frontend-tools.so \
48
- -x ./OBS.app/Contents/PlugIns/image-source.so \
49
- -x ./OBS.app/Contents/PlugIns/linux-jack.so \
50
- -x ./OBS.app/Contents/PlugIns/mac-avcapture.so \
51
- -x ./OBS.app/Contents/PlugIns/mac-capture.so \
52
- -x ./OBS.app/Contents/PlugIns/mac-decklink.so \
53
- -x ./OBS.app/Contents/PlugIns/mac-syphon.so \
54
- -x ./OBS.app/Contents/PlugIns/mac-vth264.so \
55
- -x ./OBS.app/Contents/PlugIns/mac-virtualcam.so \
56
- -x ./OBS.app/Contents/PlugIns/obs-browser.so \
57
- -x ./OBS.app/Contents/PlugIns/obs-browser-page \
58
- -x ./OBS.app/Contents/PlugIns/obs-ffmpeg.so \
59
- -x ./OBS.app/Contents/PlugIns/obs-filters.so \
60
- -x ./OBS.app/Contents/PlugIns/obs-transitions.so \
61
- -x ./OBS.app/Contents/PlugIns/obs-vst.so \
62
- -x ./OBS.app/Contents/PlugIns/rtmp-services.so \
63
- -x ./OBS.app/Contents/MacOS/obs-ffmpeg-mux \
64
- -x ./OBS.app/Contents/MacOS/obslua.so \
65
- -x ./OBS.app/Contents/PlugIns/obs-x264.so \
66
- -x ./OBS.app/Contents/PlugIns/text-freetype2.so \
67
- -x ./OBS.app/Contents/PlugIns/obs-libfdk.so \
68
- -x ./OBS.app/Contents/PlugIns/obs-outputs.so
69
- step "Move libobs-opengl to final destination"
70
71
+ BUNDLE_PLUGINS=(
72
+ ./OBS.app/Contents/PlugIns/coreaudio-encoder.so
73
+ ./OBS.app/Contents/PlugIns/decklink-ouput-ui.so
74
+ ./OBS.app/Contents/PlugIns/decklink-captions.so
75
+ ./OBS.app/Contents/PlugIns/frontend-tools.so
76
+ ./OBS.app/Contents/PlugIns/image-source.so
77
+ ./OBS.app/Contents/PlugIns/mac-avcapture.so
78
+ ./OBS.app/Contents/PlugIns/mac-capture.so
79
+ ./OBS.app/Contents/PlugIns/mac-decklink.so
80
+ ./OBS.app/Contents/PlugIns/mac-syphon.so
81
+ ./OBS.app/Contents/PlugIns/mac-vth264.so
82
+ ./OBS.app/Contents/PlugIns/mac-virtualcam.so
83
+ ./OBS.app/Contents/PlugIns/obs-browser.so
84
+ ./OBS.app/Contents/PlugIns/obs-ffmpeg.so
85
+ ./OBS.app/Contents/PlugIns/obs-filters.so
86
+ ./OBS.app/Contents/PlugIns/obs-transitions.so
87
+ ./OBS.app/Contents/PlugIns/obs-vst.so
88
+ ./OBS.app/Contents/PlugIns/rtmp-services.so
89
+ ./OBS.app/Contents/MacOS/obs-ffmpeg-mux
90
+ ./OBS.app/Contents/MacOS/obslua.so
91
+ ./OBS.app/Contents/PlugIns/obs-x264.so
92
+ ./OBS.app/Contents/PlugIns/text-freetype2.so
93
+ ./OBS.app/Contents/PlugIns/obs-outputs.so
94
+ )
95
+ if ! [ "${CEF_BUILD_VERSION:-${CI_CEF_VERSION}}" -le 3770 ]; then
96
+ ${CI_SCRIPTS}/app/dylibbundler -cd -of -a ./OBS.app -q -f \
97
+ -s ./OBS.app/Contents/MacOS \
98
+ -s "${DEPS_BUILD_DIR}/sparkle/Sparkle.framework" \
99
+ -s ./rundir/${BUILD_CONFIG}/bin/ \
100
+ $(echo "${BUNDLE_PLUGINS[@]/#/-x }")
101
+ else
102
+ ${CI_SCRIPTS}/app/dylibbundler -cd -of -a ./OBS.app -q -f \
103
+ -s ./OBS.app/Contents/MacOS \
104
+ -s "${DEPS_BUILD_DIR}/sparkle/Sparkle.framework" \
105
+ -s ./rundir/${BUILD_CONFIG}/bin/ \
106
+ $(echo "${BUNDLE_PLUGINS[@]/#/-x }") \
107
+ -x ./OBS.app/Contents/PlugIns/obs-browser-page
108
+ fi
109
+
110
+ step "Move libobs-opengl to final destination"
111
if [ -f "./libobs-opengl/libobs-opengl.so" ]; then
112
cp ./libobs-opengl/libobs-opengl.so ./OBS.app/Contents/Frameworks
113
else
114
115
mkdir -p OBS.app/Contents/MacOS
116
mkdir OBS.app/Contents/PlugIns
117
mkdir OBS.app/Contents/Resources
118
+ mkdir OBS.app/Contents/Frameworks
119
120
cp rundir/${BUILD_CONFIG}/bin/obs ./OBS.app/Contents/MacOS
121
cp rundir/${BUILD_CONFIG}/bin/obs-ffmpeg-mux ./OBS.app/Contents/MacOS
122
cp rundir/${BUILD_CONFIG}/bin/libobsglad.0.dylib ./OBS.app/Contents/MacOS
123
+ if ! [ "${CEF_BUILD_VERSION:-${CI_CEF_VERSION}}" -le 3770 ]; then
124
+ cp -R "rundir/${BUILD_CONFIG}/bin/OBS Helper.app" "./OBS.app/Contents/Frameworks/OBS Helper.app"
125
+ cp -R "rundir/${BUILD_CONFIG}/bin/OBS Helper (GPU).app" "./OBS.app/Contents/Frameworks/OBS Helper (GPU).app"
126
+ cp -R "rundir/${BUILD_CONFIG}/bin/OBS Helper (Plugin).app" "./OBS.app/Contents/Frameworks/OBS Helper (Plugin).app"
127
+ cp -R "rundir/${BUILD_CONFIG}/bin/OBS Helper (Renderer).app" "./OBS.app/Contents/Frameworks/OBS Helper (Renderer).app"
128
+ fi
129
cp -R rundir/${BUILD_CONFIG}/data ./OBS.app/Contents/Resources
130
cp ${CI_SCRIPTS}/app/AppIcon.icns ./OBS.app/Contents/Resources
131
cp -R rundir/${BUILD_CONFIG}/obs-plugins/ ./OBS.app/Contents/PlugIns
132
133
codesign --force --options runtime --sign "${CODESIGN_IDENT}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libswiftshader_libEGL.dylib"
134
codesign --force --options runtime --sign "${CODESIGN_IDENT}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib"
135
codesign --force --options runtime --sign "${CODESIGN_IDENT}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libswiftshader_libGLESv2.dylib"
136
- codesign --force --options runtime --sign "${CODESIGN_IDENT}" --deep "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework"
137
+ if ! [ "${CEF_BUILD_VERSION:-${CI_CEF_VERSION}}" -le 3770 ]; then
138
+ codesign --force --options runtime --sign "${CODESIGN_IDENT}" "./OBS.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/libvk_swiftshader.dylib"
139
+ fi
140
+
141
echo -n "${COLOR_RESET}"
142
143
step "Code-sign DAL Plugin..."
144
145
echo -n "${COLOR_ORANGE}"
146
codesign --force --options runtime --entitlements "${CI_SCRIPTS}/app/entitlements.plist" --sign "${CODESIGN_IDENT}" --deep ./OBS.app
147
echo -n "${COLOR_RESET}"
148
+
149
+ if ! [ "${CEF_BUILD_VERSION:-${CI_CEF_VERSION}}" -le 3770 ]; then
150
+ step "Code-sign CEF helper apps..."
151
+ echo -n "${COLOR_ORANGE}"
152
+ codesign --force --options runtime --sign "${CODESIGN_IDENT}" --deep "./OBS.app/Contents/Frameworks/OBS Helper.app"
153
+ codesign --force --options runtime --entitlements "${CI_SCRIPTS}/helpers/helper-gpu-entitlements.plist" --sign "${CODESIGN_IDENT}" --deep "./OBS.app/Contents/Frameworks/OBS Helper (GPU).app"
154
+ codesign --force --options runtime --entitlements "${CI_SCRIPTS}/helpers/helper-plugin-entitlements.plist" --sign "${CODESIGN_IDENT}" --deep "./OBS.app/Contents/Frameworks/OBS Helper (Plugin).app"
155
+ codesign --force --options runtime --entitlements "${CI_SCRIPTS}/helpers/helper-renderer-entitlements.plist" --sign "${CODESIGN_IDENT}" --deep "./OBS.app/Contents/Frameworks/OBS Helper (Renderer).app"
156
+ echo -n "${COLOR_RESET}"
157
+ fi
158
+
159
step "Check code-sign result..."
160
codesign -dvv ./OBS.app
161
}
162
obs-studio-26.1.0.tar.xz/CI/scripts/macos/Brewfile -> obs-studio-26.1.1.tar.xz/CI/scripts/macos/Brewfile
Changed
11
1
2
tap "akeru-inc/tap"
3
-brew "jack"
4
-brew "speexdsp"
5
brew "cmake"
6
brew "freetype"
7
-brew "fdk-aac"
8
brew "cmocka"
9
brew "akeru-inc/tap/xcnotary"
10
\ No newline at end of file
11
obs-studio-26.1.1.tar.xz/CI/scripts/macos/helpers
Added
2
1
+(directory)
2
obs-studio-26.1.1.tar.xz/CI/scripts/macos/helpers/helper-gpu-entitlements.plist
Added
11
1
2
+<?xml version="1.0" encoding="UTF-8"?>
3
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4
+<plist version="1.0">
5
+<dict>
6
+ <key>com.apple.security.cs.allow-jit</key>
7
+ <true/>
8
+</dict>
9
+</plist>
10
\ No newline at end of file
11
obs-studio-26.1.1.tar.xz/CI/scripts/macos/helpers/helper-plugin-entitlements.plist
Added
13
1
2
+<?xml version="1.0" encoding="UTF-8"?>
3
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4
+<plist version="1.0">
5
+<dict>
6
+ <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
7
+ <true/>
8
+ <key>com.apple.security.cs.disable-library-validation</key>
9
+ <true/>
10
+</dict>
11
+</plist>
12
\ No newline at end of file
13
obs-studio-26.1.1.tar.xz/CI/scripts/macos/helpers/helper-renderer-entitlements.plist
Added
11
1
2
+<?xml version="1.0" encoding="UTF-8"?>
3
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4
+<plist version="1.0">
5
+<dict>
6
+ <key>com.apple.security.cs.allow-jit</key>
7
+ <true/>
8
+</dict>
9
+</plist>
10
\ No newline at end of file
11
obs-studio-26.1.0.tar.xz/CMakeLists.txt -> obs-studio-26.1.1.tar.xz/CMakeLists.txt
Changed
20
1
2
endif ()
3
4
if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86|x64|x86_64|amd64|e2k)")
5
- set(NEEDS_SIMDE "0")
6
if(NOT MSVC)
7
set(ARCH_SIMD_FLAGS "-mmmx" "-msse" "-msse2")
8
endif()
9
elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64(le)?")
10
- set(NEEDS_SIMDE "0")
11
+ set(ARCH_SIMD_DEFINES "-DNO_WARN_X86_INTRINSICS")
12
set(ARCH_SIMD_FLAGS "-mvsx")
13
add_compile_definitions(NO_WARN_X86_INTRINSICS)
14
else()
15
- set(NEEDS_SIMDE "1")
16
- add_definitions(-DNEEDS_SIMDE=1)
17
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
18
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSIMDE_ENABLE_OPENMP")
19
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSIMDE_ENABLE_OPENMP")
20
obs-studio-26.1.0.tar.xz/UI/data/locale.ini -> obs-studio-26.1.1.tar.xz/UI/data/locale.ini
Changed
7
1
2
Name=Esperanto
3
4
[kab-KAB]
5
-Name=Taglizit
6
+Name=Taqbaylit
7
obs-studio-26.1.0.tar.xz/UI/data/themes/Acri.qss -> obs-studio-26.1.1.tar.xz/UI/data/themes/Acri.qss
Changed
12
1
2
max-height: 40px;
3
}
4
5
-#contextContainer QPushButton[themeID2=contextBarButton] {
6
- padding: 0px;
7
+#contextContainer QPushButton {
8
+ padding: 0px 12px;
9
}
10
11
QPushButton#sourcePropertiesButton {
12
obs-studio-26.1.0.tar.xz/UI/installer/mp-installer.nsi -> obs-studio-26.1.1.tar.xz/UI/installer/mp-installer.nsi
Changed
9
1
2
ClearErrors
3
GetDLLVersion "vcruntime140.DLL" $R0 $R1
4
GetDLLVersion "msvcp140.DLL" $R0 $R1
5
+ GetDLLVersion "msvcp140_1.DLL" $R0 $R1
6
IfErrors vs2019Missing_32 vs2019OK_32
7
vs2019Missing_32:
8
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your system is missing runtime components that ${APPNAME} requires. Would you like to download them?" IDYES vs2019true_32 IDNO vs2019false_32
9
obs-studio-26.1.0.tar.xz/UI/win-update/updater/updater.cpp -> obs-studio-26.1.1.tar.xz/UI/win-update/updater/updater.cpp
Changed
119
1
2
} else {
3
DeleteFile(outputPath.c_str());
4
}
5
+ if (state == STATE_INSTALL_FAILED)
6
+ DeleteFile(tempPath.c_str());
7
} else if (state == STATE_DOWNLOADED) {
8
DeleteFile(tempPath.c_str());
9
}
10
11
12
bool DownloadWorkerThread()
13
{
14
- const DWORD tlsProtocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
15
+ const DWORD tlsProtocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 |
16
+ WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3;
17
+
18
+ const DWORD enableHTTP2Flag = WINHTTP_PROTOCOL_FLAG_HTTP2;
19
20
HttpHandle hSession = WinHttpOpen(L"OBS Studio Updater/2.1",
21
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
22
23
WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS,
24
(LPVOID)&tlsProtocols, sizeof(tlsProtocols));
25
26
+ WinHttpSetOption(hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL,
27
+ (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag));
28
+
29
HttpHandle hConnect = WinHttpConnect(hSession,
30
L"cdn-fastly.obsproject.com",
31
INTERNET_DEFAULT_HTTPS_PORT, 0);
32
33
}
34
}
35
36
+static bool MoveInUseFileAway(update_t &file)
37
+{
38
+ _TCHAR deleteMeName[MAX_PATH];
39
+ _TCHAR randomStr[MAX_PATH];
40
+
41
+ BYTE junk[40];
42
+ BYTE hash[BLAKE2_HASH_LENGTH];
43
+
44
+ CryptGenRandom(hProvider, sizeof(junk), junk);
45
+ blake2b(hash, sizeof(hash), junk, sizeof(junk), NULL, 0);
46
+ HashToString(hash, randomStr);
47
+ randomStr[8] = 0;
48
+
49
+ StringCbCopy(deleteMeName, sizeof(deleteMeName),
50
+ file.outputPath.c_str());
51
+
52
+ StringCbCat(deleteMeName, sizeof(deleteMeName), L".");
53
+ StringCbCat(deleteMeName, sizeof(deleteMeName), randomStr);
54
+ StringCbCat(deleteMeName, sizeof(deleteMeName), L".deleteme");
55
+
56
+ if (MoveFile(file.outputPath.c_str(), deleteMeName)) {
57
+
58
+ if (MyCopyFile(deleteMeName, file.outputPath.c_str())) {
59
+ MoveFileEx(deleteMeName, NULL,
60
+ MOVEFILE_DELAY_UNTIL_REBOOT);
61
+
62
+ return true;
63
+ } else {
64
+ MoveFile(deleteMeName, file.outputPath.c_str());
65
+ }
66
+ }
67
+
68
+ return false;
69
+}
70
+
71
static bool UpdateFile(update_t &file)
72
{
73
wchar_t oldFileRenamedPath[MAX_PATH];
74
75
76
int error_code;
77
bool installed_ok;
78
+ bool already_tried_to_move = false;
79
+
80
+ retryAfterMovingFile:
81
82
if (file.patchable) {
83
error_code = ApplyPatch(file.tempPath.c_str(),
84
85
int is_sharing_violation =
86
(error_code == ERROR_SHARING_VIOLATION);
87
88
- if (is_sharing_violation)
89
+ if (is_sharing_violation) {
90
+ if (!already_tried_to_move) {
91
+ already_tried_to_move = true;
92
+
93
+ if (MoveInUseFileAway(file))
94
+ goto retryAfterMovingFile;
95
+ }
96
+
97
Status(L"Update failed: %s is still in use. "
98
L"Close all "
99
L"programs and try again.",
100
curFileName);
101
- else
102
+ } else {
103
Status(L"Update failed: Couldn't update %s "
104
L"(error %d)",
105
curFileName, GetLastError());
106
+ }
107
108
file.state = STATE_INSTALL_FAILED;
109
return false;
110
111
/* ------------------------------------- *
112
* Download Updates */
113
114
- if (!RunDownloadWorkers(2))
115
+ if (!RunDownloadWorkers(4))
116
return false;
117
118
if ((size_t)completedUpdates != updates.size()) {
119
obs-studio-26.1.0.tar.xz/UI/window-basic-auto-config.cpp -> obs-studio-26.1.1.tar.xz/UI/window-basic-auto-config.cpp
Changed
41
1
2
if (!wiz->customServer) {
3
if (wiz->serviceName == "Twitch")
4
wiz->service = AutoConfig::Service::Twitch;
5
- else if (wiz->serviceName == "Smashcast")
6
- wiz->service = AutoConfig::Service::Smashcast;
7
else
8
wiz->service = AutoConfig::Service::Other;
9
} else {
10
11
return;
12
13
std::string service = QT_TO_UTF8(ui->service->currentText());
14
- bool regionBased = service == "Twitch" || service == "Smashcast";
15
+ bool regionBased = service == "Twitch";
16
bool testBandwidth = ui->doBandwidthTest->isChecked();
17
bool custom = IsCustomService();
18
19
20
} else if (regionOther) {
21
return true;
22
}
23
- } else if (service == Service::Smashcast) {
24
- if (strcmp(server, "Default") == 0) {
25
- return true;
26
- } else if (astrcmp_n(server, "US-West:", 8) == 0 ||
27
- astrcmp_n(server, "US-East:", 8) == 0) {
28
- return regionUS;
29
- } else if (astrcmp_n(server, "EU-", 3) == 0) {
30
- return regionEU;
31
- } else if (astrcmp_n(server, "South Korea:", 12) == 0 ||
32
- astrcmp_n(server, "Asia:", 5) == 0 ||
33
- astrcmp_n(server, "China:", 6) == 0) {
34
- return regionAsia;
35
- } else if (regionOther) {
36
- return true;
37
- }
38
} else {
39
return true;
40
}
41
obs-studio-26.1.0.tar.xz/UI/window-basic-auto-config.hpp -> obs-studio-26.1.1.tar.xz/UI/window-basic-auto-config.hpp
Changed
9
1
2
3
enum class Service {
4
Twitch,
5
- Smashcast,
6
Other,
7
};
8
9
obs-studio-26.1.0.tar.xz/UI/window-basic-main.cpp -> obs-studio-26.1.1.tar.xz/UI/window-basic-main.cpp
Changed
16
1
2
uint32_t cx = primaryScreen->size().width();
3
uint32_t cy = primaryScreen->size().height();
4
5
+#ifdef SUPPORTS_FRACTIONAL_SCALING
6
+ cx *= devicePixelRatioF();
7
+ cy *= devicePixelRatioF();
8
+#elif
9
+ cx *= devicePixelRatio();
10
+ cy *= devicePixelRatio();
11
+#endif
12
+
13
bool oldResolutionDefaults = config_get_bool(
14
App()->GlobalConfig(), "General", "Pre19Defaults");
15
16
obs-studio-26.1.0.tar.xz/cmake/Modules/FindLibcurl.cmake -> obs-studio-26.1.1.tar.xz/cmake/Modules/FindLibcurl.cmake
Changed
70
1
2
PATH_SUFFIXES
3
include)
4
5
-find_library(CURL_LIB
6
- NAMES ${_CURL_LIBRARIES} curl libcurl
7
- HINTS
8
- ENV curlPath${_lib_suffix}
9
- ENV curlPath
10
- ENV DepsPath${_lib_suffix}
11
- ENV DepsPath
12
- ${curlPath${_lib_suffix}}
13
- ${curlPath}
14
- ${DepsPath${_lib_suffix}}
15
- ${DepsPath}
16
- ${_CURL_LIBRARY_DIRS}
17
- PATHS
18
- /usr/lib /usr/local/lib /opt/local/lib /sw/lib
19
- PATH_SUFFIXES
20
- lib${_lib_suffix} lib
21
- libs${_lib_suffix} libs
22
- bin${_lib_suffix} bin
23
- ../lib${_lib_suffix} ../lib
24
- ../libs${_lib_suffix} ../libs
25
- ../bin${_lib_suffix} ../bin
26
- "build/Win${_lib_suffix}/VC12/DLL Release - DLL Windows SSPI"
27
- "../build/Win${_lib_suffix}/VC12/DLL Release - DLL Windows SSPI")
28
+if(APPLE)
29
+ find_library(CURL_LIB
30
+ NAMES ${_CURL_LIBRARIES} curl libcurl
31
+ HINTS
32
+ ENV curlPath${_lib_suffix}
33
+ ENV curlPath
34
+ ENV DepsPath${_lib_suffix}
35
+ ENV DepsPath
36
+ ${curlPath${_lib_suffix}}
37
+ ${curlPath}
38
+ ${DepsPath${_lib_suffix}}
39
+ ${DepsPath}
40
+ ${_CURL_LIBRARY_DIRS}
41
+ )
42
+else()
43
+ find_library(CURL_LIB
44
+ NAMES ${_CURL_LIBRARIES} curl libcurl
45
+ HINTS
46
+ ENV curlPath${_lib_suffix}
47
+ ENV curlPath
48
+ ENV DepsPath${_lib_suffix}
49
+ ENV DepsPath
50
+ ${curlPath${_lib_suffix}}
51
+ ${curlPath}
52
+ ${DepsPath${_lib_suffix}}
53
+ ${DepsPath}
54
+ ${_CURL_LIBRARY_DIRS}
55
+ PATHS
56
+ /usr/lib /usr/local/lib /opt/local/lib /sw/lib
57
+ PATH_SUFFIXES
58
+ lib${_lib_suffix} lib
59
+ libs${_lib_suffix} libs
60
+ bin${_lib_suffix} bin
61
+ ../lib${_lib_suffix} ../lib
62
+ ../libs${_lib_suffix} ../libs
63
+ ../bin${_lib_suffix} ../bin
64
+ "build/Win${_lib_suffix}/VC12/DLL Release - DLL Windows SSPI"
65
+ "../build/Win${_lib_suffix}/VC12/DLL Release - DLL Windows SSPI")
66
+endif()
67
68
include(FindPackageHandleStandardArgs)
69
find_package_handle_standard_args(Libcurl DEFAULT_MSG CURL_LIB CURL_INCLUDE_DIR)
70
obs-studio-26.1.0.tar.xz/docs/sphinx/reference-frontend-api.rst -> obs-studio-26.1.1.tar.xz/docs/sphinx/reference-frontend-api.rst
Changed
17
1
2
3
---------------------------------------
4
5
+.. function:: void obs_frontend_open_projector(const char *type, int monitor, const char *geometry, const char *name)
6
+
7
+ :param type: "Preview", "Source", "Scene", "StudioProgram", or "Multiview" (case insensitive).
8
+ :param monitor: Monitor to open the projector on. If -1, opens a window.
9
+ :param geometry: If *monitor* is -1, size and position of the projector window. Encoded in Base64 using Qt's geometry encoding.
10
+ :param name: If *type* is "Source" or "Scene", name of the source or scene to be displayed.
11
+
12
+---------------------------------------
13
+
14
.. function:: void obs_frontend_save(void)
15
16
Saves the current scene collection.
17
obs-studio-26.1.0.tar.xz/libobs/CMakeLists.txt -> obs-studio-26.1.1.tar.xz/libobs/CMakeLists.txt
Changed
64
1
2
util/pipe-posix.c
3
util/platform-nix.c)
4
5
- if(NEEDS_SIMDE)
6
- set(libobs_PLATFORM_HEADERS
7
- util/simde/check.h
8
- util/simde/hedley.h
9
- util/simde/mmx.h
10
- util/simde/simde-arch.h
11
- util/simde/simde-common.h
12
- util/simde/sse.h
13
- util/simde/sse2.h
14
- util/threading-posix.h)
15
- else()
16
- set(libobs_PLATFORM_HEADERS
17
- util/threading-posix.h)
18
- endif()
19
+ set(libobs_PLATFORM_HEADERS
20
+ util/threading-posix.h)
21
22
if(HAVE_PULSEAUDIO)
23
set(libobs_audio_monitoring_HEADERS
24
25
set(libobs_util_HEADERS
26
util/curl/curl-helper.h
27
util/sse-intrin.h
28
- util/sse2neon.h
29
util/array-serializer.h
30
util/file-serializer.h
31
util/utf8.h
32
33
obs-video-gpu-encode.c
34
obs-video.c)
35
set(libobs_libobs_HEADERS
36
+ util/simde/check.h
37
+ util/simde/debug-trap.h
38
+ util/simde/hedley.h
39
+ util/simde/simde-align.h
40
+ util/simde/simde-arch.h
41
+ util/simde/simde-common.h
42
+ util/simde/simde-constify.h
43
+ util/simde/simde-detect-clang.h
44
+ util/simde/simde-diagnostic.h
45
+ util/simde/simde-features.h
46
+ util/simde/simde-math.h
47
+ util/simde/x86/mmx.h
48
+ util/simde/x86/sse2.h
49
+ util/simde/x86/sse.h
50
${libobs_PLATFORM_HEADERS}
51
obs-audio-controls.h
52
obs-defs.h
53
54
PUBLIC
55
HAVE_OBSCONFIG_H)
56
57
+target_compile_definitions(libobs
58
+ PUBLIC
59
+ ${ARCH_SIMD_DEFINES})
60
+
61
target_compile_options(libobs
62
PUBLIC
63
${ARCH_SIMD_FLAGS})
64
obs-studio-26.1.0.tar.xz/libobs/media-io/media-remux.c -> obs-studio-26.1.1.tar.xz/libobs/media-io/media-remux.c
Changed
10
1
2
3
/* Treat "Invalid data found when processing input" and
4
* "Invalid argument" as non-fatal */
5
- if (ret == AVERROR_INVALIDDATA || ret == EINVAL)
6
+ if (ret == AVERROR_INVALIDDATA || ret == -EINVAL)
7
continue;
8
9
break;
10
obs-studio-26.1.0.tar.xz/libobs/obs-config.h -> obs-studio-26.1.1.tar.xz/libobs/obs-config.h
Changed
10
1
2
*
3
* Reset to zero each major or minor version
4
*/
5
-#define LIBOBS_API_PATCH_VER 0
6
+#define LIBOBS_API_PATCH_VER 1
7
8
#define MAKE_SEMANTIC_VERSION(major, minor, patch) \
9
((major << 24) | (minor << 16) | patch)
10
obs-studio-26.1.0.tar.xz/libobs/obs-scene.c -> obs-studio-26.1.1.tar.xz/libobs/obs-scene.c
Changed
65
1
2
}
3
4
static void apply_scene_item_audio_actions(struct obs_scene_item *item,
5
- float **p_buf, uint64_t ts,
6
+ float *buf, uint64_t ts,
7
size_t sample_rate)
8
{
9
bool cur_visible = item->visible;
10
uint64_t frame_num = 0;
11
size_t deref_count = 0;
12
- float *buf = NULL;
13
-
14
- if (p_buf) {
15
- if (!*p_buf)
16
- *p_buf = malloc(AUDIO_OUTPUT_FRAMES * sizeof(float));
17
- buf = *p_buf;
18
- }
19
20
pthread_mutex_lock(&item->actions_mutex);
21
22
23
}
24
}
25
26
-static bool apply_scene_item_volume(struct obs_scene_item *item, float **buf,
27
+static bool apply_scene_item_volume(struct obs_scene_item *item, float *buf,
28
uint64_t ts, size_t sample_rate)
29
{
30
bool actions_pending;
31
32
size_t sample_rate)
33
{
34
uint64_t timestamp = 0;
35
- float *buf = NULL;
36
+ float buf[AUDIO_OUTPUT_FRAMES];
37
struct obs_source_audio_mix child_audio;
38
struct obs_scene *scene = data;
39
struct obs_scene_item *item;
40
41
size_t pos, count;
42
bool apply_buf;
43
44
- apply_buf = apply_scene_item_volume(item, &buf, timestamp,
45
+ apply_buf = apply_scene_item_volume(item, buf, timestamp,
46
sample_rate);
47
48
if (obs_source_audio_pending(item->source)) {
49
50
*ts_out = timestamp;
51
audio_unlock(scene);
52
53
- free(buf);
54
return true;
55
}
56
57
58
}
59
60
obs_sceneitem_set_crop(dst, &src->crop);
61
+ obs_sceneitem_set_locked(dst, src->locked);
62
63
if (defer_texture_update) {
64
os_atomic_set_bool(&dst->update_transform, true);
65
obs-studio-26.1.0.tar.xz/libobs/obs-source.c -> obs-studio-26.1.1.tar.xz/libobs/obs-source.c
Changed
19
1
2
static void apply_audio_actions(obs_source_t *source, size_t channels,
3
size_t sample_rate)
4
{
5
- float *vol_data = malloc(sizeof(float) * AUDIO_OUTPUT_FRAMES);
6
+ float vol_data[AUDIO_OUTPUT_FRAMES];
7
float cur_vol = get_source_volume(source, source->audio_ts);
8
size_t frame_num = 0;
9
10
11
if ((source->audio_mixers & (1 << mix)) != 0)
12
multiply_vol_data(source, mix, channels, vol_data);
13
}
14
-
15
- free(vol_data);
16
}
17
18
static void apply_audio_volume(obs_source_t *source, uint32_t mixers,
19
obs-studio-26.1.0.tar.xz/libobs/obsconfig.h.in -> obs-studio-26.1.1.tar.xz/libobs/obsconfig.h.in
Changed
9
1
2
#define HAVE_DBUS @HAVE_DBUS@
3
#define HAVE_PULSEAUDIO @HAVE_PULSEAUDIO@
4
#define USE_XINPUT @USE_XINPUT@
5
-#define NEEDS_SIMDE @NEEDS_SIMDE@
6
#define LIBOBS_IMAGEMAGICK_DIR_STYLE_6L 6
7
#define LIBOBS_IMAGEMAGICK_DIR_STYLE_7GE 7
8
#define LIBOBS_IMAGEMAGICK_DIR_STYLE @LIBOBS_IMAGEMAGICK_DIR_STYLE@
9
obs-studio-26.1.0.tar.xz/libobs/util/simde/README.libobs -> obs-studio-26.1.1.tar.xz/libobs/util/simde/README.libobs
Changed
10
1
2
-This is a slightly modified version of https://github.com/nemequ/simde/commit/cafec4b952fa5a31a51a10326f97c2e7c9067771
3
-sse{,2}.h and mmx.h was moved down from the original "x86" subdirectory,
4
-subsequently the '#include "../simde-common.h"' line in mmx.h was changed to '#include "simde-common.h"'
5
+This is a slightly modified version of the simde directory in
6
+https://github.com/simd-everywhere/simde/commit/c3d7abfaba6729a8b11d09a314b34a4db628911d
7
+Unused files have removed.
8
9
Then the code was reformatted using the "formatcode.sh" script in the root of this repository.
10
obs-studio-26.1.0.tar.xz/libobs/util/simde/check.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/check.h
Changed
9
1
2
#endif
3
4
#include "hedley.h"
5
+#include "simde-diagnostic.h"
6
#include <stdint.h>
7
8
#if !defined(_WIN32)
9
obs-studio-26.1.0.tar.xz/libobs/util/simde/hedley.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/hedley.h
Changed
201
1
2
* SPDX-License-Identifier: CC0-1.0
3
*/
4
5
-#if !defined(HEDLEY_VERSION) || (HEDLEY_VERSION < 12)
6
+#if !defined(HEDLEY_VERSION) || (HEDLEY_VERSION < 14)
7
#if defined(HEDLEY_VERSION)
8
#undef HEDLEY_VERSION
9
#endif
10
-#define HEDLEY_VERSION 12
11
+#define HEDLEY_VERSION 14
12
13
#if defined(HEDLEY_STRINGIFY_EX)
14
#undef HEDLEY_STRINGIFY_EX
15
16
#endif
17
#define HEDLEY_CONCAT(a, b) HEDLEY_CONCAT_EX(a, b)
18
19
+#if defined(HEDLEY_CONCAT3_EX)
20
+#undef HEDLEY_CONCAT3_EX
21
+#endif
22
+#define HEDLEY_CONCAT3_EX(a, b, c) a##b##c
23
+
24
+#if defined(HEDLEY_CONCAT3)
25
+#undef HEDLEY_CONCAT3
26
+#endif
27
+#define HEDLEY_CONCAT3(a, b, c) HEDLEY_CONCAT3_EX(a, b, c)
28
+
29
#if defined(HEDLEY_VERSION_ENCODE)
30
#undef HEDLEY_VERSION_ENCODE
31
#endif
32
33
#if defined(HEDLEY_MSVC_VERSION)
34
#undef HEDLEY_MSVC_VERSION
35
#endif
36
-#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)
37
+#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL)
38
#define HEDLEY_MSVC_VERSION \
39
HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, \
40
(_MSC_FULL_VER % 10000000) / 100000, \
41
(_MSC_FULL_VER % 100000) / 100)
42
-#elif defined(_MSC_FULL_VER)
43
+#elif defined(_MSC_FULL_VER) && !defined(__ICL)
44
#define HEDLEY_MSVC_VERSION \
45
HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, \
46
(_MSC_FULL_VER % 1000000) / 10000, \
47
(_MSC_FULL_VER % 10000) / 10)
48
-#elif defined(_MSC_VER)
49
+#elif defined(_MSC_VER) && !defined(__ICL)
50
#define HEDLEY_MSVC_VERSION \
51
HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0)
52
#endif
53
54
#if defined(HEDLEY_MSVC_VERSION_CHECK)
55
#undef HEDLEY_MSVC_VERSION_CHECK
56
#endif
57
-#if !defined(_MSC_VER)
58
+#if !defined(HEDLEY_MSVC_VERSION)
59
#define HEDLEY_MSVC_VERSION_CHECK(major, minor, patch) (0)
60
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
61
#define HEDLEY_MSVC_VERSION_CHECK(major, minor, patch) \
62
63
#if defined(HEDLEY_INTEL_VERSION)
64
#undef HEDLEY_INTEL_VERSION
65
#endif
66
-#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
67
+#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && \
68
+ !defined(__ICL)
69
#define HEDLEY_INTEL_VERSION \
70
HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, \
71
__INTEL_COMPILER_UPDATE)
72
-#elif defined(__INTEL_COMPILER)
73
+#elif defined(__INTEL_COMPILER) && !defined(__ICL)
74
#define HEDLEY_INTEL_VERSION \
75
HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
76
#endif
77
78
#define HEDLEY_INTEL_VERSION_CHECK(major, minor, patch) (0)
79
#endif
80
81
+#if defined(HEDLEY_INTEL_CL_VERSION)
82
+#undef HEDLEY_INTEL_CL_VERSION
83
+#endif
84
+#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && \
85
+ defined(__ICL)
86
+#define HEDLEY_INTEL_CL_VERSION \
87
+ HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0)
88
+#endif
89
+
90
+#if defined(HEDLEY_INTEL_CL_VERSION_CHECK)
91
+#undef HEDLEY_INTEL_CL_VERSION_CHECK
92
+#endif
93
+#if defined(HEDLEY_INTEL_CL_VERSION)
94
+#define HEDLEY_INTEL_CL_VERSION_CHECK(major, minor, patch) \
95
+ (HEDLEY_INTEL_CL_VERSION >= HEDLEY_VERSION_ENCODE(major, minor, patch))
96
+#else
97
+#define HEDLEY_INTEL_CL_VERSION_CHECK(major, minor, patch) (0)
98
+#endif
99
+
100
#if defined(HEDLEY_PGI_VERSION)
101
#undef HEDLEY_PGI_VERSION
102
#endif
103
104
HEDLEY_GCC_VERSION_CHECK(major, minor, patch)
105
#endif
106
107
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
108
+ defined(__clang__) || HEDLEY_GCC_VERSION_CHECK(3, 0, 0) || \
109
+ HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \
110
+ HEDLEY_IAR_VERSION_CHECK(8, 0, 0) || \
111
+ HEDLEY_PGI_VERSION_CHECK(18, 4, 0) || \
112
+ HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \
113
+ HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \
114
+ HEDLEY_TI_ARMCL_VERSION_CHECK(4, 7, 0) || \
115
+ HEDLEY_TI_CL430_VERSION_CHECK(2, 0, 1) || \
116
+ HEDLEY_TI_CL2000_VERSION_CHECK(6, 1, 0) || \
117
+ HEDLEY_TI_CL6X_VERSION_CHECK(7, 0, 0) || \
118
+ HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \
119
+ HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || \
120
+ HEDLEY_CRAY_VERSION_CHECK(5, 0, 0) || \
121
+ HEDLEY_TINYC_VERSION_CHECK(0, 9, 17) || \
122
+ HEDLEY_SUNPRO_VERSION_CHECK(8, 0, 0) || \
123
+ (HEDLEY_IBM_VERSION_CHECK(10, 1, 0) && defined(__C99_PRAGMA_OPERATOR))
124
+#define HEDLEY_PRAGMA(value) _Pragma(#value)
125
+#elif HEDLEY_MSVC_VERSION_CHECK(15, 0, 0)
126
+#define HEDLEY_PRAGMA(value) __pragma(value)
127
+#else
128
+#define HEDLEY_PRAGMA(value)
129
+#endif
130
+
131
+#if defined(HEDLEY_DIAGNOSTIC_PUSH)
132
+#undef HEDLEY_DIAGNOSTIC_PUSH
133
+#endif
134
+#if defined(HEDLEY_DIAGNOSTIC_POP)
135
+#undef HEDLEY_DIAGNOSTIC_POP
136
+#endif
137
+#if defined(__clang__)
138
+#define HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
139
+#define HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
140
+#elif HEDLEY_INTEL_VERSION_CHECK(13, 0, 0)
141
+#define HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
142
+#define HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
143
+#elif HEDLEY_GCC_VERSION_CHECK(4, 6, 0)
144
+#define HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
145
+#define HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
146
+#elif HEDLEY_MSVC_VERSION_CHECK(15, 0, 0) || \
147
+ HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0)
148
+#define HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))
149
+#define HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))
150
+#elif HEDLEY_ARM_VERSION_CHECK(5, 6, 0)
151
+#define HEDLEY_DIAGNOSTIC_PUSH _Pragma("push")
152
+#define HEDLEY_DIAGNOSTIC_POP _Pragma("pop")
153
+#elif HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \
154
+ HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \
155
+ HEDLEY_TI_CL430_VERSION_CHECK(4, 4, 0) || \
156
+ HEDLEY_TI_CL6X_VERSION_CHECK(8, 1, 0) || \
157
+ HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \
158
+ HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0)
159
+#define HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push")
160
+#define HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop")
161
+#elif HEDLEY_PELLES_VERSION_CHECK(2, 90, 0)
162
+#define HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)")
163
+#define HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)")
164
+#else
165
+#define HEDLEY_DIAGNOSTIC_PUSH
166
+#define HEDLEY_DIAGNOSTIC_POP
167
+#endif
168
+
169
/* HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for
170
HEDLEY INTERNAL USE ONLY. API subject to change without notice. */
171
#if defined(HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
172
173
#if defined(__cplusplus)
174
#if HEDLEY_HAS_WARNING("-Wc++98-compat")
175
#if HEDLEY_HAS_WARNING("-Wc++17-extensions")
176
+#if HEDLEY_HAS_WARNING("-Wc++1z-extensions")
177
+#define HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
178
+ HEDLEY_DIAGNOSTIC_PUSH \
179
+ _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") _Pragma( \
180
+ "clang diagnostic ignored \"-Wc++17-extensions\"") \
181
+ _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \
182
+ xpr HEDLEY_DIAGNOSTIC_POP
183
+#else
184
#define HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
185
HEDLEY_DIAGNOSTIC_PUSH \
186
_Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \
187
_Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \
188
xpr HEDLEY_DIAGNOSTIC_POP
189
+#endif
190
#else
191
#define HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \
192
HEDLEY_DIAGNOSTIC_PUSH \
193
194
#elif HEDLEY_IAR_VERSION_CHECK(8, 3, 0)
195
#define HEDLEY_CPP_CAST(T, expr) \
196
HEDLEY_DIAGNOSTIC_PUSH \
197
- _Pragma("diag_suppress=Pe137") HEDLEY_DIAGNOSTIC_POP #else
198
+ _Pragma("diag_suppress=Pe137") HEDLEY_DIAGNOSTIC_POP
199
+#else
200
#define HEDLEY_CPP_CAST(T, expr) ((T)(expr))
201
obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-align.h
Added
201
1
2
+/* Alignment
3
+ * Created by Evan Nemerson <evan@nemerson.com>
4
+ *
5
+ * To the extent possible under law, the authors have waived all
6
+ * copyright and related or neighboring rights to this code. For
7
+ * details, see the Creative Commons Zero 1.0 Universal license at
8
+ * <https://creativecommons.org/publicdomain/zero/1.0/>
9
+ *
10
+ * SPDX-License-Identifier: CC0-1.0
11
+ *
12
+ **********************************************************************
13
+ *
14
+ * This is portability layer which should help iron out some
15
+ * differences across various compilers, as well as various verisons of
16
+ * C and C++.
17
+ *
18
+ * It was originally developed for SIMD Everywhere
19
+ * (<https://github.com/simd-everywhere/simde>), but since its only
20
+ * dependency is Hedley (<https://nemequ.github.io/hedley>, also CC0)
21
+ * it can easily be used in other projects, so please feel free to do
22
+ * so.
23
+ *
24
+ * If you do use this in your project, please keep a link to SIMDe in
25
+ * your code to remind you where to report any bugs and/or check for
26
+ * updated versions.
27
+ *
28
+ * # API Overview
29
+ *
30
+ * The API has several parts, and most macros have a few variations.
31
+ * There are APIs for declaring aligned fields/variables, optimization
32
+ * hints, and run-time alignment checks.
33
+ *
34
+ * Briefly, macros ending with "_TO" take numeric values and are great
35
+ * when you know the value you would like to use. Macros ending with
36
+ * "_LIKE", on the other hand, accept a type and are used when you want
37
+ * to use the alignment of a type instead of hardcoding a value.
38
+ *
39
+ * Documentation for each section of the API is inline.
40
+ *
41
+ * True to form, MSVC is the main problem and imposes several
42
+ * limitations on the effectiveness of the APIs. Detailed descriptions
43
+ * of the limitations of each macro are inline, but in general:
44
+ *
45
+ * * On C11+ or C++11+ code written using this API will work. The
46
+ * ASSUME macros may or may not generate a hint to the compiler, but
47
+ * that is only an optimization issue and will not actually cause
48
+ * failures.
49
+ * * If you're using pretty much any compiler other than MSVC,
50
+ * everything should basically work as well as in C11/C++11.
51
+ */
52
+
53
+#if !defined(SIMDE_ALIGN_H)
54
+#define SIMDE_ALIGN_H
55
+
56
+#include "hedley.h"
57
+
58
+/* I know this seems a little silly, but some non-hosted compilers
59
+ * don't have stddef.h, so we try to accomodate them. */
60
+#if !defined(SIMDE_ALIGN_SIZE_T_)
61
+#if defined(__SIZE_TYPE__)
62
+#define SIMDE_ALIGN_SIZE_T_ __SIZE_TYPE__
63
+#elif defined(__SIZE_T_TYPE__)
64
+#define SIMDE_ALIGN_SIZE_T_ __SIZE_TYPE__
65
+#elif defined(__cplusplus)
66
+#include <cstddef>
67
+#define SIMDE_ALIGN_SIZE_T_ size_t
68
+#else
69
+#include <stddef.h>
70
+#define SIMDE_ALIGN_SIZE_T_ size_t
71
+#endif
72
+#endif
73
+
74
+#if !defined(SIMDE_ALIGN_INTPTR_T_)
75
+#if defined(__INTPTR_TYPE__)
76
+#define SIMDE_ALIGN_INTPTR_T_ __INTPTR_TYPE__
77
+#elif defined(__PTRDIFF_TYPE__)
78
+#define SIMDE_ALIGN_INTPTR_T_ __PTRDIFF_TYPE__
79
+#elif defined(__PTRDIFF_T_TYPE__)
80
+#define SIMDE_ALIGN_INTPTR_T_ __PTRDIFF_T_TYPE__
81
+#elif defined(__cplusplus)
82
+#include <cstddef>
83
+#define SIMDE_ALIGN_INTPTR_T_ ptrdiff_t
84
+#else
85
+#include <stddef.h>
86
+#define SIMDE_ALIGN_INTPTR_T_ ptrdiff_t
87
+#endif
88
+#endif
89
+
90
+#if defined(SIMDE_ALIGN_DEBUG)
91
+#if defined(__cplusplus)
92
+#include <cstdio>
93
+#else
94
+#include <stdio.h>
95
+#endif
96
+#endif
97
+
98
+/* SIMDE_ALIGN_OF(Type)
99
+ *
100
+ * The SIMDE_ALIGN_OF macro works like alignof, or _Alignof, or
101
+ * __alignof, or __alignof__, or __ALIGNOF__, depending on the compiler.
102
+ * It isn't defined everywhere (only when the compiler has some alignof-
103
+ * like feature we can use to implement it), but it should work in most
104
+ * modern compilers, as well as C11 and C++11.
105
+ *
106
+ * If we can't find an implementation for SIMDE_ALIGN_OF then the macro
107
+ * will not be defined, so if you can handle that situation sensibly
108
+ * you may need to sprinkle some ifdefs into your code.
109
+ */
110
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
111
+ (0 && HEDLEY_HAS_FEATURE(c_alignof))
112
+#define SIMDE_ALIGN_OF(Type) _Alignof(Type)
113
+#elif (defined(__cplusplus) && (__cplusplus >= 201103L)) || \
114
+ (0 && HEDLEY_HAS_FEATURE(cxx_alignof))
115
+#define SIMDE_ALIGN_OF(Type) alignof(Type)
116
+#elif HEDLEY_GCC_VERSION_CHECK(2, 95, 0) || \
117
+ HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \
118
+ HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \
119
+ HEDLEY_SUNPRO_VERSION_CHECK(5, 13, 0) || \
120
+ HEDLEY_TINYC_VERSION_CHECK(0, 9, 24) || \
121
+ HEDLEY_PGI_VERSION_CHECK(19, 10, 0) || \
122
+ HEDLEY_CRAY_VERSION_CHECK(10, 0, 0) || \
123
+ HEDLEY_TI_ARMCL_VERSION_CHECK(16, 9, 0) || \
124
+ HEDLEY_TI_CL2000_VERSION_CHECK(16, 9, 0) || \
125
+ HEDLEY_TI_CL6X_VERSION_CHECK(8, 0, 0) || \
126
+ HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \
127
+ HEDLEY_TI_CL430_VERSION_CHECK(16, 9, 0) || \
128
+ HEDLEY_TI_CLPRU_VERSION_CHECK(2, 3, 2) || defined(__IBM__ALIGNOF__) || \
129
+ defined(__clang__)
130
+#define SIMDE_ALIGN_OF(Type) __alignof__(Type)
131
+#elif HEDLEY_IAR_VERSION_CHECK(8, 40, 0)
132
+#define SIMDE_ALIGN_OF(Type) __ALIGNOF__(Type)
133
+#elif HEDLEY_MSVC_VERSION_CHECK(19, 0, 0)
134
+/* Probably goes back much further, but MS takes down their old docs.
135
+ * If you can verify that this works in earlier versions please let
136
+ * me know! */
137
+#define SIMDE_ALIGN_OF(Type) __alignof(Type)
138
+#endif
139
+
140
+/* SIMDE_ALIGN_MAXIMUM:
141
+ *
142
+ * This is the maximum alignment that the compiler supports. You can
143
+ * define the value prior to including SIMDe if necessary, but in that
144
+ * case *please* submit an issue so we can add the platform to the
145
+ * detection code.
146
+ *
147
+ * Most compilers are okay with types which are aligned beyond what
148
+ * they think is the maximum, as long as the alignment is a power
149
+ * of two. MSVC is the exception (of course), so we need to cap the
150
+ * alignment requests at values that the implementation supports.
151
+ *
152
+ * XL C/C++ will accept values larger than 16 (which is the alignment
153
+ * of an AltiVec vector), but will not reliably align to the larger
154
+ * value, so so we cap the value at 16 there.
155
+ *
156
+ * If the compiler accepts any power-of-two value within reason then
157
+ * this macro should be left undefined, and the SIMDE_ALIGN_CAP
158
+ * macro will just return the value passed to it. */
159
+#if !defined(SIMDE_ALIGN_MAXIMUM)
160
+#if defined(HEDLEY_MSVC_VERSION)
161
+#if defined(_M_IX86) || defined(_M_AMD64)
162
+#if HEDLEY_MSVC_VERSION_CHECK(19, 14, 0)
163
+#define SIMDE_ALIGN_PLATFORM_MAXIMUM 64
164
+#elif HEDLEY_MSVC_VERSION_CHECK(16, 0, 0)
165
+/* VS 2010 is really a guess based on Wikipedia; if anyone can
166
+ * test with old VS versions I'd really appreciate it. */
167
+#define SIMDE_ALIGN_PLATFORM_MAXIMUM 32
168
+#else
169
+#define SIMDE_ALIGN_PLATFORM_MAXIMUM 16
170
+#endif
171
+#elif defined(_M_ARM) || defined(_M_ARM64)
172
+#define SIMDE_ALIGN_PLATFORM_MAXIMUM 8
173
+#endif
174
+#elif defined(HEDLEY_IBM_VERSION)
175
+#define SIMDE_ALIGN_PLATFORM_MAXIMUM 16
176
+#endif
177
+#endif
178
+
179
+/* You can mostly ignore these; they're intended for internal use.
180
+ * If you do need to use them please let me know; if they fulfill
181
+ * a common use case I'll probably drop the trailing underscore
182
+ * and make them part of the public API. */
183
+#if defined(SIMDE_ALIGN_PLATFORM_MAXIMUM)
184
+#if SIMDE_ALIGN_PLATFORM_MAXIMUM >= 64
185
+#define SIMDE_ALIGN_64_ 64
186
+#define SIMDE_ALIGN_32_ 32
187
+#define SIMDE_ALIGN_16_ 16
188
+#define SIMDE_ALIGN_8_ 8
189
+#elif SIMDE_ALIGN_PLATFORM_MAXIMUM >= 32
190
+#define SIMDE_ALIGN_64_ 32
191
+#define SIMDE_ALIGN_32_ 32
192
+#define SIMDE_ALIGN_16_ 16
193
+#define SIMDE_ALIGN_8_ 8
194
+#elif SIMDE_ALIGN_PLATFORM_MAXIMUM >= 16
195
+#define SIMDE_ALIGN_64_ 16
196
+#define SIMDE_ALIGN_32_ 16
197
+#define SIMDE_ALIGN_16_ 16
198
+#define SIMDE_ALIGN_8_ 8
199
+#elif SIMDE_ALIGN_PLATFORM_MAXIMUM >= 8
200
+#define SIMDE_ALIGN_64_ 8
201
obs-studio-26.1.0.tar.xz/libobs/util/simde/simde-arch.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-arch.h
Changed
74
1
2
* an undefined macro being used (e.g., GCC with -Wundef).
3
*
4
* This was originally created for SIMDe
5
- * <https://github.com/nemequ/simde> (hence the prefix), but this
6
+ * <https://github.com/simd-everywhere/simde> (hence the prefix), but this
7
* header has no dependencies and may be used anywhere. It is
8
* originally based on information from
9
* <https://sourceforge.net/p/predef/wiki/Architectures/>, though it
10
* has been enhanced with additional information.
11
*
12
* If you improve this file, or find a bug, please file the issue at
13
- * <https://github.com/nemequ/simde/issues>. If you copy this into
14
+ * <https://github.com/simd-everywhere/simde/issues>. If you copy this into
15
* your project, even if you change the prefix, please keep the links
16
* to SIMDe intact so others know where to report issues, submit
17
* enhancements, and find the latest version. */
18
19
/* AMD64 / x86_64
20
<https://en.wikipedia.org/wiki/X86-64> */
21
#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || \
22
- defined(__x86_64) || defined(_M_X66) || defined(_M_AMD64)
23
+ defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)
24
#define SIMDE_ARCH_AMD64 1000
25
#endif
26
27
28
#define SIMDE_ARCH_ARM_NEON SIMDE_ARCH_ARM
29
#endif
30
#endif
31
+#if defined(__ARM_FEATURE_SVE)
32
+#define SIMDE_ARCH_ARM_SVE
33
+#endif
34
35
/* Blackfin
36
<https://en.wikipedia.org/wiki/Blackfin> */
37
38
#define SIMDE_ARCH_X86_AVX 1
39
#endif
40
#endif
41
+#if defined(__AVX512VP2INTERSECT__)
42
+#define SIMDE_ARCH_X86_AVX512VP2INTERSECT 1
43
+#endif
44
+#if defined(__AVX512VBMI__)
45
+#define SIMDE_ARCH_X86_AVX512VBMI 1
46
+#endif
47
#if defined(__AVX512BW__)
48
#define SIMDE_ARCH_X86_AVX512BW 1
49
#endif
50
51
#if defined(__GFNI__)
52
#define SIMDE_ARCH_X86_GFNI 1
53
#endif
54
+#if defined(__PCLMUL__)
55
+#define SIMDE_ARCH_X86_PCLMUL 1
56
+#endif
57
+#if defined(__VPCLMULQDQ__)
58
+#define SIMDE_ARCH_X86_VPCLMULQDQ 1
59
+#endif
60
#endif
61
62
/* Itanium
63
64
#define SIMDE_ARCH_MIPS_CHECK(version) (0)
65
#endif
66
67
+#if defined(__mips_loongson_mmi)
68
+#define SIMDE_ARCH_MIPS_LOONGSON_MMI 1
69
+#endif
70
+
71
/* Matsushita MN10300
72
<https://en.wikipedia.org/wiki/MN103> */
73
#if defined(__MN10300__) || defined(__mn10300__)
74
obs-studio-26.1.0.tar.xz/libobs/util/simde/simde-common.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-common.h
Changed
201
1
2
#include "hedley.h"
3
4
#define SIMDE_VERSION_MAJOR 0
5
-#define SIMDE_VERSION_MINOR 5
6
-#define SIMDE_VERSION_MICRO 0
7
+#define SIMDE_VERSION_MINOR 7
8
+#define SIMDE_VERSION_MICRO 1
9
#define SIMDE_VERSION \
10
HEDLEY_VERSION_ENCODE(SIMDE_VERSION_MAJOR, SIMDE_VERSION_MINOR, \
11
SIMDE_VERSION_MICRO)
12
13
-#include "simde-arch.h"
14
-#include "simde-features.h"
15
-#include "simde-diagnostic.h"
16
-
17
#include <stddef.h>
18
#include <stdint.h>
19
20
-#if HEDLEY_HAS_ATTRIBUTE(aligned) || HEDLEY_GCC_VERSION_CHECK(2, 95, 0) || \
21
- HEDLEY_CRAY_VERSION_CHECK(8, 4, 0) || \
22
- HEDLEY_IBM_VERSION_CHECK(11, 1, 0) || \
23
- HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \
24
- HEDLEY_PGI_VERSION_CHECK(19, 4, 0) || \
25
- HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \
26
- HEDLEY_TINYC_VERSION_CHECK(0, 9, 24) || \
27
- HEDLEY_TI_VERSION_CHECK(8, 1, 0)
28
-#define SIMDE_ALIGN(alignment) __attribute__((aligned(alignment)))
29
-#elif defined(_MSC_VER) && !(defined(_M_ARM) && !defined(_M_ARM64))
30
-#define SIMDE_ALIGN(alignment) __declspec(align(alignment))
31
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
32
-#define SIMDE_ALIGN(alignment) _Alignas(alignment)
33
-#elif defined(__cplusplus) && (__cplusplus >= 201103L)
34
-#define SIMDE_ALIGN(alignment) alignas(alignment)
35
-#else
36
-#define SIMDE_ALIGN(alignment)
37
-#endif
38
-
39
-#if HEDLEY_GNUC_VERSION_CHECK(2, 95, 0) || \
40
- HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \
41
- HEDLEY_IBM_VERSION_CHECK(11, 1, 0)
42
-#define SIMDE_ALIGN_OF(T) (__alignof__(T))
43
-#elif (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
44
- HEDLEY_HAS_FEATURE(c11_alignof)
45
-#define SIMDE_ALIGN_OF(T) (_Alignof(T))
46
-#elif (defined(__cplusplus) && (__cplusplus >= 201103L)) || \
47
- HEDLEY_HAS_FEATURE(cxx_alignof)
48
-#define SIMDE_ALIGN_OF(T) (alignof(T))
49
-#endif
50
-
51
-#if defined(SIMDE_ALIGN_OF)
52
-#define SIMDE_ALIGN_AS(N, T) SIMDE_ALIGN(SIMDE_ALIGN_OF(T))
53
-#else
54
-#define SIMDE_ALIGN_AS(N, T) SIMDE_ALIGN(N)
55
+#include "simde-detect-clang.h"
56
+#include "simde-arch.h"
57
+#include "simde-features.h"
58
+#include "simde-diagnostic.h"
59
+#include "simde-math.h"
60
+#include "simde-constify.h"
61
+#include "simde-align.h"
62
+
63
+/* In some situations, SIMDe has to make large performance sacrifices
64
+ * for small increases in how faithfully it reproduces an API, but
65
+ * only a relatively small number of users will actually need the API
66
+ * to be completely accurate. The SIMDE_FAST_* options can be used to
67
+ * disable these trade-offs.
68
+ *
69
+ * They can be enabled by passing -DSIMDE_FAST_MATH to the compiler, or
70
+ * the individual defines (e.g., -DSIMDE_FAST_NANS) if you only want to
71
+ * enable some optimizations. Using -ffast-math and/or
72
+ * -ffinite-math-only will also enable the relevant options. If you
73
+ * don't want that you can pass -DSIMDE_NO_FAST_* to disable them. */
74
+
75
+/* Most programs avoid NaNs by never passing values which can result in
76
+ * a NaN; for example, if you only pass non-negative values to the sqrt
77
+ * functions, it won't generate a NaN. On some platforms, similar
78
+ * functions handle NaNs differently; for example, the _mm_min_ps SSE
79
+ * function will return 0.0 if you pass it (0.0, NaN), but the NEON
80
+ * vminq_f32 function will return NaN. Making them behave like one
81
+ * another is expensive; it requires generating a mask of all lanes
82
+ * with NaNs, then performing the operation (e.g., vminq_f32), then
83
+ * blending together the result with another vector using the mask.
84
+ *
85
+ * If you don't want SIMDe to worry about the differences between how
86
+ * NaNs are handled on the two platforms, define this (or pass
87
+ * -ffinite-math-only) */
88
+#if !defined(SIMDE_FAST_MATH) && !defined(SIMDE_NO_FAST_MATH) && \
89
+ defined(__FAST_MATH__)
90
+#define SIMDE_FAST_MATH
91
+#endif
92
+
93
+#if !defined(SIMDE_FAST_NANS) && !defined(SIMDE_NO_FAST_NANS)
94
+#if defined(SIMDE_FAST_MATH)
95
+#define SIMDE_FAST_NANS
96
+#elif defined(__FINITE_MATH_ONLY__)
97
+#if __FINITE_MATH_ONLY__
98
+#define SIMDE_FAST_NANS
99
+#endif
100
+#endif
101
+#endif
102
+
103
+/* Many functions are defined as using the current rounding mode
104
+ * (i.e., the SIMD version of fegetround()) when converting to
105
+ * an integer. For example, _mm_cvtpd_epi32. Unfortunately,
106
+ * on some platforms (such as ARMv8+ where round-to-nearest is
107
+ * always used, regardless of the FPSCR register) this means we
108
+ * have to first query the current rounding mode, then choose
109
+ * the proper function (rounnd
110
+ , ceil, floor, etc.) */
111
+#if !defined(SIMDE_FAST_ROUND_MODE) && !defined(SIMDE_NO_FAST_ROUND_MODE) && \
112
+ defined(SIMDE_FAST_MATH)
113
+#define SIMDE_FAST_ROUND_MODE
114
+#endif
115
+
116
+/* This controls how ties are rounded. For example, does 10.5 round to
117
+ * 10 or 11? IEEE 754 specifies round-towards-even, but ARMv7 (for
118
+ * example) doesn't support it and it must be emulated (which is rather
119
+ * slow). If you're okay with just using the default for whatever arch
120
+ * you're on, you should definitely define this.
121
+ *
122
+ * Note that we don't use this macro to avoid correct implementations
123
+ * in functions which are explicitly about rounding (such as vrnd* on
124
+ * NEON, _mm_round_* on x86, etc.); it is only used for code where
125
+ * rounding is a component in another function, and even then it isn't
126
+ * usually a problem since such functions will use the current rounding
127
+ * mode. */
128
+#if !defined(SIMDE_FAST_ROUND_TIES) && !defined(SIMDE_NO_FAST_ROUND_TIES) && \
129
+ defined(SIMDE_FAST_MATH)
130
+#define SIMDE_FAST_ROUND_TIES
131
+#endif
132
+
133
+/* For functions which convert from one type to another (mostly from
134
+ * floating point to integer types), sometimes we need to do a range
135
+ * check and potentially return a different result if the value
136
+ * falls outside that range. Skipping this check can provide a
137
+ * performance boost, at the expense of faithfulness to the API we're
138
+ * emulating. */
139
+#if !defined(SIMDE_FAST_CONVERSION_RANGE) && \
140
+ !defined(SIMDE_NO_FAST_CONVERSION_RANGE) && defined(SIMDE_FAST_MATH)
141
+#define SIMDE_FAST_CONVERSION_RANGE
142
#endif
143
144
-#define simde_assert_aligned(alignment, val) \
145
- simde_assert_int(HEDLEY_REINTERPRET_CAST( \
146
- uintptr_t, HEDLEY_REINTERPRET_CAST( \
147
- const void *, (val))) % \
148
- (alignment), \
149
- ==, 0)
150
-
151
#if HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \
152
HEDLEY_GCC_VERSION_CHECK(3, 4, 0) || \
153
HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \
154
155
#define SIMDE_CHECK_CONSTANT_(expr) (std::is_constant_evaluated())
156
#endif
157
158
-/* diagnose_if + __builtin_constant_p was broken until clang 9,
159
- * which is when __FILE_NAME__ was added. */
160
-#if defined(SIMDE_CHECK_CONSTANT_) && defined(__FILE_NAME__)
161
+#if !defined(SIMDE_NO_CHECK_IMMEDIATE_CONSTANT)
162
+#if defined(SIMDE_CHECK_CONSTANT_) && \
163
+ SIMDE_DETECT_CLANG_VERSION_CHECK(9, 0, 0) && \
164
+ (!defined(__apple_build_version__) || \
165
+ ((__apple_build_version__ < 11000000) || \
166
+ (__apple_build_version__ >= 12000000)))
167
#define SIMDE_REQUIRE_CONSTANT(arg) \
168
HEDLEY_REQUIRE_MSG(SIMDE_CHECK_CONSTANT_(arg), \
169
"`" #arg "' must be constant")
170
#else
171
#define SIMDE_REQUIRE_CONSTANT(arg)
172
#endif
173
+#else
174
+#define SIMDE_REQUIRE_CONSTANT(arg)
175
+#endif
176
177
#define SIMDE_REQUIRE_RANGE(arg, min, max) \
178
HEDLEY_REQUIRE_MSG((((arg) >= (min)) && ((arg) <= (max))), \
179
180
SIMDE_REQUIRE_CONSTANT(arg) \
181
SIMDE_REQUIRE_RANGE(arg, min, max)
182
183
-/* SIMDE_ASSUME_ALIGNED allows you to (try to) tell the compiler
184
- * that a pointer is aligned to an `alignment`-byte boundary. */
185
-#if HEDLEY_HAS_BUILTIN(__builtin_assume_aligned) || \
186
- HEDLEY_GCC_VERSION_CHECK(4, 7, 0)
187
-#define SIMDE_ASSUME_ALIGNED(alignment, v) \
188
- HEDLEY_REINTERPRET_CAST(__typeof__(v), \
189
- __builtin_assume_aligned(v, alignment))
190
-#elif defined(__cplusplus) && (__cplusplus > 201703L)
191
-#define SIMDE_ASSUME_ALIGNED(alignment, v) std::assume_aligned<alignment>(v)
192
-#elif HEDLEY_INTEL_VERSION_CHECK(13, 0, 0)
193
-#define SIMDE_ASSUME_ALIGNED(alignment, v) \
194
- (__extension__({ \
195
- __typeof__(v) simde_assume_aligned_t_ = (v); \
196
- __assume_aligned(simde_assume_aligned_t_, alignment); \
197
- simde_assume_aligned_t_; \
198
- }))
199
-#else
200
-#define SIMDE_ASSUME_ALIGNED(alignment, v) (v)
201
obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-constify.h
Added
201
1
2
+/* SPDX-License-Identifier: MIT
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person
5
+ * obtaining a copy of this software and associated documentation
6
+ * files (the "Software"), to deal in the Software without
7
+ * restriction, including without limitation the rights to use, copy,
8
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ * of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be
13
+ * included in all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * Copyright:
25
+ * 2020 Evan Nemerson <evan@nemerson.com>
26
+ */
27
+
28
+/* Constify macros. For internal use only.
29
+ *
30
+ * These are used to make it possible to call a function which takes
31
+ * an Integer Constant Expression (ICE) using a compile time constant.
32
+ * Technically it would also be possible to use a value not trivially
33
+ * known by the compiler, but there would be a siginficant performance
34
+ * hit (a switch switch is used).
35
+ *
36
+ * The basic idea is pretty simple; we just emit a do while loop which
37
+ * contains a switch with a case for every possible value of the
38
+ * constant.
39
+ *
40
+ * As long as the value you pass to the function in constant, pretty
41
+ * much any copmiler shouldn't have a problem generating exactly the
42
+ * same code as if you had used an ICE.
43
+ *
44
+ * This is intended to be used in the SIMDe implementations of
45
+ * functions the compilers require to be an ICE, but the other benefit
46
+ * is that if we also disable the warnings from
47
+ * SIMDE_REQUIRE_CONSTANT_RANGE we can actually just allow the tests
48
+ * to use non-ICE parameters
49
+ */
50
+
51
+#if !defined(SIMDE_CONSTIFY_H)
52
+#define SIMDE_CONSTIFY_H
53
+
54
+#include "simde-diagnostic.h"
55
+
56
+HEDLEY_DIAGNOSTIC_PUSH
57
+SIMDE_DIAGNOSTIC_DISABLE_VARIADIC_MACROS_
58
+SIMDE_DIAGNOSTIC_DISABLE_CPP98_COMPAT_PEDANTIC_
59
+
60
+#define SIMDE_CONSTIFY_2_(func_name, result, default_case, imm, ...) \
61
+ do { \
62
+ switch (imm) { \
63
+ case 0: \
64
+ result = func_name(__VA_ARGS__, 0); \
65
+ break; \
66
+ case 1: \
67
+ result = func_name(__VA_ARGS__, 1); \
68
+ break; \
69
+ default: \
70
+ result = default_case; \
71
+ break; \
72
+ } \
73
+ } while (0)
74
+
75
+#define SIMDE_CONSTIFY_4_(func_name, result, default_case, imm, ...) \
76
+ do { \
77
+ switch (imm) { \
78
+ case 0: \
79
+ result = func_name(__VA_ARGS__, 0); \
80
+ break; \
81
+ case 1: \
82
+ result = func_name(__VA_ARGS__, 1); \
83
+ break; \
84
+ case 2: \
85
+ result = func_name(__VA_ARGS__, 2); \
86
+ break; \
87
+ case 3: \
88
+ result = func_name(__VA_ARGS__, 3); \
89
+ break; \
90
+ default: \
91
+ result = default_case; \
92
+ break; \
93
+ } \
94
+ } while (0)
95
+
96
+#define SIMDE_CONSTIFY_8_(func_name, result, default_case, imm, ...) \
97
+ do { \
98
+ switch (imm) { \
99
+ case 0: \
100
+ result = func_name(__VA_ARGS__, 0); \
101
+ break; \
102
+ case 1: \
103
+ result = func_name(__VA_ARGS__, 1); \
104
+ break; \
105
+ case 2: \
106
+ result = func_name(__VA_ARGS__, 2); \
107
+ break; \
108
+ case 3: \
109
+ result = func_name(__VA_ARGS__, 3); \
110
+ break; \
111
+ case 4: \
112
+ result = func_name(__VA_ARGS__, 4); \
113
+ break; \
114
+ case 5: \
115
+ result = func_name(__VA_ARGS__, 5); \
116
+ break; \
117
+ case 6: \
118
+ result = func_name(__VA_ARGS__, 6); \
119
+ break; \
120
+ case 7: \
121
+ result = func_name(__VA_ARGS__, 7); \
122
+ break; \
123
+ default: \
124
+ result = default_case; \
125
+ break; \
126
+ } \
127
+ } while (0)
128
+
129
+#define SIMDE_CONSTIFY_16_(func_name, result, default_case, imm, ...) \
130
+ do { \
131
+ switch (imm) { \
132
+ case 0: \
133
+ result = func_name(__VA_ARGS__, 0); \
134
+ break; \
135
+ case 1: \
136
+ result = func_name(__VA_ARGS__, 1); \
137
+ break; \
138
+ case 2: \
139
+ result = func_name(__VA_ARGS__, 2); \
140
+ break; \
141
+ case 3: \
142
+ result = func_name(__VA_ARGS__, 3); \
143
+ break; \
144
+ case 4: \
145
+ result = func_name(__VA_ARGS__, 4); \
146
+ break; \
147
+ case 5: \
148
+ result = func_name(__VA_ARGS__, 5); \
149
+ break; \
150
+ case 6: \
151
+ result = func_name(__VA_ARGS__, 6); \
152
+ break; \
153
+ case 7: \
154
+ result = func_name(__VA_ARGS__, 7); \
155
+ break; \
156
+ case 8: \
157
+ result = func_name(__VA_ARGS__, 8); \
158
+ break; \
159
+ case 9: \
160
+ result = func_name(__VA_ARGS__, 9); \
161
+ break; \
162
+ case 10: \
163
+ result = func_name(__VA_ARGS__, 10); \
164
+ break; \
165
+ case 11: \
166
+ result = func_name(__VA_ARGS__, 11); \
167
+ break; \
168
+ case 12: \
169
+ result = func_name(__VA_ARGS__, 12); \
170
+ break; \
171
+ case 13: \
172
+ result = func_name(__VA_ARGS__, 13); \
173
+ break; \
174
+ case 14: \
175
+ result = func_name(__VA_ARGS__, 14); \
176
+ break; \
177
+ case 15: \
178
+ result = func_name(__VA_ARGS__, 15); \
179
+ break; \
180
+ default: \
181
+ result = default_case; \
182
+ break; \
183
+ } \
184
+ } while (0)
185
+
186
+#define SIMDE_CONSTIFY_32_(func_name, result, default_case, imm, ...) \
187
+ do { \
188
+ switch (imm) { \
189
+ case 0: \
190
+ result = func_name(__VA_ARGS__, 0); \
191
+ break; \
192
+ case 1: \
193
+ result = func_name(__VA_ARGS__, 1); \
194
+ break; \
195
+ case 2: \
196
+ result = func_name(__VA_ARGS__, 2); \
197
+ break; \
198
+ case 3: \
199
+ result = func_name(__VA_ARGS__, 3); \
200
+ break; \
201
obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-detect-clang.h
Added
116
1
2
+/* Detect Clang Version
3
+ * Created by Evan Nemerson <evan@nemerson.com>
4
+ *
5
+ * To the extent possible under law, the author(s) have dedicated all
6
+ * copyright and related and neighboring rights to this software to
7
+ * the public domain worldwide. This software is distributed without
8
+ * any warranty.
9
+ *
10
+ * For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.
11
+ * SPDX-License-Identifier: CC0-1.0
12
+ */
13
+
14
+/* This file was originally part of SIMDe
15
+ * (<https://github.com/simd-everywhere/simde>). You're free to do with it as
16
+ * you please, but I do have a few small requests:
17
+ *
18
+ * * If you make improvements, please submit them back to SIMDe
19
+ * (at <https://github.com/simd-everywhere/simde/issues>) so others can
20
+ * benefit from them.
21
+ * * Please keep a link to SIMDe intact so people know where to submit
22
+ * improvements.
23
+ * * If you expose it publicly, please change the SIMDE_ prefix to
24
+ * something specific to your project.
25
+ *
26
+ * The version numbers clang exposes (in the ___clang_major__,
27
+ * __clang_minor__, and __clang_patchlevel__ macros) are unreliable.
28
+ * Vendors such as Apple will define these values to their version
29
+ * numbers; for example, "Apple Clang 4.0" is really clang 3.1, but
30
+ * __clang_major__ and __clang_minor__ are defined to 4 and 0
31
+ * respectively, instead of 3 and 1.
32
+ *
33
+ * The solution is *usually* to use clang's feature detection macros
34
+ * (<https://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros>)
35
+ * to determine if the feature you're interested in is available. This
36
+ * generally works well, and it should probably be the first thing you
37
+ * try. Unfortunately, it's not possible to check for everything. In
38
+ * particular, compiler bugs.
39
+ *
40
+ * This file just uses the feature checking macros to detect features
41
+ * added in specific versions of clang to identify which version of
42
+ * clang the compiler is based on.
43
+ *
44
+ * Right now it only goes back to 3.6, but I'm happy to accept patches
45
+ * to go back further. And, of course, newer versions are welcome if
46
+ * they're not already present, and if you find a way to detect a point
47
+ * release that would be great, too!
48
+ */
49
+
50
+#if !defined(SIMDE_DETECT_CLANG_H)
51
+#define SIMDE_DETECT_CLANG_H 1
52
+
53
+/* Attempt to detect the upstream clang version number. I usually only
54
+ * worry about major version numbers (at least for 4.0+), but if you
55
+ * need more resolution I'm happy to accept patches that are able to
56
+ * detect minor versions as well. That said, you'll probably have a
57
+ * hard time with detection since AFAIK most minor releases don't add
58
+ * anything we can detect. */
59
+
60
+#if defined(__clang__) && !defined(SIMDE_DETECT_CLANG_VERSION)
61
+#if __has_warning("-Wformat-insufficient-args")
62
+#define SIMDE_DETECT_CLANG_VERSION 120000
63
+#elif __has_warning("-Wimplicit-const-int-float-conversion")
64
+#define SIMDE_DETECT_CLANG_VERSION 110000
65
+#elif __has_warning("-Wmisleading-indentation")
66
+#define SIMDE_DETECT_CLANG_VERSION 100000
67
+#elif defined(__FILE_NAME__)
68
+#define SIMDE_DETECT_CLANG_VERSION 90000
69
+#elif __has_warning("-Wextra-semi-stmt") || \
70
+ __has_builtin(__builtin_rotateleft32)
71
+#define SIMDE_DETECT_CLANG_VERSION 80000
72
+#elif __has_warning("-Wc++98-compat-extra-semi")
73
+#define SIMDE_DETECT_CLANG_VERSION 70000
74
+#elif __has_warning("-Wpragma-pack")
75
+#define SIMDE_DETECT_CLANG_VERSION 60000
76
+#elif __has_warning("-Wbitfield-enum-conversion")
77
+#define SIMDE_DETECT_CLANG_VERSION 50000
78
+#elif __has_attribute(diagnose_if)
79
+#define SIMDE_DETECT_CLANG_VERSION 40000
80
+#elif __has_warning("-Wcast-calling-convention")
81
+#define SIMDE_DETECT_CLANG_VERSION 30900
82
+#elif __has_warning("-WCL4")
83
+#define SIMDE_DETECT_CLANG_VERSION 30800
84
+#elif __has_warning("-WIndependentClass-attribute")
85
+#define SIMDE_DETECT_CLANG_VERSION 30700
86
+#elif __has_warning("-Wambiguous-ellipsis")
87
+#define SIMDE_DETECT_CLANG_VERSION 30600
88
+#else
89
+#define SIMDE_DETECT_CLANG_VERSION 1
90
+#endif
91
+#endif /* defined(__clang__) && !defined(SIMDE_DETECT_CLANG_VERSION) */
92
+
93
+/* The SIMDE_DETECT_CLANG_VERSION_CHECK macro is pretty
94
+ * straightforward; it returns true if the compiler is a derivative
95
+ * of clang >= the specified version.
96
+ *
97
+ * Since this file is often (primarily?) useful for working around bugs
98
+ * it is also helpful to have a macro which returns true if only if the
99
+ * compiler is a version of clang *older* than the specified version to
100
+ * make it a bit easier to ifdef regions to add code for older versions,
101
+ * such as pragmas to disable a specific warning. */
102
+
103
+#if defined(SIMDE_DETECT_CLANG_VERSION)
104
+#define SIMDE_DETECT_CLANG_VERSION_CHECK(major, minor, revision) \
105
+ (SIMDE_DETECT_CLANG_VERSION >= \
106
+ ((major * 10000) + (minor * 1000) + (revision)))
107
+#define SIMDE_DETECT_CLANG_VERSION_NOT(major, minor, revision) \
108
+ (SIMDE_DETECT_CLANG_VERSION < \
109
+ ((major * 10000) + (minor * 1000) + (revision)))
110
+#else
111
+#define SIMDE_DETECT_CLANG_VERSION_CHECK(major, minor, revision) (0)
112
+#define SIMDE_DETECT_CLANG_VERSION_NOT(major, minor, revision) (1)
113
+#endif
114
+
115
+#endif /* !defined(SIMDE_DETECT_CLANG_H) */
116
obs-studio-26.1.0.tar.xz/libobs/util/simde/simde-diagnostic.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-diagnostic.h
Changed
201
1
2
*/
3
4
#if !defined(SIMDE_DIAGNOSTIC_H)
5
+#define SIMDE_DIAGNOSTIC_H
6
7
#include "hedley.h"
8
+#include "simde-detect-clang.h"
9
10
/* This is only to help us implement functions like _mm_undefined_ps. */
11
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
12
13
#define SIMDE_DIAGNOSTIC_DISABLE_SIMD_PRAGMA_DEPRECATED_
14
#endif
15
16
+/* MSVC emits a diagnostic when we call a function (like
17
+ * simde_mm_set_epi32) while initializing a struct. We currently do
18
+ * this a *lot* in the tests. */
19
#if defined(HEDLEY_MSVC_VERSION)
20
#define SIMDE_DIAGNOSTIC_DISABLE_NON_CONSTANT_AGGREGATE_INITIALIZER_ \
21
__pragma(warning(disable : 4204))
22
23
#define SIMDE_DIAGNOSTIC_DISABLE_VARIADIC_MACROS_
24
#endif
25
26
+/* emscripten requires us to use a __wasm_unimplemented_simd128__ macro
27
+ * before we can access certain SIMD intrinsics, but this diagnostic
28
+ * warns about it being a reserved name. It is a reserved name, but
29
+ * it's reserved for the compiler and we are using it to convey
30
+ * information to the compiler.
31
+ *
32
+ * This is also used when enabling native aliases since we don't get to
33
+ * choose the macro names. */
34
+#if HEDLEY_HAS_WARNING("-Wdouble-promotion")
35
+#define SIMDE_DIAGNOSTIC_DISABLE_RESERVED_ID_MACRO_ \
36
+ _Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"")
37
+#else
38
+#define SIMDE_DIAGNOSTIC_DISABLE_RESERVED_ID_MACRO_
39
+#endif
40
+
41
+/* clang 3.8 warns about the packed attribute being unnecessary when
42
+ * used in the _mm_loadu_* functions. That *may* be true for version
43
+ * 3.8, but for later versions it is crucial in order to make unaligned
44
+ * access safe. */
45
+#if HEDLEY_HAS_WARNING("-Wpacked")
46
+#define SIMDE_DIAGNOSTIC_DISABLE_PACKED_ \
47
+ _Pragma("clang diagnostic ignored \"-Wpacked\"")
48
+#else
49
+#define SIMDE_DIAGNOSTIC_DISABLE_PACKED_
50
+#endif
51
+
52
/* Triggered when assigning a float to a double implicitly. We use
53
* explicit casts in SIMDe, this is only used in the test suite. */
54
#if HEDLEY_HAS_WARNING("-Wdouble-promotion")
55
56
57
/* Several compilers treat conformant array parameters as VLAs. We
58
* test to make sure we're in C mode (C++ doesn't support CAPs), and
59
- * that the version of the standard supports CAPs. We also blacklist
60
+ * that the version of the standard supports CAPs. We also reject
61
* some buggy compilers like MSVC (the logic is in Hedley if you want
62
* to take a look), but with certain warnings enabled some compilers
63
* still like to emit a diagnostic. */
64
65
#elif HEDLEY_GCC_VERSION_CHECK(3, 4, 0)
66
#define SIMDE_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_ \
67
_Pragma("GCC diagnostic ignored \"-Wunused-function\"")
68
+#elif HEDLEY_MSVC_VERSION_CHECK(19, 0, 0) /* Likely goes back further */
69
+#define SIMDE_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_ \
70
+ __pragma(warning(disable : 4505))
71
#else
72
#define SIMDE_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_
73
#endif
74
75
#define SIMDE_DIAGNOSTIC_DISABLE_PASS_FAILED_
76
#endif
77
78
-/* https://github.com/nemequ/simde/issues/277 */
79
+#if HEDLEY_HAS_WARNING("-Wpadded")
80
+#define SIMDE_DIAGNOSTIC_DISABLE_PADDED_ \
81
+ _Pragma("clang diagnostic ignored \"-Wpadded\"")
82
+#elif HEDLEY_MSVC_VERSION_CHECK(19, 0, 0) /* Likely goes back further */
83
+#define SIMDE_DIAGNOSTIC_DISABLE_PADDED_ __pragma(warning(disable : 4324))
84
+#else
85
+#define SIMDE_DIAGNOSTIC_DISABLE_PADDED_
86
+#endif
87
+
88
+#if HEDLEY_HAS_WARNING("-Wzero-as-null-pointer-constant")
89
+#define SIMDE_DIAGNOSTIC_DISABLE_ZERO_AS_NULL_POINTER_CONSTANT_ \
90
+ _Pragma("clang diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
91
+#else
92
+#define SIMDE_DIAGNOSTIC_DISABLE_ZERO_AS_NULL_POINTER_CONSTANT_
93
+#endif
94
+
95
+#if HEDLEY_HAS_WARNING("-Wold-style-cast")
96
+#define SIMDE_DIAGNOSTIC_DISABLE_OLD_STYLE_CAST_ \
97
+ _Pragma("clang diagnostic ignored \"-Wold-style-cast\"")
98
+#else
99
+#define SIMDE_DIAGNOSTIC_DISABLE_OLD_STYLE_CAST_
100
+#endif
101
+
102
+#if HEDLEY_HAS_WARNING("-Wcast-function-type") || \
103
+ HEDLEY_GCC_VERSION_CHECK(8, 0, 0)
104
+#define SIMDE_DIAGNOSTIC_DISABLE_CAST_FUNCTION_TYPE_ \
105
+ _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
106
+#else
107
+#define SIMDE_DIAGNOSTIC_DISABLE_CAST_FUNCTION_TYPE_
108
+#endif
109
+
110
+/* clang will emit this warning when we use C99 extensions whan not in
111
+ * C99 mode, even though it does support this. In such cases we check
112
+ * the compiler and version first, so we know it's not a problem. */
113
+#if HEDLEY_HAS_WARNING("-Wc99-extensions")
114
+#define SIMDE_DIAGNOSTIC_DISABLE_C99_EXTENSIONS_ \
115
+ _Pragma("clang diagnostic ignored \"-Wc99-extensions\"")
116
+#else
117
+#define SIMDE_DIAGNOSTIC_DISABLE_C99_EXTENSIONS_
118
+#endif
119
+
120
+/* https://github.com/simd-everywhere/simde/issues/277 */
121
#if defined(HEDLEY_GCC_VERSION) && HEDLEY_GCC_VERSION_CHECK(4, 6, 0) && \
122
- !HEDLEY_GCC_VERSION_CHECK(6, 0, 0) && defined(__cplusplus)
123
-#define SIMDE_DIAGNOSTIC_DISABLE_BUGGY_UNUSED_BUT_SET_VARIBALE \
124
+ !HEDLEY_GCC_VERSION_CHECK(6, 4, 0) && defined(__cplusplus)
125
+#define SIMDE_DIAGNOSTIC_DISABLE_BUGGY_UNUSED_BUT_SET_VARIBALE_ \
126
_Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"")
127
#else
128
-#define SIMDE_DIAGNOSTIC_DISABLE_BUGGY_UNUSED_BUT_SET_VARIBALE
129
+#define SIMDE_DIAGNOSTIC_DISABLE_BUGGY_UNUSED_BUT_SET_VARIBALE_
130
+#endif
131
+
132
+/* This is the warning that you normally define _CRT_SECURE_NO_WARNINGS
133
+ * to silence, but you have to do that before including anything and
134
+ * that would require reordering includes. */
135
+#if defined(_MSC_VER)
136
+#define SIMDE_DIAGNOSTIC_DISABLE_ANNEX_K_ __pragma(warning(disable : 4996))
137
+#else
138
+#define SIMDE_DIAGNOSTIC_DISABLE_ANNEX_K_
139
#endif
140
141
/* Some compilers, such as clang, may use `long long` for 64-bit
142
143
* -Wc++98-compat-pedantic which says 'long long' is incompatible with
144
* C++98. */
145
#if HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic")
146
-#define SIMDE_DIAGNOSTIC_DISABLE_CPP98_COMPAT_PEDANTIC \
147
+#define SIMDE_DIAGNOSTIC_DISABLE_CPP98_COMPAT_PEDANTIC_ \
148
_Pragma("clang diagnostic ignored \"-Wc++98-compat-pedantic\"")
149
#else
150
-#define SIMDE_DIAGNOSTIC_DISABLE_CPP98_COMPAT_PEDANTIC
151
+#define SIMDE_DIAGNOSTIC_DISABLE_CPP98_COMPAT_PEDANTIC_
152
+#endif
153
+
154
+/* Some problem as above */
155
+#if HEDLEY_HAS_WARNING("-Wc++11-long-long")
156
+#define SIMDE_DIAGNOSTIC_DISABLE_CPP11_LONG_LONG_ \
157
+ _Pragma("clang diagnostic ignored \"-Wc++11-long-long\"")
158
+#else
159
+#define SIMDE_DIAGNOSTIC_DISABLE_CPP11_LONG_LONG_
160
+#endif
161
+
162
+/* emscripten emits this whenever stdin/stdout/stderr is used in a
163
+ * macro. */
164
+#if HEDLEY_HAS_WARNING("-Wdisabled-macro-expansion")
165
+#define SIMDE_DIAGNOSTIC_DISABLE_DISABLED_MACRO_EXPANSION_ \
166
+ _Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"")
167
+#else
168
+#define SIMDE_DIAGNOSTIC_DISABLE_DISABLED_MACRO_EXPANSION_
169
+#endif
170
+
171
+/* Clang uses C11 generic selections to implement some AltiVec
172
+ * functions, which triggers this diagnostic when not compiling
173
+ * in C11 mode */
174
+#if HEDLEY_HAS_WARNING("-Wc11-extensions")
175
+#define SIMDE_DIAGNOSTIC_DISABLE_C11_EXTENSIONS_ \
176
+ _Pragma("clang diagnostic ignored \"-Wc11-extensions\"")
177
+#else
178
+#define SIMDE_DIAGNOSTIC_DISABLE_C11_EXTENSIONS_
179
+#endif
180
+
181
+/* Clang sometimes triggers this warning in macros in the AltiVec and
182
+ * NEON headers, or due to missing functions. */
183
+#if HEDLEY_HAS_WARNING("-Wvector-conversion")
184
+#define SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_ \
185
+ _Pragma("clang diagnostic ignored \"-Wvector-conversion\"")
186
+/* For NEON, the situation with -Wvector-conversion in clang < 10 is
187
+ * bad enough that we just disable the warning altogether. */
188
+#if defined(SIMDE_ARCH_ARM) && SIMDE_DETECT_CLANG_VERSION_NOT(10, 0, 0)
189
+#define SIMDE_DIAGNOSTIC_DISABLE_BUGGY_VECTOR_CONVERSION_ \
190
+ SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_
191
+#endif
192
+#else
193
+#define SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_
194
+#endif
195
+#if !defined(SIMDE_DIAGNOSTIC_DISABLE_BUGGY_VECTOR_CONVERSION_)
196
+#define SIMDE_DIAGNOSTIC_DISABLE_BUGGY_VECTOR_CONVERSION_
197
+#endif
198
+
199
+/* SLEEF triggers this a *lot* in their headers */
200
+#if HEDLEY_HAS_WARNING("-Wignored-qualifiers")
201
obs-studio-26.1.0.tar.xz/libobs/util/simde/simde-features.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-features.h
Changed
201
1
2
#define SIMDE_FEATURES_H
3
4
#include "simde-arch.h"
5
+#include "simde-diagnostic.h"
6
7
#if !defined(SIMDE_X86_SVML_NATIVE) && !defined(SIMDE_X86_SVML_NO_NATIVE) && \
8
!defined(SIMDE_NO_NATIVE)
9
10
#define SIMDE_X86_AVX512F_NATIVE
11
#endif
12
13
+#if !defined(SIMDE_X86_AVX512VP2INTERSECT_NATIVE) && \
14
+ !defined(SIMDE_X86_AVX512VP2INTERSECT_NO_NATIVE) && \
15
+ !defined(SIMDE_NO_NATIVE)
16
+#if defined(SIMDE_ARCH_X86_AVX512VP2INTERSECT)
17
+#define SIMDE_X86_AVX512VP2INTERSECT_NATIVE
18
+#endif
19
+#endif
20
+#if defined(SIMDE_X86_AVX512VP2INTERSECT_NATIVE) && \
21
+ !defined(SIMDE_X86_AVX512F_NATIVE)
22
+#define SIMDE_X86_AVX512F_NATIVE
23
+#endif
24
+
25
+#if !defined(SIMDE_X86_AVX512VBMI_NATIVE) && \
26
+ !defined(SIMDE_X86_AVX512VBMI_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
27
+#if defined(SIMDE_ARCH_X86_AVX512VBMI)
28
+#define SIMDE_X86_AVX512VBMI_NATIVE
29
+#endif
30
+#endif
31
+#if defined(SIMDE_X86_AVX512VBMI_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
32
+#define SIMDE_X86_AVX512F_NATIVE
33
+#endif
34
+
35
#if !defined(SIMDE_X86_AVX512CD_NATIVE) && \
36
!defined(SIMDE_X86_AVX512CD_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
37
#if defined(SIMDE_ARCH_X86_AVX512CD)
38
39
#endif
40
#endif
41
42
+#if !defined(SIMDE_X86_PCLMUL_NATIVE) && \
43
+ !defined(SIMDE_X86_PCLMUL_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
44
+#if defined(SIMDE_ARCH_X86_PCLMUL)
45
+#define SIMDE_X86_PCLMUL_NATIVE
46
+#endif
47
+#endif
48
+
49
+#if !defined(SIMDE_X86_VPCLMULQDQ_NATIVE) && \
50
+ !defined(SIMDE_X86_VPCLMULQDQ_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
51
+#if defined(SIMDE_ARCH_X86_VPCLMULQDQ)
52
+#define SIMDE_X86_VPCLMULQDQ_NATIVE
53
+#endif
54
+#endif
55
+
56
#if !defined(SIMDE_X86_SVML_NATIVE) && !defined(SIMDE_X86_SVML_NO_NATIVE) && \
57
!defined(SIMDE_NO_NATIVE)
58
#if defined(__INTEL_COMPILER)
59
60
#pragma warning(disable : 4799)
61
#endif
62
63
-#if defined(SIMDE_X86_AVX_NATIVE) || defined(SIMDE_X86_GFNI_NATIVE) || \
64
- defined(SIMDE_X86_SVML_NATIVE)
65
+#if defined(SIMDE_X86_AVX_NATIVE) || defined(SIMDE_X86_GFNI_NATIVE)
66
#include <immintrin.h>
67
#elif defined(SIMDE_X86_SSE4_2_NATIVE)
68
#include <nmmintrin.h>
69
70
71
#if !defined(SIMDE_ARM_NEON_A32V8_NATIVE) && \
72
!defined(SIMDE_ARM_NEON_A32V8_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
73
-#if defined(SIMDE_ARCH_ARM_NEON) && SIMDE_ARCH_ARM_CHECK(80)
74
+#if defined(SIMDE_ARCH_ARM_NEON) && SIMDE_ARCH_ARM_CHECK(80) && \
75
+ (__ARM_NEON_FP & 0x02)
76
#define SIMDE_ARM_NEON_A32V8_NATIVE
77
#endif
78
#endif
79
80
#include <arm_neon.h>
81
#endif
82
83
+#if !defined(SIMDE_ARM_SVE_NATIVE) && !defined(SIMDE_ARM_SVE_NO_NATIVE) && \
84
+ !defined(SIMDE_NO_NATIVE)
85
+#if defined(SIMDE_ARCH_ARM_SVE)
86
+#define SIMDE_ARM_SVE_NATIVE
87
+#include <arm_sve.h>
88
+#endif
89
+#endif
90
+
91
#if !defined(SIMDE_WASM_SIMD128_NATIVE) && \
92
!defined(SIMDE_WASM_SIMD128_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
93
#if defined(SIMDE_ARCH_WASM_SIMD128)
94
95
#endif
96
#if defined(SIMDE_WASM_SIMD128_NATIVE)
97
#if !defined(__wasm_unimplemented_simd128__)
98
+HEDLEY_DIAGNOSTIC_PUSH
99
+SIMDE_DIAGNOSTIC_DISABLE_RESERVED_ID_MACRO_
100
#define __wasm_unimplemented_simd128__
101
+HEDLEY_DIAGNOSTIC_POP
102
#endif
103
#include <wasm_simd128.h>
104
#endif
105
106
#define SIMDE_POWER_ALTIVEC_P5_NATIVE
107
#endif
108
#endif
109
-#if defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
110
-/* stdbool.h conflicts with the bool in altivec.h */
111
-#if defined(bool) && !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF_BOOL_)
112
+
113
+#if defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
114
+/* AltiVec conflicts with lots of stuff. The bool keyword conflicts
115
+ * with the bool keyword in C++ and the bool macro in C99+ (defined
116
+ * in stdbool.h). The vector keyword conflicts with std::vector in
117
+ * C++ if you are `using std;`.
118
+ *
119
+ * Luckily AltiVec allows you to use `__vector`/`__bool`/`__pixel`
120
+ * instead, but altivec.h will unconditionally define
121
+ * `vector`/`bool`/`pixel` so we need to work around that.
122
+ *
123
+ * Unfortunately this means that if your code uses AltiVec directly
124
+ * it may break. If this is the case you'll want to define
125
+ * `SIMDE_POWER_ALTIVEC_NO_UNDEF` before including SIMDe. Or, even
126
+ * better, port your code to use the double-underscore versions. */
127
+#if defined(bool)
128
#undef bool
129
#endif
130
+
131
#include <altivec.h>
132
-/* GCC allows you to undefine these macros to prevent conflicts with
133
- * standard types as they become context-sensitive keywords. */
134
-#if defined(__cplusplus)
135
+
136
+#if !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF)
137
#if defined(vector)
138
#undef vector
139
#endif
140
141
#if defined(bool)
142
#undef bool
143
#endif
144
-#define SIMDE_POWER_ALTIVEC_VECTOR(T) vector T
145
-#define SIMDE_POWER_ALTIVEC_PIXEL pixel
146
-#define SIMDE_POWER_ALTIVEC_BOOL bool
147
-#else
148
+#endif /* !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF) */
149
+
150
+/* Use these intsead of vector/pixel/bool in SIMDe. */
151
#define SIMDE_POWER_ALTIVEC_VECTOR(T) __vector T
152
#define SIMDE_POWER_ALTIVEC_PIXEL __pixel
153
#define SIMDE_POWER_ALTIVEC_BOOL __bool
154
-#endif /* defined(__cplusplus) */
155
+
156
+/* Re-define bool if we're using stdbool.h */
157
+#if !defined(__cplusplus) && defined(__bool_true_false_are_defined) && \
158
+ !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF)
159
+#define bool _Bool
160
+#endif
161
+#endif
162
+
163
+#if !defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE) && \
164
+ !defined(SIMDE_MIPS_LOONGSON_MMI_NO_NATIVE) && \
165
+ !defined(SIMDE_NO_NATIVE)
166
+#if defined(SIMDE_ARCH_MIPS_LOONGSON_MMI)
167
+#define SIMDE_MIPS_LOONGSON_MMI_NATIVE 1
168
+#endif
169
+#endif
170
+#if defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
171
+#include <loongson-mmiintrin.h>
172
+#endif
173
+
174
+/* This is used to determine whether or not to fall back on a vector
175
+ * function in an earlier ISA extensions, as well as whether
176
+ * we expected any attempts at vectorization to be fruitful or if we
177
+ * expect to always be running serial code. */
178
+
179
+#if !defined(SIMDE_NATURAL_VECTOR_SIZE)
180
+#if defined(SIMDE_X86_AVX512F_NATIVE)
181
+#define SIMDE_NATURAL_VECTOR_SIZE (512)
182
+#elif defined(SIMDE_X86_AVX_NATIVE)
183
+#define SIMDE_NATURAL_VECTOR_SIZE (256)
184
+#elif defined(SIMDE_X86_SSE_NATIVE) || defined(SIMDE_ARM_NEON_A32V7_NATIVE) || \
185
+ defined(SIMDE_WASM_SIMD128_NATIVE) || \
186
+ defined(SIMDE_POWER_ALTIVEC_P5_NATIVE)
187
+#define SIMDE_NATURAL_VECTOR_SIZE (128)
188
+#endif
189
+
190
+#if !defined(SIMDE_NATURAL_VECTOR_SIZE)
191
+#define SIMDE_NATURAL_VECTOR_SIZE (0)
192
+#endif
193
+#endif
194
+
195
+#define SIMDE_NATURAL_VECTOR_SIZE_LE(x) \
196
+ ((SIMDE_NATURAL_VECTOR_SIZE > 0) && (SIMDE_NATURAL_VECTOR_SIZE <= (x)))
197
+#define SIMDE_NATURAL_VECTOR_SIZE_GE(x) \
198
+ ((SIMDE_NATURAL_VECTOR_SIZE > 0) && (SIMDE_NATURAL_VECTOR_SIZE >= (x)))
199
+
200
+/* Native aliases */
201
obs-studio-26.1.0.tar.xz/libobs/util/simde/simde-math.h -> obs-studio-26.1.1.tar.xz/libobs/util/simde/simde-math.h
Changed
201
1
2
#include "hedley.h"
3
#include "simde-features.h"
4
5
+#include <stdint.h>
6
+#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
7
+#include <arm_neon.h>
8
+#endif
9
+
10
+HEDLEY_DIAGNOSTIC_PUSH
11
+SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
12
+
13
+/* SLEEF support
14
+ * https://sleef.org/
15
+ *
16
+ * If you include <sleef.h> prior to including SIMDe, SIMDe will use
17
+ * SLEEF. You can also define SIMDE_MATH_SLEEF_ENABLE prior to
18
+ * including SIMDe to force the issue.
19
+ *
20
+ * Note that SLEEF does requires linking to libsleef.
21
+ *
22
+ * By default, SIMDe will use the 1 ULP functions, but if you use
23
+ * SIMDE_ACCURACY_PREFERENCE of 0 we will use up to 4 ULP. This is
24
+ * only the case for the simde_math_* functions; for code in other
25
+ * SIMDe headers which calls SLEEF directly we may use functions with
26
+ * greater error if the API we're implementing is less precise (for
27
+ * example, SVML guarantees 4 ULP, so we will generally use the 3.5
28
+ * ULP functions from SLEEF). */
29
+#if !defined(SIMDE_MATH_SLEEF_DISABLE)
30
+#if defined(__SLEEF_H__)
31
+#define SIMDE_MATH_SLEEF_ENABLE
32
+#endif
33
+#endif
34
+
35
+#if defined(SIMDE_MATH_SLEEF_ENABLE) && !defined(__SLEEF_H__)
36
+HEDLEY_DIAGNOSTIC_PUSH
37
+SIMDE_DIAGNOSTIC_DISABLE_IGNORED_QUALIFIERS_
38
+#include <sleef.h>
39
+HEDLEY_DIAGNOSTIC_POP
40
+#endif
41
+
42
+#if defined(SIMDE_MATH_SLEEF_ENABLE) && defined(__SLEEF_H__)
43
+#if defined(SLEEF_VERSION_MAJOR)
44
+#define SIMDE_MATH_SLEEF_VERSION_CHECK(major, minor, patch) \
45
+ (HEDLEY_VERSION_ENCODE(SLEEF_VERSION_MAJOR, SLEEF_VERSION_MINOR, \
46
+ SLEEF_VERSION_PATCHLEVEL) >= \
47
+ HEDLEY_VERSION_ENCODE(major, minor, patch))
48
+#else
49
+#define SIMDE_MATH_SLEEF_VERSION_CHECK(major, minor, patch) \
50
+ (HEDLEY_VERSION_ENCODE(3, 0, 0) >= \
51
+ HEDLEY_VERSION_ENCODE(major, minor, patch))
52
+#endif
53
+#else
54
+#define SIMDE_MATH_SLEEF_VERSION_CHECK(major, minor, patch) (0)
55
+#endif
56
+
57
#if defined(__has_builtin)
58
#define SIMDE_MATH_BUILTIN_LIBM(func) __has_builtin(__builtin_##func)
59
#elif HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \
60
61
#endif
62
#endif
63
64
-#if !defined(__cplusplus)
65
-/* If this is a problem we *might* be able to avoid including
66
- * <complex.h> on some compilers (gcc, clang, and others which
67
- * implement builtins like __builtin_cexpf). If you don't have
68
- * a <complex.h> please file an issue and we'll take a look. */
69
+/* Try to avoid including <complex> since it pulls in a *lot* of code. */
70
+#if HEDLEY_HAS_BUILTIN(__builtin_creal) || \
71
+ HEDLEY_GCC_VERSION_CHECK(4, 7, 0) || \
72
+ HEDLEY_INTEL_VERSION_CHECK(13, 0, 0)
73
+HEDLEY_DIAGNOSTIC_PUSH
74
+SIMDE_DIAGNOSTIC_DISABLE_C99_EXTENSIONS_
75
+typedef __complex__ float simde_cfloat32;
76
+typedef __complex__ double simde_cfloat64;
77
+HEDLEY_DIAGNOSTIC_POP
78
+#define SIMDE_MATH_CMPLX(x, y) \
79
+ (HEDLEY_STATIC_CAST(double, x) + \
80
+ HEDLEY_STATIC_CAST(double, y) * (__extension__ 1.0j))
81
+#define SIMDE_MATH_CMPLXF(x, y) \
82
+ (HEDLEY_STATIC_CAST(float, x) + \
83
+ HEDLEY_STATIC_CAST(float, y) * (__extension__ 1.0fj))
84
+
85
+#if !defined(simde_math_creal)
86
+#define simde_math_crealf(z) __builtin_crealf(z)
87
+#endif
88
+#if !defined(simde_math_crealf)
89
+#define simde_math_creal(z) __builtin_creal(z)
90
+#endif
91
+#if !defined(simde_math_cimag)
92
+#define simde_math_cimagf(z) __builtin_cimagf(z)
93
+#endif
94
+#if !defined(simde_math_cimagf)
95
+#define simde_math_cimag(z) __builtin_cimag(z)
96
+#endif
97
+#elif !defined(__cplusplus)
98
#include <complex.h>
99
100
#if !defined(HEDLEY_MSVC_VERSION)
101
102
typedef _Fcomplex simde_cfloat32;
103
typedef _Dcomplex simde_cfloat64;
104
#endif
105
-#if HEDLEY_HAS_BUILTIN(__builtin_complex) || \
106
- HEDLEY_GCC_VERSION_CHECK(4, 7, 0) || \
107
- HEDLEY_INTEL_VERSION_CHECK(13, 0, 0)
108
-#define SIMDE_MATH_CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
109
-#define SIMDE_MATH_CMPLXF(x, y) __builtin_complex((float)(x), (float)(y))
110
-#elif defined(HEDLEY_MSVC_VERSION)
111
+
112
+#if defined(HEDLEY_MSVC_VERSION)
113
#define SIMDE_MATH_CMPLX(x, y) ((simde_cfloat64){(x), (y)})
114
#define SIMDE_MATH_CMPLXF(x, y) ((simde_cfloat32){(x), (y)})
115
#elif defined(CMPLX) && defined(CMPLXF)
116
#define SIMDE_MATH_CMPLX(x, y) CMPLX(x, y)
117
#define SIMDE_MATH_CMPLXF(x, y) CMPLXF(x, y)
118
#else
119
-/* CMPLX / CMPLXF are in C99, but these seem to be necessary in
120
- * some compilers that aren't even MSVC. */
121
#define SIMDE_MATH_CMPLX(x, y) \
122
(HEDLEY_STATIC_CAST(double, x) + HEDLEY_STATIC_CAST(double, y) * I)
123
#define SIMDE_MATH_CMPLXF(x, y) \
124
125
#endif
126
127
#if !defined(simde_math_creal)
128
-#if SIMDE_MATH_BUILTIN_LIBM(creal)
129
-#define simde_math_creal(z) __builtin_creal(z)
130
-#else
131
#define simde_math_creal(z) creal(z)
132
#endif
133
-#endif
134
-
135
#if !defined(simde_math_crealf)
136
-#if SIMDE_MATH_BUILTIN_LIBM(crealf)
137
-#define simde_math_crealf(z) __builtin_crealf(z)
138
-#else
139
#define simde_math_crealf(z) crealf(z)
140
#endif
141
-#endif
142
-
143
#if !defined(simde_math_cimag)
144
-#if SIMDE_MATH_BUILTIN_LIBM(cimag)
145
-#define simde_math_cimag(z) __builtin_cimag(z)
146
-#else
147
#define simde_math_cimag(z) cimag(z)
148
#endif
149
-#endif
150
-
151
#if !defined(simde_math_cimagf)
152
-#if SIMDE_MATH_BUILTIN_LIBM(cimagf)
153
-#define simde_math_cimagf(z) __builtin_cimagf(z)
154
-#else
155
#define simde_math_cimagf(z) cimagf(z)
156
#endif
157
-#endif
158
#else
159
-
160
HEDLEY_DIAGNOSTIC_PUSH
161
#if defined(HEDLEY_MSVC_VERSION)
162
#pragma warning(disable : 4530)
163
164
#endif
165
#endif
166
167
+#if !defined(SIMDE_MATH_PI_OVER_180)
168
+#define SIMDE_MATH_PI_OVER_180 \
169
+ 0.0174532925199432957692369076848861271344287188854172545609719144
170
+#endif
171
+
172
+#if !defined(SIMDE_MATH_PI_OVER_180F)
173
+#define SIMDE_MATH_PI_OVER_180F \
174
+ 0.0174532925199432957692369076848861271344287188854172545609719144f
175
+#endif
176
+
177
+#if !defined(SIMDE_MATH_180_OVER_PI)
178
+#define SIMDE_MATH_180_OVER_PI \
179
+ 57.295779513082320876798154814105170332405472466564321549160243861
180
+#endif
181
+
182
+#if !defined(SIMDE_MATH_180_OVER_PIF)
183
+#define SIMDE_MATH_180_OVER_PIF \
184
+ 57.295779513082320876798154814105170332405472466564321549160243861f
185
+#endif
186
+
187
#if !defined(SIMDE_MATH_FLT_MIN)
188
#if defined(FLT_MIN)
189
#define SIMDE_MATH_FLT_MIN FLT_MIN
190
191
#endif
192
#endif
193
194
+/*** Manipulation functions ***/
195
+
196
+#if !defined(simde_math_nextafter)
197
+#if (HEDLEY_HAS_BUILTIN(__builtin_nextafter) && \
198
+ !defined(HEDLEY_IBM_VERSION)) || \
199
+ HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \
200
+ HEDLEY_GCC_VERSION_CHECK(3, 4, 0) || \
201
obs-studio-26.1.1.tar.xz/libobs/util/simde/x86
Added
2
1
+(directory)
2
obs-studio-26.1.1.tar.xz/libobs/util/simde/x86/mmx.h
Added
201
1
2
+/* SPDX-License-Identifier: MIT
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person
5
+ * obtaining a copy of this software and associated documentation
6
+ * files (the "Software"), to deal in the Software without
7
+ * restriction, including without limitation the rights to use, copy,
8
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ * of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be
13
+ * included in all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * Copyright:
25
+ * 2017-2020 Evan Nemerson <evan@nemerson.com>
26
+ */
27
+
28
+#if !defined(SIMDE_X86_MMX_H)
29
+#define SIMDE_X86_MMX_H
30
+
31
+#include "../simde-common.h"
32
+
33
+HEDLEY_DIAGNOSTIC_PUSH
34
+SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
35
+
36
+#if defined(SIMDE_X86_MMX_NATIVE)
37
+#define SIMDE_X86_MMX_USE_NATIVE_TYPE
38
+#elif defined(SIMDE_X86_SSE_NATIVE)
39
+#define SIMDE_X86_MMX_USE_NATIVE_TYPE
40
+#endif
41
+
42
+#if defined(SIMDE_X86_MMX_USE_NATIVE_TYPE)
43
+#include <mmintrin.h>
44
+#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
45
+#include <arm_neon.h>
46
+#elif defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
47
+#include <loongson-mmiintrin.h>
48
+#endif
49
+
50
+#include <stdint.h>
51
+#include <limits.h>
52
+
53
+SIMDE_BEGIN_DECLS_
54
+
55
+typedef union {
56
+#if defined(SIMDE_VECTOR_SUBSCRIPT)
57
+ SIMDE_ALIGN_TO_8 int8_t i8 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
58
+ SIMDE_ALIGN_TO_8 int16_t i16 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
59
+ SIMDE_ALIGN_TO_8 int32_t i32 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
60
+ SIMDE_ALIGN_TO_8 int64_t i64 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
61
+ SIMDE_ALIGN_TO_8 uint8_t u8 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
62
+ SIMDE_ALIGN_TO_8 uint16_t u16 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
63
+ SIMDE_ALIGN_TO_8 uint32_t u32 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
64
+ SIMDE_ALIGN_TO_8 uint64_t u64 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
65
+ SIMDE_ALIGN_TO_8 simde_float32 f32 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
66
+ SIMDE_ALIGN_TO_8 int_fast32_t i32f SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
67
+ SIMDE_ALIGN_TO_8 uint_fast32_t u32f SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
68
+#else
69
+ SIMDE_ALIGN_TO_8 int8_t i8[8];
70
+ SIMDE_ALIGN_TO_8 int16_t i16[4];
71
+ SIMDE_ALIGN_TO_8 int32_t i32[2];
72
+ SIMDE_ALIGN_TO_8 int64_t i64[1];
73
+ SIMDE_ALIGN_TO_8 uint8_t u8[8];
74
+ SIMDE_ALIGN_TO_8 uint16_t u16[4];
75
+ SIMDE_ALIGN_TO_8 uint32_t u32[2];
76
+ SIMDE_ALIGN_TO_8 uint64_t u64[1];
77
+ SIMDE_ALIGN_TO_8 simde_float32 f32[2];
78
+ SIMDE_ALIGN_TO_8 int_fast32_t i32f[8 / sizeof(int_fast32_t)];
79
+ SIMDE_ALIGN_TO_8 uint_fast32_t u32f[8 / sizeof(uint_fast32_t)];
80
+#endif
81
+
82
+#if defined(SIMDE_X86_MMX_USE_NATIVE_TYPE)
83
+ __m64 n;
84
+#endif
85
+#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
86
+ int8x8_t neon_i8;
87
+ int16x4_t neon_i16;
88
+ int32x2_t neon_i32;
89
+ int64x1_t neon_i64;
90
+ uint8x8_t neon_u8;
91
+ uint16x4_t neon_u16;
92
+ uint32x2_t neon_u32;
93
+ uint64x1_t neon_u64;
94
+ float32x2_t neon_f32;
95
+#endif
96
+#if defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
97
+ int8x8_t mmi_i8;
98
+ int16x4_t mmi_i16;
99
+ int32x2_t mmi_i32;
100
+ int64_t mmi_i64;
101
+ uint8x8_t mmi_u8;
102
+ uint16x4_t mmi_u16;
103
+ uint32x2_t mmi_u32;
104
+ uint64_t mmi_u64;
105
+#endif
106
+} simde__m64_private;
107
+
108
+#if defined(SIMDE_X86_MMX_USE_NATIVE_TYPE)
109
+typedef __m64 simde__m64;
110
+#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
111
+typedef int32x2_t simde__m64;
112
+#elif defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
113
+typedef int32x2_t simde__m64;
114
+#elif defined(SIMDE_VECTOR_SUBSCRIPT)
115
+typedef int32_t simde__m64 SIMDE_ALIGN_TO_8 SIMDE_VECTOR(8) SIMDE_MAY_ALIAS;
116
+#else
117
+typedef simde__m64_private simde__m64;
118
+#endif
119
+
120
+#if !defined(SIMDE_X86_MMX_USE_NATIVE_TYPE) && \
121
+ defined(SIMDE_ENABLE_NATIVE_ALIASES)
122
+#define SIMDE_X86_MMX_ENABLE_NATIVE_ALIASES
123
+typedef simde__m64 __m64;
124
+#endif
125
+
126
+HEDLEY_STATIC_ASSERT(8 == sizeof(simde__m64), "__m64 size incorrect");
127
+HEDLEY_STATIC_ASSERT(8 == sizeof(simde__m64_private), "__m64 size incorrect");
128
+#if defined(SIMDE_CHECK_ALIGNMENT) && defined(SIMDE_ALIGN_OF)
129
+HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m64) == 8,
130
+ "simde__m64 is not 8-byte aligned");
131
+HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m64_private) == 8,
132
+ "simde__m64_private is not 8-byte aligned");
133
+#endif
134
+
135
+SIMDE_FUNCTION_ATTRIBUTES
136
+simde__m64 simde__m64_from_private(simde__m64_private v)
137
+{
138
+ simde__m64 r;
139
+ simde_memcpy(&r, &v, sizeof(r));
140
+ return r;
141
+}
142
+
143
+SIMDE_FUNCTION_ATTRIBUTES
144
+simde__m64_private simde__m64_to_private(simde__m64 v)
145
+{
146
+ simde__m64_private r;
147
+ simde_memcpy(&r, &v, sizeof(r));
148
+ return r;
149
+}
150
+
151
+#define SIMDE_X86_GENERATE_CONVERSION_FUNCTION(simde_type, source_type, isax, \
152
+ fragment) \
153
+ SIMDE_FUNCTION_ATTRIBUTES \
154
+ simde__##simde_type simde__##simde_type##_from_##isax##_##fragment( \
155
+ source_type value) \
156
+ { \
157
+ simde__##simde_type##_private r_; \
158
+ r_.isax##_##fragment = value; \
159
+ return simde__##simde_type##_from_private(r_); \
160
+ } \
161
+ \
162
+ SIMDE_FUNCTION_ATTRIBUTES \
163
+ source_type simde__##simde_type##_to_##isax##_##fragment( \
164
+ simde__##simde_type value) \
165
+ { \
166
+ simde__##simde_type##_private r_ = \
167
+ simde__##simde_type##_to_private(value); \
168
+ return r_.isax##_##fragment; \
169
+ }
170
+
171
+#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
172
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int8x8_t, neon, i8)
173
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int16x4_t, neon, i16)
174
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int32x2_t, neon, i32)
175
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int64x1_t, neon, i64)
176
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint8x8_t, neon, u8)
177
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint16x4_t, neon, u16)
178
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint32x2_t, neon, u32)
179
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint64x1_t, neon, u64)
180
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, float32x2_t, neon, f32)
181
+#endif /* defined(SIMDE_ARM_NEON_A32V7_NATIVE) */
182
+
183
+#if defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
184
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int8x8_t, mmi, i8)
185
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int16x4_t, mmi, i16)
186
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int32x2_t, mmi, i32)
187
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, int64_t, mmi, i64)
188
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint8x8_t, mmi, u8)
189
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint16x4_t, mmi, u16)
190
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint32x2_t, mmi, u32)
191
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m64, uint64_t, mmi, u64)
192
+#endif /* defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE) */
193
+
194
+SIMDE_FUNCTION_ATTRIBUTES
195
+simde__m64 simde_mm_add_pi8(simde__m64 a, simde__m64 b)
196
+{
197
+#if defined(SIMDE_X86_MMX_NATIVE)
198
+ return _mm_add_pi8(a, b);
199
+#else
200
+ simde__m64_private r_;
201
obs-studio-26.1.1.tar.xz/libobs/util/simde/x86/sse.h
Added
201
1
2
+/* SPDX-License-Identifier: MIT
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person
5
+ * obtaining a copy of this software and associated documentation
6
+ * files (the "Software"), to deal in the Software without
7
+ * restriction, including without limitation the rights to use, copy,
8
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ * of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be
13
+ * included in all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * Copyright:
25
+ * 2017-2020 Evan Nemerson <evan@nemerson.com>
26
+ * 2015-2017 John W. Ratcliff <jratcliffscarab@gmail.com>
27
+ * 2015 Brandon Rowlett <browlett@nvidia.com>
28
+ * 2015 Ken Fast <kfast@gdeb.com>
29
+ */
30
+
31
+#if !defined(SIMDE_X86_SSE_H)
32
+#define SIMDE_X86_SSE_H
33
+
34
+#include "mmx.h"
35
+
36
+#if defined(_WIN32)
37
+#include <windows.h>
38
+#endif
39
+
40
+HEDLEY_DIAGNOSTIC_PUSH
41
+SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
42
+SIMDE_BEGIN_DECLS_
43
+
44
+typedef union {
45
+#if defined(SIMDE_VECTOR_SUBSCRIPT)
46
+ SIMDE_ALIGN_TO_16 int8_t i8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
47
+ SIMDE_ALIGN_TO_16 int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
48
+ SIMDE_ALIGN_TO_16 int32_t i32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
49
+ SIMDE_ALIGN_TO_16 int64_t i64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
50
+ SIMDE_ALIGN_TO_16 uint8_t u8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
51
+ SIMDE_ALIGN_TO_16 uint16_t u16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
52
+ SIMDE_ALIGN_TO_16 uint32_t u32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
53
+ SIMDE_ALIGN_TO_16 uint64_t u64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
54
+#if defined(SIMDE_HAVE_INT128_)
55
+ SIMDE_ALIGN_TO_16 simde_int128 i128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
56
+ SIMDE_ALIGN_TO_16 simde_uint128 u128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
57
+#endif
58
+ SIMDE_ALIGN_TO_16 simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
59
+ SIMDE_ALIGN_TO_16 int_fast32_t i32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
60
+ SIMDE_ALIGN_TO_16 uint_fast32_t u32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
61
+#else
62
+ SIMDE_ALIGN_TO_16 int8_t i8[16];
63
+ SIMDE_ALIGN_TO_16 int16_t i16[8];
64
+ SIMDE_ALIGN_TO_16 int32_t i32[4];
65
+ SIMDE_ALIGN_TO_16 int64_t i64[2];
66
+ SIMDE_ALIGN_TO_16 uint8_t u8[16];
67
+ SIMDE_ALIGN_TO_16 uint16_t u16[8];
68
+ SIMDE_ALIGN_TO_16 uint32_t u32[4];
69
+ SIMDE_ALIGN_TO_16 uint64_t u64[2];
70
+#if defined(SIMDE_HAVE_INT128_)
71
+ SIMDE_ALIGN_TO_16 simde_int128 i128[1];
72
+ SIMDE_ALIGN_TO_16 simde_uint128 u128[1];
73
+#endif
74
+ SIMDE_ALIGN_TO_16 simde_float32 f32[4];
75
+ SIMDE_ALIGN_TO_16 int_fast32_t i32f[16 / sizeof(int_fast32_t)];
76
+ SIMDE_ALIGN_TO_16 uint_fast32_t u32f[16 / sizeof(uint_fast32_t)];
77
+#endif
78
+
79
+ SIMDE_ALIGN_TO_16 simde__m64_private m64_private[2];
80
+ SIMDE_ALIGN_TO_16 simde__m64 m64[2];
81
+
82
+#if defined(SIMDE_X86_SSE_NATIVE)
83
+ SIMDE_ALIGN_TO_16 __m128 n;
84
+#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
85
+ SIMDE_ALIGN_TO_16 int8x16_t neon_i8;
86
+ SIMDE_ALIGN_TO_16 int16x8_t neon_i16;
87
+ SIMDE_ALIGN_TO_16 int32x4_t neon_i32;
88
+ SIMDE_ALIGN_TO_16 int64x2_t neon_i64;
89
+ SIMDE_ALIGN_TO_16 uint8x16_t neon_u8;
90
+ SIMDE_ALIGN_TO_16 uint16x8_t neon_u16;
91
+ SIMDE_ALIGN_TO_16 uint32x4_t neon_u32;
92
+ SIMDE_ALIGN_TO_16 uint64x2_t neon_u64;
93
+ SIMDE_ALIGN_TO_16 float32x4_t neon_f32;
94
+#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
95
+ SIMDE_ALIGN_TO_16 float64x2_t neon_f64;
96
+#endif
97
+#elif defined(SIMDE_WASM_SIMD128_NATIVE)
98
+ SIMDE_ALIGN_TO_16 v128_t wasm_v128;
99
+#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
100
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned char) altivec_u8;
101
+ SIMDE_ALIGN_TO_16
102
+ SIMDE_POWER_ALTIVEC_VECTOR(unsigned short) altivec_u16;
103
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32;
104
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed char) altivec_i8;
105
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed short) altivec_i16;
106
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32;
107
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(float) altivec_f32;
108
+#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
109
+ SIMDE_ALIGN_TO_16
110
+ SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long) altivec_u64;
111
+ SIMDE_ALIGN_TO_16
112
+ SIMDE_POWER_ALTIVEC_VECTOR(signed long long) altivec_i64;
113
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(double) altivec_f64;
114
+#endif
115
+#endif
116
+} simde__m128_private;
117
+
118
+#if defined(SIMDE_X86_SSE_NATIVE)
119
+typedef __m128 simde__m128;
120
+#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
121
+typedef float32x4_t simde__m128;
122
+#elif defined(SIMDE_WASM_SIMD128_NATIVE)
123
+typedef v128_t simde__m128;
124
+#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
125
+typedef SIMDE_POWER_ALTIVEC_VECTOR(float) simde__m128;
126
+#elif defined(SIMDE_VECTOR_SUBSCRIPT)
127
+typedef simde_float32
128
+ simde__m128 SIMDE_ALIGN_TO_16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
129
+#else
130
+typedef simde__m128_private simde__m128;
131
+#endif
132
+
133
+#if defined(SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES)
134
+typedef simde__m128 __m128;
135
+#endif
136
+
137
+HEDLEY_STATIC_ASSERT(16 == sizeof(simde__m128), "simde__m128 size incorrect");
138
+HEDLEY_STATIC_ASSERT(16 == sizeof(simde__m128_private),
139
+ "simde__m128_private size incorrect");
140
+#if defined(SIMDE_CHECK_ALIGNMENT) && defined(SIMDE_ALIGN_OF)
141
+HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m128) == 16,
142
+ "simde__m128 is not 16-byte aligned");
143
+HEDLEY_STATIC_ASSERT(SIMDE_ALIGN_OF(simde__m128_private) == 16,
144
+ "simde__m128_private is not 16-byte aligned");
145
+#endif
146
+
147
+SIMDE_FUNCTION_ATTRIBUTES
148
+simde__m128 simde__m128_from_private(simde__m128_private v)
149
+{
150
+ simde__m128 r;
151
+ simde_memcpy(&r, &v, sizeof(r));
152
+ return r;
153
+}
154
+
155
+SIMDE_FUNCTION_ATTRIBUTES
156
+simde__m128_private simde__m128_to_private(simde__m128 v)
157
+{
158
+ simde__m128_private r;
159
+ simde_memcpy(&r, &v, sizeof(r));
160
+ return r;
161
+}
162
+
163
+#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
164
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int8x16_t, neon, i8)
165
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int16x8_t, neon, i16)
166
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int32x4_t, neon, i32)
167
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, int64x2_t, neon, i64)
168
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint8x16_t, neon, u8)
169
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint16x8_t, neon, u16)
170
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint32x4_t, neon, u32)
171
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, uint64x2_t, neon, u64)
172
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, float32x4_t, neon, f32)
173
+#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
174
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128, float64x2_t, neon, f64)
175
+#endif
176
+#endif /* defined(SIMDE_ARM_NEON_A32V7_NATIVE) */
177
+
178
+#if defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
179
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128,
180
+ SIMDE_POWER_ALTIVEC_VECTOR(signed char),
181
+ altivec, i8)
182
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128,
183
+ SIMDE_POWER_ALTIVEC_VECTOR(signed short),
184
+ altivec, i16)
185
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128,
186
+ SIMDE_POWER_ALTIVEC_VECTOR(signed int),
187
+ altivec, i32)
188
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(
189
+ m128, SIMDE_POWER_ALTIVEC_VECTOR(unsigned char), altivec, u8)
190
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(
191
+ m128, SIMDE_POWER_ALTIVEC_VECTOR(unsigned short), altivec, u16)
192
+SIMDE_X86_GENERATE_CONVERSION_FUNCTION(m128,
193
+ SIMDE_POWER_ALTIVEC_VECTOR(unsigned int),
194
+ altivec, u32)
195
+
196
+#if defined(SIMDE_BUG_GCC_95782)
197
+SIMDE_FUNCTION_ATTRIBUTES
198
+SIMDE_POWER_ALTIVEC_VECTOR(float)
199
+simde__m128_to_altivec_f32(simde__m128 value)
200
+{
201
obs-studio-26.1.1.tar.xz/libobs/util/simde/x86/sse2.h
Added
201
1
2
+/* SPDX-License-Identifier: MIT
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person
5
+ * obtaining a copy of this software and associated documentation
6
+ * files (the "Software"), to deal in the Software without
7
+ * restriction, including without limitation the rights to use, copy,
8
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ * of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be
13
+ * included in all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * Copyright:
25
+ * 2017-2020 Evan Nemerson <evan@nemerson.com>
26
+ * 2015-2017 John W. Ratcliff <jratcliffscarab@gmail.com>
27
+ * 2015 Brandon Rowlett <browlett@nvidia.com>
28
+ * 2015 Ken Fast <kfast@gdeb.com>
29
+ * 2017 Hasindu Gamaarachchi <hasindu@unsw.edu.au>
30
+ * 2018 Jeff Daily <jeff.daily@amd.com>
31
+ */
32
+
33
+#if !defined(SIMDE_X86_SSE2_H)
34
+#define SIMDE_X86_SSE2_H
35
+
36
+#include "sse.h"
37
+
38
+HEDLEY_DIAGNOSTIC_PUSH
39
+SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
40
+SIMDE_BEGIN_DECLS_
41
+
42
+typedef union {
43
+#if defined(SIMDE_VECTOR_SUBSCRIPT)
44
+ SIMDE_ALIGN_TO_16 int8_t i8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
45
+ SIMDE_ALIGN_TO_16 int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
46
+ SIMDE_ALIGN_TO_16 int32_t i32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
47
+ SIMDE_ALIGN_TO_16 int64_t i64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
48
+ SIMDE_ALIGN_TO_16 uint8_t u8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
49
+ SIMDE_ALIGN_TO_16 uint16_t u16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
50
+ SIMDE_ALIGN_TO_16 uint32_t u32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
51
+ SIMDE_ALIGN_TO_16 uint64_t u64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
52
+#if defined(SIMDE_HAVE_INT128_)
53
+ SIMDE_ALIGN_TO_16 simde_int128 i128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
54
+ SIMDE_ALIGN_TO_16 simde_uint128 u128 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
55
+#endif
56
+ SIMDE_ALIGN_TO_16 simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
57
+ SIMDE_ALIGN_TO_16 simde_float64 f64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
58
+
59
+ SIMDE_ALIGN_TO_16 int_fast32_t i32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
60
+ SIMDE_ALIGN_TO_16 uint_fast32_t u32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
61
+#else
62
+ SIMDE_ALIGN_TO_16 int8_t i8[16];
63
+ SIMDE_ALIGN_TO_16 int16_t i16[8];
64
+ SIMDE_ALIGN_TO_16 int32_t i32[4];
65
+ SIMDE_ALIGN_TO_16 int64_t i64[2];
66
+ SIMDE_ALIGN_TO_16 uint8_t u8[16];
67
+ SIMDE_ALIGN_TO_16 uint16_t u16[8];
68
+ SIMDE_ALIGN_TO_16 uint32_t u32[4];
69
+ SIMDE_ALIGN_TO_16 uint64_t u64[2];
70
+#if defined(SIMDE_HAVE_INT128_)
71
+ SIMDE_ALIGN_TO_16 simde_int128 i128[1];
72
+ SIMDE_ALIGN_TO_16 simde_uint128 u128[1];
73
+#endif
74
+ SIMDE_ALIGN_TO_16 simde_float32 f32[4];
75
+ SIMDE_ALIGN_TO_16 simde_float64 f64[2];
76
+
77
+ SIMDE_ALIGN_TO_16 int_fast32_t i32f[16 / sizeof(int_fast32_t)];
78
+ SIMDE_ALIGN_TO_16 uint_fast32_t u32f[16 / sizeof(uint_fast32_t)];
79
+#endif
80
+
81
+ SIMDE_ALIGN_TO_16 simde__m64_private m64_private[2];
82
+ SIMDE_ALIGN_TO_16 simde__m64 m64[2];
83
+
84
+#if defined(SIMDE_X86_SSE2_NATIVE)
85
+ SIMDE_ALIGN_TO_16 __m128i n;
86
+#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
87
+ SIMDE_ALIGN_TO_16 int8x16_t neon_i8;
88
+ SIMDE_ALIGN_TO_16 int16x8_t neon_i16;
89
+ SIMDE_ALIGN_TO_16 int32x4_t neon_i32;
90
+ SIMDE_ALIGN_TO_16 int64x2_t neon_i64;
91
+ SIMDE_ALIGN_TO_16 uint8x16_t neon_u8;
92
+ SIMDE_ALIGN_TO_16 uint16x8_t neon_u16;
93
+ SIMDE_ALIGN_TO_16 uint32x4_t neon_u32;
94
+ SIMDE_ALIGN_TO_16 uint64x2_t neon_u64;
95
+ SIMDE_ALIGN_TO_16 float32x4_t neon_f32;
96
+#if defined(SIMDE_ARCH_AARCH64)
97
+ SIMDE_ALIGN_TO_16 float64x2_t neon_f64;
98
+#endif
99
+#elif defined(SIMDE_WASM_SIMD128_NATIVE)
100
+ SIMDE_ALIGN_TO_16 v128_t wasm_v128;
101
+#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
102
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed char) altivec_i8;
103
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed short) altivec_i16;
104
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32;
105
+#if defined(__UINT_FAST32_TYPE__) && defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
106
+ SIMDE_ALIGN_TO_16
107
+ SIMDE_POWER_ALTIVEC_VECTOR(__INT_FAST32_TYPE__) altivec_i32f;
108
+#else
109
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32f;
110
+#endif
111
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned char) altivec_u8;
112
+ SIMDE_ALIGN_TO_16
113
+ SIMDE_POWER_ALTIVEC_VECTOR(unsigned short) altivec_u16;
114
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32;
115
+#if defined(__UINT_FAST32_TYPE__) && defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
116
+ SIMDE_ALIGN_TO_16
117
+ SIMDE_POWER_ALTIVEC_VECTOR(__UINT_FAST32_TYPE__) altivec_u32f;
118
+#else
119
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32f;
120
+#endif
121
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(float) altivec_f32;
122
+#if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
123
+ SIMDE_ALIGN_TO_16
124
+ SIMDE_POWER_ALTIVEC_VECTOR(signed long long) altivec_i64;
125
+ SIMDE_ALIGN_TO_16
126
+ SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long) altivec_u64;
127
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(double) altivec_f64;
128
+#endif
129
+#endif
130
+} simde__m128i_private;
131
+
132
+typedef union {
133
+#if defined(SIMDE_VECTOR_SUBSCRIPT)
134
+ SIMDE_ALIGN_TO_16 int8_t i8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
135
+ SIMDE_ALIGN_TO_16 int16_t i16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
136
+ SIMDE_ALIGN_TO_16 int32_t i32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
137
+ SIMDE_ALIGN_TO_16 int64_t i64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
138
+ SIMDE_ALIGN_TO_16 uint8_t u8 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
139
+ SIMDE_ALIGN_TO_16 uint16_t u16 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
140
+ SIMDE_ALIGN_TO_16 uint32_t u32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
141
+ SIMDE_ALIGN_TO_16 uint64_t u64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
142
+ SIMDE_ALIGN_TO_16 simde_float32 f32 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
143
+ SIMDE_ALIGN_TO_16 simde_float64 f64 SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
144
+ SIMDE_ALIGN_TO_16 int_fast32_t i32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
145
+ SIMDE_ALIGN_TO_16 uint_fast32_t u32f SIMDE_VECTOR(16) SIMDE_MAY_ALIAS;
146
+#else
147
+ SIMDE_ALIGN_TO_16 int8_t i8[16];
148
+ SIMDE_ALIGN_TO_16 int16_t i16[8];
149
+ SIMDE_ALIGN_TO_16 int32_t i32[4];
150
+ SIMDE_ALIGN_TO_16 int64_t i64[2];
151
+ SIMDE_ALIGN_TO_16 uint8_t u8[16];
152
+ SIMDE_ALIGN_TO_16 uint16_t u16[8];
153
+ SIMDE_ALIGN_TO_16 uint32_t u32[4];
154
+ SIMDE_ALIGN_TO_16 uint64_t u64[2];
155
+ SIMDE_ALIGN_TO_16 simde_float32 f32[4];
156
+ SIMDE_ALIGN_TO_16 simde_float64 f64[2];
157
+ SIMDE_ALIGN_TO_16 int_fast32_t i32f[16 / sizeof(int_fast32_t)];
158
+ SIMDE_ALIGN_TO_16 uint_fast32_t u32f[16 / sizeof(uint_fast32_t)];
159
+#endif
160
+
161
+ SIMDE_ALIGN_TO_16 simde__m64_private m64_private[2];
162
+ SIMDE_ALIGN_TO_16 simde__m64 m64[2];
163
+
164
+#if defined(SIMDE_X86_SSE2_NATIVE)
165
+ SIMDE_ALIGN_TO_16 __m128d n;
166
+#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
167
+ SIMDE_ALIGN_TO_16 int8x16_t neon_i8;
168
+ SIMDE_ALIGN_TO_16 int16x8_t neon_i16;
169
+ SIMDE_ALIGN_TO_16 int32x4_t neon_i32;
170
+ SIMDE_ALIGN_TO_16 int64x2_t neon_i64;
171
+ SIMDE_ALIGN_TO_16 uint8x16_t neon_u8;
172
+ SIMDE_ALIGN_TO_16 uint16x8_t neon_u16;
173
+ SIMDE_ALIGN_TO_16 uint32x4_t neon_u32;
174
+ SIMDE_ALIGN_TO_16 uint64x2_t neon_u64;
175
+ SIMDE_ALIGN_TO_16 float32x4_t neon_f32;
176
+#if defined(SIMDE_ARCH_AARCH64)
177
+ SIMDE_ALIGN_TO_16 float64x2_t neon_f64;
178
+#endif
179
+#elif defined(SIMDE_WASM_SIMD128_NATIVE)
180
+ SIMDE_ALIGN_TO_16 v128_t wasm_v128;
181
+#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
182
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed char) altivec_i8;
183
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed short) altivec_i16;
184
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32;
185
+#if defined(__INT_FAST32_TYPE__) && defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
186
+ SIMDE_ALIGN_TO_16
187
+ SIMDE_POWER_ALTIVEC_VECTOR(__INT_FAST32_TYPE__) altivec_i32f;
188
+#else
189
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(signed int) altivec_i32f;
190
+#endif
191
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned char) altivec_u8;
192
+ SIMDE_ALIGN_TO_16
193
+ SIMDE_POWER_ALTIVEC_VECTOR(unsigned short) altivec_u16;
194
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32;
195
+#if defined(__UINT_FAST32_TYPE__) && defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
196
+ SIMDE_ALIGN_TO_16
197
+ SIMDE_POWER_ALTIVEC_VECTOR(__UINT_FAST32_TYPE__) altivec_u32f;
198
+#else
199
+ SIMDE_ALIGN_TO_16 SIMDE_POWER_ALTIVEC_VECTOR(unsigned int) altivec_u32f;
200
+#endif
201
obs-studio-26.1.0.tar.xz/libobs/util/sse-intrin.h -> obs-studio-26.1.1.tar.xz/libobs/util/sse-intrin.h
Changed
61
1
2
3
#pragma once
4
5
-#if NEEDS_SIMDE
6
-
7
-#include "simde/sse2.h"
8
-
9
-#define __m128 simde__m128
10
-#define _mm_setzero_ps simde_mm_setzero_ps
11
-#define _mm_set_ps simde_mm_set_ps
12
-#define _mm_add_ps simde_mm_add_ps
13
-#define _mm_sub_ps simde_mm_sub_ps
14
-#define _mm_mul_ps simde_mm_mul_ps
15
-#define _mm_div_ps simde_mm_div_ps
16
-#define _mm_set1_ps simde_mm_set1_ps
17
-#define _mm_movehl_ps simde_mm_movehl_ps
18
-#define _mm_shuffle_ps simde_mm_shuffle_ps
19
-#define _mm_min_ps simde_mm_min_ps
20
-#define _mm_max_ps simde_mm_max_ps
21
-#define _mm_movelh_ps simde_mm_movelh_ps
22
-#define _mm_unpacklo_ps simde_mm_unpacklo_ps
23
-#define _mm_unpackhi_ps simde_mm_unpackhi_ps
24
-#define _mm_load_ps simde_mm_load_ps
25
-#define _mm_andnot_ps simde_mm_andnot_ps
26
-#define _mm_storeu_ps simde_mm_storeu_ps
27
-#define _mm_loadu_ps simde_mm_loadu_ps
28
-
29
-#define __m128i simde__m128i
30
-#define _mm_set1_epi32 simde_mm_set1_epi32
31
-#define _mm_set1_epi16 simde_mm_set1_epi16
32
-#define _mm_load_si128 simde_mm_load_si128
33
-#define _mm_packs_epi32 simde_mm_packs_epi32
34
-#define _mm_srli_si128 simde_mm_srli_si128
35
-#define _mm_and_si128 simde_mm_and_si128
36
-#define _mm_packus_epi16 simde_mm_packus_epi16
37
-#define _mm_add_epi64 simde_mm_add_epi64
38
-#define _mm_shuffle_epi32 simde_mm_shuffle_epi32
39
-#define _mm_srai_epi16 simde_mm_srai_epi16
40
-#define _mm_shufflelo_epi16 simde_mm_shufflelo_epi16
41
-#define _mm_storeu_si128 simde_mm_storeu_si128
42
-
43
-#define _MM_SHUFFLE SIMDE_MM_SHUFFLE
44
-#define _MM_TRANSPOSE4_PS SIMDE_MM_TRANSPOSE4_PS
45
-
46
-#else
47
-
48
-#if defined(__aarch64__) || defined(__arm__)
49
-#include <arm_neon.h>
50
-#include "sse2neon.h"
51
-#else
52
-#include <xmmintrin.h>
53
+#if defined(_MSC_VER)
54
#include <emmintrin.h>
55
-#endif
56
-
57
+#else
58
+#define SIMDE_ENABLE_NATIVE_ALIASES
59
+#include "simde/x86/sse2.h"
60
#endif
61
obs-studio-26.1.0.tar.xz/plugins/coreaudio-encoder/CMakeLists.txt -> obs-studio-26.1.1.tar.xz/plugins/coreaudio-encoder/CMakeLists.txt
Changed
25
1
2
encoder.cpp)
3
4
if (WIN32)
5
+ # Set compiler flag before adding resource file
6
+ if (MINGW)
7
+ set_source_files_properties(${coreaudio-encoder_SOURCES}
8
+ PROPERTIES COMPILE_FLAGS "-Wno-multichar")
9
+ endif()
10
+
11
set(MODULE_DESCRIPTION "OBS Core Audio encoder")
12
configure_file(${CMAKE_SOURCE_DIR}/cmake/winrc/obs-module.rc.in coreaudio-encoder.rc)
13
list(APPEND coreaudio-encoder_SOURCES
14
coreaudio-encoder.rc)
15
set(coreaudio-encoder_HEADERS windows-imports.h)
16
set(coreaudio-encoder_LIBS )
17
-
18
- if (MINGW)
19
- set_source_files_properties(${coreaudio-encoder_SOURCES}
20
- PROPERTIES COMPILE_FLAGS "-Wno-multichar")
21
- endif()
22
else()
23
find_library(COREFOUNDATION CoreFoundation)
24
find_library(COREAUDIO CoreAudio)
25
obs-studio-26.1.0.tar.xz/plugins/decklink/DecklinkInput.cpp -> obs-studio-26.1.1.tar.xz/plugins/decklink/DecklinkInput.cpp
Changed
10
1
2
return false;
3
}
4
5
- if (!instance->StartCapture(mode, bmdVideoConnection,
6
+ if (!instance->StartCapture(mode, allow10Bit, bmdVideoConnection,
7
bmdAudioConnection)) {
8
instance = nullptr;
9
return false;
10
obs-studio-26.1.0.tar.xz/plugins/decklink/DecklinkInput.hpp -> obs-studio-26.1.1.tar.xz/plugins/decklink/DecklinkInput.hpp
Changed
9
1
2
std::string hash;
3
long long id;
4
bool swap = false;
5
+ bool allow10Bit = false;
6
BMDVideoConnection videoConnection;
7
BMDAudioConnection audioConnection;
8
};
9
obs-studio-26.1.0.tar.xz/plugins/decklink/OBSVideoFrame.cpp -> obs-studio-26.1.1.tar.xz/plugins/decklink/OBSVideoFrame.cpp
Changed
19
1
2
#include "OBSVideoFrame.h"
3
4
-OBSVideoFrame::OBSVideoFrame(long width, long height)
5
+OBSVideoFrame::OBSVideoFrame(long width, long height,
6
+ BMDPixelFormat pixelFormat)
7
{
8
+ int bpp = 2;
9
this->width = width;
10
this->height = height;
11
- this->rowBytes = width * 2;
12
- this->data = new unsigned char[width * height * 2 + 1];
13
+ this->rowBytes = width * bpp;
14
+ this->data = new unsigned char[width * height * bpp + 1];
15
+ this->pixelFormat = pixelFormat;
16
}
17
18
HRESULT OBSVideoFrame::SetFlags(BMDFrameFlags newFlags)
19
obs-studio-26.1.0.tar.xz/plugins/decklink/OBSVideoFrame.h -> obs-studio-26.1.1.tar.xz/plugins/decklink/OBSVideoFrame.h
Changed
10
1
2
unsigned char *data;
3
4
public:
5
- OBSVideoFrame(long width, long height);
6
+ OBSVideoFrame(long width, long height, BMDPixelFormat pixelFormat);
7
8
HRESULT STDMETHODCALLTYPE SetFlags(BMDFrameFlags newFlags) override;
9
10
obs-studio-26.1.0.tar.xz/plugins/decklink/const.h -> obs-studio-26.1.1.tar.xz/plugins/decklink/const.h
Changed
14
1
2
#define AUTO_START "auto_start"
3
#define KEYER "keyer"
4
#define SWAP "swap"
5
+#define ALLOW_10_BIT "allow_10_bit"
6
7
#define TEXT_DEVICE obs_module_text("Device")
8
#define TEXT_VIDEO_CONNECTION obs_module_text("VideoConnection")
9
10
#define TEXT_ENABLE_KEYER obs_module_text("Keyer")
11
#define TEXT_SWAP obs_module_text("SwapFC-LFE")
12
#define TEXT_SWAP_TOOLTIP obs_module_text("SwapFC-LFE.Tooltip")
13
+#define TEXT_ALLOW_10_BIT obs_module_text("Allow10Bit")
14
obs-studio-26.1.0.tar.xz/plugins/decklink/data/locale/en-US.ini -> obs-studio-26.1.1.tar.xz/plugins/decklink/data/locale/en-US.ini
Changed
7
1
2
SwapFC-LFE.Tooltip="Swap Front Center Channel and LFE Channel"
3
VideoConnection="Video Connection"
4
AudioConnection="Audio Connection"
5
+Allow10Bit="Allow 10 Bit (Required for SDI captions, may cause performance overhead)"
6
\ No newline at end of file
7
obs-studio-26.1.0.tar.xz/plugins/decklink/decklink-device-instance.cpp -> obs-studio-26.1.1.tar.xz/plugins/decklink/decklink-device-instance.cpp
Changed
138
1
2
return VIDEO_FORMAT_BGRX;
3
4
default:
5
- case bmdFormat8BitYUV:;
6
+ case bmdFormat8BitYUV:
7
+ case bmdFormat10BitYUV:;
8
+ return VIDEO_FORMAT_UYVY;
9
}
10
-
11
- return VIDEO_FORMAT_UYVY;
12
}
13
14
static inline int ConvertChannelFormat(speaker_layout format)
15
16
packets->Release();
17
}
18
19
- IDeckLinkVideoConversion *frameConverter =
20
- CreateVideoConversionInstance();
21
+ IDeckLinkVideoFrame *frame;
22
+ if (videoFrame->GetPixelFormat() != convertFrame->GetPixelFormat()) {
23
+ IDeckLinkVideoConversion *frameConverter =
24
+ CreateVideoConversionInstance();
25
+
26
+ frameConverter->ConvertFrame(videoFrame, convertFrame);
27
28
- frameConverter->ConvertFrame(videoFrame, convertFrame);
29
+ frame = convertFrame;
30
+ } else {
31
+ frame = videoFrame;
32
+ }
33
34
void *bytes;
35
- if (convertFrame->GetBytes(&bytes) != S_OK) {
36
+ if (frame->GetBytes(&bytes) != S_OK) {
37
LOG(LOG_WARNING, "Failed to get video frame data");
38
return;
39
}
40
41
currentFrame.data[0] = (uint8_t *)bytes;
42
- currentFrame.linesize[0] = (uint32_t)convertFrame->GetRowBytes();
43
- currentFrame.width = (uint32_t)convertFrame->GetWidth();
44
- currentFrame.height = (uint32_t)convertFrame->GetHeight();
45
+ currentFrame.linesize[0] = (uint32_t)frame->GetRowBytes();
46
+ currentFrame.width = (uint32_t)frame->GetWidth();
47
+ currentFrame.height = (uint32_t)frame->GetHeight();
48
currentFrame.timestamp = timestamp;
49
50
obs_source_output_video2(
51
52
currentFrame.color_range_min,
53
currentFrame.color_range_max);
54
55
- if (convertFrame) {
56
- delete convertFrame;
57
+ delete convertFrame;
58
+
59
+ BMDPixelFormat convertFormat;
60
+ switch (pixelFormat) {
61
+ case bmdFormat8BitBGRA:
62
+ convertFormat = bmdFormat8BitBGRA;
63
+ break;
64
+ default:
65
+ case bmdFormat10BitYUV:
66
+ case bmdFormat8BitYUV:;
67
+ convertFormat = bmdFormat8BitYUV;
68
+ break;
69
}
70
- convertFrame = new OBSVideoFrame(mode_->GetWidth(), mode_->GetHeight());
71
+
72
+ convertFrame = new OBSVideoFrame(mode_->GetWidth(), mode_->GetHeight(),
73
+ convertFormat);
74
75
#ifdef LOG_SETUP_VIDEO_FORMAT
76
LOG(LOG_INFO, "Setup video format: %s, %s, %s",
77
78
}
79
80
bool DeckLinkDeviceInstance::StartCapture(DeckLinkDeviceMode *mode_,
81
+ bool allow10Bit_,
82
BMDVideoConnection bmdVideoConnection,
83
BMDAudioConnection bmdAudioConnection)
84
{
85
86
bool isauto = mode_->GetName() == "Auto";
87
if (isauto) {
88
displayMode = bmdModeNTSC;
89
- pixelFormat = bmdFormat10BitYUV;
90
+ if (allow10Bit) {
91
+ pixelFormat = bmdFormat10BitYUV;
92
+ } else {
93
+ pixelFormat = bmdFormat8BitYUV;
94
+ }
95
flags = bmdVideoInputEnableFormatDetection;
96
} else {
97
displayMode = mode_->GetDisplayMode();
98
99
flags = bmdVideoInputFlagDefault;
100
}
101
102
+ allow10Bit = allow10Bit_;
103
+
104
const HRESULT videoResult =
105
input->EnableVideoInput(displayMode, pixelFormat, flags);
106
if (videoResult != S_OK) {
107
108
{
109
110
if (events & bmdVideoInputColorspaceChanged) {
111
- switch (detectedSignalFlags) {
112
- case bmdDetectedVideoInputRGB444:
113
+ if (detectedSignalFlags & bmdDetectedVideoInputRGB444) {
114
pixelFormat = bmdFormat8BitBGRA;
115
- break;
116
-
117
- default:
118
- case bmdDetectedVideoInputYCbCr422:
119
- pixelFormat = bmdFormat10BitYUV;
120
- break;
121
+ }
122
+ if (detectedSignalFlags & bmdDetectedVideoInputYCbCr422) {
123
+ if (detectedSignalFlags &
124
+ bmdDetectedVideoInput10BitDepth) {
125
+ if (allow10Bit) {
126
+ pixelFormat = bmdFormat10BitYUV;
127
+ } else {
128
+ pixelFormat = bmdFormat8BitYUV;
129
+ }
130
+ }
131
+ if (detectedSignalFlags &
132
+ bmdDetectedVideoInput8BitDepth) {
133
+ pixelFormat = bmdFormat8BitYUV;
134
+ }
135
}
136
}
137
138
obs-studio-26.1.0.tar.xz/plugins/decklink/decklink-device-instance.hpp -> obs-studio-26.1.1.tar.xz/plugins/decklink/decklink-device-instance.hpp
Changed
18
1
2
AudioRepacker *audioRepacker = nullptr;
3
speaker_layout channelFormat = SPEAKERS_STEREO;
4
bool swap;
5
+ bool allow10Bit;
6
7
OBSVideoFrame *convertFrame = nullptr;
8
IDeckLinkMutableVideoFrame *decklinkOutputFrame = nullptr;
9
10
11
inline DeckLinkDeviceMode *GetMode() const { return mode; }
12
13
- bool StartCapture(DeckLinkDeviceMode *mode,
14
+ bool StartCapture(DeckLinkDeviceMode *mode, bool allow10Bit,
15
BMDVideoConnection bmdVideoConnection,
16
BMDAudioConnection bmdAudioConnection);
17
bool StopCapture(void);
18
obs-studio-26.1.0.tar.xz/plugins/decklink/decklink-source.cpp -> obs-studio-26.1.1.tar.xz/plugins/decklink/decklink-source.cpp
Changed
36
1
2
decklink->SetChannelFormat(channelFormat);
3
decklink->hash = std::string(hash);
4
decklink->swap = obs_data_get_bool(settings, SWAP);
5
+ decklink->allow10Bit = obs_data_get_bool(settings, ALLOW_10_BIT);
6
decklink->Activate(device, id, videoConnection, audioConnection);
7
}
8
9
10
list = obs_properties_get(props, PIXEL_FORMAT);
11
obs_property_set_visible(list, id != MODE_ID_AUTO);
12
13
+ auto allow10BitProp = obs_properties_get(props, ALLOW_10_BIT);
14
+ obs_property_set_visible(allow10BitProp, id == MODE_ID_AUTO);
15
+
16
return true;
17
}
18
19
20
OBS_COMBO_FORMAT_INT);
21
22
obs_property_list_add_int(list, "8-bit YUV", bmdFormat8BitYUV);
23
+ obs_property_list_add_int(list, "10-bit YUV", bmdFormat10BitYUV);
24
obs_property_list_add_int(list, "8-bit BGRA", bmdFormat8BitBGRA);
25
26
list = obs_properties_add_list(props, COLOR_SPACE, TEXT_COLOR_SPACE,
27
28
29
obs_properties_add_bool(props, DEACTIVATE_WNS, TEXT_DWNS);
30
31
+ obs_properties_add_bool(props, ALLOW_10_BIT, TEXT_ALLOW_10_BIT);
32
+
33
UNUSED_PARAMETER(data);
34
return props;
35
}
36
obs-studio-26.1.0.tar.xz/plugins/image-source/image-source.c -> obs-studio-26.1.1.tar.xz/plugins/image-source/image-source.c
Changed
17
1
2
}
3
4
static const char *image_filter =
5
- "All formats (*.bmp *.tga *.png *.jpeg *.jpg *.gif *.psd);;"
6
+ "All formats (*.bmp *.tga *.png *.jpeg *.jpg *.gif *.psd *.webp);;"
7
"BMP Files (*.bmp);;"
8
"Targa Files (*.tga);;"
9
"PNG Files (*.png);;"
10
"JPEG Files (*.jpeg *.jpg);;"
11
"GIF Files (*.gif);;"
12
"PSD Files (*.psd);;"
13
+ "WebP Files (*.webp);;"
14
"All Files (*.*)";
15
16
static obs_properties_t *image_source_properties(void *data)
17
obs-studio-26.1.0.tar.xz/plugins/image-source/obs-slideshow.c -> obs-studio-26.1.1.tar.xz/plugins/image-source/obs-slideshow.c
Changed
22
1
2
if (!ss->transition || !ss->slide_time)
3
return;
4
5
- if (ss->restart_on_activate && !ss->randomize && ss->use_cut) {
6
+ if (ss->restart_on_activate && ss->use_cut) {
7
ss->elapsed = 0.0f;
8
- ss->cur_item = 0;
9
+ ss->cur_item = ss->randomize ? random_file(ss) : 0;
10
do_transition(ss, false);
11
ss->restart_on_activate = false;
12
ss->use_cut = false;
13
14
}
15
16
static const char *file_filter =
17
- "Image files (*.bmp *.tga *.png *.jpeg *.jpg *.gif)";
18
+ "Image files (*.bmp *.tga *.png *.jpeg *.jpg *.gif *.webp)";
19
20
static const char *aspects[] = {"16:9", "16:10", "4:3", "1:1"};
21
22
obs-studio-26.1.0.tar.xz/plugins/linux-jack/jack-wrapper.c -> obs-studio-26.1.1.tar.xz/plugins/linux-jack/jack-wrapper.c
Changed
70
1
2
int jack_process_callback(jack_nframes_t nframes, void *arg)
3
{
4
struct jack_data *data = (struct jack_data *)arg;
5
+ jack_nframes_t current_frames;
6
+ jack_time_t current_usecs, next_usecs;
7
+ float period_usecs;
8
+
9
+ uint64_t now = os_gettime_ns();
10
+
11
if (data == 0)
12
return 0;
13
14
- pthread_mutex_lock(&data->jack_mutex);
15
-
16
struct obs_source_audio out;
17
out.speakers = jack_channels_to_obs_speakers(data->channels);
18
out.samples_per_sec = jack_get_sample_rate(data->jack_client);
19
20
}
21
22
out.frames = nframes;
23
- out.timestamp = os_gettime_ns() -
24
- jack_frames_to_time(data->jack_client, nframes);
25
+ if (!jack_get_cycle_times(data->jack_client, ¤t_frames,
26
+ ¤t_usecs, &next_usecs, &period_usecs)) {
27
+ out.timestamp = now - (int64_t)(period_usecs * 1000);
28
+ } else {
29
+ out.timestamp = now - util_mul_div64(nframes, 1000000000ULL,
30
+ data->samples_per_sec);
31
+ blog(LOG_WARNING,
32
+ "jack_get_cycle_times error: guessing timestamp");
33
+ }
34
35
+ /* FIXME: this function is not realtime-safe, we should do something
36
+ * about this */
37
obs_source_output_audio(data->source, &out);
38
- pthread_mutex_unlock(&data->jack_mutex);
39
return 0;
40
}
41
42
43
44
data->jack_ports[i] = jack_port_register(
45
data->jack_client, port_name, JACK_DEFAULT_AUDIO_TYPE,
46
- JackPortIsInput, 0);
47
+ JackPortIsInput | JackPortIsTerminal, 0);
48
if (data->jack_ports[i] == NULL) {
49
blog(LOG_ERROR,
50
"jack_port_register Error:"
51
52
pthread_mutex_lock(&data->jack_mutex);
53
54
if (data->jack_client) {
55
+ jack_client_close(data->jack_client);
56
if (data->jack_ports != NULL) {
57
- for (int i = 0; i < data->channels; ++i) {
58
- if (data->jack_ports[i] != NULL)
59
- jack_port_unregister(
60
- data->jack_client,
61
- data->jack_ports[i]);
62
- }
63
bfree(data->jack_ports);
64
data->jack_ports = NULL;
65
}
66
- jack_client_close(data->jack_client);
67
data->jack_client = NULL;
68
}
69
pthread_mutex_unlock(&data->jack_mutex);
70
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/dal-plugin/CMSampleBufferUtils.mm -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/dal-plugin/CMSampleBufferUtils.mm
Changed
11
1
2
3
static void releaseNSData(void *o, void *block, size_t size)
4
{
5
+ UNUSED_PARAMETER(block);
6
+ UNUSED_PARAMETER(size);
7
+
8
NSData *data = (__bridge_transfer NSData *)o;
9
data = nil; // Assuming ARC is enabled
10
}
11
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/dal-plugin/Logging.h -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/dal-plugin/Logging.h
Changed
8
1
2
#define VLogFunc(fmt, ...)
3
#define ELog(fmt, ...) DLog(fmt, ##__VA_ARGS__)
4
5
+#define UNUSED_PARAMETER(param) (void)param
6
+
7
#endif /* Logging_h */
8
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALDevice.mm -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALDevice.mm
Changed
53
1
2
case kCMIODevicePropertyDeviceMaster:
3
return sizeof(pid_t);
4
default:
5
- DLog(@"Device unhandled getPropertyDataSizeWithAddress for %@",
6
- [OBSDALObjectStore
7
- StringFromPropertySelector:address.mSelector]);
8
+ break;
9
};
10
11
return 0;
12
13
*dataUsed = sizeof(pid_t);
14
break;
15
default:
16
- DLog(@"Device unhandled getPropertyDataWithAddress for %@",
17
- [OBSDALObjectStore
18
- StringFromPropertySelector:address.mSelector]);
19
- *dataUsed = 0;
20
break;
21
};
22
}
23
24
case kCMIODevicePropertyLinkedCoreAudioDeviceUID:
25
return false;
26
default:
27
- DLog(@"Device unhandled hasPropertyWithAddress for %@",
28
- [OBSDALObjectStore
29
- StringFromPropertySelector:address.mSelector]);
30
return false;
31
};
32
}
33
34
case kCMIODevicePropertyDeviceMaster:
35
return true;
36
default:
37
- DLog(@"Device unhandled isPropertySettableWithAddress for %@",
38
- [OBSDALObjectStore
39
- StringFromPropertySelector:address.mSelector]);
40
return false;
41
};
42
}
43
44
self.masterPid = *static_cast<const pid_t *>(data);
45
break;
46
default:
47
- DLog(@"Device unhandled setPropertyDataWithAddress for %@",
48
- [OBSDALObjectStore
49
- StringFromPropertySelector:address.mSelector]);
50
break;
51
};
52
}
53
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALPlugInInterface.mm -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALPlugInInterface.mm
Changed
136
1
2
3
ULONG HardwarePlugIn_AddRef(CMIOHardwarePlugInRef self)
4
{
5
+ UNUSED_PARAMETER(self);
6
+
7
sRefCount += 1;
8
DLogFunc(@"sRefCount now = %d", sRefCount);
9
return sRefCount;
10
11
12
ULONG HardwarePlugIn_Release(CMIOHardwarePlugInRef self)
13
{
14
+ UNUSED_PARAMETER(self);
15
+
16
sRefCount -= 1;
17
DLogFunc(@"sRefCount now = %d", sRefCount);
18
return sRefCount;
19
20
HRESULT HardwarePlugIn_QueryInterface(CMIOHardwarePlugInRef self, REFIID uuid,
21
LPVOID *interface)
22
{
23
+ UNUSED_PARAMETER(self);
24
DLogFunc(@"");
25
26
if (!interface) {
27
28
void HardwarePlugIn_ObjectShow(CMIOHardwarePlugInRef self,
29
CMIOObjectID objectID)
30
{
31
+ UNUSED_PARAMETER(objectID);
32
DLogFunc(@"self=%p", self);
33
}
34
35
36
CMIOObjectID objectID,
37
const CMIOObjectPropertyAddress *address)
38
{
39
+ UNUSED_PARAMETER(self);
40
41
NSObject<CMIOObject> *object =
42
[OBSDALObjectStore GetObjectWithId:objectID];
43
44
const CMIOObjectPropertyAddress *address, UInt32 qualifierDataSize,
45
const void *qualifierData, UInt32 *dataSize)
46
{
47
+ UNUSED_PARAMETER(self);
48
49
NSObject<CMIOObject> *object =
50
[OBSDALObjectStore GetObjectWithId:objectID];
51
52
const void *qualifierData, UInt32 dataSize, UInt32 *dataUsed,
53
void *data)
54
{
55
+ UNUSED_PARAMETER(self);
56
57
NSObject<CMIOObject> *object =
58
[OBSDALObjectStore GetObjectWithId:objectID];
59
60
OSStatus HardwarePlugIn_DeviceSuspend(CMIOHardwarePlugInRef self,
61
CMIODeviceID deviceID)
62
{
63
+ UNUSED_PARAMETER(deviceID);
64
+
65
DLogFunc(@"self=%p", self);
66
return kCMIOHardwareNoError;
67
}
68
69
OSStatus HardwarePlugIn_DeviceResume(CMIOHardwarePlugInRef self,
70
CMIODeviceID deviceID)
71
{
72
+ UNUSED_PARAMETER(deviceID);
73
+
74
DLogFunc(@"self=%p", self);
75
return kCMIOHardwareNoError;
76
}
77
78
CMIODeviceID deviceID,
79
CMIODeviceAVCCommand *ioAVCCommand)
80
{
81
+ UNUSED_PARAMETER(deviceID);
82
+ UNUSED_PARAMETER(ioAVCCommand);
83
+
84
DLogFunc(@"self=%p", self);
85
return kCMIOHardwareNoError;
86
}
87
88
CMIODeviceID deviceID,
89
CMIODeviceRS422Command *ioRS422Command)
90
{
91
+ UNUSED_PARAMETER(deviceID);
92
+ UNUSED_PARAMETER(ioRS422Command);
93
+
94
DLogFunc(@"self=%p", self);
95
return kCMIOHardwareNoError;
96
}
97
98
OSStatus HardwarePlugIn_StreamDeckPlay(CMIOHardwarePlugInRef self,
99
CMIOStreamID streamID)
100
{
101
+ UNUSED_PARAMETER(streamID);
102
+
103
DLogFunc(@"self=%p", self);
104
return kCMIOHardwareIllegalOperationError;
105
}
106
107
OSStatus HardwarePlugIn_StreamDeckStop(CMIOHardwarePlugInRef self,
108
CMIOStreamID streamID)
109
{
110
+ UNUSED_PARAMETER(streamID);
111
+
112
DLogFunc(@"self=%p", self);
113
return kCMIOHardwareIllegalOperationError;
114
}
115
116
OSStatus HardwarePlugIn_StreamDeckJog(CMIOHardwarePlugInRef self,
117
CMIOStreamID streamID, SInt32 speed)
118
{
119
+ UNUSED_PARAMETER(streamID);
120
+ UNUSED_PARAMETER(speed);
121
+
122
DLogFunc(@"self=%p", self);
123
return kCMIOHardwareIllegalOperationError;
124
}
125
126
Float64 requestedTimecode,
127
Boolean playOnCue)
128
{
129
+ UNUSED_PARAMETER(streamID);
130
+ UNUSED_PARAMETER(requestedTimecode);
131
+ UNUSED_PARAMETER(playOnCue);
132
+
133
DLogFunc(@"self=%p", self);
134
return kCMIOHardwareIllegalOperationError;
135
}
136
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALPluginMain.mm -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALPluginMain.mm
Changed
10
1
2
extern "C" {
3
void *PlugInMain(CFAllocatorRef allocator, CFUUIDRef requestedTypeUUID)
4
{
5
+ UNUSED_PARAMETER(allocator);
6
+
7
DLogFunc(@"version=%@", PLUGIN_VERSION);
8
if (!CFEqual(requestedTypeUUID, kCMIOHardwarePlugInTypeID)) {
9
return 0;
10
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/dal-plugin/OBSDALStream.mm
Changed
56
1
2
- (void)fillFrame
3
{
4
if (CMSimpleQueueGetFullness(self.queue) >= 1.0) {
5
- DLog(@"Queue is full, bailing out");
6
return;
7
}
8
9
10
case kCMIOStreamPropertyClock:
11
return sizeof(CFTypeRef);
12
default:
13
- DLog(@"Stream unhandled getPropertyDataSizeWithAddress for %@",
14
- [OBSDALObjectStore
15
- StringFromPropertySelector:address.mSelector]);
16
return 0;
17
};
18
}
19
20
*dataUsed = sizeof(CFTypeRef);
21
break;
22
default:
23
- DLog(@"Stream unhandled getPropertyDataWithAddress for %@",
24
- [OBSDALObjectStore
25
- StringFromPropertySelector:address.mSelector]);
26
*dataUsed = 0;
27
};
28
}
29
30
StringFromPropertySelector:address.mSelector]);
31
return false;
32
default:
33
- DLog(@"Stream unhandled hasPropertyWithAddress for %@",
34
- [OBSDALObjectStore
35
- StringFromPropertySelector:address.mSelector]);
36
return false;
37
};
38
}
39
40
- (BOOL)isPropertySettableWithAddress:(CMIOObjectPropertyAddress)address
41
{
42
- DLog(@"Stream unhandled isPropertySettableWithAddress for %@",
43
- [OBSDALObjectStore StringFromPropertySelector:address.mSelector]);
44
return false;
45
}
46
47
48
dataSize:(UInt32)dataSize
49
data:(nonnull const void *)data
50
{
51
- DLog(@"Stream unhandled setPropertyDataWithAddress for %@",
52
- [OBSDALObjectStore StringFromPropertySelector:address.mSelector]);
53
}
54
55
@end
56
obs-studio-26.1.0.tar.xz/plugins/mac-virtualcam/src/obs-plugin/plugin-main.mm -> obs-studio-26.1.1.tar.xz/plugins/mac-virtualcam/src/obs-plugin/plugin-main.mm
Changed
45
1
2
static void *virtualcam_output_create(obs_data_t *settings,
3
obs_output_t *output)
4
{
5
+ UNUSED_PARAMETER(settings);
6
+
7
outputRef = output;
8
9
blog(LOG_DEBUG, "output_create");
10
11
12
static void virtualcam_output_destroy(void *data)
13
{
14
+ UNUSED_PARAMETER(data);
15
blog(LOG_DEBUG, "output_destroy");
16
sMachServer = nil;
17
}
18
19
static bool virtualcam_output_start(void *data)
20
{
21
+ UNUSED_PARAMETER(data);
22
+
23
bool hasDalPlugin = check_dal_plugin();
24
25
if (!hasDalPlugin) {
26
27
28
static void virtualcam_output_stop(void *data, uint64_t ts)
29
{
30
+ UNUSED_PARAMETER(data);
31
+ UNUSED_PARAMETER(ts);
32
+
33
blog(LOG_DEBUG, "output_stop");
34
obs_output_end_data_capture(outputRef);
35
[sMachServer stop];
36
37
38
static void virtualcam_output_raw_video(void *data, struct video_data *frame)
39
{
40
+ UNUSED_PARAMETER(data);
41
+
42
uint8_t *outData = frame->data[0];
43
if (frame->linesize[0] != (videoInfo.output_width * 2)) {
44
blog(LOG_ERROR,
45
obs-studio-26.1.0.tar.xz/plugins/obs-browser/obs-browser-plugin.cpp -> obs-studio-26.1.1.tar.xz/plugins/obs-browser/obs-browser-plugin.cpp
Changed
14
1
2
}
3
obs_data_release(private_data);
4
#endif
5
+
6
+#if defined(__APPLE__) && CHROME_VERSION_BUILD < 4183
7
+ // Make sure CEF malloc hijacking happens early in the process
8
+ obs_browser_initialize();
9
+#endif
10
+
11
return true;
12
}
13
14
obs-studio-26.1.0.tar.xz/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c -> obs-studio-26.1.1.tar.xz/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c
Changed
10
1
2
}
3
4
/* Treat "Invalid data found when processing input" and "Invalid argument" as non-fatal */
5
- if (ret == AVERROR_INVALIDDATA || ret == EINVAL) {
6
+ if (ret == AVERROR_INVALIDDATA || ret == -EINVAL) {
7
return true;
8
}
9
10
obs-studio-26.1.0.tar.xz/plugins/rtmp-services/data/package.json -> obs-studio-26.1.1.tar.xz/plugins/rtmp-services/data/package.json
Changed
14
1
2
{
3
"url": "https://obsproject.com/obs2_update/rtmp-services",
4
- "version": 161,
5
+ "version": 163,
6
"files": [
7
{
8
"name": "services.json",
9
- "version": 161
10
+ "version": 163
11
}
12
]
13
}
14
obs-studio-26.1.0.tar.xz/plugins/rtmp-services/data/services.json -> obs-studio-26.1.1.tar.xz/plugins/rtmp-services/data/services.json
Changed
136
1
2
}
3
},
4
{
5
- "name": "VIMM",
6
+ "name": "Loola.tv",
7
+ "common": false,
8
"servers": [
9
{
10
- "name": "Europe: Frankfurt",
11
- "url": "rtmp://eu.vimm.tv/live"
12
+ "name": "US East: Virginia",
13
+ "url": "rtmp://rtmp.loola.tv/push"
14
},
15
{
16
- "name": "North America: Montreal",
17
- "url": "rtmp://us.vimm.tv/live"
18
+ "name": "EU Central: Germany",
19
+ "url": "rtmp://rtmp-eu.loola.tv/push"
20
+ },
21
+ {
22
+ "name": "South America: Brazil",
23
+ "url": "rtmp://rtmp-sa.loola.tv/push"
24
+ },
25
+ {
26
+ "name": "Asia/Pacific: Singapore",
27
+ "url": "rtmp://rtmp-sg.loola.tv/push"
28
+ },
29
+ {
30
+ "name": "Middle East: Bahrain",
31
+ "url": "rtmp://rtmp-me.loola.tv/push"
32
}
33
],
34
"recommended": {
35
"keyint": 2,
36
- "max video bitrate": 8000,
37
- "max audio bitrate": 320,
38
+ "profile": "high",
39
+ "max video bitrate": 2500,
40
+ "max audio bitrate": 160,
41
+ "bframes": 2,
42
"x264opts": "scenecut=0"
43
}
44
},
45
{
46
- "name": "Smashcast",
47
+ "name": "VIMM",
48
"servers": [
49
{
50
- "name": "Default",
51
- "url": "rtmp://live.hitbox.tv/push"
52
- },
53
- {
54
- "name": "EU-North: Amsterdam, Netherlands",
55
- "url": "rtmp://live.ams.hitbox.tv/push"
56
- },
57
- {
58
- "name": "EU-West: Paris, France",
59
- "url": "rtmp://live.cdg.hitbox.tv/push"
60
- },
61
- {
62
- "name": "EU-South: Milan, Italia",
63
- "url": "rtmp://live.mxp.hitbox.tv/push"
64
- },
65
- {
66
- "name": "Russia: Moscow",
67
- "url": "rtmp://live.dme.hitbox.tv/push"
68
- },
69
- {
70
- "name": "US-East: New York",
71
- "url": "rtmp://live.jfk.hitbox.tv/push"
72
- },
73
- {
74
- "name": "US-West: San Francisco",
75
- "url": "rtmp://live.sfo.hitbox.tv/push"
76
- },
77
- {
78
- "name": "US-West: Los Angeles",
79
- "url": "rtmp://live.lax.hitbox.tv/push"
80
- },
81
- {
82
- "name": "South America: Sao Paulo, Brazil",
83
- "url": "rtmp://live.gru.hitbox.tv/push"
84
- },
85
- {
86
- "name": "Asia: Singapore",
87
- "url": "rtmp://live.sin.hitbox.tv/push"
88
+ "name": "Europe: Frankfurt",
89
+ "url": "rtmp://eu.vimm.tv/live"
90
},
91
{
92
- "name": "Oceania: Sydney, Australia",
93
- "url": "rtmp://live.syd.hitbox.tv/push"
94
+ "name": "North America: Montreal",
95
+ "url": "rtmp://us.vimm.tv/live"
96
}
97
],
98
"recommended": {
99
"keyint": 2,
100
- "profile": "high",
101
- "max video bitrate": 3500,
102
- "max audio bitrate": 320
103
+ "max video bitrate": 8000,
104
+ "max audio bitrate": 320,
105
+ "x264opts": "scenecut=0"
106
}
107
},
108
{
109
110
{
111
"name": "US: New York, NY",
112
"url": "rtmp://live-nyc.vaughnsoft.net/live"
113
- },
114
+ },
115
{
116
"name": "US: Miami, FL",
117
"url": "rtmp://live-mia.vaughnsoft.net/live"
118
119
{
120
"name": "US: New York, NY",
121
"url": "rtmp://live-nyc.vaughnsoft.net/live"
122
- },
123
+ },
124
{
125
"name": "US: Miami, FL",
126
"url": "rtmp://live-mia.vaughnsoft.net/live"
127
128
"max audio bitrate": 160,
129
"x264opts": "tune=zerolatency"
130
}
131
- },
132
+ },
133
{
134
"name": "Mux",
135
"servers": [
136
obs-studio-26.1.0.tar.xz/plugins/win-dshow/libdshowcapture/dshowcapture.hpp -> obs-studio-26.1.1.tar.xz/plugins/win-dshow/libdshowcapture/dshowcapture.hpp
Changed
10
1
2
3
#define DSHOWCAPTURE_VERSION_MAJOR 0
4
#define DSHOWCAPTURE_VERSION_MINOR 8
5
-#define DSHOWCAPTURE_VERSION_PATCH 5
6
+#define DSHOWCAPTURE_VERSION_PATCH 6
7
8
#define MAKE_DSHOWCAPTURE_VERSION(major, minor, patch) \
9
((major << 24) | (minor << 16) | (patch))
10
obs-studio-26.1.0.tar.xz/plugins/win-dshow/libdshowcapture/source/dshow-base.cpp -> obs-studio-26.1.1.tar.xz/plugins/win-dshow/libdshowcapture/source/dshow-base.cpp
Changed
198
1
2
return hr;
3
}
4
5
+static HRESULT GetFriendlyName(REFCLSID deviceClass, const wchar_t *devPath,
6
+ wchar_t *name, int nameSize)
7
+{
8
+ /* Sanity checks */
9
+ if (!devPath)
10
+ return E_POINTER;
11
+ if (!name)
12
+ return E_POINTER;
13
+
14
+ /* Create device enumerator */
15
+ ComPtr<ICreateDevEnum> createDevEnum;
16
+ HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
17
+ CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
18
+ (void **)&createDevEnum);
19
+
20
+ /* Enumerate filters */
21
+ ComPtr<IEnumMoniker> enumMoniker;
22
+ if (SUCCEEDED(hr)) {
23
+ /* returns S_FALSE if no devices are installed */
24
+ hr = createDevEnum->CreateClassEnumerator(deviceClass,
25
+ &enumMoniker, 0);
26
+ if (!enumMoniker)
27
+ hr = E_FAIL;
28
+ }
29
+
30
+ /* Cycle through the enumeration */
31
+ if (SUCCEEDED(hr)) {
32
+ ULONG fetched = 0;
33
+ ComPtr<IMoniker> moniker;
34
+
35
+ enumMoniker->Reset();
36
+
37
+ while (enumMoniker->Next(1, &moniker, &fetched) == S_OK) {
38
+
39
+ /* Get device path from moniker */
40
+ wchar_t monikerDevPath[512];
41
+ hr = ReadProperty(moniker, L"DevicePath",
42
+ monikerDevPath,
43
+ _ARRAYSIZE(monikerDevPath));
44
+
45
+ /* Find desired filter */
46
+ if (wcscmp(devPath, monikerDevPath) == 0) {
47
+
48
+ /* Get friendly name */
49
+ hr = ReadProperty(moniker, L"FriendlyName",
50
+ name, nameSize);
51
+ return hr;
52
+ }
53
+ }
54
+ }
55
+
56
+ return E_FAIL;
57
+}
58
+
59
+static bool MatchFriendlyNames(const wchar_t *vidName, const wchar_t *audName)
60
+{
61
+ /* Sanity checks */
62
+ if (!vidName)
63
+ return false;
64
+ if (!audName)
65
+ return false;
66
+
67
+ /* Convert strings to lower case */
68
+ wstring strVidName = vidName;
69
+ for (wchar_t &c : strVidName)
70
+ c = (wchar_t)tolower(c);
71
+ wstring strAudName = audName;
72
+ for (wchar_t &c : strAudName)
73
+ c = (wchar_t)tolower(c);
74
+
75
+ /* Remove 'video' from friendly name */
76
+ size_t posVid;
77
+ wstring searchVid[] = {L"(video) ", L"(video)", L"video ", L"video"};
78
+ for (int i = 0; i < _ARRAYSIZE(searchVid); i++) {
79
+ wstring &search = searchVid[i];
80
+ while ((posVid = strVidName.find(search)) !=
81
+ std::string::npos) {
82
+ strVidName.replace(posVid, search.length(), L"");
83
+ }
84
+ }
85
+
86
+ /* Remove 'audio' from friendly name */
87
+ size_t posAud;
88
+ wstring searchAud[] = {L"(audio) ", L"(audio)", L"audio ", L"audio"};
89
+ for (int i = 0; i < _ARRAYSIZE(searchAud); i++) {
90
+ wstring &search = searchAud[i];
91
+ while ((posAud = strAudName.find(search)) !=
92
+ std::string::npos) {
93
+ strAudName.replace(posAud, search.length(), L"");
94
+ }
95
+ }
96
+
97
+ return strVidName == strAudName;
98
+}
99
+
100
static bool GetDeviceAudioFilterInternal(REFCLSID deviceClass,
101
const wchar_t *vidDevPath,
102
- IBaseFilter **audioCaptureFilter)
103
+ IBaseFilter **audioCaptureFilter,
104
+ bool matchFilterName = false)
105
{
106
/* Get video device instance path */
107
wchar_t vidDevInstPath[512];
108
109
return false;
110
#endif
111
112
+ /* Get friendly name */
113
+ wchar_t vidName[512];
114
+ if (matchFilterName) {
115
+ hr = GetFriendlyName(CLSID_VideoInputDeviceCategory, vidDevPath,
116
+ vidName, _ARRAYSIZE(vidName));
117
+ if (FAILED(hr))
118
+ return false;
119
+ }
120
+
121
/* Create device enumerator */
122
ComPtr<ICreateDevEnum> createDevEnum;
123
if (SUCCEEDED(hr))
124
125
126
while (enumMoniker->Next(1, &moniker, &fetched) == S_OK) {
127
bool samePath = false;
128
-#if 0
129
- /* Get friendly name (helpful for debugging) */
130
- wchar_t friendlyName[512];
131
- ReadProperty(moniker, L"FriendlyName", friendlyName,
132
- _ARRAYSIZE(friendlyName));
133
-#endif
134
135
/* Get device path */
136
wchar_t audDevPath[512];
137
138
139
/* Get audio capture filter */
140
if (samePath) {
141
- hr = moniker->BindToObject(
142
- 0, 0, IID_IBaseFilter,
143
- (void **)audioCaptureFilter);
144
- if (SUCCEEDED(hr))
145
- return true;
146
+ /* Match video and audio filter names */
147
+ bool isSameFilterName = false;
148
+ if (matchFilterName) {
149
+ wchar_t audName[512];
150
+ hr = ReadProperty(moniker,
151
+ L"FriendlyName",
152
+ audName,
153
+ _ARRAYSIZE(audName));
154
+ if (SUCCEEDED(hr)) {
155
+ isSameFilterName =
156
+ MatchFriendlyNames(
157
+ vidName,
158
+ audName);
159
+ }
160
+ }
161
+
162
+ if (!matchFilterName || isSameFilterName) {
163
+ hr = moniker->BindToObject(
164
+ 0, 0, IID_IBaseFilter,
165
+ (void **)audioCaptureFilter);
166
+ if (SUCCEEDED(hr))
167
+ return true;
168
+ }
169
}
170
}
171
}
172
173
bool GetDeviceAudioFilter(const wchar_t *vidDevPath,
174
IBaseFilter **audioCaptureFilter)
175
{
176
- /* Search in "Audio capture sources" */
177
+ /* Search in "Audio capture sources" and match filter name */
178
bool success = GetDeviceAudioFilterInternal(
179
- CLSID_AudioInputDeviceCategory, vidDevPath, audioCaptureFilter);
180
+ CLSID_AudioInputDeviceCategory, vidDevPath, audioCaptureFilter,
181
+ true);
182
+
183
+ /* Search in "WDM Streaming Capture Devices" and match filter name */
184
+ if (!success)
185
+ success = GetDeviceAudioFilterInternal(KSCATEGORY_CAPTURE,
186
+ vidDevPath,
187
+ audioCaptureFilter,
188
+ true);
189
+
190
+ /* Search in "Audio capture sources" */
191
+ if (!success)
192
+ success = GetDeviceAudioFilterInternal(
193
+ CLSID_AudioInputDeviceCategory, vidDevPath,
194
+ audioCaptureFilter);
195
196
/* Search in "WDM Streaming Capture Devices" */
197
if (!success)
198
obs-studio-26.1.0.tar.xz/plugins/win-dshow/libdshowcapture/source/output-filter.cpp -> obs-studio-26.1.1.tar.xz/plugins/win-dshow/libdshowcapture/source/output-filter.cpp
Changed
15
1
2
* USA
3
*/
4
5
-#include <strsafe.h>
6
#include "output-filter.hpp"
7
#include "dshow-formats.hpp"
8
#include "log.hpp"
9
10
+#include <strsafe.h>
11
+
12
namespace DShow {
13
14
#if 0
15