mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
223 Commits
v2.5.37
...
misc_auto_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b0a83c1ab | ||
|
|
9864cd97de | ||
|
|
6d7deb57a0 | ||
|
|
21876ff590 | ||
|
|
c543c05968 | ||
|
|
a5537da4df | ||
|
|
edaddeecc4 | ||
|
|
6b30a199da | ||
|
|
23c637e3e5 | ||
|
|
313b0fe3b5 | ||
|
|
90818c3627 | ||
|
|
89877aba58 | ||
|
|
80cb381b35 | ||
|
|
73a4d258a9 | ||
|
|
26fcbc712e | ||
|
|
7e4bc6ba22 | ||
|
|
a975a472b8 | ||
|
|
29a1304218 | ||
|
|
af5279cf56 | ||
|
|
4a59a80f1d | ||
|
|
501088b859 | ||
|
|
aa0bd38134 | ||
|
|
35d3bf2f2d | ||
|
|
09d0ff2577 | ||
|
|
567b0173ec | ||
|
|
20411aa8d6 | ||
|
|
be94aa97db | ||
|
|
f65c1dd5bc | ||
|
|
a92297ceec | ||
|
|
a8ea4e55ef | ||
|
|
3195befab1 | ||
|
|
2cdc65c06b | ||
|
|
0529715640 | ||
|
|
2534cb2c9d | ||
|
|
49f4c36b0e | ||
|
|
4b08672f99 | ||
|
|
73f7cb1fa7 | ||
|
|
8f64d118c8 | ||
|
|
e31625d2bd | ||
|
|
7907ead7fc | ||
|
|
276193d876 | ||
|
|
9c61053fe0 | ||
|
|
8779bf44d8 | ||
|
|
5ea4c55a6a | ||
|
|
4662d0e5dc | ||
|
|
cc5f594384 | ||
|
|
d9ff9d7aa1 | ||
|
|
08b9037781 | ||
|
|
59125c9b12 | ||
|
|
e5ba376985 | ||
|
|
165595008e | ||
|
|
8dc905e827 | ||
|
|
7cc8e5887f | ||
|
|
3599438e57 | ||
|
|
88515d58ab | ||
|
|
338e1a71a9 | ||
|
|
d9fc763f82 | ||
|
|
7eeb6c7aca | ||
|
|
a045c917e7 | ||
|
|
a052a43b84 | ||
|
|
94d87a35be | ||
|
|
0c8c798051 | ||
|
|
c9ddab444a | ||
|
|
1222270e44 | ||
|
|
86b5de8785 | ||
|
|
e97f03ed8b | ||
|
|
0a76c5a64d | ||
|
|
01a1b017e8 | ||
|
|
ddefb8a393 | ||
|
|
62a5cd98da | ||
|
|
8ad9d7d047 | ||
|
|
10ed797881 | ||
|
|
23918e25c2 | ||
|
|
de022ab68d | ||
|
|
5561884126 | ||
|
|
406d7468dd | ||
|
|
41124994fa | ||
|
|
c4e048eedf | ||
|
|
eff9b4167c | ||
|
|
47931a0689 | ||
|
|
34ca40fa2a | ||
|
|
821f732ff9 | ||
|
|
54c8ef7ee6 | ||
|
|
dc9e531cb1 | ||
|
|
2bd151e6f2 | ||
|
|
ae084643c4 | ||
|
|
bd1b91b862 | ||
|
|
f221c85e17 | ||
|
|
e2fe93e403 | ||
|
|
f98e23f061 | ||
|
|
18f6518d41 | ||
|
|
74598b3055 | ||
|
|
6159cd4114 | ||
|
|
3c70d7f575 | ||
|
|
bd70f1ca4a | ||
|
|
0e67507d3a | ||
|
|
beab573758 | ||
|
|
e46890fd76 | ||
|
|
3888638f8c | ||
|
|
44778c374f | ||
|
|
207d4df5e7 | ||
|
|
d454a7dafc | ||
|
|
53b4ddc4cb | ||
|
|
23c8780bff | ||
|
|
958ab4048c | ||
|
|
657d20d36e | ||
|
|
fde045241f | ||
|
|
b3be566426 | ||
|
|
1eebb550a8 | ||
|
|
fbe5f88417 | ||
|
|
d9609b9f51 | ||
|
|
815d7b2967 | ||
|
|
98ce7c81c8 | ||
|
|
e4d8f3d901 | ||
|
|
ca5dfdd25c | ||
|
|
11634c6567 | ||
|
|
f6a313f1a5 | ||
|
|
1a46898cde | ||
|
|
63ee30cbb3 | ||
|
|
20241f301b | ||
|
|
61c653c49c | ||
|
|
a7f4f992e1 | ||
|
|
daa9953d40 | ||
|
|
4771198c30 | ||
|
|
d8f3717119 | ||
|
|
33ab6fd09b | ||
|
|
1391e1339e | ||
|
|
2f2614737a | ||
|
|
85a62427f9 | ||
|
|
8fd91cb7df | ||
|
|
c5820a4f54 | ||
|
|
572eae596c | ||
|
|
6f3c189129 | ||
|
|
7a0017bd40 | ||
|
|
74f840f66b | ||
|
|
4a7c194157 | ||
|
|
116eb6dc5b | ||
|
|
0bab3c74ea | ||
|
|
6328de43e3 | ||
|
|
5becdc9ab5 | ||
|
|
26b6394b67 | ||
|
|
1b6086ab62 | ||
|
|
87a4536a2e | ||
|
|
d20b897ac8 | ||
|
|
6f26b064b9 | ||
|
|
3a2c78d17c | ||
|
|
19d375b4bd | ||
|
|
8162461618 | ||
|
|
0cadc3189c | ||
|
|
e971a9ebf5 | ||
|
|
19f85713ce | ||
|
|
4c41de6013 | ||
|
|
96f9cde1bc | ||
|
|
3feef0824c | ||
|
|
5f2ab55c93 | ||
|
|
0f75bfe17d | ||
|
|
7faa132622 | ||
|
|
b69e6da105 | ||
|
|
11edb128e9 | ||
|
|
fc4407aaef | ||
|
|
2a418e3282 | ||
|
|
59415542ff | ||
|
|
00416e26bb | ||
|
|
e936398e17 | ||
|
|
e3b45c3efd | ||
|
|
7ad759007a | ||
|
|
2fab554360 | ||
|
|
e98b6e6cb3 | ||
|
|
aa5147a52b | ||
|
|
83ebbe95c5 | ||
|
|
2ad71d046b | ||
|
|
099e1f900d | ||
|
|
0c6537e917 | ||
|
|
8937fb3d11 | ||
|
|
028085f8f9 | ||
|
|
b33932f47b | ||
|
|
d122939183 | ||
|
|
b09eb4e42d | ||
|
|
e75ddb878a | ||
|
|
6e3dca5a1a | ||
|
|
b069f51e6f | ||
|
|
bb1e6d06e4 | ||
|
|
f747abcc3b | ||
|
|
77738f72b4 | ||
|
|
61f11d12ff | ||
|
|
7e00b2c9a9 | ||
|
|
7dd4ab947b | ||
|
|
be213695a0 | ||
|
|
cde548a2f9 | ||
|
|
e76481f454 | ||
|
|
1a8d1d443e | ||
|
|
a14c8eb7d5 | ||
|
|
97ea52a6c1 | ||
|
|
0617182dfc | ||
|
|
bd99d76416 | ||
|
|
fdbe9305a9 | ||
|
|
fd772e42da | ||
|
|
df56797b38 | ||
|
|
28e72110bb | ||
|
|
e451c5f70c | ||
|
|
20b8fef950 | ||
|
|
47449a424d | ||
|
|
e8ab761be4 | ||
|
|
6463fc541b | ||
|
|
08b3194b96 | ||
|
|
62fa768e60 | ||
|
|
cafe7a9dc2 | ||
|
|
7ffc671c3a | ||
|
|
eaeea83547 | ||
|
|
76b758dbd2 | ||
|
|
ab19b109ce | ||
|
|
73c3216ca6 | ||
|
|
ee56c5b13c | ||
|
|
46768c8624 | ||
|
|
24340caa35 | ||
|
|
6dc92b00a6 | ||
|
|
43a81a3cb1 | ||
|
|
0df388cd96 | ||
|
|
c342f9cac5 | ||
|
|
21042934e3 | ||
|
|
888e024d0c | ||
|
|
fe9794ba53 | ||
|
|
e546acec1e |
@@ -86,5 +86,5 @@ SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: ForContinuationAndIndentation
|
||||
UseTab: AlignWithSpaces
|
||||
...
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
name: "Update Base Translation"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Update Base Translation
|
||||
run: ./.github/workflows/scripts/common/update_base_translation.sh
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Get Latest DB and Prepare DB File
|
||||
run: |
|
||||
|
||||
2
.github/workflows/lint_gamedb.yml
vendored
2
.github/workflows/lint_gamedb.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Packages
|
||||
run: |
|
||||
|
||||
2
.github/workflows/linux_build_flatpak.yml
vendored
2
.github/workflows/linux_build_flatpak.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
set-safe-directory: ${{ env.GITHUB_WORKSPACE }}
|
||||
# 10 here, since the odds of having 10 untagged commits in a row should be slim to none
|
||||
|
||||
2
.github/workflows/linux_build_qt.yml
vendored
2
.github/workflows/linux_build_qt.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
8
.github/workflows/macos_build.yml
vendored
8
.github/workflows/macos_build.yml
vendored
@@ -12,7 +12,7 @@ on:
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
default: macos-14
|
||||
default: macos-15
|
||||
patchesUrl:
|
||||
required: false
|
||||
type: string
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch Tags
|
||||
@@ -62,8 +62,8 @@ jobs:
|
||||
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
cat ./pcsx2-qt/DefaultUpdaterChannel.h
|
||||
|
||||
- name: Use Xcode 15.2
|
||||
run: sudo xcode-select -s /Applications/Xcode_15.2.app
|
||||
- name: Use Xcode 16.4
|
||||
run: sudo xcode-select -s /Applications/Xcode_16.4.app
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
|
||||
6
.github/workflows/release_cut_new.yml
vendored
6
.github/workflows/release_cut_new.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
outputs:
|
||||
new_tag: ${{ steps.tag_version.outputs.new_tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
# Docs - https://github.com/mathieudutour/github-tag-action
|
||||
- name: Bump Version and Push Tag
|
||||
@@ -163,12 +163,12 @@ jobs:
|
||||
name: "Upload Artifacts"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Prepare Artifact Folder
|
||||
run: mkdir ./ci-artifacts/
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
name: Download all Artifacts
|
||||
with:
|
||||
path: ./ci-artifacts/
|
||||
|
||||
@@ -9,6 +9,5 @@ set -e
|
||||
"$SCRIPTDIR/../../../../tools/retry.sh" sudo apt-get -y install qt6-l10n-tools python3
|
||||
|
||||
"$SCRIPTDIR/../../../../tools/generate_fullscreen_ui_translation_strings.py"
|
||||
"$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_glyph_ranges.py"
|
||||
"$SCRIPTDIR/../../../../tools/generate_update_fa_glyph_ranges.py"
|
||||
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_base_translation.sh"
|
||||
|
||||
32
.github/workflows/scripts/linux/appimage-qt.sh
vendored
32
.github/workflows/scripts/linux/appimage-qt.sh
vendored
@@ -41,8 +41,13 @@ BINARY=pcsx2-qt
|
||||
APPDIRNAME=PCSX2.AppDir
|
||||
STRIP=strip
|
||||
|
||||
# Need both libharfbuzz.so and libharfbuzz.so.0 for bundled libs
|
||||
|
||||
declare -a MANUAL_LIBS=(
|
||||
"libshaderc_shared.so.1"
|
||||
"libharfbuzz.so.0"
|
||||
"libharfbuzz.so"
|
||||
"libfreetype.so.6"
|
||||
)
|
||||
|
||||
declare -a REMOVE_LIBS=(
|
||||
@@ -68,29 +73,36 @@ if [ ! -f "$LINUXDEPLOY_PLUGIN_QT" ]; then
|
||||
fi
|
||||
|
||||
if [ ! -f "$APPIMAGETOOL" ]; then
|
||||
"$PCSX2DIR/tools/retry.sh" wget -O "$APPIMAGETOOL" https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
"$PCSX2DIR/tools/retry.sh" wget -O "$APPIMAGETOOL" https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x "$APPIMAGETOOL"
|
||||
fi
|
||||
|
||||
OUTDIR=$(realpath "./$APPDIRNAME")
|
||||
rm -fr "$OUTDIR"
|
||||
|
||||
# Our deps build dosn't create libharfbuzz.so.0, so we have to symlink it here
|
||||
hbpath=$(find "$DEPSDIR" -name "libharfbuzz.so")
|
||||
if [ ! -f "$hbpath" ]; then
|
||||
echo "Missing harfbuzz. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$hbpath.0" ]; then
|
||||
echo "Symlinking libharfbuzz.so.0"
|
||||
ln -s "$hbpath" "$hbpath.0"
|
||||
fi
|
||||
|
||||
echo "Locating extra libraries..."
|
||||
EXTRA_LIBS_ARGS=""
|
||||
EXTRA_LIBS_ARGS=()
|
||||
for lib in "${MANUAL_LIBS[@]}"; do
|
||||
srcpath=$(find "$DEPSDIR" -name "$lib")
|
||||
if [ ! -f "$srcpath" ]; then
|
||||
echo "Missinge extra library $lib. Exiting."
|
||||
echo "Missing extra library $lib. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Found $lib at $srcpath."
|
||||
|
||||
if [ "$EXTRA_LIBS_ARGS" == "" ]; then
|
||||
EXTRA_LIBS_ARGS="--library=$srcpath"
|
||||
else
|
||||
EXTRA_LIBS_ARGS="$EXTRA_LIBS_ARGS,$srcpath"
|
||||
fi
|
||||
EXTRA_LIBS_ARGS+=( "--library=$srcpath" )
|
||||
done
|
||||
|
||||
# Why the nastyness? linuxdeploy strips our main binary, and there's no option to turn it off.
|
||||
@@ -122,7 +134,7 @@ EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
|
||||
DEPLOY_PLATFORM_THEMES="1" \
|
||||
QMAKE="$DEPSDIR/bin/qmake" \
|
||||
NO_STRIP="1" \
|
||||
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" $EXTRA_LIBS_ARGS \
|
||||
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" ${EXTRA_LIBS_ARGS[@]} \
|
||||
--desktop-file="net.pcsx2.PCSX2.desktop" --icon-file="PCSX2.png"
|
||||
|
||||
echo "Copying resources into AppDir..."
|
||||
|
||||
@@ -14,16 +14,18 @@ if [ "${INSTALLDIR:0:1}" != "/" ]; then
|
||||
INSTALLDIR="$PWD/$INSTALLDIR"
|
||||
fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=11.2.0
|
||||
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
|
||||
LIBJPEGTURBO=3.1.0
|
||||
LIBPNG=1.6.48
|
||||
LIBWEBP=1.5.0
|
||||
SDL=SDL3-3.2.16
|
||||
QT=6.9.1
|
||||
LIBJPEGTURBO=3.1.1
|
||||
LIBPNG=1.6.50
|
||||
LIBWEBP=1.6.0
|
||||
SDL=SDL3-3.2.20
|
||||
QT=6.9.2
|
||||
LZ4=1.10.0
|
||||
ZSTD=1.5.7
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
PLUTOVG=1.1.0
|
||||
PLUTOVG=1.3.0
|
||||
PLUTOSVG=0.0.7
|
||||
|
||||
SHADERC=2025.3
|
||||
@@ -35,29 +37,33 @@ mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
|
||||
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
||||
9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
6340e58879b2d15830c8460d2f589a385c444d1faa2a4828a9626c7322562be8 $SDL.tar.gz
|
||||
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
40caedbf83cc9a1959610830563565889878bc95f115868bbf545d1914acf28e qtbase-everywhere-src-$QT.tar.xz
|
||||
ebe9f238daaf9bb752c7233edadf4af33fc4fa30d914936812b6410d3af1577c qtimageformats-everywhere-src-$QT.tar.xz
|
||||
2dfc5de5fd891ff2afd9861e519bf1a26e6deb729b3133f68a28ba763c9abbd5 qtsvg-everywhere-src-$QT.tar.xz
|
||||
90c4a562f4ccfd043fd99f34c600853e0b5ba9babc6ec616c0f306f2ce3f4b4c qttools-everywhere-src-$QT.tar.xz
|
||||
9761a1a555f447cdeba79fdec6a705dee8a7882ac10c12e85f49467ddd01a741 qttranslations-everywhere-src-$QT.tar.xz
|
||||
7d21ea0e687180ebb19b9a1f86ae9cfa7a25b4f02d5db05ec834164409932e3e qtwayland-everywhere-src-$QT.tar.xz
|
||||
44be9c9ecfe04129c4dea0a7e1b36ad476c9cc07c292016ac98e7b41514f2440 qtbase-everywhere-src-$QT.tar.xz
|
||||
8a023f7e2f57dedc02e2ab10c975f7cb3cccac9b8f0823c12fd6824834549139 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
d984cab8f26334aa1c15e5b8f0cd9f1b7c0c1289fe0b68c1c84ab469b75605a5 qtsvg-everywhere-src-$QT.tar.xz
|
||||
d8b7f7e8e970cc0b975205fd6d5832ea917ef3e751df69b97439c1cddd67a489 qttools-everywhere-src-$QT.tar.xz
|
||||
c73bb6281ed365c0f954f4b1b6e1b13e1b3fefd94854f46fcd9a412f641f7ed6 qttranslations-everywhere-src-$QT.tar.xz
|
||||
cad79806565568f12f9983fed69219416abcee9d5deef4abdfcf94aa2eef7781 qtwayland-everywhere-src-$QT.tar.xz
|
||||
a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937 shaderc-$SHADERC.tar.gz
|
||||
9427deccbdf4bde6a269938df38c6bd75247493786a310d8d733a2c82065ef47 shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
8aa9860519c407890668c29998e8bb88896ef6a2e6d7ce5ac1e57f18d79e1525 plutovg-$PLUTOVG.tar.gz
|
||||
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
|
||||
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
-o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download" \
|
||||
-o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz" \
|
||||
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
|
||||
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
|
||||
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
|
||||
@@ -137,6 +143,33 @@ cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building FreeType without HarfBuzz..."
|
||||
rm -fr "freetype-$FREETYPE"
|
||||
tar xf "freetype-$FREETYPE.tar.xz"
|
||||
cd "freetype-$FREETYPE"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building HarfBuzz..."
|
||||
rm -fr "harfbuzz-$HARFBUZZ"
|
||||
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
|
||||
cd "harfbuzz-$HARFBUZZ"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -DHB_HAVE_FREETYPE=ON -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building FreeType with HarfBuzz..."
|
||||
rm -fr "freetype-$FREETYPE"
|
||||
tar xf "freetype-$FREETYPE.tar.xz"
|
||||
cd "freetype-$FREETYPE"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
echo "Building SDL..."
|
||||
rm -fr "$SDL"
|
||||
tar xf "$SDL.tar.gz"
|
||||
@@ -240,7 +273,7 @@ echo "Building PlutoSVG..."
|
||||
rm -fr "plutosvg-$PLUTOSVG"
|
||||
tar xf "plutosvg-$PLUTOSVG.tar.gz"
|
||||
cd "plutosvg-$PLUTOSVG"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=OFF -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.16.tar.gz",
|
||||
"sha256": "6340e58879b2d15830c8460d2f589a385c444d1faa2a4828a9626c7322562be8"
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.20.tar.gz",
|
||||
"sha256": "467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/sammycage/plutovg.git",
|
||||
"tag": "v1.1.0",
|
||||
"commit": "1a8412d0574c4345dd7ef8a91ce7b58c7dcfe253"
|
||||
"tag": "v1.3.0",
|
||||
"commit": "1596f459d6796b37f3f6d610ce598de2403350b5"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"app-id": "net.pcsx2.PCSX2",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "6.8",
|
||||
"runtime-version": "6.9",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"sdk-extensions": [
|
||||
"org.freedesktop.Sdk.Extension.llvm18"
|
||||
|
||||
@@ -40,17 +40,17 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=11.2.0
|
||||
SDL=SDL3-3.2.16
|
||||
SDL=SDL3-3.2.20
|
||||
ZSTD=1.5.7
|
||||
LZ4=1.10.0
|
||||
LIBPNG=1.6.48
|
||||
LIBJPEGTURBO=3.1.0
|
||||
LIBWEBP=1.5.0
|
||||
LIBPNG=1.6.50
|
||||
LIBJPEGTURBO=3.1.1
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.3
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
PLUTOVG=1.1.0
|
||||
PLUTOVG=1.3.0
|
||||
PLUTOSVG=0.0.7
|
||||
|
||||
SHADERC=2025.3
|
||||
@@ -79,12 +79,12 @@ CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
|
||||
6340e58879b2d15830c8460d2f589a385c444d1faa2a4828a9626c7322562be8 $SDL.tar.gz
|
||||
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 qtbase-everywhere-src-$QT.tar.xz
|
||||
@@ -97,7 +97,7 @@ a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937 shaderc-$SHADE
|
||||
c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
8aa9860519c407890668c29998e8bb88896ef6a2e6d7ce5ac1e57f18d79e1525 plutovg-$PLUTOVG.tar.gz
|
||||
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
|
||||
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
|
||||
EOF
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=11.2.0
|
||||
SDL=SDL3-3.2.16
|
||||
SDL=SDL3-3.2.20
|
||||
ZSTD=1.5.7
|
||||
LZ4=1.10.0
|
||||
LIBPNG=1.6.48
|
||||
LIBJPEGTURBO=3.1.0
|
||||
LIBWEBP=1.5.0
|
||||
LIBPNG=1.6.50
|
||||
LIBJPEGTURBO=3.1.1
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.3
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
PLUTOVG=1.1.0
|
||||
PLUTOVG=1.3.0
|
||||
PLUTOSVG=0.0.7
|
||||
|
||||
SHADERC=2025.3
|
||||
@@ -59,12 +59,12 @@ CMAKE_COMMON=(
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
|
||||
6340e58879b2d15830c8460d2f589a385c444d1faa2a4828a9626c7322562be8 $SDL.tar.gz
|
||||
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 qtbase-everywhere-src-$QT.tar.xz
|
||||
@@ -77,7 +77,7 @@ a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937 shaderc-$SHADE
|
||||
c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
8aa9860519c407890668c29998e8bb88896ef6a2e6d7ce5ac1e57f18d79e1525 plutovg-$PLUTOVG.tar.gz
|
||||
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
|
||||
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
|
||||
EOF
|
||||
|
||||
|
||||
@@ -44,18 +44,18 @@ cd "%BUILDDIR%"
|
||||
|
||||
set FREETYPE=2.13.3
|
||||
set HARFBUZZ=11.2.0
|
||||
set LIBJPEGTURBO=3.1.0
|
||||
set LIBPNG=1648
|
||||
set SDL=SDL3-3.2.16
|
||||
set QT=6.9.1
|
||||
set LIBJPEGTURBO=3.1.1
|
||||
set LIBPNG=1650
|
||||
set SDL=SDL3-3.2.20
|
||||
set QT=6.9.2
|
||||
set QTMINOR=6.9
|
||||
set LZ4=1.10.0
|
||||
set WEBP=1.5.0
|
||||
set WEBP=1.6.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.7
|
||||
set KDDOCKWIDGETS=2.2.3
|
||||
set PLUTOVG=1.1.0
|
||||
set PLUTOVG=1.3.0
|
||||
set PLUTOSVG=0.0.7
|
||||
|
||||
set SHADERC=2025.3
|
||||
@@ -65,20 +65,20 @@ set SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 850cb5e38e21106c0abba86c5b73f8f74b9a32d7725505901d081080b0d3f0b3 || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1648.zip 2e5f080360f77376eb2bfa9e2ed773b9c7728159aba47b638ad53ca839379040 || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 0cc7430fb827c1f843e31b8b26ba7f083b1eeb8f6315a65d3744fd4d25b6c373 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" efa6d8ef9f7ae0fd9f7d280fbff574d71882b60a357ae639e516dc173cf26986 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 8439d3394bc380fd17a920ee96df1d2272bf8d3490871d948ef750f95e0ded06 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" a8f90c768b54e28d61e02c1229b74a2b834e9852af523e5c70bcd2ae4c34a772 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 38db91c4a8044c395eac89e325ecc25edbda12606fc28812491ef5e5b6b53dd6 || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" fd2e776164751fb486495efeee336d26d85fe1ca1f6a7b9eb6aafca2e3d333aa || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1650.zip 4be6938313b08d5921f9dede13f2789b653c96f4f8595d92ff3f09c9320e51c7 || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" d76454913ea6f5f38856fbf00578d8e39daf842887f3396c95608414680250f7 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 97d59c78e40b4ddd018738d285a12afc320b57f8265a3f760353739a3619ccdb || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" f2fc6ff382c6f3af79493d0709dbd64847d0356313518f094f9096315f2fdb30 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" af80bb671ea0f66c0036ce7041a56b0e550fc94fb88d2c77b5b6a3e33e42139b || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" d2f4c7a4a12630e879702353f944f96a5d8e764771b5a5f04163334ad61b39db || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 3e168d1b081ee3a2175fe1bd97ad03bb40fe7ce38a37e99923a19f0e7ec4d81c || goto error
|
||||
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/refs/tags/v%LZ4%.zip" 3224b4c80f351f194984526ef396f6079bd6332dd9825c72ac0d7a37b3cdc565 || goto error
|
||||
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
|
||||
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" 7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4 || goto error
|
||||
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 83b2cd6230909a8d586518f49e79e4a1b1e9fab3847db6a678ec9d2dacab052a || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 5153e6b3603a253e6f86dc0b1eb5b80d1dce849ceef628369942587e86582cbb || goto error
|
||||
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 82dee2c57ad712bdd6d6d81d3e76249d89caa4b5a4214353660fd5adff12201a || goto error
|
||||
|
||||
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 77d2425458bca62c16b1ed49ed02de4c4114a113781bd94c1961b273bdca00fb || goto error
|
||||
|
||||
@@ -42,18 +42,18 @@ cd "%BUILDDIR%"
|
||||
|
||||
set FREETYPE=2.13.3
|
||||
set HARFBUZZ=11.2.0
|
||||
set LIBJPEGTURBO=3.1.0
|
||||
set LIBPNG=1648
|
||||
set SDL=SDL3-3.2.16
|
||||
set QT=6.9.1
|
||||
set LIBJPEGTURBO=3.1.1
|
||||
set LIBPNG=1650
|
||||
set SDL=SDL3-3.2.20
|
||||
set QT=6.9.2
|
||||
set QTMINOR=6.9
|
||||
set LZ4=1.10.0
|
||||
set WEBP=1.5.0
|
||||
set WEBP=1.6.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.7
|
||||
set KDDOCKWIDGETS=2.2.3
|
||||
set PLUTOVG=1.1.0
|
||||
set PLUTOVG=1.3.0
|
||||
set PLUTOSVG=0.0.7
|
||||
|
||||
set SHADERC=2025.3
|
||||
@@ -63,20 +63,20 @@ set SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 850cb5e38e21106c0abba86c5b73f8f74b9a32d7725505901d081080b0d3f0b3 || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1648.zip 2e5f080360f77376eb2bfa9e2ed773b9c7728159aba47b638ad53ca839379040 || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 0cc7430fb827c1f843e31b8b26ba7f083b1eeb8f6315a65d3744fd4d25b6c373 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" efa6d8ef9f7ae0fd9f7d280fbff574d71882b60a357ae639e516dc173cf26986 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 8439d3394bc380fd17a920ee96df1d2272bf8d3490871d948ef750f95e0ded06 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" a8f90c768b54e28d61e02c1229b74a2b834e9852af523e5c70bcd2ae4c34a772 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 38db91c4a8044c395eac89e325ecc25edbda12606fc28812491ef5e5b6b53dd6 || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" fd2e776164751fb486495efeee336d26d85fe1ca1f6a7b9eb6aafca2e3d333aa || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1650.zip 4be6938313b08d5921f9dede13f2789b653c96f4f8595d92ff3f09c9320e51c7 || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" d76454913ea6f5f38856fbf00578d8e39daf842887f3396c95608414680250f7 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 97d59c78e40b4ddd018738d285a12afc320b57f8265a3f760353739a3619ccdb || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" f2fc6ff382c6f3af79493d0709dbd64847d0356313518f094f9096315f2fdb30 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" af80bb671ea0f66c0036ce7041a56b0e550fc94fb88d2c77b5b6a3e33e42139b || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" d2f4c7a4a12630e879702353f944f96a5d8e764771b5a5f04163334ad61b39db || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 3e168d1b081ee3a2175fe1bd97ad03bb40fe7ce38a37e99923a19f0e7ec4d81c || goto error
|
||||
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/refs/tags/v%LZ4%.zip" 3224b4c80f351f194984526ef396f6079bd6332dd9825c72ac0d7a37b3cdc565 || goto error
|
||||
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
|
||||
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" 7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4 || goto error
|
||||
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 83b2cd6230909a8d586518f49e79e4a1b1e9fab3847db6a678ec9d2dacab052a || goto error
|
||||
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 5153e6b3603a253e6f86dc0b1eb5b80d1dce849ceef628369942587e86582cbb || goto error
|
||||
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 82dee2c57ad712bdd6d6d81d3e76249d89caa4b5a4214353660fd5adff12201a || goto error
|
||||
|
||||
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 77d2425458bca62c16b1ed49ed02de4c4114a113781bd94c1961b273bdca00fb || goto error
|
||||
|
||||
2
.github/workflows/windows_build_matrix.yml
vendored
2
.github/workflows/windows_build_matrix.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Verify VS Project Files
|
||||
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
|
||||
|
||||
|
||||
4
.github/workflows/windows_build_qt.yml
vendored
4
.github/workflows/windows_build_qt.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Configure MSBuild Clang Version
|
||||
if: inputs.configuration != 'CMake'
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
!./bin/**/*.lib
|
||||
|
||||
- name: Install the Breakpad Symbol Generator
|
||||
uses: baptiste0928/cargo-install@e38323ef017552d7f7af73a3f4db467f278310ed
|
||||
uses: baptiste0928/cargo-install@b687c656bda5733207e629b50a22bf68974a0305
|
||||
with:
|
||||
crate: dump_syms
|
||||
|
||||
|
||||
4
3rdparty/cpuinfo/README.md
vendored
4
3rdparty/cpuinfo/README.md
vendored
@@ -9,7 +9,7 @@ cpuinfo is a library to detect essential for performance optimization informatio
|
||||
## Features
|
||||
|
||||
- **Cross-platform** availability:
|
||||
- Linux, Windows, macOS, Android, and iOS operating systems
|
||||
- Linux, Windows, macOS, Android, iOS and FreeBSD operating systems
|
||||
- x86, x86-64, ARM, and ARM64 architectures
|
||||
- Modern **C/C++ interface**
|
||||
- Thread-safe
|
||||
@@ -258,6 +258,8 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
|
||||
- [x] x86
|
||||
- [x] x86-64
|
||||
- [x] arm64
|
||||
- [x] FreeBSD
|
||||
- [x] x86-64
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
34
3rdparty/cpuinfo/include/cpuinfo.h
vendored
34
3rdparty/cpuinfo/include/cpuinfo.h
vendored
@@ -353,6 +353,8 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_palm_cove = 0x0010020B,
|
||||
/** Intel Sunny Cove microarchitecture (10 nm, Ice Lake). */
|
||||
cpuinfo_uarch_sunny_cove = 0x0010020C,
|
||||
/** Intel Willow Cove microarchitecture (10 nm, Tiger Lake). */
|
||||
cpuinfo_uarch_willow_cove = 0x0010020D,
|
||||
|
||||
/** Pentium 4 with Willamette, Northwood, or Foster cores. */
|
||||
cpuinfo_uarch_willamette = 0x00100300,
|
||||
@@ -371,6 +373,10 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_goldmont = 0x00100404,
|
||||
/** Intel Goldmont Plus microarchitecture (Gemini Lake). */
|
||||
cpuinfo_uarch_goldmont_plus = 0x00100405,
|
||||
/** Intel Gracemont microarchitecture (Twin Lake). */
|
||||
cpuinfo_uarch_gracemont = 0x00100406,
|
||||
/** Intel Crestmont microarchitecture (Sierra Forest). */
|
||||
cpuinfo_uarch_crestmont = 0x00100407,
|
||||
|
||||
/** Intel Knights Ferry HPC boards. */
|
||||
cpuinfo_uarch_knights_ferry = 0x00100500,
|
||||
@@ -382,6 +388,8 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_knights_hill = 0x00100503,
|
||||
/** Intel Knights Mill Xeon Phi. */
|
||||
cpuinfo_uarch_knights_mill = 0x00100504,
|
||||
/** Intel Darkmont microarchitecture (e-core used in Clearwater Forest). */
|
||||
cpuinfo_uarch_darkmont = 0x00100505,
|
||||
|
||||
/** Intel/Marvell XScale series. */
|
||||
cpuinfo_uarch_xscale = 0x00100600,
|
||||
@@ -581,6 +589,22 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_avalanche = 0x0070010D,
|
||||
/** Apple A15 / M2 processor (little cores). */
|
||||
cpuinfo_uarch_blizzard = 0x0070010E,
|
||||
/** Apple A16 processor (big cores). */
|
||||
cpuinfo_uarch_everest = 0x00700200,
|
||||
/** Apple A16 processor (little cores). */
|
||||
cpuinfo_uarch_sawtooth = 0x00700201,
|
||||
/** Apple A17 processor (big cores). */
|
||||
cpuinfo_uarch_coll_everest = 0x00700202,
|
||||
/** Apple A17 processor (little cores). */
|
||||
cpuinfo_uarch_coll_sawtooth = 0x00700203,
|
||||
/** Apple A18 processor (big cores). */
|
||||
cpuinfo_uarch_tupai_everest = 0x00700204,
|
||||
/** Apple A18 processor (little cores). */
|
||||
cpuinfo_uarch_tupai_sawtooth = 0x00700205,
|
||||
/** Apple A18 pro processor (big cores). */
|
||||
cpuinfo_uarch_tahiti_everest = 0x00700206,
|
||||
/** Apple A18 pro processor (little cores). */
|
||||
cpuinfo_uarch_tahiti_sawtooth = 0x00700207,
|
||||
|
||||
/** Cavium ThunderX. */
|
||||
cpuinfo_uarch_thunderx = 0x00800100,
|
||||
@@ -1700,6 +1724,7 @@ struct cpuinfo_arm_isa {
|
||||
bool sme_b16b16;
|
||||
bool sme_f16f16;
|
||||
uint32_t svelen;
|
||||
uint32_t smelen;
|
||||
#endif
|
||||
bool rdm;
|
||||
bool fp16arith;
|
||||
@@ -2081,6 +2106,15 @@ static inline uint32_t cpuinfo_get_max_arm_sve_length(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Function to get the max SME vector length on ARM CPU's which support SME.
|
||||
static inline uint32_t cpuinfo_get_max_arm_sme_length(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.smelen * 8; // bytes * 8 = bit length(vector length)
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_sme(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.sme;
|
||||
|
||||
2
3rdparty/cpuinfo/src/arm/linux/aarch32-isa.c
vendored
2
3rdparty/cpuinfo/src/arm/linux/aarch32-isa.c
vendored
@@ -149,6 +149,8 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
|
||||
cpuinfo_log_warning("VDOT instructions disabled: cause occasional SIGILL on Unisoc T310");
|
||||
} else if (chipset->series == cpuinfo_arm_chipset_series_unisoc_ums && chipset->model == 312) {
|
||||
cpuinfo_log_warning("VDOT instructions disabled: cause occasional SIGILL on Unisoc UMS312");
|
||||
} else if (chipset->vendor == cpuinfo_arm_chipset_vendor_unknown) {
|
||||
cpuinfo_log_warning("VDOT instructions disabled: unknown chipset");
|
||||
} else {
|
||||
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
|
||||
17
3rdparty/cpuinfo/src/arm/linux/aarch64-isa.c
vendored
17
3rdparty/cpuinfo/src/arm/linux/aarch64-isa.c
vendored
@@ -191,4 +191,21 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
|
||||
// Mask out the SVE vector length bits
|
||||
isa->svelen = ret & PR_SVE_VL_LEN_MASK;
|
||||
}
|
||||
|
||||
#ifndef PR_SME_GET_VL
|
||||
#define PR_SME_GET_VL 64
|
||||
#endif
|
||||
|
||||
#ifndef PR_SME_VL_LEN_MASK
|
||||
#define PR_SME_VL_LEN_MASK 0xffff
|
||||
#endif
|
||||
|
||||
ret = prctl(PR_SME_GET_VL);
|
||||
if (ret < 0) {
|
||||
cpuinfo_log_warning("No SME support on this machine");
|
||||
isa->smelen = 0; // Assume no SME support if the call fails
|
||||
} else {
|
||||
// Mask out the SME vector length bits
|
||||
isa->smelen = ret & PR_SME_VL_LEN_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
56
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
56
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
@@ -27,6 +27,45 @@
|
||||
#ifndef CPUFAMILY_ARM_AVALANCHE_BLIZZARD
|
||||
#define CPUFAMILY_ARM_AVALANCHE_BLIZZARD 0xDA33D83D
|
||||
#endif
|
||||
// Following are copied over from ncnn/src/cpu.cpp
|
||||
// A16
|
||||
#ifndef CPUFAMILY_ARM_EVEREST_SAWTOOTH
|
||||
#define CPUFAMILY_ARM_EVEREST_SAWTOOTH 0x8765edea
|
||||
#endif
|
||||
// A17
|
||||
#ifndef CPUFAMILY_ARM_COLL
|
||||
#define CPUFAMILY_ARM_COLL 0x2876f5b5
|
||||
#endif
|
||||
// A18
|
||||
#ifndef CPUFAMILY_ARM_TUPAI
|
||||
#define CPUFAMILY_ARM_TUPAI 0x204526d0
|
||||
#endif
|
||||
// A18 Pro
|
||||
#ifndef CPUFAMILY_ARM_TAHITI
|
||||
#define CPUFAMILY_ARM_TAHITI 0x75d4acb9
|
||||
#endif
|
||||
// For M3/M4 we need to populate more information about
|
||||
// efficiency and perf cores.
|
||||
// M3
|
||||
#ifndef CPUFAMILY_ARM_IBIZA
|
||||
#define CPUFAMILY_ARM_IBIZA 0xfa33415e
|
||||
#endif
|
||||
// M3 Pro
|
||||
#ifndef CPUFAMILY_ARM_LOBOS
|
||||
#define CPUFAMILY_ARM_LOBOS 0x5f4dea93
|
||||
#endif
|
||||
// M3 Max
|
||||
#ifndef CPUFAMILY_ARM_PALMA
|
||||
#define CPUFAMILY_ARM_PALMA 0x72015832
|
||||
#endif
|
||||
// M4
|
||||
#ifndef CPUFAMILY_ARM_DONAN
|
||||
#define CPUFAMILY_ARM_DONAN 0x6f5129ac
|
||||
#endif
|
||||
// M4 Pro / M4 Max
|
||||
#ifndef CPUFAMILY_ARM_BRAVA
|
||||
#define CPUFAMILY_ARM_BRAVA 0x17d5b93a
|
||||
#endif
|
||||
|
||||
struct cpuinfo_arm_isa cpuinfo_isa = {
|
||||
.aes = true,
|
||||
@@ -93,6 +132,23 @@ static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t core_index,
|
||||
case CPUFAMILY_ARM_AVALANCHE_BLIZZARD:
|
||||
/* Hexa-core: 2x Avalanche + 4x Blizzard */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_avalanche : cpuinfo_uarch_blizzard;
|
||||
case CPUFAMILY_ARM_EVEREST_SAWTOOTH:
|
||||
/* Hexa-core: 2x Avalanche + 4x Blizzard */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_everest : cpuinfo_uarch_sawtooth;
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_avalanche : cpuinfo_uarch_blizzard;
|
||||
case CPUFAMILY_ARM_COLL:
|
||||
/* Hexa-core: 2x Avalanche + 4x Blizzard */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_coll_everest : cpuinfo_uarch_coll_sawtooth;
|
||||
|
||||
case CPUFAMILY_ARM_TUPAI:
|
||||
/* Hexa-core: 2x Avalanche + 4x Blizzard */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_tupai_everest : cpuinfo_uarch_tupai_sawtooth;
|
||||
|
||||
case CPUFAMILY_ARM_TAHITI:
|
||||
/* Hexa-core: 2x Avalanche + 4x Blizzard */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_tahiti_everest
|
||||
: cpuinfo_uarch_tahiti_sawtooth;
|
||||
|
||||
default:
|
||||
/* Use hw.cpusubtype for detection */
|
||||
break;
|
||||
|
||||
2
3rdparty/cpuinfo/src/riscv/linux/riscv-hw.c
vendored
2
3rdparty/cpuinfo/src/riscv/linux/riscv-hw.c
vendored
@@ -112,7 +112,7 @@ void cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
|
||||
*
|
||||
* for more details.
|
||||
*/
|
||||
int ret = syscall(NR_riscv_hwprobe, pairs, pairs_count, cpu_set_size, (unsigned long*)cpu_set, 0 /* flags */);
|
||||
int ret = syscall(NR_riscv_hwprobe, pairs, pairs_count, cpu_set_size, cpu_set, 0 /* flags */);
|
||||
#else
|
||||
int ret = __riscv_hwprobe(pairs, pairs_count, cpu_set_size, (unsigned long*)cpu_set, 0 /* flags */);
|
||||
#endif
|
||||
|
||||
9
3rdparty/cpuinfo/src/x86/linux/cpuinfo.c
vendored
9
3rdparty/cpuinfo/src/x86/linux/cpuinfo.c
vendored
@@ -80,11 +80,7 @@ struct proc_cpuinfo_parser_state {
|
||||
* Decode a single line of /proc/cpuinfo information.
|
||||
* Lines have format <words-with-spaces>[ ]*:[ ]<space-separated words>
|
||||
*/
|
||||
static bool parse_line(
|
||||
const char* line_start,
|
||||
const char* line_end,
|
||||
void* context,
|
||||
uint64_t line_number) {
|
||||
static bool parse_line(const char* line_start, const char* line_end, void* context, uint64_t line_number) {
|
||||
struct proc_cpuinfo_parser_state* restrict state = context;
|
||||
/* Empty line. Skip. */
|
||||
if (line_start == line_end) {
|
||||
@@ -215,6 +211,5 @@ bool cpuinfo_x86_linux_parse_proc_cpuinfo(
|
||||
.max_processors_count = max_processors_count,
|
||||
.processors = processors,
|
||||
};
|
||||
return cpuinfo_linux_parse_multiline_file(
|
||||
"/proc/cpuinfo", BUFFER_SIZE, parse_line, &state);
|
||||
return cpuinfo_linux_parse_multiline_file("/proc/cpuinfo", BUFFER_SIZE, parse_line, &state);
|
||||
}
|
||||
|
||||
9
3rdparty/cpuinfo/src/x86/uarch.c
vendored
9
3rdparty/cpuinfo/src/x86/uarch.c
vendored
@@ -168,6 +168,9 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
|
||||
case 0x7E: // Ice Lake-U
|
||||
return cpuinfo_uarch_sunny_cove;
|
||||
|
||||
case 0x8C: // Tiger U
|
||||
case 0x8D: // Tiger H
|
||||
return cpuinfo_uarch_willow_cove;
|
||||
/* Low-power cores */
|
||||
case 0x1C: // Diamondville,
|
||||
// Silverthorne,
|
||||
@@ -185,6 +188,10 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
|
||||
case 0x5A: // Moorefield
|
||||
case 0x5D: // SoFIA
|
||||
return cpuinfo_uarch_silvermont;
|
||||
case 0xBE: // Twin Lake
|
||||
return cpuinfo_uarch_gracemont;
|
||||
case 0xAF: // Sierra Forest
|
||||
return cpuinfo_uarch_crestmont;
|
||||
case 0x4C: // Braswell, Cherry
|
||||
// Trail
|
||||
case 0x75: // Spreadtrum
|
||||
@@ -201,6 +208,8 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
|
||||
return cpuinfo_uarch_knights_landing;
|
||||
case 0x85:
|
||||
return cpuinfo_uarch_knights_mill;
|
||||
case 0xDD: // Clearwater Forest
|
||||
return cpuinfo_uarch_darkmont;
|
||||
}
|
||||
break;
|
||||
case 0x0F:
|
||||
|
||||
18
3rdparty/ffmpeg/COPYING.LGPLv2.1
vendored
18
3rdparty/ffmpeg/COPYING.LGPLv2.1
vendored
@@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@@ -158,7 +158,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
|
||||
2235
3rdparty/ffmpeg/Changelog
vendored
Normal file
2235
3rdparty/ffmpeg/Changelog
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
3rdparty/ffmpeg/LICENSE.md
vendored
2
3rdparty/ffmpeg/LICENSE.md
vendored
@@ -12,7 +12,6 @@ configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
|
||||
|
||||
Specifically, the GPL parts of FFmpeg are:
|
||||
|
||||
- libpostproc
|
||||
- optional x86 optimization in the files
|
||||
- `libavcodec/x86/flac_dsp_gpl.asm`
|
||||
- `libavcodec/x86/idct_mmx.c`
|
||||
@@ -45,7 +44,6 @@ Specifically, the GPL parts of FFmpeg are:
|
||||
- `vf_owdenoise.c`
|
||||
- `vf_perspective.c`
|
||||
- `vf_phase.c`
|
||||
- `vf_pp.c`
|
||||
- `vf_pp7.c`
|
||||
- `vf_pullup.c`
|
||||
- `vf_repeatfields.c`
|
||||
|
||||
2
3rdparty/ffmpeg/headers-version.txt
vendored
2
3rdparty/ffmpeg/headers-version.txt
vendored
@@ -1 +1 @@
|
||||
ffmpeg-7.0.2 from https://ffmpeg.org/releases/ffmpeg-7.0.2.tar.xz
|
||||
ffmpeg-8.0 from https://ffmpeg.org/releases/ffmpeg-8.0.tar.xz
|
||||
284
3rdparty/ffmpeg/include/libavcodec/avcodec.h
vendored
284
3rdparty/ffmpeg/include/libavcodec/avcodec.h
vendored
@@ -187,17 +187,6 @@ struct AVCodecParameters;
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if FF_API_BUFFER_MIN_SIZE
|
||||
/**
|
||||
* @ingroup lavc_encoding
|
||||
* minimum encoding buffer size
|
||||
* Used to avoid some checks during header writing.
|
||||
* @deprecated Unused: avcodec_receive_packet() does not work
|
||||
* with preallocated packet buffers.
|
||||
*/
|
||||
#define AV_INPUT_BUFFER_MIN_SIZE 16384
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup lavc_encoding
|
||||
*/
|
||||
@@ -234,18 +223,9 @@ typedef struct RcOverride{
|
||||
* Use qpel MC.
|
||||
*/
|
||||
#define AV_CODEC_FLAG_QPEL (1 << 4)
|
||||
#if FF_API_DROPCHANGED
|
||||
/**
|
||||
* Don't output frames whose parameters differ from first
|
||||
* decoded frame in stream.
|
||||
*
|
||||
* @deprecated callers should implement this functionality in their own code
|
||||
*/
|
||||
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
|
||||
#endif
|
||||
/**
|
||||
* Request the encoder to output reconstructed frames, i.e.\ frames that would
|
||||
* be produced by decoding the encoded bistream. These frames may be retrieved
|
||||
* be produced by decoding the encoded bitstream. These frames may be retrieved
|
||||
* by calling avcodec_receive_frame() immediately after a successful call to
|
||||
* avcodec_receive_packet().
|
||||
*
|
||||
@@ -419,6 +399,12 @@ typedef struct RcOverride{
|
||||
*/
|
||||
#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
|
||||
|
||||
/**
|
||||
* Decoding only.
|
||||
* Do not apply picture enhancement layers, export them instead.
|
||||
*/
|
||||
#define AV_CODEC_EXPORT_DATA_ENHANCEMENTS (1 << 4)
|
||||
|
||||
/**
|
||||
* The decoder will keep a reference to the frame and may reuse it later.
|
||||
*/
|
||||
@@ -509,16 +495,21 @@ typedef struct AVCodecContext {
|
||||
int flags2;
|
||||
|
||||
/**
|
||||
* some codecs need / can use extradata like Huffman tables.
|
||||
* MJPEG: Huffman tables
|
||||
* rv10: additional flags
|
||||
* MPEG-4: global headers (they can be in the bitstream or here)
|
||||
* The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
|
||||
* than extradata_size to avoid problems if it is read with the bitstream reader.
|
||||
* The bytewise contents of extradata must not depend on the architecture or CPU endianness.
|
||||
* Must be allocated with the av_malloc() family of functions.
|
||||
* - encoding: Set/allocated/freed by libavcodec.
|
||||
* - decoding: Set/allocated/freed by user.
|
||||
* Out-of-band global headers that may be used by some codecs.
|
||||
*
|
||||
* - decoding: Should be set by the caller when available (typically from a
|
||||
* demuxer) before opening the decoder; some decoders require this to be
|
||||
* set and will fail to initialize otherwise.
|
||||
*
|
||||
* The array must be allocated with the av_malloc() family of functions;
|
||||
* allocated size must be at least AV_INPUT_BUFFER_PADDING_SIZE bytes
|
||||
* larger than extradata_size.
|
||||
*
|
||||
* - encoding: May be set by the encoder in avcodec_open2() (possibly
|
||||
* depending on whether the AV_CODEC_FLAG_GLOBAL_HEADER flag is set).
|
||||
*
|
||||
* After being set, the array is owned by the codec and freed in
|
||||
* avcodec_free_context().
|
||||
*/
|
||||
uint8_t *extradata;
|
||||
int extradata_size;
|
||||
@@ -559,23 +550,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
AVRational framerate;
|
||||
|
||||
#if FF_API_TICKS_PER_FRAME
|
||||
/**
|
||||
* For some codecs, the time base is closer to the field rate than the frame rate.
|
||||
* Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
|
||||
* if no telecine is used ...
|
||||
*
|
||||
* Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
|
||||
*
|
||||
* @deprecated
|
||||
* - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
|
||||
* - encoding: Set AVCodecContext.framerate instead
|
||||
*
|
||||
*/
|
||||
attribute_deprecated
|
||||
int ticks_per_frame;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec delay.
|
||||
*
|
||||
@@ -1175,6 +1149,10 @@ typedef struct AVCodecContext {
|
||||
* this callback and filled with the extra buffers if there are more
|
||||
* buffers than buf[] can hold. extended_buf will be freed in
|
||||
* av_frame_unref().
|
||||
* Decoders will generally initialize the whole buffer before it is output
|
||||
* but it can in rare error conditions happen that uninitialized data is passed
|
||||
* through. \important The buffers returned by get_buffer* should thus not contain sensitive
|
||||
* data.
|
||||
*
|
||||
* If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
|
||||
* avcodec_default_get_buffer2() instead of providing buffers allocated by
|
||||
@@ -1538,6 +1516,7 @@ typedef struct AVCodecContext {
|
||||
#define FF_DCT_MMX 3
|
||||
#define FF_DCT_ALTIVEC 5
|
||||
#define FF_DCT_FAAN 6
|
||||
#define FF_DCT_NEON 7
|
||||
|
||||
/**
|
||||
* IDCT algorithm, see FF_IDCT_* below.
|
||||
@@ -1637,165 +1616,29 @@ typedef struct AVCodecContext {
|
||||
* See the AV_PROFILE_* defines in defs.h.
|
||||
*/
|
||||
int profile;
|
||||
#if FF_API_FF_PROFILE_LEVEL
|
||||
/** @deprecated The following defines are deprecated; use AV_PROFILE_*
|
||||
* in defs.h instead. */
|
||||
#define FF_PROFILE_UNKNOWN -99
|
||||
#define FF_PROFILE_RESERVED -100
|
||||
|
||||
#define FF_PROFILE_AAC_MAIN 0
|
||||
#define FF_PROFILE_AAC_LOW 1
|
||||
#define FF_PROFILE_AAC_SSR 2
|
||||
#define FF_PROFILE_AAC_LTP 3
|
||||
#define FF_PROFILE_AAC_HE 4
|
||||
#define FF_PROFILE_AAC_HE_V2 28
|
||||
#define FF_PROFILE_AAC_LD 22
|
||||
#define FF_PROFILE_AAC_ELD 38
|
||||
#define FF_PROFILE_MPEG2_AAC_LOW 128
|
||||
#define FF_PROFILE_MPEG2_AAC_HE 131
|
||||
|
||||
#define FF_PROFILE_DNXHD 0
|
||||
#define FF_PROFILE_DNXHR_LB 1
|
||||
#define FF_PROFILE_DNXHR_SQ 2
|
||||
#define FF_PROFILE_DNXHR_HQ 3
|
||||
#define FF_PROFILE_DNXHR_HQX 4
|
||||
#define FF_PROFILE_DNXHR_444 5
|
||||
|
||||
#define FF_PROFILE_DTS 20
|
||||
#define FF_PROFILE_DTS_ES 30
|
||||
#define FF_PROFILE_DTS_96_24 40
|
||||
#define FF_PROFILE_DTS_HD_HRA 50
|
||||
#define FF_PROFILE_DTS_HD_MA 60
|
||||
#define FF_PROFILE_DTS_EXPRESS 70
|
||||
#define FF_PROFILE_DTS_HD_MA_X 61
|
||||
#define FF_PROFILE_DTS_HD_MA_X_IMAX 62
|
||||
|
||||
|
||||
#define FF_PROFILE_EAC3_DDP_ATMOS 30
|
||||
|
||||
#define FF_PROFILE_TRUEHD_ATMOS 30
|
||||
|
||||
#define FF_PROFILE_MPEG2_422 0
|
||||
#define FF_PROFILE_MPEG2_HIGH 1
|
||||
#define FF_PROFILE_MPEG2_SS 2
|
||||
#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
|
||||
#define FF_PROFILE_MPEG2_MAIN 4
|
||||
#define FF_PROFILE_MPEG2_SIMPLE 5
|
||||
|
||||
#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
|
||||
#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
|
||||
|
||||
#define FF_PROFILE_H264_BASELINE 66
|
||||
#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
|
||||
#define FF_PROFILE_H264_MAIN 77
|
||||
#define FF_PROFILE_H264_EXTENDED 88
|
||||
#define FF_PROFILE_H264_HIGH 100
|
||||
#define FF_PROFILE_H264_HIGH_10 110
|
||||
#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
|
||||
#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
|
||||
#define FF_PROFILE_H264_HIGH_422 122
|
||||
#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
|
||||
#define FF_PROFILE_H264_STEREO_HIGH 128
|
||||
#define FF_PROFILE_H264_HIGH_444 144
|
||||
#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
|
||||
#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
|
||||
#define FF_PROFILE_H264_CAVLC_444 44
|
||||
|
||||
#define FF_PROFILE_VC1_SIMPLE 0
|
||||
#define FF_PROFILE_VC1_MAIN 1
|
||||
#define FF_PROFILE_VC1_COMPLEX 2
|
||||
#define FF_PROFILE_VC1_ADVANCED 3
|
||||
|
||||
#define FF_PROFILE_MPEG4_SIMPLE 0
|
||||
#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
|
||||
#define FF_PROFILE_MPEG4_CORE 2
|
||||
#define FF_PROFILE_MPEG4_MAIN 3
|
||||
#define FF_PROFILE_MPEG4_N_BIT 4
|
||||
#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
|
||||
#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
|
||||
#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
|
||||
#define FF_PROFILE_MPEG4_HYBRID 8
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
|
||||
#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
|
||||
#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
|
||||
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
|
||||
|
||||
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
|
||||
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
|
||||
#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
|
||||
#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
|
||||
#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
|
||||
|
||||
#define FF_PROFILE_VP9_0 0
|
||||
#define FF_PROFILE_VP9_1 1
|
||||
#define FF_PROFILE_VP9_2 2
|
||||
#define FF_PROFILE_VP9_3 3
|
||||
|
||||
#define FF_PROFILE_HEVC_MAIN 1
|
||||
#define FF_PROFILE_HEVC_MAIN_10 2
|
||||
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
|
||||
#define FF_PROFILE_HEVC_REXT 4
|
||||
#define FF_PROFILE_HEVC_SCC 9
|
||||
|
||||
#define FF_PROFILE_VVC_MAIN_10 1
|
||||
#define FF_PROFILE_VVC_MAIN_10_444 33
|
||||
|
||||
#define FF_PROFILE_AV1_MAIN 0
|
||||
#define FF_PROFILE_AV1_HIGH 1
|
||||
#define FF_PROFILE_AV1_PROFESSIONAL 2
|
||||
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
|
||||
#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
|
||||
#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
|
||||
|
||||
#define FF_PROFILE_SBC_MSBC 1
|
||||
|
||||
#define FF_PROFILE_PRORES_PROXY 0
|
||||
#define FF_PROFILE_PRORES_LT 1
|
||||
#define FF_PROFILE_PRORES_STANDARD 2
|
||||
#define FF_PROFILE_PRORES_HQ 3
|
||||
#define FF_PROFILE_PRORES_4444 4
|
||||
#define FF_PROFILE_PRORES_XQ 5
|
||||
|
||||
#define FF_PROFILE_ARIB_PROFILE_A 0
|
||||
#define FF_PROFILE_ARIB_PROFILE_C 1
|
||||
|
||||
#define FF_PROFILE_KLVA_SYNC 0
|
||||
#define FF_PROFILE_KLVA_ASYNC 1
|
||||
|
||||
#define FF_PROFILE_EVC_BASELINE 0
|
||||
#define FF_PROFILE_EVC_MAIN 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Encoding level descriptor.
|
||||
* - encoding: Set by user, corresponds to a specific level defined by the
|
||||
* codec, usually corresponding to the profile level, if not specified it
|
||||
* is set to FF_LEVEL_UNKNOWN.
|
||||
* is set to AV_LEVEL_UNKNOWN.
|
||||
* - decoding: Set by libavcodec.
|
||||
* See AV_LEVEL_* in defs.h.
|
||||
*/
|
||||
int level;
|
||||
#if FF_API_FF_PROFILE_LEVEL
|
||||
/** @deprecated The following define is deprecated; use AV_LEVEL_UNKOWN
|
||||
* in defs.h instead. */
|
||||
#define FF_LEVEL_UNKNOWN -99
|
||||
#endif
|
||||
|
||||
#if FF_API_CODEC_PROPS
|
||||
/**
|
||||
* Properties of the stream that gets decoded
|
||||
* - encoding: unused
|
||||
* - decoding: set by libavcodec
|
||||
*/
|
||||
attribute_deprecated
|
||||
unsigned properties;
|
||||
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
|
||||
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
|
||||
#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Skip loop filtering for selected frames.
|
||||
@@ -1884,8 +1727,13 @@ typedef struct AVCodecContext {
|
||||
* For SUBTITLE_ASS subtitle type, it should contain the whole ASS
|
||||
* [Script Info] and [V4+ Styles] section, plus the [Events] line and
|
||||
* the Format line following. It shouldn't include any Dialogue line.
|
||||
* - encoding: Set/allocated/freed by user (before avcodec_open2())
|
||||
* - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
|
||||
*
|
||||
* - encoding: May be set by the caller before avcodec_open2() to an array
|
||||
* allocated with the av_malloc() family of functions.
|
||||
* - decoding: May be set by libavcodec in avcodec_open2().
|
||||
*
|
||||
* After being set, the array is owned by the codec and freed in
|
||||
* avcodec_free_context().
|
||||
*/
|
||||
int subtitle_header_size;
|
||||
uint8_t *subtitle_header;
|
||||
@@ -2071,7 +1919,7 @@ typedef struct AVCodecContext {
|
||||
* - encoding: may be set by user before calling avcodec_open2() for
|
||||
* encoder configuration. Afterwards owned and freed by the
|
||||
* encoder.
|
||||
* - decoding: unused
|
||||
* - decoding: may be set by libavcodec in avcodec_open2().
|
||||
*/
|
||||
AVFrameSideData **decoded_side_data;
|
||||
int nb_decoded_side_data;
|
||||
@@ -2369,24 +2217,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
|
||||
*/
|
||||
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
|
||||
|
||||
#if FF_API_AVCODEC_CLOSE
|
||||
/**
|
||||
* Close a given AVCodecContext and free all the data associated with it
|
||||
* (but not the AVCodecContext itself).
|
||||
*
|
||||
* Calling this function on an AVCodecContext that hasn't been opened will free
|
||||
* the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
|
||||
* codec. Subsequent calls will do nothing.
|
||||
*
|
||||
* @deprecated Do not use this function. Use avcodec_free_context() to destroy a
|
||||
* codec context (either open or closed). Opening and closing a codec context
|
||||
* multiple times is not supported anymore -- use multiple codec contexts
|
||||
* instead.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int avcodec_close(AVCodecContext *avctx);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Free all allocated data in the given subtitle struct.
|
||||
*
|
||||
@@ -2690,6 +2520,36 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
|
||||
enum AVPixelFormat hw_pix_fmt,
|
||||
AVBufferRef **out_frames_ref);
|
||||
|
||||
enum AVCodecConfig {
|
||||
AV_CODEC_CONFIG_PIX_FORMAT, ///< AVPixelFormat, terminated by AV_PIX_FMT_NONE
|
||||
AV_CODEC_CONFIG_FRAME_RATE, ///< AVRational, terminated by {0, 0}
|
||||
AV_CODEC_CONFIG_SAMPLE_RATE, ///< int, terminated by 0
|
||||
AV_CODEC_CONFIG_SAMPLE_FORMAT, ///< AVSampleFormat, terminated by AV_SAMPLE_FMT_NONE
|
||||
AV_CODEC_CONFIG_CHANNEL_LAYOUT, ///< AVChannelLayout, terminated by {0}
|
||||
AV_CODEC_CONFIG_COLOR_RANGE, ///< AVColorRange, terminated by AVCOL_RANGE_UNSPECIFIED
|
||||
AV_CODEC_CONFIG_COLOR_SPACE, ///< AVColorSpace, terminated by AVCOL_SPC_UNSPECIFIED
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve a list of all supported values for a given configuration type.
|
||||
*
|
||||
* @param avctx An optional context to use. Values such as
|
||||
* `strict_std_compliance` may affect the result. If NULL,
|
||||
* default values are used.
|
||||
* @param codec The codec to query, or NULL to use avctx->codec.
|
||||
* @param config The configuration to query.
|
||||
* @param flags Currently unused; should be set to zero.
|
||||
* @param out_configs On success, set to a list of configurations, terminated
|
||||
* by a config-specific terminator, or NULL if all
|
||||
* possible values are supported.
|
||||
* @param out_num_configs On success, set to the number of elements in
|
||||
*out_configs, excluding the terminator. Optional.
|
||||
*/
|
||||
int avcodec_get_supported_config(const AVCodecContext *avctx,
|
||||
const AVCodec *codec, enum AVCodecConfig config,
|
||||
unsigned flags, const void **out_configs,
|
||||
int *out_num_configs);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -3040,7 +2900,7 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
||||
*
|
||||
* @note for encoders, this function will only do something if the encoder
|
||||
* declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
|
||||
* will drain any remaining packets, and can then be re-used for a different
|
||||
* will drain any remaining packets, and can then be reused for a different
|
||||
* stream (as opposed to sending a null frame which will leave the encoder
|
||||
* in a permanent EOF state after draining). This can be desirable if the
|
||||
* cost of tearing down and replacing the encoder instance is high.
|
||||
@@ -3075,8 +2935,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
|
||||
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
|
||||
|
||||
/**
|
||||
* @return a positive value if s is open (i.e. avcodec_open2() was called on it
|
||||
* with no corresponding avcodec_close()), 0 otherwise.
|
||||
* @return a positive value if s is open (i.e. avcodec_open2() was called on it),
|
||||
* 0 otherwise.
|
||||
*/
|
||||
int avcodec_is_open(AVCodecContext *s);
|
||||
|
||||
|
||||
34
3rdparty/ffmpeg/include/libavcodec/codec.h
vendored
34
3rdparty/ffmpeg/include/libavcodec/codec.h
vendored
@@ -80,21 +80,6 @@
|
||||
*/
|
||||
#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
|
||||
|
||||
#if FF_API_SUBFRAMES
|
||||
/**
|
||||
* Codec can output multiple frames per AVPacket
|
||||
* Normally demuxers return one frame at a time, demuxers which do not do
|
||||
* are connected to a parser to split what they return into proper frames.
|
||||
* This flag is reserved to the very rare category of codecs which have a
|
||||
* bitstream that cannot be split into frames without timeconsuming
|
||||
* operations like full decoding. Demuxers carrying such bitstreams thus
|
||||
* may return multiple frames in a packet. This has many disadvantages like
|
||||
* prohibiting stream copy in many cases thus it should only be considered
|
||||
* as a last resort.
|
||||
*/
|
||||
#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec is experimental and is thus avoided in favor of non experimental
|
||||
* encoders
|
||||
@@ -205,10 +190,19 @@ typedef struct AVCodec {
|
||||
*/
|
||||
int capabilities;
|
||||
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
|
||||
const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
|
||||
const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
|
||||
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
|
||||
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
|
||||
|
||||
/**
|
||||
* Deprecated codec capabilities.
|
||||
*/
|
||||
attribute_deprecated
|
||||
const AVRational *supported_framerates; ///< @deprecated use avcodec_get_supported_config()
|
||||
attribute_deprecated
|
||||
const enum AVPixelFormat *pix_fmts; ///< @deprecated use avcodec_get_supported_config()
|
||||
attribute_deprecated
|
||||
const int *supported_samplerates; ///< @deprecated use avcodec_get_supported_config()
|
||||
attribute_deprecated
|
||||
const enum AVSampleFormat *sample_fmts; ///< @deprecated use avcodec_get_supported_config()
|
||||
|
||||
const AVClass *priv_class; ///< AVClass for the private context
|
||||
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}
|
||||
|
||||
@@ -226,7 +220,9 @@ typedef struct AVCodec {
|
||||
|
||||
/**
|
||||
* Array of supported channel layouts, terminated with a zeroed layout.
|
||||
* @deprecated use avcodec_get_supported_config()
|
||||
*/
|
||||
attribute_deprecated
|
||||
const AVChannelLayout *ch_layouts;
|
||||
} AVCodec;
|
||||
|
||||
|
||||
16
3rdparty/ffmpeg/include/libavcodec/codec_id.h
vendored
16
3rdparty/ffmpeg/include/libavcodec/codec_id.h
vendored
@@ -206,7 +206,9 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_BMV_VIDEO,
|
||||
AV_CODEC_ID_VBLE,
|
||||
AV_CODEC_ID_DXTORY,
|
||||
#if FF_API_V408_CODECID
|
||||
AV_CODEC_ID_V410,
|
||||
#endif
|
||||
AV_CODEC_ID_XWD,
|
||||
AV_CODEC_ID_CDXL,
|
||||
AV_CODEC_ID_XBM,
|
||||
@@ -254,8 +256,10 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_012V,
|
||||
AV_CODEC_ID_AVUI,
|
||||
AV_CODEC_ID_TARGA_Y216,
|
||||
#if FF_API_V408_CODECID
|
||||
AV_CODEC_ID_V308,
|
||||
AV_CODEC_ID_V408,
|
||||
#endif
|
||||
AV_CODEC_ID_YUV4,
|
||||
AV_CODEC_ID_AVRN,
|
||||
AV_CODEC_ID_CPIA,
|
||||
@@ -322,6 +326,11 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_RTV1,
|
||||
AV_CODEC_ID_VMIX,
|
||||
AV_CODEC_ID_LEAD,
|
||||
AV_CODEC_ID_DNXUC,
|
||||
AV_CODEC_ID_RV60,
|
||||
AV_CODEC_ID_JPEGXL_ANIM,
|
||||
AV_CODEC_ID_APV,
|
||||
AV_CODEC_ID_PRORES_RAW,
|
||||
|
||||
/* various PCM "codecs" */
|
||||
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
|
||||
@@ -416,6 +425,8 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
|
||||
AV_CODEC_ID_ADPCM_IMA_ACORN,
|
||||
AV_CODEC_ID_ADPCM_XMD,
|
||||
AV_CODEC_ID_ADPCM_IMA_XBOX,
|
||||
AV_CODEC_ID_ADPCM_SANYO,
|
||||
|
||||
/* AMR */
|
||||
AV_CODEC_ID_AMR_NB = 0x12000,
|
||||
@@ -543,6 +554,8 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_AC4,
|
||||
AV_CODEC_ID_OSQ,
|
||||
AV_CODEC_ID_QOA,
|
||||
AV_CODEC_ID_LC3,
|
||||
AV_CODEC_ID_G728,
|
||||
|
||||
/* subtitle codecs */
|
||||
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
|
||||
@@ -572,6 +585,7 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
|
||||
AV_CODEC_ID_TTML,
|
||||
AV_CODEC_ID_ARIB_CAPTION,
|
||||
AV_CODEC_ID_IVTV_VBI,
|
||||
|
||||
/* other specific kind of codecs (generally used for attachments) */
|
||||
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
|
||||
@@ -588,6 +602,8 @@ enum AVCodecID {
|
||||
AV_CODEC_ID_TIMED_ID3,
|
||||
AV_CODEC_ID_BIN_DATA,
|
||||
AV_CODEC_ID_SMPTE_2038,
|
||||
AV_CODEC_ID_LCEVC,
|
||||
AV_CODEC_ID_SMPTE_436M_ANC,
|
||||
|
||||
|
||||
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
|
||||
|
||||
@@ -148,7 +148,7 @@ typedef struct AVCodecParameters {
|
||||
* durations. Should be set to { 0, 1 } when some frames have differing
|
||||
* durations or if the value is not known.
|
||||
*
|
||||
* @note This field correponds to values that are stored in codec-level
|
||||
* @note This field corresponds to values that are stored in codec-level
|
||||
* headers and is typically overridden by container/transport-layer
|
||||
* timestamps, when available. It should thus be used only as a last resort,
|
||||
* when no higher-level timing information is available.
|
||||
|
||||
27
3rdparty/ffmpeg/include/libavcodec/defs.h
vendored
27
3rdparty/ffmpeg/include/libavcodec/defs.h
vendored
@@ -73,6 +73,7 @@
|
||||
#define AV_PROFILE_AAC_HE_V2 28
|
||||
#define AV_PROFILE_AAC_LD 22
|
||||
#define AV_PROFILE_AAC_ELD 38
|
||||
#define AV_PROFILE_AAC_USAC 41
|
||||
#define AV_PROFILE_MPEG2_AAC_LOW 128
|
||||
#define AV_PROFILE_MPEG2_AAC_HE 131
|
||||
|
||||
@@ -159,6 +160,7 @@
|
||||
#define AV_PROFILE_HEVC_MAIN_10 2
|
||||
#define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3
|
||||
#define AV_PROFILE_HEVC_REXT 4
|
||||
#define AV_PROFILE_HEVC_MULTIVIEW_MAIN 6
|
||||
#define AV_PROFILE_HEVC_SCC 9
|
||||
|
||||
#define AV_PROFILE_VVC_MAIN_10 1
|
||||
@@ -183,6 +185,9 @@
|
||||
#define AV_PROFILE_PRORES_4444 4
|
||||
#define AV_PROFILE_PRORES_XQ 5
|
||||
|
||||
#define AV_PROFILE_PRORES_RAW 0
|
||||
#define AV_PROFILE_PRORES_RAW_HQ 1
|
||||
|
||||
#define AV_PROFILE_ARIB_PROFILE_A 0
|
||||
#define AV_PROFILE_ARIB_PROFILE_C 1
|
||||
|
||||
@@ -192,6 +197,14 @@
|
||||
#define AV_PROFILE_EVC_BASELINE 0
|
||||
#define AV_PROFILE_EVC_MAIN 1
|
||||
|
||||
#define AV_PROFILE_APV_422_10 33
|
||||
#define AV_PROFILE_APV_422_12 44
|
||||
#define AV_PROFILE_APV_444_10 55
|
||||
#define AV_PROFILE_APV_444_12 66
|
||||
#define AV_PROFILE_APV_4444_10 77
|
||||
#define AV_PROFILE_APV_4444_12 88
|
||||
#define AV_PROFILE_APV_400_10 99
|
||||
|
||||
|
||||
#define AV_LEVEL_UNKNOWN -99
|
||||
|
||||
@@ -323,6 +336,20 @@ typedef struct AVProducerReferenceTime {
|
||||
int flags;
|
||||
} AVProducerReferenceTime;
|
||||
|
||||
/**
|
||||
* RTCP SR (Sender Report) information
|
||||
*
|
||||
* The received sender report information for an RTSP
|
||||
* stream, exposed as AV_PKT_DATA_RTCP_SR side data.
|
||||
*/
|
||||
typedef struct AVRTCPSenderReport {
|
||||
uint32_t ssrc; ///< Synchronization source identifier
|
||||
uint64_t ntp_timestamp; ///< NTP time when the report was sent
|
||||
uint32_t rtp_timestamp; ///< RTP time when the report was sent
|
||||
uint32_t sender_nb_packets; ///< Total number of packets sent
|
||||
uint32_t sender_nb_bytes; ///< Total number of bytes sent (excluding headers or padding)
|
||||
} AVRTCPSenderReport;
|
||||
|
||||
/**
|
||||
* Encode extradata length to a buffer. Used by xiph codecs.
|
||||
*
|
||||
|
||||
55
3rdparty/ffmpeg/include/libavcodec/packet.h
vendored
55
3rdparty/ffmpeg/include/libavcodec/packet.h
vendored
@@ -59,10 +59,6 @@ enum AVPacketSideDataType {
|
||||
* An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
|
||||
* @code
|
||||
* u32le param_flags
|
||||
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT)
|
||||
* s32le channel_count
|
||||
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT)
|
||||
* u64le channel_layout
|
||||
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE)
|
||||
* s32le sample_rate
|
||||
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS)
|
||||
@@ -146,7 +142,7 @@ enum AVPacketSideDataType {
|
||||
AV_PKT_DATA_CPB_PROPERTIES,
|
||||
|
||||
/**
|
||||
* Recommmends skipping the specified number of samples
|
||||
* Recommends skipping the specified number of samples
|
||||
* @code
|
||||
* u32le number of samples to skip from start of this packet
|
||||
* u32le number of samples to skip from end of this packet
|
||||
@@ -330,6 +326,42 @@ enum AVPacketSideDataType {
|
||||
*/
|
||||
AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,
|
||||
|
||||
/**
|
||||
* The number of pixels to discard from the top/bottom/left/right border of the
|
||||
* decoded frame to obtain the sub-rectangle intended for presentation.
|
||||
*
|
||||
* @code
|
||||
* u32le crop_top
|
||||
* u32le crop_bottom
|
||||
* u32le crop_left
|
||||
* u32le crop_right
|
||||
* @endcode
|
||||
*/
|
||||
AV_PKT_DATA_FRAME_CROPPING,
|
||||
|
||||
/**
|
||||
* Raw LCEVC payload data, as a uint8_t array, with NAL emulation
|
||||
* bytes intact.
|
||||
*/
|
||||
AV_PKT_DATA_LCEVC,
|
||||
|
||||
/**
|
||||
* This side data contains information about the reference display width(s)
|
||||
* and reference viewing distance(s) as well as information about the
|
||||
* corresponding reference stereo pair(s), i.e., the pair(s) of views to be
|
||||
* displayed for the viewer's left and right eyes on the reference display
|
||||
* at the reference viewing distance.
|
||||
* The payload is the AV3DReferenceDisplaysInfo struct defined in
|
||||
* libavutil/tdrdi.h.
|
||||
*/
|
||||
AV_PKT_DATA_3D_REFERENCE_DISPLAYS,
|
||||
|
||||
/**
|
||||
* Contains the last received RTCP SR (Sender Report) information
|
||||
* in the form of the AVRTCPSenderReport struct.
|
||||
*/
|
||||
AV_PKT_DATA_RTCP_SR,
|
||||
|
||||
/**
|
||||
* The number of side data types.
|
||||
* This is not part of the public API/ABI in the sense that it may
|
||||
@@ -341,8 +373,6 @@ enum AVPacketSideDataType {
|
||||
AV_PKT_DATA_NB
|
||||
};
|
||||
|
||||
#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
|
||||
|
||||
/**
|
||||
* This structure stores auxiliary information for decoding, presenting, or
|
||||
* otherwise processing the coded stream. It is typically exported by demuxers
|
||||
@@ -351,11 +381,11 @@ enum AVPacketSideDataType {
|
||||
*
|
||||
* Global side data is handled as follows:
|
||||
* - During demuxing, it may be exported through
|
||||
* @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
|
||||
* @ref AVCodecParameters.coded_side_data "AVStream's codec parameters", which can
|
||||
* then be passed as input to decoders through the
|
||||
* @ref AVCodecContext.coded_side_data "decoder context's side data", for
|
||||
* initialization.
|
||||
* - For muxing, it can be fed through @ref AVStream.codecpar.side_data
|
||||
* - For muxing, it can be fed through @ref AVCodecParameters.coded_side_data
|
||||
* "AVStream's codec parameters", typically the output of encoders through
|
||||
* the @ref AVCodecContext.coded_side_data "encoder context's side data", for
|
||||
* initialization.
|
||||
@@ -863,6 +893,13 @@ int av_packet_make_writable(AVPacket *pkt);
|
||||
*/
|
||||
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
|
||||
|
||||
/**
|
||||
* Allocate an AVContainerFifo instance for AVPacket.
|
||||
*
|
||||
* @param flags currently unused
|
||||
*/
|
||||
struct AVContainerFifo *av_container_fifo_alloc_avpacket(unsigned flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
33
3rdparty/ffmpeg/include/libavcodec/vdpau.h
vendored
33
3rdparty/ffmpeg/include/libavcodec/vdpau.h
vendored
@@ -93,28 +93,6 @@ typedef struct AVVDPAUContext {
|
||||
AVVDPAU_Render2 render2;
|
||||
} AVVDPAUContext;
|
||||
|
||||
#if FF_API_VDPAU_ALLOC_GET_SET
|
||||
/**
|
||||
* @brief allocation function for AVVDPAUContext
|
||||
*
|
||||
* Allows extending the struct without breaking API/ABI
|
||||
* @deprecated use av_vdpau_bind_context() instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAUContext *av_alloc_vdpaucontext(void);
|
||||
|
||||
/**
|
||||
* @deprecated render2 is public and can be accessed directly
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
|
||||
/**
|
||||
* @deprecated render2 is public and can be accessed directly
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Associate a VDPAU device with a codec context for hardware acceleration.
|
||||
* This function is meant to be called from the get_format() codec callback,
|
||||
@@ -155,17 +133,6 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
|
||||
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
|
||||
uint32_t *width, uint32_t *height);
|
||||
|
||||
#if FF_API_VDPAU_ALLOC_GET_SET
|
||||
/**
|
||||
* Allocate an AVVDPAUContext.
|
||||
*
|
||||
* @return Newly-allocated AVVDPAUContext or NULL on failure.
|
||||
* @deprecated use av_vdpau_bind_context() instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAUContext *av_vdpau_alloc_context(void);
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* AVCODEC_VDPAU_H */
|
||||
|
||||
2
3rdparty/ffmpeg/include/libavcodec/version.h
vendored
2
3rdparty/ffmpeg/include/libavcodec/version.h
vendored
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 3
|
||||
#define LIBAVCODEC_VERSION_MINOR 11
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* Libavcodec version macros.
|
||||
*/
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 61
|
||||
#define LIBAVCODEC_VERSION_MAJOR 62
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
@@ -37,15 +37,19 @@
|
||||
* at once through the bump. This improves the git bisect-ability of the change.
|
||||
*/
|
||||
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_AVCODEC_CLOSE (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_BUFFER_MIN_SIZE (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_V408_CODECID (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
#define FF_API_CODEC_PROPS (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
#define FF_API_EXR_GAMMA (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_NVDEC_OLD_PIX_FMTS (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
// reminder to remove the OMX encoder on next major bump
|
||||
#define FF_CODEC_OMX (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
// reminder to remove Sonic Lossy/Lossless encoders on next major bump
|
||||
#define FF_CODEC_SONIC_ENC (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
// reminder to remove Sonic decoder on next-next major bump
|
||||
#define FF_CODEC_SONIC_DEC (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
#endif /* AVCODEC_VERSION_MAJOR_H */
|
||||
|
||||
217
3rdparty/ffmpeg/include/libavformat/avformat.h
vendored
217
3rdparty/ffmpeg/include/libavformat/avformat.h
vendored
@@ -146,8 +146,8 @@
|
||||
* consumed). The calling program can handle such unrecognized options as it
|
||||
* wishes, e.g.
|
||||
* @code
|
||||
* AVDictionaryEntry *e;
|
||||
* if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
|
||||
* const AVDictionaryEntry *e;
|
||||
* if ((e = av_dict_iterate(options, NULL))) {
|
||||
* fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key);
|
||||
* abort();
|
||||
* }
|
||||
@@ -459,7 +459,7 @@ typedef struct AVProbeData {
|
||||
#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
|
||||
|
||||
#define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension
|
||||
#define AVPROBE_SCORE_MIME 75 ///< score for file mime type
|
||||
#define AVPROBE_SCORE_MIME_BONUS 30 ///< score added for matching mime type
|
||||
#define AVPROBE_SCORE_MAX 100 ///< maximum score
|
||||
|
||||
#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
|
||||
@@ -470,8 +470,7 @@ typedef struct AVProbeData {
|
||||
/**
|
||||
* The muxer/demuxer is experimental and should be used with caution.
|
||||
*
|
||||
* - demuxers: will not be selected automatically by probing, must be specified
|
||||
* explicitly.
|
||||
* It will not be selected automatically, and must be specified explicitly.
|
||||
*/
|
||||
#define AVFMT_EXPERIMENTAL 0x0004
|
||||
#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */
|
||||
@@ -485,9 +484,6 @@ typedef struct AVProbeData {
|
||||
#define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */
|
||||
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */
|
||||
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */
|
||||
#if FF_API_ALLOW_FLUSH
|
||||
#define AVFMT_ALLOW_FLUSH 0x10000 /**< @deprecated: Just send a NULL packet if you want to flush a muxer. */
|
||||
#endif
|
||||
#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly
|
||||
increasing timestamps, but they must
|
||||
still be monotonic */
|
||||
@@ -713,6 +709,11 @@ typedef struct AVIndexEntry {
|
||||
* The video stream contains still images.
|
||||
*/
|
||||
#define AV_DISPOSITION_STILL_IMAGE (1 << 20)
|
||||
/**
|
||||
* The video stream contains multiple layers, e.g. stereoscopic views (cf. H.264
|
||||
* Annex G/H, or HEVC Annex F).
|
||||
*/
|
||||
#define AV_DISPOSITION_MULTILAYER (1 << 21)
|
||||
|
||||
/**
|
||||
* @return The AV_DISPOSITION_* flag corresponding to disp or a negative error
|
||||
@@ -842,38 +843,6 @@ typedef struct AVStream {
|
||||
*/
|
||||
AVPacket attached_pic;
|
||||
|
||||
#if FF_API_AVSTREAM_SIDE_DATA
|
||||
/**
|
||||
* An array of side data that applies to the whole stream (i.e. the
|
||||
* container does not allow it to change between packets).
|
||||
*
|
||||
* There may be no overlap between the side data in this array and side data
|
||||
* in the packets. I.e. a given side data is either exported by the muxer
|
||||
* (demuxing) / set by the caller (muxing) in this array, then it never
|
||||
* appears in the packets, or the side data is exported / sent through
|
||||
* the packets (always in the first packet where the value becomes known or
|
||||
* changes), then it does not appear in this array.
|
||||
*
|
||||
* - demuxing: Set by libavformat when the stream is created.
|
||||
* - muxing: May be set by the caller before avformat_write_header().
|
||||
*
|
||||
* Freed by libavformat in avformat_free_context().
|
||||
*
|
||||
* @deprecated use AVStream's @ref AVCodecParameters.coded_side_data
|
||||
* "codecpar side data".
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVPacketSideData *side_data;
|
||||
/**
|
||||
* The number of elements in the AVStream.side_data array.
|
||||
*
|
||||
* @deprecated use AVStream's @ref AVCodecParameters.nb_coded_side_data
|
||||
* "codecpar side data".
|
||||
*/
|
||||
attribute_deprecated
|
||||
int nb_side_data;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Flags indicating events happening on the stream, a combination of
|
||||
* AVSTREAM_EVENT_FLAG_*.
|
||||
@@ -957,7 +926,7 @@ typedef struct AVStream {
|
||||
* the sixth @ref AVStreamGroup.streams "stream" in the group is "512,512",
|
||||
* etc.
|
||||
*
|
||||
* The following is an example of a canvas with overlaping tiles:
|
||||
* The following is an example of a canvas with overlapping tiles:
|
||||
*
|
||||
* +-----------+
|
||||
* | %%%%% |
|
||||
@@ -1077,13 +1046,52 @@ typedef struct AVStreamGroupTileGrid {
|
||||
* final image before presentation.
|
||||
*/
|
||||
int height;
|
||||
|
||||
/**
|
||||
* Additional data associated with the grid.
|
||||
*
|
||||
* Should be allocated with av_packet_side_data_new() or
|
||||
* av_packet_side_data_add(), and will be freed by avformat_free_context().
|
||||
*/
|
||||
AVPacketSideData *coded_side_data;
|
||||
|
||||
/**
|
||||
* Amount of entries in @ref coded_side_data.
|
||||
*/
|
||||
int nb_coded_side_data;
|
||||
} AVStreamGroupTileGrid;
|
||||
|
||||
/**
|
||||
* AVStreamGroupLCEVC is meant to define the relation between video streams
|
||||
* and a data stream containing LCEVC enhancement layer NALUs.
|
||||
*
|
||||
* No more than one stream of @ref AVCodecParameters.codec_type "codec_type"
|
||||
* AVMEDIA_TYPE_DATA shall be present, and it must be of
|
||||
* @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC.
|
||||
*/
|
||||
typedef struct AVStreamGroupLCEVC {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Index of the LCEVC data stream in AVStreamGroup.
|
||||
*/
|
||||
unsigned int lcevc_index;
|
||||
/**
|
||||
* Width of the final stream for presentation.
|
||||
*/
|
||||
int width;
|
||||
/**
|
||||
* Height of the final image for presentation.
|
||||
*/
|
||||
int height;
|
||||
} AVStreamGroupLCEVC;
|
||||
|
||||
enum AVStreamGroupParamsType {
|
||||
AV_STREAM_GROUP_PARAMS_NONE,
|
||||
AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT,
|
||||
AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION,
|
||||
AV_STREAM_GROUP_PARAMS_TILE_GRID,
|
||||
AV_STREAM_GROUP_PARAMS_LCEVC,
|
||||
};
|
||||
|
||||
struct AVIAMFAudioElement;
|
||||
@@ -1125,6 +1133,7 @@ typedef struct AVStreamGroup {
|
||||
struct AVIAMFAudioElement *iamf_audio_element;
|
||||
struct AVIAMFMixPresentation *iamf_mix_presentation;
|
||||
struct AVStreamGroupTileGrid *tile_grid;
|
||||
struct AVStreamGroupLCEVC *lcevc;
|
||||
} params;
|
||||
|
||||
/**
|
||||
@@ -1411,7 +1420,7 @@ typedef struct AVFormatContext {
|
||||
#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
|
||||
#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
|
||||
#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container
|
||||
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
|
||||
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the filling code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
|
||||
#define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible
|
||||
#define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
|
||||
#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted
|
||||
@@ -1425,9 +1434,6 @@ typedef struct AVFormatContext {
|
||||
#define AVFMT_FLAG_BITEXACT 0x0400
|
||||
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
|
||||
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
|
||||
#if FF_API_LAVF_SHORTEST
|
||||
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
|
||||
#endif
|
||||
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
|
||||
|
||||
/**
|
||||
@@ -1439,7 +1445,7 @@ typedef struct AVFormatContext {
|
||||
*
|
||||
* @note this is \e not used for determining the \ref AVInputFormat
|
||||
* "input format"
|
||||
* @sa format_probesize
|
||||
* @see format_probesize
|
||||
*/
|
||||
int64_t probesize;
|
||||
|
||||
@@ -1664,9 +1670,11 @@ typedef struct AVFormatContext {
|
||||
int use_wallclock_as_timestamps;
|
||||
|
||||
/**
|
||||
* Skip duration calcuation in estimate_timings_from_pts.
|
||||
* Skip duration calculation in estimate_timings_from_pts.
|
||||
* - encoding: unused
|
||||
* - decoding: set by user
|
||||
*
|
||||
* @see duration_probesize
|
||||
*/
|
||||
int skip_estimate_duration_from_pts;
|
||||
|
||||
@@ -1729,7 +1737,7 @@ typedef struct AVFormatContext {
|
||||
*
|
||||
* Demuxing only, set by the caller before avformat_open_input().
|
||||
*
|
||||
* @sa probesize
|
||||
* @see probesize
|
||||
*/
|
||||
int format_probesize;
|
||||
|
||||
@@ -1765,7 +1773,7 @@ typedef struct AVFormatContext {
|
||||
|
||||
/**
|
||||
* IO repositioned flag.
|
||||
* This is set by avformat when the underlaying IO context read pointer
|
||||
* This is set by avformat when the underlying IO context read pointer
|
||||
* is repositioned, for example when doing byte based seeking.
|
||||
* Demuxers can use the flag to detect such changes.
|
||||
*/
|
||||
@@ -1861,40 +1869,23 @@ typedef struct AVFormatContext {
|
||||
/**
|
||||
* A callback for closing the streams opened with AVFormatContext.io_open().
|
||||
*
|
||||
* Using this is preferred over io_close, because this can return an error.
|
||||
* Therefore this callback is used instead of io_close by the generic
|
||||
* libavformat code if io_close is NULL or the default.
|
||||
*
|
||||
* @param s the format context
|
||||
* @param pb IO context to be closed and freed
|
||||
* @return 0 on success, a negative AVERROR code on failure
|
||||
*/
|
||||
int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb);
|
||||
|
||||
/**
|
||||
* Maximum number of bytes read from input in order to determine stream durations
|
||||
* when using estimate_timings_from_pts in avformat_find_stream_info().
|
||||
* Demuxing only, set by the caller before avformat_find_stream_info().
|
||||
* Can be set to 0 to let avformat choose using a heuristic.
|
||||
*
|
||||
* @see skip_estimate_duration_from_pts
|
||||
*/
|
||||
int64_t duration_probesize;
|
||||
} AVFormatContext;
|
||||
|
||||
/**
|
||||
* This function will cause global side data to be injected in the next packet
|
||||
* of each stream as well as after any subsequent seek.
|
||||
*
|
||||
* @note global side data is always available in every AVStream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
|
||||
* in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
|
||||
* initialized with said stream's codecpar.
|
||||
* @see av_packet_side_data_get()
|
||||
*/
|
||||
void av_format_inject_global_side_data(AVFormatContext *s);
|
||||
|
||||
#if FF_API_GET_DUR_ESTIMATE_METHOD
|
||||
/**
|
||||
* Returns the method used to set ctx->duration.
|
||||
*
|
||||
* @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
|
||||
* @deprecated duration_estimation_method is public and can be read directly.
|
||||
*/
|
||||
attribute_deprecated
|
||||
enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup lavf_core Core functions
|
||||
* @ingroup libavf
|
||||
@@ -2072,57 +2063,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const struct AVCodec *c);
|
||||
*/
|
||||
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st);
|
||||
|
||||
#if FF_API_AVSTREAM_SIDE_DATA
|
||||
/**
|
||||
* Wrap an existing array as stream side data.
|
||||
*
|
||||
* @param st stream
|
||||
* @param type side information type
|
||||
* @param data the side data array. It must be allocated with the av_malloc()
|
||||
* family of functions. The ownership of the data is transferred to
|
||||
* st.
|
||||
* @param size side information size
|
||||
*
|
||||
* @return zero on success, a negative AVERROR code on failure. On failure,
|
||||
* the stream is unchanged and the data remains owned by the caller.
|
||||
* @deprecated use av_packet_side_data_add() with the stream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data"
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
|
||||
uint8_t *data, size_t size);
|
||||
|
||||
/**
|
||||
* Allocate new information from stream.
|
||||
*
|
||||
* @param stream stream
|
||||
* @param type desired side information type
|
||||
* @param size side information size
|
||||
*
|
||||
* @return pointer to fresh allocated data or NULL otherwise
|
||||
* @deprecated use av_packet_side_data_new() with the stream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data"
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint8_t *av_stream_new_side_data(AVStream *stream,
|
||||
enum AVPacketSideDataType type, size_t size);
|
||||
/**
|
||||
* Get side information from stream.
|
||||
*
|
||||
* @param stream stream
|
||||
* @param type desired side information type
|
||||
* @param size If supplied, *size will be set to the size of the side data
|
||||
* or to zero if the desired side data is not present.
|
||||
*
|
||||
* @return pointer to data if present or NULL otherwise
|
||||
* @deprecated use av_packet_side_data_get() with the stream's
|
||||
* @ref AVCodecParameters.coded_side_data "codecpar side data"
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint8_t *av_stream_get_side_data(const AVStream *stream,
|
||||
enum AVPacketSideDataType type, size_t *size);
|
||||
#endif
|
||||
|
||||
AVProgram *av_new_program(AVFormatContext *s, int id);
|
||||
|
||||
/**
|
||||
@@ -2231,7 +2171,7 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
|
||||
* which case an AVFormatContext is allocated by this
|
||||
* function and written into ps.
|
||||
* Note that a user-supplied AVFormatContext will be freed
|
||||
* on failure.
|
||||
* on failure and its pointer set to NULL.
|
||||
* @param url URL of the stream to open.
|
||||
* @param fmt If non-NULL, this parameter forces a specific input format.
|
||||
* Otherwise the format is autodetected.
|
||||
@@ -2240,7 +2180,8 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
|
||||
* On return this parameter will be destroyed and replaced with
|
||||
* a dict containing options that were not found. May be NULL.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on failure.
|
||||
* @return 0 on success; on failure: frees ps, sets its pointer to NULL,
|
||||
* and returns a negative AVERROR.
|
||||
*
|
||||
* @note If you want to use custom IO, preallocate the format context and set its pb field.
|
||||
*/
|
||||
@@ -3030,6 +2971,7 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st,
|
||||
|
||||
int avformat_queue_attached_pictures(AVFormatContext *s);
|
||||
|
||||
#if FF_API_INTERNAL_TIMING
|
||||
enum AVTimebaseSource {
|
||||
AVFMT_TBCF_AUTO = -1,
|
||||
AVFMT_TBCF_DECODER,
|
||||
@@ -3040,25 +2982,20 @@ enum AVTimebaseSource {
|
||||
};
|
||||
|
||||
/**
|
||||
* Transfer internal timing information from one stream to another.
|
||||
*
|
||||
* This function is useful when doing stream copy.
|
||||
*
|
||||
* @param ofmt target output format for ost
|
||||
* @param ost output stream which needs timings copy and adjustments
|
||||
* @param ist reference input stream to copy timings from
|
||||
* @param copy_tb define from where the stream codec timebase needs to be imported
|
||||
* @deprecated do not call this function
|
||||
*/
|
||||
attribute_deprecated
|
||||
int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
|
||||
AVStream *ost, const AVStream *ist,
|
||||
enum AVTimebaseSource copy_tb);
|
||||
|
||||
/**
|
||||
* Get the internal codec timebase from a stream.
|
||||
*
|
||||
* @param st input stream to extract the timebase from
|
||||
* @deprecated do not call this function
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational av_stream_get_codec_timebase(const AVStream *st);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 1
|
||||
#define LIBAVFORMAT_VERSION_MINOR 3
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
|
||||
// Also please add any ticket numbers that you believe might be affected here
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 61
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 62
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
@@ -41,12 +41,11 @@
|
||||
* at once through the bump. This improves the git bisect-ability of the change.
|
||||
*
|
||||
*/
|
||||
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_GET_DUR_ESTIMATE_METHOD (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_NO_DEFAULT_TLS_VERIFY (LIBAVFORMAT_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_R_FRAME_RATE 1
|
||||
|
||||
|
||||
@@ -159,9 +159,11 @@
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define av_builtin_constant_p __builtin_constant_p
|
||||
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
|
||||
# define av_scanf_format(fmtpos, attrpos) __attribute__((__format__(__scanf__, fmtpos, attrpos)))
|
||||
#else
|
||||
# define av_builtin_constant_p(x) 0
|
||||
# define av_printf_format(fmtpos, attrpos)
|
||||
# define av_scanf_format(fmtpos, attrpos)
|
||||
#endif
|
||||
|
||||
#if AV_GCC_VERSION_AT_LEAST(2,5) || defined(__clang__)
|
||||
|
||||
45
3rdparty/ffmpeg/include/libavutil/avassert.h
vendored
45
3rdparty/ffmpeg/include/libavutil/avassert.h
vendored
@@ -31,6 +31,7 @@
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include "attributes.h"
|
||||
#include "log.h"
|
||||
#include "macros.h"
|
||||
|
||||
@@ -75,4 +76,48 @@
|
||||
*/
|
||||
void av_assert0_fpu(void);
|
||||
|
||||
/**
|
||||
* Asserts that are used as compiler optimization hints depending
|
||||
* upon ASSERT_LEVEL and NBDEBUG.
|
||||
*
|
||||
* Undefined behaviour occurs if execution reaches a point marked
|
||||
* with av_unreachable() or if a condition used with av_assume()
|
||||
* is false.
|
||||
*
|
||||
* The condition used with av_assume() should not have side-effects
|
||||
* and should be visible to the compiler.
|
||||
*/
|
||||
#if defined(ASSERT_LEVEL) ? ASSERT_LEVEL > 0 : !defined(HAVE_AV_CONFIG_H) && !defined(NDEBUG)
|
||||
#define av_unreachable(msg) \
|
||||
do { \
|
||||
av_log(NULL, AV_LOG_PANIC, \
|
||||
"Reached supposedly unreachable code at %s:%d: %s\n", \
|
||||
__FILE__, __LINE__, msg); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
#define av_assume(cond) av_assert0(cond)
|
||||
#else
|
||||
#if AV_GCC_VERSION_AT_LEAST(4, 5) || AV_HAS_BUILTIN(__builtin_unreachable)
|
||||
#define av_unreachable(msg) __builtin_unreachable()
|
||||
#elif defined(_MSC_VER)
|
||||
#define av_unreachable(msg) __assume(0)
|
||||
#elif __STDC_VERSION__ >= 202311L
|
||||
#include <stddef.h>
|
||||
#define av_unreachable(msg) unreachable()
|
||||
#else
|
||||
#define av_unreachable(msg) ((void)0)
|
||||
#endif
|
||||
|
||||
#if AV_HAS_BUILTIN(__builtin_assume)
|
||||
#define av_assume(cond) __builtin_assume(cond)
|
||||
#elif defined(_MSC_VER)
|
||||
#define av_assume(cond) __assume(cond)
|
||||
#else
|
||||
#define av_assume(cond) do { \
|
||||
if (!(cond)) \
|
||||
av_unreachable(); \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_AVASSERT_H */
|
||||
|
||||
2
3rdparty/ffmpeg/include/libavutil/avstring.h
vendored
2
3rdparty/ffmpeg/include/libavutil/avstring.h
vendored
@@ -419,7 +419,7 @@ int av_match_list(const char *name, const char *list, char separator);
|
||||
* See libc sscanf manual for more information.
|
||||
* Locale-independent sscanf implementation.
|
||||
*/
|
||||
int av_sscanf(const char *string, const char *format, ...);
|
||||
int av_sscanf(const char *string, const char *format, ...) av_scanf_format(2, 3);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
4
3rdparty/ffmpeg/include/libavutil/avutil.h
vendored
4
3rdparty/ffmpeg/include/libavutil/avutil.h
vendored
@@ -41,7 +41,6 @@
|
||||
* @li @ref lavd "libavdevice" special devices muxing/demuxing library
|
||||
* @li @ref lavu "libavutil" common utility library
|
||||
* @li @ref lswr "libswresample" audio resampling, format conversion and mixing
|
||||
* @li @ref lpp "libpostproc" post processing library
|
||||
* @li @ref libsws "libswscale" color conversion and scaling library
|
||||
*
|
||||
* @section ffmpeg_versioning Versioning and compatibility
|
||||
@@ -314,6 +313,7 @@ static inline void *av_x_if_null(const void *p, const void *x)
|
||||
return (void *)(intptr_t)(p ? p : x);
|
||||
}
|
||||
|
||||
#if FF_API_OPT_INT_LIST
|
||||
/**
|
||||
* Compute the length of an integer list.
|
||||
*
|
||||
@@ -322,6 +322,7 @@ static inline void *av_x_if_null(const void *p, const void *x)
|
||||
* @param list pointer to the list
|
||||
* @return length of the list, in elements, not counting the terminator
|
||||
*/
|
||||
attribute_deprecated
|
||||
unsigned av_int_list_length_for_size(unsigned elsize,
|
||||
const void *list, uint64_t term) av_pure;
|
||||
|
||||
@@ -334,6 +335,7 @@ unsigned av_int_list_length_for_size(unsigned elsize,
|
||||
*/
|
||||
#define av_int_list_length(list, term) \
|
||||
av_int_list_length_for_size(sizeof(*(list)), list, term)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return the fractional representation of the internal time base.
|
||||
|
||||
8
3rdparty/ffmpeg/include/libavutil/bswap.h
vendored
8
3rdparty/ffmpeg/include/libavutil/bswap.h
vendored
@@ -34,16 +34,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if ARCH_AARCH64
|
||||
# include "aarch64/bswap.h"
|
||||
#elif ARCH_ARM
|
||||
#if ARCH_ARM
|
||||
# include "arm/bswap.h"
|
||||
#elif ARCH_AVR32
|
||||
# include "avr32/bswap.h"
|
||||
#elif ARCH_RISCV
|
||||
# include "riscv/bswap.h"
|
||||
#elif ARCH_SH4
|
||||
# include "sh4/bswap.h"
|
||||
#elif ARCH_X86
|
||||
# include "x86/bswap.h"
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
enum AVChannel {
|
||||
///< Invalid channel index
|
||||
/// Invalid channel index
|
||||
AV_CHAN_NONE = -1,
|
||||
AV_CHAN_FRONT_LEFT,
|
||||
AV_CHAN_FRONT_RIGHT,
|
||||
@@ -79,6 +79,13 @@ enum AVChannel {
|
||||
AV_CHAN_BOTTOM_FRONT_CENTER,
|
||||
AV_CHAN_BOTTOM_FRONT_LEFT,
|
||||
AV_CHAN_BOTTOM_FRONT_RIGHT,
|
||||
AV_CHAN_SIDE_SURROUND_LEFT, ///< +90 degrees, Lss, SiL
|
||||
AV_CHAN_SIDE_SURROUND_RIGHT, ///< -90 degrees, Rss, SiR
|
||||
AV_CHAN_TOP_SURROUND_LEFT, ///< +110 degrees, Lvs, TpLS
|
||||
AV_CHAN_TOP_SURROUND_RIGHT, ///< -110 degrees, Rvs, TpRS
|
||||
|
||||
AV_CHAN_BINAURAL_LEFT = 61,
|
||||
AV_CHAN_BINAURAL_RIGHT,
|
||||
|
||||
/** Channel is empty can be safely skipped. */
|
||||
AV_CHAN_UNUSED = 0x200,
|
||||
@@ -195,6 +202,12 @@ enum AVChannelOrder {
|
||||
#define AV_CH_BOTTOM_FRONT_CENTER (1ULL << AV_CHAN_BOTTOM_FRONT_CENTER )
|
||||
#define AV_CH_BOTTOM_FRONT_LEFT (1ULL << AV_CHAN_BOTTOM_FRONT_LEFT )
|
||||
#define AV_CH_BOTTOM_FRONT_RIGHT (1ULL << AV_CHAN_BOTTOM_FRONT_RIGHT )
|
||||
#define AV_CH_SIDE_SURROUND_LEFT (1ULL << AV_CHAN_SIDE_SURROUND_LEFT )
|
||||
#define AV_CH_SIDE_SURROUND_RIGHT (1ULL << AV_CHAN_SIDE_SURROUND_RIGHT )
|
||||
#define AV_CH_TOP_SURROUND_LEFT (1ULL << AV_CHAN_TOP_SURROUND_LEFT )
|
||||
#define AV_CH_TOP_SURROUND_RIGHT (1ULL << AV_CHAN_TOP_SURROUND_RIGHT )
|
||||
#define AV_CH_BINAURAL_LEFT (1ULL << AV_CHAN_BINAURAL_LEFT )
|
||||
#define AV_CH_BINAURAL_RIGHT (1ULL << AV_CHAN_BINAURAL_RIGHT )
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -227,17 +240,20 @@ enum AVChannelOrder {
|
||||
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT2 (AV_CH_LAYOUT_5POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT2_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2_BACK|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1POINT2 (AV_CH_LAYOUT_7POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT2POINT3 (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_CENTER|AV_CH_LOW_FREQUENCY_2)
|
||||
#define AV_CH_LAYOUT_9POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_9POINT1POINT6 (AV_CH_LAYOUT_9POINT1POINT4_BACK|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT)
|
||||
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_BINAURAL (AV_CH_BINAURAL_LEFT|AV_CH_BINAURAL_RIGHT)
|
||||
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
|
||||
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_9POINT1POINT6|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
|
||||
|
||||
#define AV_CH_LAYOUT_7POINT1_TOP_BACK AV_CH_LAYOUT_5POINT1POINT2_BACK
|
||||
|
||||
@@ -291,7 +307,7 @@ typedef struct AVChannelCustom {
|
||||
* - with a constructor function, such as av_channel_layout_default(),
|
||||
* av_channel_layout_from_mask() or av_channel_layout_from_string().
|
||||
*
|
||||
* The channel layout must be unitialized with av_channel_layout_uninit()
|
||||
* The channel layout must be uninitialized with av_channel_layout_uninit()
|
||||
*
|
||||
* Copying an AVChannelLayout via assigning is forbidden,
|
||||
* av_channel_layout_copy() must be used instead (and its return value should
|
||||
@@ -349,7 +365,7 @@ typedef struct AVChannelLayout {
|
||||
*
|
||||
* map[i].name may be filled with a 0-terminated string, in which case
|
||||
* it will be used for the purpose of identifying the channel with the
|
||||
* convenience functions below. Otherise it must be zeroed.
|
||||
* convenience functions below. Otherwise it must be zeroed.
|
||||
*/
|
||||
AVChannelCustom *map;
|
||||
} u;
|
||||
@@ -401,6 +417,7 @@ typedef struct AVChannelLayout {
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_5POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2)
|
||||
#define AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
|
||||
@@ -409,7 +426,9 @@ typedef struct AVChannelLayout {
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT2POINT3 AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT2POINT3)
|
||||
#define AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(14, AV_CH_LAYOUT_9POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_9POINT1POINT6 AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_9POINT1POINT6)
|
||||
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_BINAURAL AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_BINAURAL)
|
||||
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
|
||||
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
|
||||
|
||||
@@ -679,6 +698,16 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout);
|
||||
*/
|
||||
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1);
|
||||
|
||||
/**
|
||||
* Return the order if the layout is n-th order standard-order ambisonic.
|
||||
* The presence of optional extra non-diegetic channels at the end is not taken
|
||||
* into account.
|
||||
*
|
||||
* @param channel_layout input channel layout
|
||||
* @return the order of the layout, a negative error code otherwise.
|
||||
*/
|
||||
int av_channel_layout_ambisonic_order(const AVChannelLayout *channel_layout);
|
||||
|
||||
/**
|
||||
* The conversion must be lossless.
|
||||
*/
|
||||
|
||||
38
3rdparty/ffmpeg/include/libavutil/common.h
vendored
38
3rdparty/ffmpeg/include/libavutil/common.h
vendored
@@ -42,12 +42,14 @@
|
||||
#include "attributes.h"
|
||||
#include "error.h"
|
||||
#include "macros.h"
|
||||
#include "mem.h"
|
||||
#include "version.h"
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
# include "intmath.h"
|
||||
# include "internal.h"
|
||||
#else
|
||||
# include "mem.h"
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
//rounded division & shift
|
||||
@@ -121,9 +123,6 @@
|
||||
#ifndef av_clip_uintp2
|
||||
# define av_clip_uintp2 av_clip_uintp2_c
|
||||
#endif
|
||||
#ifndef av_mod_uintp2
|
||||
# define av_mod_uintp2 av_mod_uintp2_c
|
||||
#endif
|
||||
#ifndef av_sat_add32
|
||||
# define av_sat_add32 av_sat_add32_c
|
||||
#endif
|
||||
@@ -148,6 +147,9 @@
|
||||
#ifndef av_clipd
|
||||
# define av_clipd av_clipd_c
|
||||
#endif
|
||||
#ifndef av_zero_extend
|
||||
# define av_zero_extend av_zero_extend_c
|
||||
#endif
|
||||
#ifndef av_popcount
|
||||
# define av_popcount av_popcount_c
|
||||
#endif
|
||||
@@ -251,8 +253,8 @@ static av_always_inline av_const int16_t av_clip_int16_c(int a)
|
||||
*/
|
||||
static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
|
||||
{
|
||||
if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
|
||||
else return (int32_t)a;
|
||||
if ((a+UINT64_C(0x80000000)) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
|
||||
else return (int32_t)a;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,7 +265,7 @@ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
|
||||
*/
|
||||
static av_always_inline av_const int av_clip_intp2_c(int a, int p)
|
||||
{
|
||||
if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
|
||||
if (((unsigned)a + (1U << p)) & ~((2U << p) - 1))
|
||||
return (a >> 31) ^ ((1 << p) - 1);
|
||||
else
|
||||
return a;
|
||||
@@ -277,21 +279,35 @@ static av_always_inline av_const int av_clip_intp2_c(int a, int p)
|
||||
*/
|
||||
static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
|
||||
{
|
||||
if (a & ~((1<<p) - 1)) return (~a) >> 31 & ((1<<p) - 1);
|
||||
else return a;
|
||||
if (a & ~((1U<<p) - 1)) return (~a) >> 31 & ((1U<<p) - 1);
|
||||
else return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear high bits from an unsigned integer starting with specific bit position
|
||||
* @param a value to clip
|
||||
* @param p bit position to clip at
|
||||
* @param p bit position to clip at. Must be between 0 and 31.
|
||||
* @return clipped value
|
||||
*/
|
||||
static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
|
||||
static av_always_inline av_const unsigned av_zero_extend_c(unsigned a, unsigned p)
|
||||
{
|
||||
#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2
|
||||
if (p > 31) abort();
|
||||
#endif
|
||||
return a & ((1U << p) - 1);
|
||||
}
|
||||
|
||||
#if FF_API_MOD_UINTP2
|
||||
#ifndef av_mod_uintp2
|
||||
# define av_mod_uintp2 av_mod_uintp2_c
|
||||
#endif
|
||||
attribute_deprecated
|
||||
static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)
|
||||
{
|
||||
return av_zero_extend_c(a, p);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Add two signed 32-bit values with saturation.
|
||||
*
|
||||
|
||||
13
3rdparty/ffmpeg/include/libavutil/cpu.h
vendored
13
3rdparty/ffmpeg/include/libavutil/cpu.h
vendored
@@ -22,6 +22,7 @@
|
||||
#define AVUTIL_CPU_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "version.h"
|
||||
|
||||
#define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */
|
||||
|
||||
@@ -71,6 +72,8 @@
|
||||
#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations
|
||||
#define AV_CPU_FLAG_DOTPROD (1 << 8)
|
||||
#define AV_CPU_FLAG_I8MM (1 << 9)
|
||||
#define AV_CPU_FLAG_SVE (1 <<10)
|
||||
#define AV_CPU_FLAG_SVE2 (1 <<11)
|
||||
#define AV_CPU_FLAG_SETEND (1 <<16)
|
||||
|
||||
#define AV_CPU_FLAG_MMI (1 << 0)
|
||||
@@ -82,14 +85,24 @@
|
||||
|
||||
// RISC-V extensions
|
||||
#define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank)
|
||||
#if FF_API_RISCV_FD_ZBA
|
||||
#define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP)
|
||||
#define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP)
|
||||
#endif
|
||||
#define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */
|
||||
#define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */
|
||||
#define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */
|
||||
#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
|
||||
#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
|
||||
#if FF_API_RISCV_FD_ZBA
|
||||
#define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations
|
||||
#endif
|
||||
#define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations
|
||||
#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
|
||||
#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations)
|
||||
|
||||
// WASM extensions
|
||||
#define AV_CPU_FLAG_SIMD128 (1 << 0)
|
||||
|
||||
/**
|
||||
* Return the flags which specify extensions supported by the CPU.
|
||||
|
||||
48
3rdparty/ffmpeg/include/libavutil/csp.h
vendored
48
3rdparty/ffmpeg/include/libavutil/csp.h
vendored
@@ -81,8 +81,12 @@ typedef struct AVColorPrimariesDesc {
|
||||
} AVColorPrimariesDesc;
|
||||
|
||||
/**
|
||||
* Function pointer representing a double -> double transfer function that performs
|
||||
* an EOTF transfer inversion. This function outputs linear light.
|
||||
* Function pointer representing a double -> double transfer function that
|
||||
* performs either an OETF transfer function, or alternatively an inverse EOTF
|
||||
* function (in particular, for SMPTE ST 2084 / PQ). This function inputs
|
||||
* linear light, and outputs gamma encoded light.
|
||||
*
|
||||
* See ITU-T H.273 for more information.
|
||||
*/
|
||||
typedef double (*av_csp_trc_function)(double);
|
||||
|
||||
@@ -110,7 +114,7 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
|
||||
* @see enum AVColorPrimaries
|
||||
* @param prm A description of the colorspace gamut
|
||||
* @return The enum constant associated with this gamut, or
|
||||
* AVCOL_PRI_UNSPECIFIED if no clear match can be idenitified.
|
||||
* AVCOL_PRI_UNSPECIFIED if no clear match can be identified.
|
||||
*/
|
||||
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm);
|
||||
|
||||
@@ -143,6 +147,44 @@ double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
|
||||
*/
|
||||
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Returns the mathematical inverse of the corresponding TRC function.
|
||||
*/
|
||||
av_csp_trc_function av_csp_trc_func_inv_from_id(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Function pointer representing an ITU EOTF transfer for a given reference
|
||||
* display configuration.
|
||||
*
|
||||
* @param Lw The white point luminance of the display, in nits (cd/m^2).
|
||||
* @param Lb The black point luminance of the display, in nits (cd/m^2).
|
||||
*/
|
||||
typedef void (*av_csp_eotf_function)(double Lw, double Lb, double c[3]);
|
||||
|
||||
/**
|
||||
* Returns the ITU EOTF corresponding to a given TRC. This converts from the
|
||||
* signal level [0,1] to the raw output display luminance in nits (cd/m^2).
|
||||
* This is done per channel in RGB space, except for AVCOL_TRC_SMPTE428, which
|
||||
* assumes CIE XYZ in- and output.
|
||||
*
|
||||
* @return A pointer to the function implementing the given TRC, or NULL if no
|
||||
* such function is defined.
|
||||
*
|
||||
* @note In general, the resulting function is defined (wherever possible) for
|
||||
* out-of-range values, even though these values do not have a physical
|
||||
* meaning on the given display. Users should clamp inputs (or outputs)
|
||||
* if this behavior is not desired.
|
||||
*
|
||||
* This is also the case for functions like PQ, which are defined over an
|
||||
* absolute signal range independent of the target display capabilities.
|
||||
*/
|
||||
av_csp_eotf_function av_csp_itu_eotf(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Returns the mathematical inverse of the corresponding EOTF.
|
||||
*/
|
||||
av_csp_eotf_function av_csp_itu_eotf_inv(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
3
3rdparty/ffmpeg/include/libavutil/dict.h
vendored
3
3rdparty/ffmpeg/include/libavutil/dict.h
vendored
@@ -82,6 +82,7 @@
|
||||
#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
|
||||
delimiter is added, the strings are simply concatenated. */
|
||||
#define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */
|
||||
#define AV_DICT_DEDUP 128 /**< If inserting a value that already exists for a key, do nothing. Only relevant with AV_DICT_MULTIKEY. */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -224,7 +225,7 @@ void av_dict_free(AVDictionary **m);
|
||||
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
|
||||
*
|
||||
* @param[in] m The dictionary
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containg entries.
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containing entries.
|
||||
* Buffer must be freed by the caller when is no longer needed.
|
||||
* @param[in] key_val_sep Character used to separate key from value
|
||||
* @param[in] pairs_sep Character used to separate two pairs from each other
|
||||
|
||||
160
3rdparty/ffmpeg/include/libavutil/dovi_meta.h
vendored
160
3rdparty/ffmpeg/include/libavutil/dovi_meta.h
vendored
@@ -29,7 +29,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "rational.h"
|
||||
#include "csp.h"
|
||||
|
||||
/*
|
||||
* DOVI configuration
|
||||
@@ -44,6 +46,7 @@
|
||||
* uint8_t el_present_flag
|
||||
* uint8_t bl_present_flag
|
||||
* uint8_t dv_bl_signal_compatibility_id
|
||||
* uint8_t dv_md_compression, the compression method in use
|
||||
* @endcode
|
||||
*
|
||||
* @note The struct must be allocated with av_dovi_alloc() and
|
||||
@@ -58,8 +61,16 @@ typedef struct AVDOVIDecoderConfigurationRecord {
|
||||
uint8_t el_present_flag;
|
||||
uint8_t bl_present_flag;
|
||||
uint8_t dv_bl_signal_compatibility_id;
|
||||
uint8_t dv_md_compression;
|
||||
} AVDOVIDecoderConfigurationRecord;
|
||||
|
||||
enum AVDOVICompression {
|
||||
AV_DOVI_COMPRESSION_NONE = 0,
|
||||
AV_DOVI_COMPRESSION_LIMITED = 1,
|
||||
AV_DOVI_COMPRESSION_RESERVED = 2,
|
||||
AV_DOVI_COMPRESSION_EXTENDED = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* Allocate a AVDOVIDecoderConfigurationRecord structure and initialize its
|
||||
* fields to default values.
|
||||
@@ -89,6 +100,8 @@ typedef struct AVDOVIRpuDataHeader {
|
||||
uint8_t spatial_resampling_filter_flag;
|
||||
uint8_t el_spatial_resampling_filter_flag;
|
||||
uint8_t disable_residual_flag;
|
||||
uint8_t ext_mapping_idc_0_4; /* extended base layer inverse mapping indicator */
|
||||
uint8_t ext_mapping_idc_5_7; /* reserved */
|
||||
} AVDOVIRpuDataHeader;
|
||||
|
||||
enum AVDOVIMappingMethod {
|
||||
@@ -147,6 +160,7 @@ typedef struct AVDOVIDataMapping {
|
||||
uint32_t num_x_partitions;
|
||||
uint32_t num_y_partitions;
|
||||
AVDOVINLQParams nlq[3]; /* per component */
|
||||
uint16_t nlq_pivots[2];
|
||||
} AVDOVIDataMapping;
|
||||
|
||||
/**
|
||||
@@ -186,6 +200,132 @@ typedef struct AVDOVIColorMetadata {
|
||||
uint16_t source_diagonal;
|
||||
} AVDOVIColorMetadata;
|
||||
|
||||
typedef struct AVDOVIDmLevel1 {
|
||||
/* Per-frame brightness metadata */
|
||||
uint16_t min_pq;
|
||||
uint16_t max_pq;
|
||||
uint16_t avg_pq;
|
||||
} AVDOVIDmLevel1;
|
||||
|
||||
typedef struct AVDOVIDmLevel2 {
|
||||
/* Usually derived from level 8 (at different levels) */
|
||||
uint16_t target_max_pq;
|
||||
uint16_t trim_slope;
|
||||
uint16_t trim_offset;
|
||||
uint16_t trim_power;
|
||||
uint16_t trim_chroma_weight;
|
||||
uint16_t trim_saturation_gain;
|
||||
int16_t ms_weight;
|
||||
} AVDOVIDmLevel2;
|
||||
|
||||
typedef struct AVDOVIDmLevel3 {
|
||||
uint16_t min_pq_offset;
|
||||
uint16_t max_pq_offset;
|
||||
uint16_t avg_pq_offset;
|
||||
} AVDOVIDmLevel3;
|
||||
|
||||
typedef struct AVDOVIDmLevel4 {
|
||||
uint16_t anchor_pq;
|
||||
uint16_t anchor_power;
|
||||
} AVDOVIDmLevel4;
|
||||
|
||||
typedef struct AVDOVIDmLevel5 {
|
||||
/* Active area definition */
|
||||
uint16_t left_offset;
|
||||
uint16_t right_offset;
|
||||
uint16_t top_offset;
|
||||
uint16_t bottom_offset;
|
||||
} AVDOVIDmLevel5;
|
||||
|
||||
typedef struct AVDOVIDmLevel6 {
|
||||
/* Static HDR10 metadata */
|
||||
uint16_t max_luminance;
|
||||
uint16_t min_luminance;
|
||||
uint16_t max_cll;
|
||||
uint16_t max_fall;
|
||||
} AVDOVIDmLevel6;
|
||||
|
||||
typedef struct AVDOVIDmLevel8 {
|
||||
/* Extended version of level 2 */
|
||||
uint8_t target_display_index;
|
||||
uint16_t trim_slope;
|
||||
uint16_t trim_offset;
|
||||
uint16_t trim_power;
|
||||
uint16_t trim_chroma_weight;
|
||||
uint16_t trim_saturation_gain;
|
||||
uint16_t ms_weight;
|
||||
uint16_t target_mid_contrast;
|
||||
uint16_t clip_trim;
|
||||
uint8_t saturation_vector_field[6];
|
||||
uint8_t hue_vector_field[6];
|
||||
} AVDOVIDmLevel8;
|
||||
|
||||
typedef struct AVDOVIDmLevel9 {
|
||||
/* Source display characteristics */
|
||||
uint8_t source_primary_index;
|
||||
AVColorPrimariesDesc source_display_primaries;
|
||||
} AVDOVIDmLevel9;
|
||||
|
||||
typedef struct AVDOVIDmLevel10 {
|
||||
/* Target display characteristics */
|
||||
uint8_t target_display_index;
|
||||
uint16_t target_max_pq;
|
||||
uint16_t target_min_pq;
|
||||
uint8_t target_primary_index;
|
||||
AVColorPrimariesDesc target_display_primaries;
|
||||
} AVDOVIDmLevel10;
|
||||
|
||||
typedef struct AVDOVIDmLevel11 {
|
||||
uint8_t content_type;
|
||||
uint8_t whitepoint;
|
||||
uint8_t reference_mode_flag;
|
||||
uint8_t sharpness;
|
||||
uint8_t noise_reduction;
|
||||
uint8_t mpeg_noise_reduction;
|
||||
uint8_t frame_rate_conversion;
|
||||
uint8_t brightness;
|
||||
uint8_t color;
|
||||
} AVDOVIDmLevel11;
|
||||
|
||||
typedef struct AVDOVIDmLevel254 {
|
||||
/* DMv2 info block, always present in samples with DMv2 metadata */
|
||||
uint8_t dm_mode;
|
||||
uint8_t dm_version_index;
|
||||
} AVDOVIDmLevel254;
|
||||
|
||||
typedef struct AVDOVIDmLevel255 {
|
||||
/* Debug block, not really used in samples */
|
||||
uint8_t dm_run_mode;
|
||||
uint8_t dm_run_version;
|
||||
uint8_t dm_debug[4];
|
||||
} AVDOVIDmLevel255;
|
||||
|
||||
/**
|
||||
* Dolby Vision metadata extension block. Dynamic extension blocks may change
|
||||
* from frame to frame, while static blocks are constant throughout the entire
|
||||
* sequence.
|
||||
*
|
||||
* @note sizeof(AVDOVIDmData) is not part of the public API.
|
||||
*/
|
||||
typedef struct AVDOVIDmData {
|
||||
uint8_t level; /* [1, 255] */
|
||||
union {
|
||||
AVDOVIDmLevel1 l1; /* dynamic */
|
||||
AVDOVIDmLevel2 l2; /* dynamic, may appear multiple times */
|
||||
AVDOVIDmLevel3 l3; /* dynamic */
|
||||
AVDOVIDmLevel4 l4; /* dynamic */
|
||||
AVDOVIDmLevel5 l5; /* dynamic */
|
||||
AVDOVIDmLevel6 l6; /* static */
|
||||
/* level 7 is currently unused */
|
||||
AVDOVIDmLevel8 l8; /* dynamic, may appear multiple times */
|
||||
AVDOVIDmLevel9 l9; /* dynamic */
|
||||
AVDOVIDmLevel10 l10; /* static, may appear multiple times */
|
||||
AVDOVIDmLevel11 l11; /* dynamic */
|
||||
AVDOVIDmLevel254 l254; /* static */
|
||||
AVDOVIDmLevel255 l255; /* static */
|
||||
};
|
||||
} AVDOVIDmData;
|
||||
|
||||
/**
|
||||
* Combined struct representing a combination of header, mapping and color
|
||||
* metadata, for attaching to frames as side data.
|
||||
@@ -202,6 +342,13 @@ typedef struct AVDOVIMetadata {
|
||||
size_t header_offset; /* AVDOVIRpuDataHeader */
|
||||
size_t mapping_offset; /* AVDOVIDataMapping */
|
||||
size_t color_offset; /* AVDOVIColorMetadata */
|
||||
|
||||
size_t ext_block_offset; /* offset to start of ext blocks array */
|
||||
size_t ext_block_size; /* size per element */
|
||||
int num_ext_blocks; /* number of extension blocks */
|
||||
|
||||
/* static limit on num_ext_blocks, derived from bitstream limitations */
|
||||
#define AV_DOVI_MAX_EXT_BLOCKS 32
|
||||
} AVDOVIMetadata;
|
||||
|
||||
static av_always_inline AVDOVIRpuDataHeader *
|
||||
@@ -222,6 +369,19 @@ av_dovi_get_color(const AVDOVIMetadata *data)
|
||||
return (AVDOVIColorMetadata *)((uint8_t *) data + data->color_offset);
|
||||
}
|
||||
|
||||
static av_always_inline AVDOVIDmData *
|
||||
av_dovi_get_ext(const AVDOVIMetadata *data, int index)
|
||||
{
|
||||
return (AVDOVIDmData *)((uint8_t *) data + data->ext_block_offset +
|
||||
data->ext_block_size * index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an extension block with a given level, or NULL. In the case of
|
||||
* multiple extension blocks, only the first is returned.
|
||||
*/
|
||||
AVDOVIDmData *av_dovi_find_level(const AVDOVIMetadata *data, uint8_t level);
|
||||
|
||||
/**
|
||||
* Allocate an AVDOVIMetadata structure and initialize its
|
||||
* fields to default values.
|
||||
|
||||
1
3rdparty/ffmpeg/include/libavutil/error.h
vendored
1
3rdparty/ffmpeg/include/libavutil/error.h
vendored
@@ -79,6 +79,7 @@
|
||||
#define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1')
|
||||
#define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3')
|
||||
#define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4')
|
||||
#define AVERROR_HTTP_TOO_MANY_REQUESTS FFERRTAG(0xF8,'4','2','9')
|
||||
#define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X')
|
||||
#define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X')
|
||||
|
||||
|
||||
4
3rdparty/ffmpeg/include/libavutil/fifo.h
vendored
4
3rdparty/ffmpeg/include/libavutil/fifo.h
vendored
@@ -26,10 +26,6 @@
|
||||
#define AVUTIL_FIFO_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "attributes.h"
|
||||
#include "version.h"
|
||||
|
||||
/**
|
||||
* @defgroup lavu_fifo AVFifo
|
||||
|
||||
1
3rdparty/ffmpeg/include/libavutil/file.h
vendored
1
3rdparty/ffmpeg/include/libavutil/file.h
vendored
@@ -22,7 +22,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "version.h"
|
||||
#include "attributes.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -124,7 +124,7 @@ typedef struct AVFilmGrainAOMParams {
|
||||
|
||||
/**
|
||||
* This structure describes how to handle film grain synthesis for codecs using
|
||||
* the ITU-T H.274 Versatile suplemental enhancement information message.
|
||||
* the ITU-T H.274 Versatile supplemental enhancement information message.
|
||||
*
|
||||
* @note The struct must be allocated as part of AVFilmGrainParams using
|
||||
* av_film_grain_params_alloc(). Its size is not a part of the public ABI.
|
||||
@@ -136,43 +136,6 @@ typedef struct AVFilmGrainH274Params {
|
||||
*/
|
||||
int model_id;
|
||||
|
||||
#if FF_API_H274_FILM_GRAIN_VCS
|
||||
/**
|
||||
* TODO: On this ABI bump, please also re-order the fields in
|
||||
* AVFilmGrainParams (see below)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specifies the bit depth used for the luma component.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.bit_depth_luma.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int bit_depth_luma;
|
||||
|
||||
/**
|
||||
* Specifies the bit depth used for the chroma components.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.bit_depth_chroma.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int bit_depth_chroma;
|
||||
|
||||
/**
|
||||
* Specifies the video signal characteristics.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}.
|
||||
*/
|
||||
attribute_deprecated
|
||||
enum AVColorRange color_range;
|
||||
attribute_deprecated
|
||||
enum AVColorPrimaries color_primaries;
|
||||
attribute_deprecated
|
||||
enum AVColorTransferCharacteristic color_trc;
|
||||
attribute_deprecated
|
||||
enum AVColorSpace color_space;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Specifies the blending mode used to blend the simulated film grain
|
||||
* with the decoded images.
|
||||
@@ -249,18 +212,6 @@ typedef struct AVFilmGrainParams {
|
||||
*/
|
||||
uint64_t seed;
|
||||
|
||||
/**
|
||||
* Additional fields may be added both here and in any structure included.
|
||||
* If a codec's film grain structure differs slightly over another
|
||||
* codec's, fields within may change meaning depending on the type.
|
||||
*
|
||||
* TODO: Move this to the end of the structure, at the next ABI bump.
|
||||
*/
|
||||
union {
|
||||
AVFilmGrainAOMParams aom;
|
||||
AVFilmGrainH274Params h274;
|
||||
} codec;
|
||||
|
||||
/**
|
||||
* Intended display resolution. May be 0 if the codec does not specify
|
||||
* any restrictions.
|
||||
@@ -287,6 +238,15 @@ typedef struct AVFilmGrainParams {
|
||||
int bit_depth_luma;
|
||||
int bit_depth_chroma;
|
||||
|
||||
/**
|
||||
* Additional fields may be added both here and in any structure included.
|
||||
* If a codec's film grain structure differs slightly over another
|
||||
* codec's, fields within may change meaning depending on the type.
|
||||
*/
|
||||
union {
|
||||
AVFilmGrainAOMParams aom;
|
||||
AVFilmGrainH274Params h274;
|
||||
} codec;
|
||||
} AVFilmGrainParams;
|
||||
|
||||
/**
|
||||
|
||||
248
3rdparty/ffmpeg/include/libavutil/frame.h
vendored
248
3rdparty/ffmpeg/include/libavutil/frame.h
vendored
@@ -96,7 +96,7 @@ enum AVFrameSideDataType {
|
||||
*/
|
||||
AV_FRAME_DATA_MOTION_VECTORS,
|
||||
/**
|
||||
* Recommmends skipping the specified number of samples. This is exported
|
||||
* Recommends skipping the specified number of samples. This is exported
|
||||
* only if the "skip_manual" AVOption is set in libavcodec.
|
||||
* This has the same format as AV_PKT_DATA_SKIP_SAMPLES.
|
||||
* @code
|
||||
@@ -228,6 +228,32 @@ enum AVFrameSideDataType {
|
||||
* encoding.
|
||||
*/
|
||||
AV_FRAME_DATA_VIDEO_HINT,
|
||||
|
||||
/**
|
||||
* Raw LCEVC payload data, as a uint8_t array, with NAL emulation
|
||||
* bytes intact.
|
||||
*/
|
||||
AV_FRAME_DATA_LCEVC,
|
||||
|
||||
/**
|
||||
* This side data must be associated with a video frame.
|
||||
* The presence of this side data indicates that the video stream is
|
||||
* composed of multiple views (e.g. stereoscopic 3D content,
|
||||
* cf. H.264 Annex H or H.265 Annex G).
|
||||
* The data is an int storing the view ID.
|
||||
*/
|
||||
AV_FRAME_DATA_VIEW_ID,
|
||||
|
||||
/**
|
||||
* This side data contains information about the reference display width(s)
|
||||
* and reference viewing distance(s) as well as information about the
|
||||
* corresponding reference stereo pair(s), i.e., the pair(s) of views to be
|
||||
* displayed for the viewer's left and right eyes on the reference display
|
||||
* at the reference viewing distance.
|
||||
* The payload is the AV3DReferenceDisplaysInfo struct defined in
|
||||
* libavutil/tdrdi.h.
|
||||
*/
|
||||
AV_FRAME_DATA_3D_REFERENCE_DISPLAYS,
|
||||
};
|
||||
|
||||
enum AVActiveFormatDescription {
|
||||
@@ -255,6 +281,58 @@ typedef struct AVFrameSideData {
|
||||
AVBufferRef *buf;
|
||||
} AVFrameSideData;
|
||||
|
||||
enum AVSideDataProps {
|
||||
/**
|
||||
* The side data type can be used in stream-global structures.
|
||||
* Side data types without this property are only meaningful on per-frame
|
||||
* basis.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_GLOBAL = (1 << 0),
|
||||
|
||||
/**
|
||||
* Multiple instances of this side data type can be meaningfully present in
|
||||
* a single side data array.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_MULTI = (1 << 1),
|
||||
|
||||
/**
|
||||
* Side data depends on the video dimensions. Side data with this property
|
||||
* loses its meaning when rescaling or cropping the image, unless
|
||||
* either recomputed or adjusted to the new resolution.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_SIZE_DEPENDENT = (1 << 2),
|
||||
|
||||
/**
|
||||
* Side data depends on the video color space. Side data with this property
|
||||
* loses its meaning when changing the video color encoding, e.g. by
|
||||
* adapting to a different set of primaries or transfer characteristics.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_COLOR_DEPENDENT = (1 << 3),
|
||||
|
||||
/**
|
||||
* Side data depends on the channel layout. Side data with this property
|
||||
* loses its meaning when downmixing or upmixing, unless either recomputed
|
||||
* or adjusted to the new layout.
|
||||
*/
|
||||
AV_SIDE_DATA_PROP_CHANNEL_DEPENDENT = (1 << 4),
|
||||
};
|
||||
|
||||
/**
|
||||
* This struct describes the properties of a side data type. Its instance
|
||||
* corresponding to a given type can be obtained from av_frame_side_data_desc().
|
||||
*/
|
||||
typedef struct AVSideDataDescriptor {
|
||||
/**
|
||||
* Human-readable side data description.
|
||||
*/
|
||||
const char *name;
|
||||
|
||||
/**
|
||||
* Side data property flags, a combination of AVSideDataProps values.
|
||||
*/
|
||||
unsigned props;
|
||||
} AVSideDataDescriptor;
|
||||
|
||||
/**
|
||||
* Structure describing a single Region Of Interest.
|
||||
*
|
||||
@@ -338,8 +416,7 @@ typedef struct AVRegionOfInterest {
|
||||
* to the end with a minor bump.
|
||||
*
|
||||
* Fields can be accessed through AVOptions, the name string used, matches the
|
||||
* C structure field name for fields accessible through AVOptions. The AVClass
|
||||
* for AVFrame can be obtained from avcodec_get_frame_class()
|
||||
* C structure field name for fields accessible through AVOptions.
|
||||
*/
|
||||
typedef struct AVFrame {
|
||||
#define AV_NUM_DATA_POINTERS 8
|
||||
@@ -430,16 +507,6 @@ typedef struct AVFrame {
|
||||
*/
|
||||
int format;
|
||||
|
||||
#if FF_API_FRAME_KEY
|
||||
/**
|
||||
* 1 -> keyframe, 0-> not
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_KEY instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int key_frame;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Picture type of the frame.
|
||||
*/
|
||||
@@ -511,32 +578,6 @@ typedef struct AVFrame {
|
||||
*/
|
||||
int repeat_pict;
|
||||
|
||||
#if FF_API_INTERLACED_FRAME
|
||||
/**
|
||||
* The content of the picture is interlaced.
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_INTERLACED instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int interlaced_frame;
|
||||
|
||||
/**
|
||||
* If the content is interlaced, is top field displayed first.
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int top_field_first;
|
||||
#endif
|
||||
|
||||
#if FF_API_PALETTE_HAS_CHANGED
|
||||
/**
|
||||
* Tell user application that palette has changed from previous frame.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int palette_has_changed;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sample rate of the audio data.
|
||||
*/
|
||||
@@ -606,6 +647,14 @@ typedef struct AVFrame {
|
||||
* is interlaced.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
|
||||
/**
|
||||
* A decoder can use this flag to mark frames which were originally encoded losslessly.
|
||||
*
|
||||
* For coding bitstream formats which support both lossless and lossy
|
||||
* encoding, it is sometimes possible for a decoder to determine which method
|
||||
* was used when the bitsream was encoded.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_LOSSLESS (1 << 5)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -642,18 +691,6 @@ typedef struct AVFrame {
|
||||
*/
|
||||
int64_t best_effort_timestamp;
|
||||
|
||||
#if FF_API_FRAME_PKT
|
||||
/**
|
||||
* reordered pos from the last AVPacket that has been input into the decoder
|
||||
* - encoding: unused
|
||||
* - decoding: Read by user.
|
||||
* @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
|
||||
* data from packets to frames
|
||||
*/
|
||||
attribute_deprecated
|
||||
int64_t pkt_pos;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* metadata.
|
||||
* - encoding: Set by user.
|
||||
@@ -674,20 +711,6 @@ typedef struct AVFrame {
|
||||
#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
|
||||
#define FF_DECODE_ERROR_DECODE_SLICES 8
|
||||
|
||||
#if FF_API_FRAME_PKT
|
||||
/**
|
||||
* size of the corresponding packet containing the compressed
|
||||
* frame.
|
||||
* It is set to a negative value if unknown.
|
||||
* - encoding: unused
|
||||
* - decoding: set by libavcodec, read by user.
|
||||
* @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
|
||||
* data from packets to frames
|
||||
*/
|
||||
attribute_deprecated
|
||||
int pkt_size;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* For hwaccel-format frames, this should be a reference to the
|
||||
* AVHWFramesContext describing the frame.
|
||||
@@ -727,17 +750,13 @@ typedef struct AVFrame {
|
||||
*/
|
||||
|
||||
/**
|
||||
* AVBufferRef for internal use by a single libav* library.
|
||||
* RefStruct reference for internal use by a single libav* library.
|
||||
* Must not be used to transfer data between libraries.
|
||||
* Has to be NULL when ownership of the frame leaves the respective library.
|
||||
*
|
||||
* Code outside the FFmpeg libs should never check or change the contents of the buffer ref.
|
||||
*
|
||||
* FFmpeg calls av_buffer_unref() on it when the frame is unreferenced.
|
||||
* av_frame_copy_props() calls create a new reference with av_buffer_ref()
|
||||
* for the target frame's private_ref field.
|
||||
* Code outside the FFmpeg libs must never check or change private_ref.
|
||||
*/
|
||||
AVBufferRef *private_ref;
|
||||
void *private_ref;
|
||||
|
||||
/**
|
||||
* Channel layout of the audio data.
|
||||
@@ -842,9 +861,10 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
|
||||
* cases.
|
||||
*
|
||||
* @param frame frame in which to store the new buffers.
|
||||
* @param align Required buffer size alignment. If equal to 0, alignment will be
|
||||
* chosen automatically for the current CPU. It is highly
|
||||
* recommended to pass 0 here unless you know what you are doing.
|
||||
* @param align Required buffer size and data pointer alignment. If equal to 0,
|
||||
* alignment will be chosen automatically for the current CPU.
|
||||
* It is highly recommended to pass 0 here unless you know what
|
||||
* you are doing.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error.
|
||||
*/
|
||||
@@ -992,6 +1012,12 @@ int av_frame_apply_cropping(AVFrame *frame, int flags);
|
||||
*/
|
||||
const char *av_frame_side_data_name(enum AVFrameSideDataType type);
|
||||
|
||||
/**
|
||||
* @return side data descriptor corresponding to a given side data type, NULL
|
||||
* when not available.
|
||||
*/
|
||||
const AVSideDataDescriptor *av_frame_side_data_desc(enum AVFrameSideDataType type);
|
||||
|
||||
/**
|
||||
* Free all side data entries and their contents, then zeroes out the
|
||||
* values which the pointers are pointing to.
|
||||
@@ -1003,7 +1029,20 @@ const char *av_frame_side_data_name(enum AVFrameSideDataType type);
|
||||
*/
|
||||
void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd);
|
||||
|
||||
/**
|
||||
* Remove existing entries before adding new ones.
|
||||
*/
|
||||
#define AV_FRAME_SIDE_DATA_FLAG_UNIQUE (1 << 0)
|
||||
/**
|
||||
* Don't add a new entry if another of the same type exists.
|
||||
* Applies only for side data types without the AV_SIDE_DATA_PROP_MULTI prop.
|
||||
*/
|
||||
#define AV_FRAME_SIDE_DATA_FLAG_REPLACE (1 << 1)
|
||||
/**
|
||||
* Create a new reference to the passed in buffer instead of taking ownership
|
||||
* of it.
|
||||
*/
|
||||
#define AV_FRAME_SIDE_DATA_FLAG_NEW_REF (1 << 2)
|
||||
|
||||
/**
|
||||
* Add new side data entry to an array.
|
||||
@@ -1016,15 +1055,43 @@ void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd);
|
||||
* @param size size of the side data
|
||||
* @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
|
||||
*
|
||||
* @return newly added side data on success, NULL on error. In case of
|
||||
* AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching
|
||||
* AVFrameSideDataType will be removed before the addition is
|
||||
* attempted.
|
||||
* @return newly added side data on success, NULL on error.
|
||||
* @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
|
||||
* matching AVFrameSideDataType will be removed before the addition
|
||||
* is attempted.
|
||||
* @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an
|
||||
* entry of the same type already exists, it will be replaced instead.
|
||||
*/
|
||||
AVFrameSideData *av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd,
|
||||
enum AVFrameSideDataType type,
|
||||
size_t size, unsigned int flags);
|
||||
|
||||
/**
|
||||
* Add a new side data entry to an array from an existing AVBufferRef.
|
||||
*
|
||||
* @param sd pointer to array of side data to which to add another entry,
|
||||
* or to NULL in order to start a new array.
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array.
|
||||
* @param type type of the added side data
|
||||
* @param buf Pointer to AVBufferRef to add to the array. On success,
|
||||
* the function takes ownership of the AVBufferRef and *buf is
|
||||
* set to NULL, unless AV_FRAME_SIDE_DATA_FLAG_NEW_REF is set
|
||||
* in which case the ownership will remain with the caller.
|
||||
* @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
|
||||
*
|
||||
* @return newly added side data on success, NULL on error.
|
||||
* @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
|
||||
* matching AVFrameSideDataType will be removed before the addition
|
||||
* is attempted.
|
||||
* @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an
|
||||
* entry of the same type already exists, it will be replaced instead.
|
||||
*
|
||||
*/
|
||||
AVFrameSideData *av_frame_side_data_add(AVFrameSideData ***sd, int *nb_sd,
|
||||
enum AVFrameSideDataType type,
|
||||
AVBufferRef **buf, unsigned int flags);
|
||||
|
||||
/**
|
||||
* Add a new side data entry to an array based on existing side data, taking
|
||||
* a reference towards the contained AVBufferRef.
|
||||
@@ -1037,10 +1104,12 @@ AVFrameSideData *av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd,
|
||||
* for the buffer.
|
||||
* @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
|
||||
*
|
||||
* @return negative error code on failure, >=0 on success. In case of
|
||||
* AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching
|
||||
* AVFrameSideDataType will be removed before the addition is
|
||||
* attempted.
|
||||
* @return negative error code on failure, >=0 on success.
|
||||
* @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
|
||||
* matching AVFrameSideDataType will be removed before the addition
|
||||
* is attempted.
|
||||
* @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an
|
||||
* entry of the same type already exists, it will be replaced instead.
|
||||
*/
|
||||
int av_frame_side_data_clone(AVFrameSideData ***sd, int *nb_sd,
|
||||
const AVFrameSideData *src, unsigned int flags);
|
||||
@@ -1074,6 +1143,19 @@ const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd,
|
||||
nb_sd, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove and free all side data instances of the given type from an array.
|
||||
*/
|
||||
void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd,
|
||||
enum AVFrameSideDataType type);
|
||||
|
||||
/**
|
||||
* Remove and free all side data instances that match any of the given
|
||||
* side data properties. (See enum AVSideDataProps)
|
||||
*/
|
||||
void av_frame_side_data_remove_by_props(AVFrameSideData ***sd, int *nb_sd,
|
||||
int props);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -83,7 +83,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
AVRational targeted_system_display_maximum_luminance;
|
||||
|
||||
/**
|
||||
* This flag indicates that transfer the base paramter(for value of 1)
|
||||
* This flag indicates that transfer the base parameter(for value of 1)
|
||||
*/
|
||||
int base_enable_flag;
|
||||
|
||||
@@ -145,7 +145,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
int base_param_k3;
|
||||
|
||||
/**
|
||||
* This flag indicates that delta mode of base paramter(for value of 1)
|
||||
* This flag indicates that delta mode of base parameter(for value of 1)
|
||||
*/
|
||||
int base_param_Delta_enable_mode;
|
||||
|
||||
@@ -158,7 +158,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
|
||||
/**
|
||||
* indicates 3Spline_enable_flag in the base parameter,
|
||||
* This flag indicates that transfer three Spline of base paramter(for value of 1)
|
||||
* This flag indicates that transfer three Spline of base parameter(for value of 1)
|
||||
*/
|
||||
int three_Spline_enable_flag;
|
||||
|
||||
@@ -168,60 +168,6 @@ typedef struct AVHDRVividColorToneMappingParams {
|
||||
*/
|
||||
int three_Spline_num;
|
||||
|
||||
#if FF_API_HDR_VIVID_THREE_SPLINE
|
||||
/**
|
||||
* The mode of three Spline. the value shall be in the range
|
||||
* of 0 to 3, inclusive.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int three_Spline_TH_mode;
|
||||
|
||||
/**
|
||||
* three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive
|
||||
* and in multiples of 1.0/255.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_enable_MB;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_enable of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive.
|
||||
* and in multiples of 1.0/4095.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_enable;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta1 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_Delta1;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta2 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_Delta2;
|
||||
|
||||
/**
|
||||
* 3Spline_enable_Strength of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive,
|
||||
* and in multiples of 1.0/255.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_enable_Strength;
|
||||
#endif
|
||||
|
||||
AVHDRVivid3SplineParams three_spline[2];
|
||||
} AVHDRVividColorToneMappingParams;
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ enum AVHWDeviceType {
|
||||
AV_HWDEVICE_TYPE_MEDIACODEC,
|
||||
AV_HWDEVICE_TYPE_VULKAN,
|
||||
AV_HWDEVICE_TYPE_D3D12VA,
|
||||
AV_HWDEVICE_TYPE_AMF,
|
||||
/* OpenHarmony Codec device */
|
||||
AV_HWDEVICE_TYPE_OHCODEC,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -560,7 +563,7 @@ enum {
|
||||
* values indicate that it failed somehow.
|
||||
*
|
||||
* On failure, the destination frame will be left blank, except for the
|
||||
* hw_frames_ctx/format fields thay may have been set by the caller - those will
|
||||
* hw_frames_ctx/format fields they may have been set by the caller - those will
|
||||
* be preserved as they were.
|
||||
*
|
||||
* @param dst Destination frame, to contain the mapping.
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct AVOpenCLDeviceContext {
|
||||
/**
|
||||
* The default command queue for this device, which will be used by all
|
||||
* frames contexts which do not have their own command queue. If not
|
||||
* intialised by the user, a default queue will be created on the
|
||||
* initialised by the user, a default queue will be created on the
|
||||
* primary device.
|
||||
*/
|
||||
cl_command_queue command_queue;
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
* @file
|
||||
* An API-specific header for AV_HWDEVICE_TYPE_QSV.
|
||||
*
|
||||
* This API does not support dynamic frame pools. AVHWFramesContext.pool must
|
||||
* contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct.
|
||||
* AVHWFramesContext.pool must contain AVBufferRefs whose data pointer points
|
||||
* to a mfxFrameSurface1 struct.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -51,14 +51,36 @@ typedef struct AVQSVDeviceContext {
|
||||
* This struct is allocated as AVHWFramesContext.hwctx
|
||||
*/
|
||||
typedef struct AVQSVFramesContext {
|
||||
/**
|
||||
* A pointer to a mfxFrameSurface1 struct
|
||||
*
|
||||
* It is available when nb_surfaces is non-zero.
|
||||
*/
|
||||
mfxFrameSurface1 *surfaces;
|
||||
|
||||
/**
|
||||
* Number of frames in the pool
|
||||
*
|
||||
* It is 0 for dynamic frame pools or AVHWFramesContext.initial_pool_size
|
||||
* for fixed frame pools.
|
||||
*
|
||||
* Note only oneVPL GPU runtime 2.9+ can support dynamic frame pools
|
||||
* on d3d11va or vaapi
|
||||
*/
|
||||
int nb_surfaces;
|
||||
|
||||
/**
|
||||
* A combination of MFX_MEMTYPE_* describing the frame pool.
|
||||
*/
|
||||
int frame_type;
|
||||
|
||||
/**
|
||||
* A pointer to a mfxFrameInfo struct
|
||||
*
|
||||
* It is available when nb_surfaces is 0, all buffers allocated from the
|
||||
* pool have the same mfxFrameInfo.
|
||||
*/
|
||||
mfxFrameInfo *info;
|
||||
} AVQSVFramesContext;
|
||||
|
||||
#endif /* AVUTIL_HWCONTEXT_QSV_H */
|
||||
|
||||
|
||||
@@ -90,8 +90,15 @@ CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pr
|
||||
CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Update a CVPixelBufferRef's metadata to based on an AVFrame.
|
||||
* Returns 0 if no known equivalent was found.
|
||||
* Set CVPixelBufferRef's metadata based on an AVFrame.
|
||||
*
|
||||
* Sets/unsets the CVPixelBuffer attachments to match as closely as possible the
|
||||
* AVFrame metadata. To prevent inconsistent attachments, the attachments for properties
|
||||
* that could not be matched or are unspecified in the given AVFrame are unset. So if
|
||||
* any attachments already covered by AVFrame metadata need to be set to a specific
|
||||
* value, this should happen after calling this function.
|
||||
*
|
||||
* Returns < 0 in case of an error.
|
||||
*/
|
||||
int av_vt_pixbuf_set_attachments(void *log_ctx,
|
||||
CVPixelBufferRef pixbuf, const struct AVFrame *src);
|
||||
|
||||
@@ -26,9 +26,24 @@
|
||||
|
||||
#include "pixfmt.h"
|
||||
#include "frame.h"
|
||||
#include "hwcontext.h"
|
||||
|
||||
typedef struct AVVkFrame AVVkFrame;
|
||||
|
||||
typedef struct AVVulkanDeviceQueueFamily {
|
||||
/* Queue family index */
|
||||
int idx;
|
||||
/* Number of queues in the queue family in use */
|
||||
int num;
|
||||
/* Queue family capabilities. Must be non-zero.
|
||||
* Flags may be removed to indicate the queue family may not be used
|
||||
* for a given purpose. */
|
||||
VkQueueFlagBits flags;
|
||||
/* Vulkan implementations are allowed to list multiple video queues
|
||||
* which differ in what they can encode or decode. */
|
||||
VkVideoCodecOperationFlagBitsKHR video_caps;
|
||||
} AVVulkanDeviceQueueFamily;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* API-specific header for AV_HWDEVICE_TYPE_VULKAN.
|
||||
@@ -48,9 +63,8 @@ typedef struct AVVulkanDeviceContext {
|
||||
const VkAllocationCallbacks *alloc;
|
||||
|
||||
/**
|
||||
* Pointer to the instance-provided vkGetInstanceProcAddr loading function.
|
||||
* If NULL, will pick either libvulkan or libvolk, depending on libavutil's
|
||||
* compilation settings, and set this field.
|
||||
* Pointer to a vkGetInstanceProcAddr loading function.
|
||||
* If unset, will dynamically load and use libvulkan.
|
||||
*/
|
||||
PFN_vkGetInstanceProcAddr get_proc_addr;
|
||||
|
||||
@@ -98,28 +112,35 @@ typedef struct AVVulkanDeviceContext {
|
||||
const char * const *enabled_dev_extensions;
|
||||
int nb_enabled_dev_extensions;
|
||||
|
||||
#if FF_API_VULKAN_FIXED_QUEUES
|
||||
/**
|
||||
* Queue family index for graphics operations, and the number of queues
|
||||
* enabled for it. If unavaiable, will be set to -1. Not required.
|
||||
* enabled for it. If unavailable, will be set to -1. Not required.
|
||||
* av_hwdevice_create() will attempt to find a dedicated queue for each
|
||||
* queue family, or pick the one with the least unrelated flags set.
|
||||
* Queue indices here may overlap if a queue has to share capabilities.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int queue_family_index;
|
||||
attribute_deprecated
|
||||
int nb_graphics_queues;
|
||||
|
||||
/**
|
||||
* Queue family index for transfer operations and the number of queues
|
||||
* enabled. Required.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int queue_family_tx_index;
|
||||
attribute_deprecated
|
||||
int nb_tx_queues;
|
||||
|
||||
/**
|
||||
* Queue family index for compute operations and the number of queues
|
||||
* enabled. Required.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int queue_family_comp_index;
|
||||
attribute_deprecated
|
||||
int nb_comp_queues;
|
||||
|
||||
/**
|
||||
@@ -127,7 +148,9 @@ typedef struct AVVulkanDeviceContext {
|
||||
* If the device doesn't support such, queue_family_encode_index will be -1.
|
||||
* Not required.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int queue_family_encode_index;
|
||||
attribute_deprecated
|
||||
int nb_encode_queues;
|
||||
|
||||
/**
|
||||
@@ -135,8 +158,11 @@ typedef struct AVVulkanDeviceContext {
|
||||
* If the device doesn't support such, queue_family_decode_index will be -1.
|
||||
* Not required.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int queue_family_decode_index;
|
||||
attribute_deprecated
|
||||
int nb_decode_queues;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Locks a queue, preventing other threads from submitting any command
|
||||
@@ -150,6 +176,17 @@ typedef struct AVVulkanDeviceContext {
|
||||
* Similar to lock_queue(), unlocks a queue. Must only be called after locking.
|
||||
*/
|
||||
void (*unlock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
|
||||
|
||||
/**
|
||||
* Queue families used. Must be preferentially ordered. List may contain
|
||||
* duplicates.
|
||||
*
|
||||
* For compatibility reasons, all the enabled queue families listed above
|
||||
* (queue_family_(tx/comp/encode/decode)_index) must also be included in
|
||||
* this list until they're removed after deprecation.
|
||||
*/
|
||||
AVVulkanDeviceQueueFamily qf[64];
|
||||
int nb_qf;
|
||||
} AVVulkanDeviceContext;
|
||||
|
||||
/**
|
||||
@@ -160,11 +197,6 @@ typedef enum AVVkFrameFlags {
|
||||
* device and tiling during av_hwframe_ctx_init(). */
|
||||
AV_VK_FRAME_FLAG_NONE = (1ULL << 0),
|
||||
|
||||
#if FF_API_VULKAN_CONTIGUOUS_MEMORY
|
||||
/* DEPRECATED: does nothing. Replaced by multiplane images. */
|
||||
AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY = (1ULL << 1),
|
||||
#endif
|
||||
|
||||
/* Disables multiplane images.
|
||||
* This is required to export/import images from CUDA. */
|
||||
AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE = (1ULL << 2),
|
||||
|
||||
45
3rdparty/ffmpeg/include/libavutil/intreadwrite.h
vendored
45
3rdparty/ffmpeg/include/libavutil/intreadwrite.h
vendored
@@ -64,10 +64,8 @@ typedef union {
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if ARCH_ARM
|
||||
# include "arm/intreadwrite.h"
|
||||
#elif ARCH_AVR32
|
||||
# include "avr32/intreadwrite.h"
|
||||
#if ARCH_AARCH64
|
||||
# include "aarch64/intreadwrite.h"
|
||||
#elif ARCH_MIPS
|
||||
# include "mips/intreadwrite.h"
|
||||
#elif ARCH_PPC
|
||||
@@ -543,9 +541,41 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
# define AV_RLA(s, p) av_bswap##s(AV_RN##s##A(p))
|
||||
# define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v))
|
||||
# define AV_RBA(s, p) AV_RN##s##A(p)
|
||||
# define AV_WBA(s, p, v) AV_WN##s##A(p, v)
|
||||
#else
|
||||
# define AV_RLA(s, p) AV_RN##s##A(p)
|
||||
# define AV_WLA(s, p, v) AV_WN##s##A(p, v)
|
||||
# define AV_RBA(s, p) av_bswap##s(AV_RN##s##A(p))
|
||||
# define AV_WBA(s, p, v) AV_WN##s##A(p, av_bswap##s(v))
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL16A
|
||||
# define AV_RL16A(p) AV_RLA(16, p)
|
||||
#endif
|
||||
#ifndef AV_WL16A
|
||||
# define AV_WL16A(p, v) AV_WLA(16, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB16A
|
||||
# define AV_RB16A(p) AV_RBA(16, p)
|
||||
#endif
|
||||
#ifndef AV_WB16A
|
||||
# define AV_WB16A(p, v) AV_WBA(16, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL32A
|
||||
# define AV_RL32A(p) AV_RLA(32, p)
|
||||
#endif
|
||||
#ifndef AV_WL32A
|
||||
# define AV_WL32A(p, v) AV_WLA(32, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB32A
|
||||
# define AV_RB32A(p) AV_RBA(32, p)
|
||||
#endif
|
||||
#ifndef AV_WB32A
|
||||
# define AV_WB32A(p, v) AV_WBA(32, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RL64A
|
||||
@@ -555,6 +585,13 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
|
||||
# define AV_WL64A(p, v) AV_WLA(64, p, v)
|
||||
#endif
|
||||
|
||||
#ifndef AV_RB64A
|
||||
# define AV_RB64A(p) AV_RBA(64, p)
|
||||
#endif
|
||||
#ifndef AV_WB64A
|
||||
# define AV_WB64A(p, v) AV_WBA(64, p, v)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The AV_COPYxxU macros are suitable for copying data to/from unaligned
|
||||
* memory locations.
|
||||
|
||||
4
3rdparty/ffmpeg/include/libavutil/lfg.h
vendored
4
3rdparty/ffmpeg/include/libavutil/lfg.h
vendored
@@ -28,7 +28,7 @@
|
||||
* Context structure for the Lagged Fibonacci PRNG.
|
||||
* The exact layout, types and content of this struct may change and should
|
||||
* not be accessed directly. Only its `sizeof()` is guaranteed to stay the same
|
||||
* to allow easy instanciation.
|
||||
* to allow easy instantiation.
|
||||
*/
|
||||
typedef struct AVLFG {
|
||||
unsigned int state[64];
|
||||
@@ -73,7 +73,7 @@ static inline unsigned int av_mlfg_get(AVLFG *c){
|
||||
* Get the next two numbers generated by a Box-Muller Gaussian
|
||||
* generator using the random numbers issued by lfg.
|
||||
*
|
||||
* @param lfg pointer to the contex structure
|
||||
* @param lfg pointer to the context structure
|
||||
* @param out array where the two generated numbers are placed
|
||||
*/
|
||||
void av_bmg_get(AVLFG *lfg, double out[2]);
|
||||
|
||||
76
3rdparty/ffmpeg/include/libavutil/log.h
vendored
76
3rdparty/ffmpeg/include/libavutil/log.h
vendored
@@ -37,6 +37,7 @@ typedef enum {
|
||||
AV_CLASS_CATEGORY_BITSTREAM_FILTER,
|
||||
AV_CLASS_CATEGORY_SWSCALER,
|
||||
AV_CLASS_CATEGORY_SWRESAMPLER,
|
||||
AV_CLASS_CATEGORY_HWDEVICE,
|
||||
AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,
|
||||
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
|
||||
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
@@ -46,6 +47,15 @@ typedef enum {
|
||||
AV_CLASS_CATEGORY_NB ///< not part of ABI/API
|
||||
}AVClassCategory;
|
||||
|
||||
enum AVClassStateFlags {
|
||||
/**
|
||||
* Object initialization has finished and it is now in the 'runtime' stage.
|
||||
* This affects e.g. what options can be set on the object (only
|
||||
* AV_OPT_FLAG_RUNTIME_PARAM options can be set on initialized objects).
|
||||
*/
|
||||
AV_CLASS_STATE_INITIALIZED = (1 << 0),
|
||||
};
|
||||
|
||||
#define AV_IS_INPUT_DEVICE(category) \
|
||||
(((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
|
||||
((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
|
||||
@@ -77,7 +87,9 @@ typedef struct AVClass {
|
||||
const char* (*item_name)(void* ctx);
|
||||
|
||||
/**
|
||||
* a pointer to the first option specified in the class if any or NULL
|
||||
* An array of options for the structure or NULL.
|
||||
* When non-NULL, the array must be terminated by an option with a NULL
|
||||
* name.
|
||||
*
|
||||
* @see av_set_default_options()
|
||||
*/
|
||||
@@ -85,43 +97,50 @@ typedef struct AVClass {
|
||||
|
||||
/**
|
||||
* LIBAVUTIL_VERSION with which this structure was created.
|
||||
* This is used to allow fields to be added without requiring major
|
||||
* version bumps everywhere.
|
||||
* This is used to allow fields to be added to AVClass without requiring
|
||||
* major version bumps everywhere.
|
||||
*/
|
||||
|
||||
int version;
|
||||
|
||||
/**
|
||||
* Offset in the structure where log_level_offset is stored.
|
||||
* 0 means there is no such variable
|
||||
* Offset in the structure where the log level offset is stored. The log
|
||||
* level offset is an int added to the log level for logging with this
|
||||
* object as the context.
|
||||
*
|
||||
* 0 means there is no such variable.
|
||||
*/
|
||||
int log_level_offset_offset;
|
||||
|
||||
/**
|
||||
* Offset in the structure where a pointer to the parent context for
|
||||
* logging is stored. For example a decoder could pass its AVCodecContext
|
||||
* to eval as such a parent context, which an av_log() implementation
|
||||
* to eval as such a parent context, which an ::av_log() implementation
|
||||
* could then leverage to display the parent context.
|
||||
* The offset can be NULL.
|
||||
*
|
||||
* When the pointer is NULL, or this offset is zero, the object is assumed
|
||||
* to have no parent.
|
||||
*/
|
||||
int parent_log_context_offset;
|
||||
|
||||
/**
|
||||
* Category used for visualization (like color)
|
||||
* This is only set if the category is equal for all objects using this class.
|
||||
* available since version (51 << 16 | 56 << 8 | 100)
|
||||
* Category used for visualization (like color).
|
||||
*
|
||||
* Only used when ::get_category() is NULL. Use this field when all
|
||||
* instances of this class have the same category, use ::get_category()
|
||||
* otherwise.
|
||||
*/
|
||||
AVClassCategory category;
|
||||
|
||||
/**
|
||||
* Callback to return the category.
|
||||
* available since version (51 << 16 | 59 << 8 | 100)
|
||||
* Callback to return the instance category. Use this callback when
|
||||
* different instances of this class may have different categories,
|
||||
* ::category otherwise.
|
||||
*/
|
||||
AVClassCategory (*get_category)(void* ctx);
|
||||
|
||||
/**
|
||||
* Callback to return the supported/allowed ranges.
|
||||
* available since version (52.12)
|
||||
*/
|
||||
int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
@@ -139,11 +158,22 @@ typedef struct AVClass {
|
||||
* @return AVClass for the next AVOptions-enabled child or NULL if there are
|
||||
* no more such children.
|
||||
*
|
||||
* @note The difference between child_next and this is that child_next
|
||||
* iterates over _already existing_ objects, while child_class_iterate
|
||||
* iterates over _all possible_ children.
|
||||
* @note The difference between ::child_next() and ::child_class_iterate()
|
||||
* is that ::child_next() iterates over _actual_ children of an
|
||||
* _existing_ object instance, while ::child_class_iterate() iterates
|
||||
* over the classes of all _potential_ children of any possible
|
||||
* instance of this class.
|
||||
*/
|
||||
const struct AVClass* (*child_class_iterate)(void **iter);
|
||||
|
||||
/**
|
||||
* When non-zero, offset in the object to an unsigned int holding object
|
||||
* state flags, a combination of AVClassStateFlags values. The flags are
|
||||
* updated by the object to signal its state to the generic code.
|
||||
*
|
||||
* Added in version 59.41.100.
|
||||
*/
|
||||
int state_flags_offset;
|
||||
} AVClass;
|
||||
|
||||
/**
|
||||
@@ -247,9 +277,9 @@ void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
|
||||
* @param avcl A pointer to an arbitrary struct of which the first field is a
|
||||
* pointer to an AVClass struct or NULL if general log.
|
||||
* @param initial_level importance level of the message expressed using a @ref
|
||||
* lavu_log_constants "Logging Constant" for the first occurance.
|
||||
* lavu_log_constants "Logging Constant" for the first occurrence.
|
||||
* @param subsequent_level importance level of the message expressed using a @ref
|
||||
* lavu_log_constants "Logging Constant" after the first occurance.
|
||||
* lavu_log_constants "Logging Constant" after the first occurrence.
|
||||
* @param fmt The format string (printf-compatible) that specifies how
|
||||
* subsequent arguments are converted to output.
|
||||
* @param state a variable to keep trak of if a message has already been printed
|
||||
@@ -377,6 +407,16 @@ int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
|
||||
*/
|
||||
#define AV_LOG_PRINT_LEVEL 2
|
||||
|
||||
/**
|
||||
* Include system time in log output.
|
||||
*/
|
||||
#define AV_LOG_PRINT_TIME 4
|
||||
|
||||
/**
|
||||
* Include system date and time in log output.
|
||||
*/
|
||||
#define AV_LOG_PRINT_DATETIME 8
|
||||
|
||||
void av_log_set_flags(int arg);
|
||||
int av_log_get_flags(void);
|
||||
|
||||
|
||||
@@ -77,6 +77,15 @@ typedef struct AVMasteringDisplayMetadata {
|
||||
*/
|
||||
AVMasteringDisplayMetadata *av_mastering_display_metadata_alloc(void);
|
||||
|
||||
/**
|
||||
* Allocate an AVMasteringDisplayMetadata structure and set its fields to
|
||||
* default values. The resulting struct can be freed using av_freep().
|
||||
*
|
||||
* @return An AVMasteringDisplayMetadata filled with default values or NULL
|
||||
* on failure.
|
||||
*/
|
||||
AVMasteringDisplayMetadata *av_mastering_display_metadata_alloc_size(size_t *size);
|
||||
|
||||
/**
|
||||
* Allocate a complete AVMasteringDisplayMetadata and add it to the frame.
|
||||
*
|
||||
|
||||
@@ -278,7 +278,7 @@ int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int
|
||||
/**
|
||||
* Add a value to a timestamp.
|
||||
*
|
||||
* This function guarantees that when the same value is repeatly added that
|
||||
* This function guarantees that when the same value is repeatedly added that
|
||||
* no accumulation of rounding errors occurs.
|
||||
*
|
||||
* @param[in] ts Input timestamp
|
||||
|
||||
210
3rdparty/ffmpeg/include/libavutil/opt.h
vendored
210
3rdparty/ffmpeg/include/libavutil/opt.h
vendored
@@ -53,6 +53,16 @@
|
||||
* question is allowed to access the field. This allows us to extend the
|
||||
* semantics of those fields without breaking API compatibility.
|
||||
*
|
||||
* @section avoptions_scope Scope of AVOptions
|
||||
*
|
||||
* AVOptions is designed to support any set of multimedia configuration options
|
||||
* that can be defined at compile-time. Although it is mainly used to expose
|
||||
* FFmpeg options, you are welcome to adapt it to your own use case.
|
||||
*
|
||||
* No single approach can ever fully solve the problem of configuration,
|
||||
* but please submit a patch if you believe you have found a problem
|
||||
* that is best solved by extending AVOptions.
|
||||
*
|
||||
* @section avoptions_implement Implementing AVOptions
|
||||
* This section describes how to add AVOptions capabilities to a struct.
|
||||
*
|
||||
@@ -230,26 +240,99 @@
|
||||
* before the file is actually opened.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An option type determines:
|
||||
* - for native access, the underlying C type of the field that an AVOption
|
||||
* refers to;
|
||||
* - for foreign access, the semantics of accessing the option through this API,
|
||||
* e.g. which av_opt_get_*() and av_opt_set_*() functions can be called, or
|
||||
* what format will av_opt_get()/av_opt_set() expect/produce.
|
||||
*/
|
||||
enum AVOptionType{
|
||||
/**
|
||||
* Underlying C type is unsigned int.
|
||||
*/
|
||||
AV_OPT_TYPE_FLAGS = 1,
|
||||
/**
|
||||
* Underlying C type is int.
|
||||
*/
|
||||
AV_OPT_TYPE_INT,
|
||||
/**
|
||||
* Underlying C type is int64_t.
|
||||
*/
|
||||
AV_OPT_TYPE_INT64,
|
||||
/**
|
||||
* Underlying C type is double.
|
||||
*/
|
||||
AV_OPT_TYPE_DOUBLE,
|
||||
/**
|
||||
* Underlying C type is float.
|
||||
*/
|
||||
AV_OPT_TYPE_FLOAT,
|
||||
/**
|
||||
* Underlying C type is a uint8_t* that is either NULL or points to a C
|
||||
* string allocated with the av_malloc() family of functions.
|
||||
*/
|
||||
AV_OPT_TYPE_STRING,
|
||||
/**
|
||||
* Underlying C type is AVRational.
|
||||
*/
|
||||
AV_OPT_TYPE_RATIONAL,
|
||||
AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length
|
||||
/**
|
||||
* Underlying C type is a uint8_t* that is either NULL or points to an array
|
||||
* allocated with the av_malloc() family of functions. The pointer is
|
||||
* immediately followed by an int containing the array length in bytes.
|
||||
*/
|
||||
AV_OPT_TYPE_BINARY,
|
||||
/**
|
||||
* Underlying C type is AVDictionary*.
|
||||
*/
|
||||
AV_OPT_TYPE_DICT,
|
||||
/**
|
||||
* Underlying C type is uint64_t.
|
||||
*/
|
||||
AV_OPT_TYPE_UINT64,
|
||||
/**
|
||||
* Special option type for declaring named constants. Does not correspond to
|
||||
* an actual field in the object, offset must be 0.
|
||||
*/
|
||||
AV_OPT_TYPE_CONST,
|
||||
AV_OPT_TYPE_IMAGE_SIZE, ///< offset must point to two consecutive integers
|
||||
/**
|
||||
* Underlying C type is two consecutive integers.
|
||||
*/
|
||||
AV_OPT_TYPE_IMAGE_SIZE,
|
||||
/**
|
||||
* Underlying C type is enum AVPixelFormat.
|
||||
*/
|
||||
AV_OPT_TYPE_PIXEL_FMT,
|
||||
/**
|
||||
* Underlying C type is enum AVSampleFormat.
|
||||
*/
|
||||
AV_OPT_TYPE_SAMPLE_FMT,
|
||||
AV_OPT_TYPE_VIDEO_RATE, ///< offset must point to AVRational
|
||||
/**
|
||||
* Underlying C type is AVRational.
|
||||
*/
|
||||
AV_OPT_TYPE_VIDEO_RATE,
|
||||
/**
|
||||
* Underlying C type is int64_t.
|
||||
*/
|
||||
AV_OPT_TYPE_DURATION,
|
||||
/**
|
||||
* Underlying C type is uint8_t[4].
|
||||
*/
|
||||
AV_OPT_TYPE_COLOR,
|
||||
/**
|
||||
* Underlying C type is int.
|
||||
*/
|
||||
AV_OPT_TYPE_BOOL,
|
||||
/**
|
||||
* Underlying C type is AVChannelLayout.
|
||||
*/
|
||||
AV_OPT_TYPE_CHLAYOUT,
|
||||
/**
|
||||
* Underlying C type is unsigned int.
|
||||
*/
|
||||
AV_OPT_TYPE_UINT,
|
||||
|
||||
/**
|
||||
* May be combined with another regular option type to declare an array
|
||||
@@ -459,7 +542,7 @@ typedef struct AVOptionRanges {
|
||||
*/
|
||||
int nb_ranges;
|
||||
/**
|
||||
* Number of componentes.
|
||||
* Number of components.
|
||||
*/
|
||||
int nb_components;
|
||||
} AVOptionRanges;
|
||||
@@ -535,6 +618,12 @@ const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter);
|
||||
*/
|
||||
#define AV_OPT_ALLOW_NULL (1 << 2)
|
||||
|
||||
/**
|
||||
* May be used with av_opt_set_array() to signal that new elements should
|
||||
* replace the existing ones in the indicated range.
|
||||
*/
|
||||
#define AV_OPT_ARRAY_REPLACE (1 << 3)
|
||||
|
||||
/**
|
||||
* Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than
|
||||
* one component for certain option types.
|
||||
@@ -786,6 +875,10 @@ int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_
|
||||
int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);
|
||||
int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags);
|
||||
int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags);
|
||||
/**
|
||||
* @note Any old chlayout present is discarded and replaced with a copy of the new one. The
|
||||
* caller still owns layout and is responsible for uninitializing it.
|
||||
*/
|
||||
int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags);
|
||||
/**
|
||||
* @note Any old dictionary present is discarded and replaced with a copy of the new one. The
|
||||
@@ -793,6 +886,7 @@ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layo
|
||||
*/
|
||||
int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags);
|
||||
|
||||
#if FF_API_OPT_INT_LIST
|
||||
/**
|
||||
* Set a binary option to an integer list.
|
||||
*
|
||||
@@ -808,6 +902,57 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, in
|
||||
AVERROR(EINVAL) : \
|
||||
av_opt_set_bin(obj, name, (const uint8_t *)(val), \
|
||||
av_int_list_length(val, term) * sizeof(*(val)), flags))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Add, replace, or remove elements for an array option. Which of these
|
||||
* operations is performed depends on the values of val and search_flags.
|
||||
*
|
||||
* @param start_elem Index of the first array element to modify; must not be
|
||||
* larger than array size as returned by
|
||||
* av_opt_get_array_size().
|
||||
* @param nb_elems number of array elements to modify; when val is NULL,
|
||||
* start_elem+nb_elems must not be larger than array size as
|
||||
* returned by av_opt_get_array_size()
|
||||
*
|
||||
* @param val_type Option type corresponding to the type of val, ignored when val is
|
||||
* NULL.
|
||||
*
|
||||
* The effect of this function will will be as if av_opt_setX()
|
||||
* was called for each element, where X is specified by type.
|
||||
* E.g. AV_OPT_TYPE_STRING corresponds to av_opt_set().
|
||||
*
|
||||
* Typically this should be the same as the scalarized type of
|
||||
* the AVOption being set, but certain conversions are also
|
||||
* possible - the same as those done by the corresponding
|
||||
* av_opt_set*() function. E.g. any option type can be set from
|
||||
* a string, numeric types can be set from int64, double, or
|
||||
* rational, etc.
|
||||
*
|
||||
* @param val Array with nb_elems elements or NULL.
|
||||
*
|
||||
* When NULL, nb_elems array elements starting at start_elem are
|
||||
* removed from the array. Any array elements remaining at the end
|
||||
* are shifted by nb_elems towards the first element in order to keep
|
||||
* the array contiguous.
|
||||
*
|
||||
* Otherwise (val is non-NULL), the type of val must match the
|
||||
* underlying C type as documented for val_type.
|
||||
*
|
||||
* When AV_OPT_ARRAY_REPLACE is not set in search_flags, the array is
|
||||
* enlarged by nb_elems, and the contents of val are inserted at
|
||||
* start_elem. Previously existing array elements from start_elem
|
||||
* onwards (if present) are shifted by nb_elems away from the first
|
||||
* element in order to make space for the new elements.
|
||||
*
|
||||
* When AV_OPT_ARRAY_REPLACE is set in search_flags, the contents
|
||||
* of val replace existing array elements from start_elem to
|
||||
* start_elem+nb_elems (if present). New array size is
|
||||
* max(start_elem + nb_elems, old array size).
|
||||
*/
|
||||
int av_opt_set_array(void *obj, const char *name, int search_flags,
|
||||
unsigned int start_elem, unsigned int nb_elems,
|
||||
enum AVOptionType val_type, const void *val);
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -847,12 +992,56 @@ int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_
|
||||
int av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt);
|
||||
int av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt);
|
||||
int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val);
|
||||
/**
|
||||
* @param[out] layout The returned layout is a copy of the actual value and must
|
||||
* be freed with av_channel_layout_uninit() by the caller
|
||||
*/
|
||||
int av_opt_get_chlayout(void *obj, const char *name, int search_flags, AVChannelLayout *layout);
|
||||
/**
|
||||
* @param[out] out_val The returned dictionary is a copy of the actual value and must
|
||||
* be freed with av_dict_free() by the caller
|
||||
*/
|
||||
int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDictionary **out_val);
|
||||
|
||||
/**
|
||||
* For an array-type option, get the number of elements in the array.
|
||||
*/
|
||||
int av_opt_get_array_size(void *obj, const char *name, int search_flags,
|
||||
unsigned int *out_val);
|
||||
|
||||
/**
|
||||
* For an array-type option, retrieve the values of one or more array elements.
|
||||
*
|
||||
* @param start_elem index of the first array element to retrieve
|
||||
* @param nb_elems number of array elements to retrieve; start_elem+nb_elems
|
||||
* must not be larger than array size as returned by
|
||||
* av_opt_get_array_size()
|
||||
*
|
||||
* @param out_type Option type corresponding to the desired output.
|
||||
*
|
||||
* The array elements produced by this function will
|
||||
* will be as if av_opt_getX() was called for each element,
|
||||
* where X is specified by out_type. E.g. AV_OPT_TYPE_STRING
|
||||
* corresponds to av_opt_get().
|
||||
*
|
||||
* Typically this should be the same as the scalarized type of
|
||||
* the AVOption being retrieved, but certain conversions are
|
||||
* also possible - the same as those done by the corresponding
|
||||
* av_opt_get*() function. E.g. any option type can be retrieved
|
||||
* as a string, numeric types can be retrieved as int64, double,
|
||||
* or rational, etc.
|
||||
*
|
||||
* @param out_val Array with nb_elems members into which the output will be
|
||||
* written. The array type must match the underlying C type as
|
||||
* documented for out_type, and be zeroed on entry to this
|
||||
* function.
|
||||
*
|
||||
* For dynamically allocated types (strings, binary, dicts,
|
||||
* etc.), the result is owned and freed by the caller.
|
||||
*/
|
||||
int av_opt_get_array(void *obj, const char *name, int search_flags,
|
||||
unsigned int start_elem, unsigned int nb_elems,
|
||||
enum AVOptionType out_type, void *out_val);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -873,6 +1062,7 @@ int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDiction
|
||||
*/
|
||||
int av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int *flags_out);
|
||||
int av_opt_eval_int (void *obj, const AVOption *o, const char *val, int *int_out);
|
||||
int av_opt_eval_uint (void *obj, const AVOption *o, const char *val, unsigned *uint_out);
|
||||
int av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t *int64_out);
|
||||
int av_opt_eval_float (void *obj, const AVOption *o, const char *val, float *float_out);
|
||||
int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out);
|
||||
@@ -881,6 +1071,7 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
|
||||
* @}
|
||||
*/
|
||||
|
||||
#if FF_API_OPT_PTR
|
||||
/**
|
||||
* Gets a pointer to the requested field in a struct.
|
||||
* This function allows accessing a struct even when its fields are moved or
|
||||
@@ -888,8 +1079,12 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
|
||||
*
|
||||
* @returns a pointer to the field, it can be cast to the correct type and read
|
||||
* or written to.
|
||||
*
|
||||
* @deprecated direct access to AVOption-exported fields is not supported
|
||||
*/
|
||||
attribute_deprecated
|
||||
void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check if given option is set to its default value.
|
||||
@@ -929,6 +1124,7 @@ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
|
||||
|
||||
#define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001 ///< Serialize options that are not set to default values only.
|
||||
#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002 ///< Serialize options that exactly match opt_flags only.
|
||||
#define AV_OPT_SERIALIZE_SEARCH_CHILDREN 0x00000004 ///< Serialize options in possible children of the given object.
|
||||
|
||||
/**
|
||||
* Serialize object's options.
|
||||
@@ -941,7 +1137,7 @@ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
|
||||
* @param[in] obj AVClass object to serialize
|
||||
* @param[in] opt_flags serialize options with all the specified flags set (AV_OPT_FLAG)
|
||||
* @param[in] flags combination of AV_OPT_SERIALIZE_* flags
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containg serialized options.
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containing serialized options.
|
||||
* Buffer must be freed by the caller when is no longer needed.
|
||||
* @param[in] key_val_sep character used to separate key from value
|
||||
* @param[in] pairs_sep character used to separate two pairs from each other
|
||||
@@ -971,7 +1167,7 @@ void av_opt_freep_ranges(AVOptionRanges **ranges);
|
||||
*
|
||||
* The result must be freed with av_opt_freep_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
* @return number of components returned on success, a negative error code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
@@ -987,7 +1183,7 @@ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags
|
||||
*
|
||||
* The result must be freed with av_opt_free_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
* @return number of components returned on success, a negative error code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
|
||||
88
3rdparty/ffmpeg/include/libavutil/pixfmt.h
vendored
88
3rdparty/ffmpeg/include/libavutil/pixfmt.h
vendored
@@ -398,12 +398,12 @@ enum AVPixelFormat {
|
||||
AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian
|
||||
AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA...
|
||||
AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), VUYAVUYA...
|
||||
|
||||
AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
|
||||
AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
|
||||
|
||||
AV_PIX_FMT_P012LE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian
|
||||
AV_PIX_FMT_P012BE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian
|
||||
@@ -439,6 +439,66 @@ enum AVPixelFormat {
|
||||
*/
|
||||
AV_PIX_FMT_D3D12,
|
||||
|
||||
AV_PIX_FMT_AYUV, ///< packed AYUV 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), AYUVAYUV...
|
||||
|
||||
AV_PIX_FMT_UYVA, ///< packed UYVA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
|
||||
|
||||
AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
|
||||
|
||||
AV_PIX_FMT_V30XBE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
|
||||
AV_PIX_FMT_V30XLE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
|
||||
|
||||
AV_PIX_FMT_RGBF16BE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., big-endian
|
||||
AV_PIX_FMT_RGBF16LE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., little-endian
|
||||
|
||||
AV_PIX_FMT_RGBA128BE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBA128LE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
|
||||
AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian
|
||||
|
||||
AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
|
||||
AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
|
||||
AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
|
||||
|
||||
AV_PIX_FMT_GBRPF16BE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, big-endian
|
||||
AV_PIX_FMT_GBRPF16LE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, little-endian
|
||||
AV_PIX_FMT_GBRAPF16BE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, big-endian
|
||||
AV_PIX_FMT_GBRAPF16LE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_GRAYF16BE, ///< IEEE-754 half precision Y, 16bpp, big-endian
|
||||
AV_PIX_FMT_GRAYF16LE, ///< IEEE-754 half precision Y, 16bpp, little-endian
|
||||
|
||||
/**
|
||||
* HW acceleration through AMF. data[0] contain AMFSurface pointer
|
||||
*/
|
||||
AV_PIX_FMT_AMF_SURFACE,
|
||||
|
||||
AV_PIX_FMT_GRAY32BE, ///< Y , 32bpp, big-endian
|
||||
AV_PIX_FMT_GRAY32LE, ///< Y , 32bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_YAF32BE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, big-endian
|
||||
AV_PIX_FMT_YAF32LE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_YAF16BE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, big-endian
|
||||
AV_PIX_FMT_YAF16LE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_GBRAP32BE, ///< planar GBRA 4:4:4:4 128bpp, big-endian
|
||||
AV_PIX_FMT_GBRAP32LE, ///< planar GBRA 4:4:4:4 128bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_YUV444P10MSBBE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, big-endian
|
||||
AV_PIX_FMT_YUV444P10MSBLE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, little-endian
|
||||
AV_PIX_FMT_YUV444P12MSBBE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, big-endian
|
||||
AV_PIX_FMT_YUV444P12MSBLE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, little-endian
|
||||
AV_PIX_FMT_GBRP10MSBBE, ///< planar GBR 4:4:4 30bpp, lowest bits zero, big-endian
|
||||
AV_PIX_FMT_GBRP10MSBLE, ///< planar GBR 4:4:4 30bpp, lowest bits zero, little-endian
|
||||
AV_PIX_FMT_GBRP12MSBBE, ///< planar GBR 4:4:4 36bpp, lowest bits zero, big-endian
|
||||
AV_PIX_FMT_GBRP12MSBLE, ///< planar GBR 4:4:4 36bpp, lowest bits zero, little-endian
|
||||
|
||||
AV_PIX_FMT_OHCODEC, /// hardware decoding through openharmony
|
||||
|
||||
AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
|
||||
};
|
||||
|
||||
@@ -460,6 +520,7 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
|
||||
#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
|
||||
#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
|
||||
#define AV_PIX_FMT_GRAY32 AV_PIX_FMT_NE(GRAY32BE, GRAY32LE)
|
||||
#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
|
||||
#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
|
||||
#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
|
||||
@@ -490,6 +551,9 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
|
||||
#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
|
||||
|
||||
#define AV_PIX_FMT_YUV444P10MSB AV_PIX_FMT_NE(YUV444P10MSBBE, YUV444P10MSBLE)
|
||||
#define AV_PIX_FMT_YUV444P12MSB AV_PIX_FMT_NE(YUV444P12MSBBE, YUV444P12MSBLE)
|
||||
|
||||
#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
|
||||
#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
|
||||
#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
|
||||
@@ -499,17 +563,27 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
|
||||
#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE)
|
||||
#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
|
||||
#define AV_PIX_FMT_GBRAP32 AV_PIX_FMT_NE(GBRAP32BE, GBRAP32LE)
|
||||
|
||||
#define AV_PIX_FMT_GBRP10MSB AV_PIX_FMT_NE(GBRP10MSBBE, GBRP10MSBLE)
|
||||
#define AV_PIX_FMT_GBRP12MSB AV_PIX_FMT_NE(GBRP12MSBBE, GBRP12MSBLE)
|
||||
|
||||
#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
|
||||
#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
|
||||
#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
|
||||
#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
|
||||
|
||||
#define AV_PIX_FMT_GBRPF16 AV_PIX_FMT_NE(GBRPF16BE, GBRPF16LE)
|
||||
#define AV_PIX_FMT_GBRAPF16 AV_PIX_FMT_NE(GBRAPF16BE, GBRAPF16LE)
|
||||
#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
|
||||
#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
|
||||
|
||||
#define AV_PIX_FMT_GRAYF16 AV_PIX_FMT_NE(GRAYF16BE, GRAYF16LE)
|
||||
#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
|
||||
|
||||
#define AV_PIX_FMT_YAF16 AV_PIX_FMT_NE(YAF16BE, YAF16LE)
|
||||
#define AV_PIX_FMT_YAF32 AV_PIX_FMT_NE(YAF32BE, YAF32LE)
|
||||
|
||||
#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
|
||||
#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
|
||||
#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
|
||||
@@ -531,8 +605,11 @@ enum AVPixelFormat {
|
||||
|
||||
#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
|
||||
#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
|
||||
#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
|
||||
#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
|
||||
#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
|
||||
#define AV_PIX_FMT_XV48 AV_PIX_FMT_NE(XV48BE, XV48LE)
|
||||
#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
|
||||
#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
|
||||
#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
|
||||
|
||||
@@ -543,11 +620,15 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
|
||||
#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
|
||||
|
||||
#define AV_PIX_FMT_RGBF16 AV_PIX_FMT_NE(RGBF16BE, RGBF16LE)
|
||||
#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
|
||||
|
||||
#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
|
||||
#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
|
||||
|
||||
#define AV_PIX_FMT_RGB96 AV_PIX_FMT_NE(RGB96BE, RGB96LE)
|
||||
#define AV_PIX_FMT_RGBA128 AV_PIX_FMT_NE(RGBA128BE, RGBA128LE)
|
||||
|
||||
/**
|
||||
* Chromaticity coordinates of the source primaries.
|
||||
* These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273.
|
||||
@@ -623,6 +704,9 @@ enum AVColorSpace {
|
||||
AVCOL_SPC_CHROMA_DERIVED_NCL = 12, ///< Chromaticity-derived non-constant luminance system
|
||||
AVCOL_SPC_CHROMA_DERIVED_CL = 13, ///< Chromaticity-derived constant luminance system
|
||||
AVCOL_SPC_ICTCP = 14, ///< ITU-R BT.2100-0, ICtCp
|
||||
AVCOL_SPC_IPT_C2 = 15, ///< SMPTE ST 2128, IPT-C2
|
||||
AVCOL_SPC_YCGCO_RE = 16, ///< YCgCo-R, even addition of bits
|
||||
AVCOL_SPC_YCGCO_RO = 17, ///< YCgCo-R, odd addition of bits
|
||||
AVCOL_SPC_NB ///< Not part of ABI
|
||||
};
|
||||
|
||||
|
||||
2
3rdparty/ffmpeg/include/libavutil/rational.h
vendored
2
3rdparty/ffmpeg/include/libavutil/rational.h
vendored
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavu_math_rational
|
||||
* Utilties for rational number calculation.
|
||||
* Utilities for rational number calculation.
|
||||
* @author Michael Niedermayer <michaelni@gmx.at>
|
||||
*/
|
||||
|
||||
|
||||
2
3rdparty/ffmpeg/include/libavutil/rc4.h
vendored
2
3rdparty/ffmpeg/include/libavutil/rc4.h
vendored
@@ -43,7 +43,7 @@ AVRC4 *av_rc4_alloc(void);
|
||||
* @brief Initializes an AVRC4 context.
|
||||
*
|
||||
* @param d pointer to the AVRC4 context
|
||||
* @param key buffer containig the key
|
||||
* @param key buffer containing the key
|
||||
* @param key_bits must be a multiple of 8
|
||||
* @param decrypt 0 for encryption, 1 for decryption, currently has no effect
|
||||
* @return zero on success, negative value otherwise
|
||||
|
||||
22
3rdparty/ffmpeg/include/libavutil/spherical.h
vendored
22
3rdparty/ffmpeg/include/libavutil/spherical.h
vendored
@@ -66,6 +66,28 @@ enum AVSphericalProjection {
|
||||
* the position of the current video in a larger surface.
|
||||
*/
|
||||
AV_SPHERICAL_EQUIRECTANGULAR_TILE,
|
||||
|
||||
/**
|
||||
* Video frame displays as a 180 degree equirectangular projection.
|
||||
*/
|
||||
AV_SPHERICAL_HALF_EQUIRECTANGULAR,
|
||||
|
||||
/**
|
||||
* Video frame displays on a flat, rectangular 2D surface.
|
||||
*/
|
||||
AV_SPHERICAL_RECTILINEAR,
|
||||
|
||||
/**
|
||||
* Fisheye projection (Apple).
|
||||
* See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/fisheye
|
||||
*/
|
||||
AV_SPHERICAL_FISHEYE,
|
||||
|
||||
/**
|
||||
* Parametric Immersive projection (Apple).
|
||||
* See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/parametricimmersive
|
||||
*/
|
||||
AV_SPHERICAL_PARAMETRIC_IMMERSIVE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
96
3rdparty/ffmpeg/include/libavutil/stereo3d.h
vendored
96
3rdparty/ffmpeg/include/libavutil/stereo3d.h
vendored
@@ -136,6 +136,11 @@ enum AVStereo3DType {
|
||||
* @endcode
|
||||
*/
|
||||
AV_STEREO3D_COLUMNS,
|
||||
|
||||
/**
|
||||
* Video is stereoscopic but the packing is unspecified.
|
||||
*/
|
||||
AV_STEREO3D_UNSPEC,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -156,6 +161,31 @@ enum AVStereo3DView {
|
||||
* Frame contains only the right view.
|
||||
*/
|
||||
AV_STEREO3D_VIEW_RIGHT,
|
||||
|
||||
/**
|
||||
* Content is unspecified.
|
||||
*/
|
||||
AV_STEREO3D_VIEW_UNSPEC,
|
||||
};
|
||||
|
||||
/**
|
||||
* List of possible primary eyes.
|
||||
*/
|
||||
enum AVStereo3DPrimaryEye {
|
||||
/**
|
||||
* Neither eye.
|
||||
*/
|
||||
AV_PRIMARY_EYE_NONE,
|
||||
|
||||
/**
|
||||
* Left eye.
|
||||
*/
|
||||
AV_PRIMARY_EYE_LEFT,
|
||||
|
||||
/**
|
||||
* Right eye
|
||||
*/
|
||||
AV_PRIMARY_EYE_RIGHT,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -185,6 +215,28 @@ typedef struct AVStereo3D {
|
||||
* Determines which views are packed.
|
||||
*/
|
||||
enum AVStereo3DView view;
|
||||
|
||||
/**
|
||||
* Which eye is the primary eye when rendering in 2D.
|
||||
*/
|
||||
enum AVStereo3DPrimaryEye primary_eye;
|
||||
|
||||
/**
|
||||
* The distance between the centres of the lenses of the camera system,
|
||||
* in micrometers. Zero if unset.
|
||||
*/
|
||||
uint32_t baseline;
|
||||
|
||||
/**
|
||||
* Relative shift of the left and right images, which changes the zero parallax plane.
|
||||
* Range is -1.0 to 1.0. Zero if unset.
|
||||
*/
|
||||
AVRational horizontal_disparity_adjustment;
|
||||
|
||||
/**
|
||||
* Horizontal field of view, in degrees. Zero if unset.
|
||||
*/
|
||||
AVRational horizontal_field_of_view;
|
||||
} AVStereo3D;
|
||||
|
||||
/**
|
||||
@@ -195,6 +247,14 @@ typedef struct AVStereo3D {
|
||||
*/
|
||||
AVStereo3D *av_stereo3d_alloc(void);
|
||||
|
||||
/**
|
||||
* Allocate an AVStereo3D structure and set its fields to default values.
|
||||
* The resulting struct can be freed using av_freep().
|
||||
*
|
||||
* @return An AVStereo3D filled with default values or NULL on failure.
|
||||
*/
|
||||
AVStereo3D *av_stereo3d_alloc_size(size_t *size);
|
||||
|
||||
/**
|
||||
* Allocate a complete AVFrameSideData and add it to the frame.
|
||||
*
|
||||
@@ -222,6 +282,42 @@ const char *av_stereo3d_type_name(unsigned int type);
|
||||
*/
|
||||
int av_stereo3d_from_name(const char *name);
|
||||
|
||||
/**
|
||||
* Provide a human-readable name of a given stereo3d view.
|
||||
*
|
||||
* @param type The input stereo3d view value.
|
||||
*
|
||||
* @return The name of the stereo3d view value, or "unknown".
|
||||
*/
|
||||
const char *av_stereo3d_view_name(unsigned int view);
|
||||
|
||||
/**
|
||||
* Get the AVStereo3DView form a human-readable name.
|
||||
*
|
||||
* @param name The input string.
|
||||
*
|
||||
* @return The AVStereo3DView value, or -1 if not found.
|
||||
*/
|
||||
int av_stereo3d_view_from_name(const char *name);
|
||||
|
||||
/**
|
||||
* Provide a human-readable name of a given stereo3d primary eye.
|
||||
*
|
||||
* @param type The input stereo3d primary eye value.
|
||||
*
|
||||
* @return The name of the stereo3d primary eye value, or "unknown".
|
||||
*/
|
||||
const char *av_stereo3d_primary_eye_name(unsigned int eye);
|
||||
|
||||
/**
|
||||
* Get the AVStereo3DPrimaryEye form a human-readable name.
|
||||
*
|
||||
* @param name The input string.
|
||||
*
|
||||
* @return The AVStereo3DPrimaryEye value, or -1 if not found.
|
||||
*/
|
||||
int av_stereo3d_primary_eye_from_name(const char *name);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
2
3rdparty/ffmpeg/include/libavutil/tx.h
vendored
2
3rdparty/ffmpeg/include/libavutil/tx.h
vendored
@@ -50,7 +50,7 @@ enum AVTXType {
|
||||
|
||||
/**
|
||||
* Standard MDCT with a sample data type of float, double or int32_t,
|
||||
* respecively. For the float and int32 variants, the scale type is
|
||||
* respectively. For the float and int32 variants, the scale type is
|
||||
* 'float', while for the double variant, it's 'double'.
|
||||
* If scale is NULL, 1.0 will be used as a default.
|
||||
*
|
||||
|
||||
18
3rdparty/ffmpeg/include/libavutil/version.h
vendored
18
3rdparty/ffmpeg/include/libavutil/version.h
vendored
@@ -35,7 +35,7 @@
|
||||
* Useful to check and match library version in order to maintain
|
||||
* backward compatibility.
|
||||
*
|
||||
* The FFmpeg libraries follow a versioning sheme very similar to
|
||||
* The FFmpeg libraries follow a versioning scheme very similar to
|
||||
* Semantic Versioning (http://semver.org/)
|
||||
* The difference is that the component called PATCH is called MICRO in FFmpeg
|
||||
* and its value is reset to 100 instead of 0 to keep it above or equal to 100.
|
||||
@@ -72,13 +72,13 @@
|
||||
/**
|
||||
* @defgroup lavu_ver Version and Build diagnostics
|
||||
*
|
||||
* Macros and function useful to check at compiletime and at runtime
|
||||
* Macros and function useful to check at compile time and at runtime
|
||||
* which version of libavutil is in use.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 59
|
||||
#define LIBAVUTIL_VERSION_MAJOR 60
|
||||
#define LIBAVUTIL_VERSION_MINOR 8
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
@@ -105,13 +105,11 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_OPT_INT_LIST (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_OPT_PTR (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
* matrix). This is using the swr_alloc() function.
|
||||
* @code
|
||||
* SwrContext *swr = swr_alloc();
|
||||
* av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0);
|
||||
* av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
|
||||
* av_opt_set_chlayout(swr, "in_chlayout", &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1, 0);
|
||||
* av_opt_set_chlayout(swr, "out_chlayout", &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO, 0);
|
||||
* av_opt_set_int(swr, "in_sample_rate", 48000, 0);
|
||||
* av_opt_set_int(swr, "out_sample_rate", 44100, 0);
|
||||
* av_opt_set_sample_fmt(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0);
|
||||
@@ -337,7 +337,7 @@ int64_t swr_next_pts(struct SwrContext *s, int64_t pts);
|
||||
* @}
|
||||
*
|
||||
* @name Low-level option setting functions
|
||||
* These functons provide a means to set low-level options that is not possible
|
||||
* These functions provide a means to set low-level options that is not possible
|
||||
* with the AVOption API.
|
||||
* @{
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
* Libswresample version macros
|
||||
*/
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_MAJOR 5
|
||||
#define LIBSWRESAMPLE_VERSION_MAJOR 6
|
||||
|
||||
#endif /* SWRESAMPLE_VERSION_MAJOR_H */
|
||||
|
||||
407
3rdparty/ffmpeg/include/libswscale/swscale.h
vendored
407
3rdparty/ffmpeg/include/libswscale/swscale.h
vendored
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Niklas Haas
|
||||
* Copyright (C) 2001-2011 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
@@ -61,36 +62,308 @@ const char *swscale_configuration(void);
|
||||
*/
|
||||
const char *swscale_license(void);
|
||||
|
||||
/* values for the flags, the stuff on the command line is different */
|
||||
#define SWS_FAST_BILINEAR 1
|
||||
#define SWS_BILINEAR 2
|
||||
#define SWS_BICUBIC 4
|
||||
#define SWS_X 8
|
||||
#define SWS_POINT 0x10
|
||||
#define SWS_AREA 0x20
|
||||
#define SWS_BICUBLIN 0x40
|
||||
#define SWS_GAUSS 0x80
|
||||
#define SWS_SINC 0x100
|
||||
#define SWS_LANCZOS 0x200
|
||||
#define SWS_SPLINE 0x400
|
||||
/**
|
||||
* Get the AVClass for SwsContext. It can be used in combination with
|
||||
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
|
||||
*
|
||||
* @see av_opt_find().
|
||||
*/
|
||||
const AVClass *sws_get_class(void);
|
||||
|
||||
/******************************
|
||||
* Flags and quality settings *
|
||||
******************************/
|
||||
|
||||
typedef enum SwsDither {
|
||||
SWS_DITHER_NONE = 0, /* disable dithering */
|
||||
SWS_DITHER_AUTO, /* auto-select from preset */
|
||||
SWS_DITHER_BAYER, /* ordered dither matrix */
|
||||
SWS_DITHER_ED, /* error diffusion */
|
||||
SWS_DITHER_A_DITHER, /* arithmetic addition */
|
||||
SWS_DITHER_X_DITHER, /* arithmetic xor */
|
||||
SWS_DITHER_NB, /* not part of the ABI */
|
||||
} SwsDither;
|
||||
|
||||
typedef enum SwsAlphaBlend {
|
||||
SWS_ALPHA_BLEND_NONE = 0,
|
||||
SWS_ALPHA_BLEND_UNIFORM,
|
||||
SWS_ALPHA_BLEND_CHECKERBOARD,
|
||||
SWS_ALPHA_BLEND_NB, /* not part of the ABI */
|
||||
} SwsAlphaBlend;
|
||||
|
||||
typedef enum SwsFlags {
|
||||
/**
|
||||
* Scaler selection options. Only one may be active at a time.
|
||||
*/
|
||||
SWS_FAST_BILINEAR = 1 << 0, ///< fast bilinear filtering
|
||||
SWS_BILINEAR = 1 << 1, ///< bilinear filtering
|
||||
SWS_BICUBIC = 1 << 2, ///< 2-tap cubic B-spline
|
||||
SWS_X = 1 << 3, ///< experimental
|
||||
SWS_POINT = 1 << 4, ///< nearest neighbor
|
||||
SWS_AREA = 1 << 5, ///< area averaging
|
||||
SWS_BICUBLIN = 1 << 6, ///< bicubic luma, bilinear chroma
|
||||
SWS_GAUSS = 1 << 7, ///< gaussian approximation
|
||||
SWS_SINC = 1 << 8, ///< unwindowed sinc
|
||||
SWS_LANCZOS = 1 << 9, ///< 3-tap sinc/sinc
|
||||
SWS_SPLINE = 1 << 10, ///< cubic Keys spline
|
||||
|
||||
/**
|
||||
* Return an error on underspecified conversions. Without this flag,
|
||||
* unspecified fields are defaulted to sensible values.
|
||||
*/
|
||||
SWS_STRICT = 1 << 11,
|
||||
|
||||
/**
|
||||
* Emit verbose log of scaling parameters.
|
||||
*/
|
||||
SWS_PRINT_INFO = 1 << 12,
|
||||
|
||||
/**
|
||||
* Perform full chroma upsampling when upscaling to RGB.
|
||||
*
|
||||
* For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
|
||||
* will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
|
||||
* the 100x100 yuv444p image to rgba in the final output step.
|
||||
*
|
||||
* Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
|
||||
* with a single chroma sample being reused for both of the horizontally
|
||||
* adjacent RGBA output pixels.
|
||||
*/
|
||||
SWS_FULL_CHR_H_INT = 1 << 13,
|
||||
|
||||
/**
|
||||
* Perform full chroma interpolation when downscaling RGB sources.
|
||||
*
|
||||
* For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
|
||||
* this flag will generate a 100x100 (4:4:4) chroma plane, which is then
|
||||
* downscaled to the required 50x50.
|
||||
*
|
||||
* Without this flag, the chroma plane is instead generated at 50x100 (dropping
|
||||
* every other pixel), before then being downscaled to the required 50x50
|
||||
* resolution.
|
||||
*/
|
||||
SWS_FULL_CHR_H_INP = 1 << 14,
|
||||
|
||||
/**
|
||||
* Force bit-exact output. This will prevent the use of platform-specific
|
||||
* optimizations that may lead to slight difference in rounding, in favor
|
||||
* of always maintaining exact bit output compatibility with the reference
|
||||
* C code.
|
||||
*
|
||||
* Note: It is recommended to set both of these flags simultaneously.
|
||||
*/
|
||||
SWS_ACCURATE_RND = 1 << 18,
|
||||
SWS_BITEXACT = 1 << 19,
|
||||
|
||||
/**
|
||||
* Deprecated flags.
|
||||
*/
|
||||
SWS_DIRECT_BGR = 1 << 15, ///< This flag has no effect
|
||||
SWS_ERROR_DIFFUSION = 1 << 23, ///< Set `SwsContext.dither` instead
|
||||
} SwsFlags;
|
||||
|
||||
typedef enum SwsIntent {
|
||||
SWS_INTENT_PERCEPTUAL = 0, ///< Perceptual tone mapping
|
||||
SWS_INTENT_RELATIVE_COLORIMETRIC = 1, ///< Relative colorimetric clipping
|
||||
SWS_INTENT_SATURATION = 2, ///< Saturation mapping
|
||||
SWS_INTENT_ABSOLUTE_COLORIMETRIC = 3, ///< Absolute colorimetric clipping
|
||||
SWS_INTENT_NB, ///< not part of the ABI
|
||||
} SwsIntent;
|
||||
|
||||
/***********************************
|
||||
* Context creation and management *
|
||||
***********************************/
|
||||
|
||||
/**
|
||||
* Main external API structure. New fields can be added to the end with
|
||||
* minor version bumps. Removal, reordering and changes to existing fields
|
||||
* require a major version bump. sizeof(SwsContext) is not part of the ABI.
|
||||
*/
|
||||
typedef struct SwsContext {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Private data of the user, can be used to carry app specific stuff.
|
||||
*/
|
||||
void *opaque;
|
||||
|
||||
/**
|
||||
* Bitmask of SWS_*. See `SwsFlags` for details.
|
||||
*/
|
||||
unsigned flags;
|
||||
|
||||
/**
|
||||
* Extra parameters for fine-tuning certain scalers.
|
||||
*/
|
||||
double scaler_params[2];
|
||||
|
||||
/**
|
||||
* How many threads to use for processing, or 0 for automatic selection.
|
||||
*/
|
||||
int threads;
|
||||
|
||||
/**
|
||||
* Dither mode.
|
||||
*/
|
||||
SwsDither dither;
|
||||
|
||||
/**
|
||||
* Alpha blending mode. See `SwsAlphaBlend` for details.
|
||||
*/
|
||||
SwsAlphaBlend alpha_blend;
|
||||
|
||||
/**
|
||||
* Use gamma correct scaling.
|
||||
*/
|
||||
int gamma_flag;
|
||||
|
||||
/**
|
||||
* Deprecated frame property overrides, for the legacy API only.
|
||||
*
|
||||
* Ignored by sws_scale_frame() when used in dynamic mode, in which
|
||||
* case all properties are instead taken from the frame directly.
|
||||
*/
|
||||
int src_w, src_h; ///< Width and height of the source frame
|
||||
int dst_w, dst_h; ///< Width and height of the destination frame
|
||||
int src_format; ///< Source pixel format
|
||||
int dst_format; ///< Destination pixel format
|
||||
int src_range; ///< Source is full range
|
||||
int dst_range; ///< Destination is full range
|
||||
int src_v_chr_pos; ///< Source vertical chroma position in luma grid / 256
|
||||
int src_h_chr_pos; ///< Source horizontal chroma position
|
||||
int dst_v_chr_pos; ///< Destination vertical chroma position
|
||||
int dst_h_chr_pos; ///< Destination horizontal chroma position
|
||||
|
||||
/**
|
||||
* Desired ICC intent for color space conversions.
|
||||
*/
|
||||
int intent;
|
||||
|
||||
/* Remember to add new fields to graph.c:opts_equal() */
|
||||
} SwsContext;
|
||||
|
||||
/**
|
||||
* Allocate an empty SwsContext and set its fields to default values.
|
||||
*/
|
||||
SwsContext *sws_alloc_context(void);
|
||||
|
||||
/**
|
||||
* Free the context and everything associated with it, and write NULL
|
||||
* to the provided pointer.
|
||||
*/
|
||||
void sws_free_context(SwsContext **ctx);
|
||||
|
||||
/***************************
|
||||
* Supported frame formats *
|
||||
***************************/
|
||||
|
||||
/**
|
||||
* Test if a given pixel format is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param format The format to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_format(enum AVPixelFormat format, int output);
|
||||
|
||||
/**
|
||||
* Test if a given color space is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param colorspace The colorspace to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_colorspace(enum AVColorSpace colorspace, int output);
|
||||
|
||||
/**
|
||||
* Test if a given set of color primaries is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param primaries The color primaries to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_primaries(enum AVColorPrimaries primaries, int output);
|
||||
|
||||
/**
|
||||
* Test if a given color transfer function is supported.
|
||||
*
|
||||
* @param output If 0, test if compatible with the source/input frame;
|
||||
* otherwise, with the destination/output frame.
|
||||
* @param trc The color transfer function to check.
|
||||
*
|
||||
* @return A positive integer if supported, 0 otherwise.
|
||||
*/
|
||||
int sws_test_transfer(enum AVColorTransferCharacteristic trc, int output);
|
||||
|
||||
/**
|
||||
* Helper function to run all sws_test_* against a frame, as well as testing
|
||||
* the basic frame properties for sanity. Ignores irrelevant properties - for
|
||||
* example, AVColorSpace is not checked for RGB frames.
|
||||
*/
|
||||
int sws_test_frame(const AVFrame *frame, int output);
|
||||
|
||||
/**
|
||||
* Like `sws_scale_frame`, but without actually scaling. It will instead
|
||||
* merely initialize internal state that *would* be required to perform the
|
||||
* operation, as well as returning the correct error code for unsupported
|
||||
* frame combinations.
|
||||
*
|
||||
* @param ctx The scaling context.
|
||||
* @param dst The destination frame to consider.
|
||||
* @param src The source frame to consider.
|
||||
* @return 0 on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int sws_frame_setup(SwsContext *ctx, const AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/********************
|
||||
* Main scaling API *
|
||||
********************/
|
||||
|
||||
/**
|
||||
* Check if a given conversion is a noop. Returns a positive integer if
|
||||
* no operation needs to be performed, 0 otherwise.
|
||||
*/
|
||||
int sws_is_noop(const AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Scale source data from `src` and write the output to `dst`.
|
||||
*
|
||||
* This function can be used directly on an allocated context, without setting
|
||||
* up any frame properties or calling `sws_init_context()`. Such usage is fully
|
||||
* dynamic and does not require reallocation if the frame properties change.
|
||||
*
|
||||
* Alternatively, this function can be called on a context that has been
|
||||
* explicitly initialized. However, this is provided only for backwards
|
||||
* compatibility. In this usage mode, all frame properties must be correctly
|
||||
* set at init time, and may no longer change after initialization.
|
||||
*
|
||||
* @param ctx The scaling context.
|
||||
* @param dst The destination frame. The data buffers may either be already
|
||||
* allocated by the caller or left clear, in which case they will
|
||||
* be allocated by the scaler. The latter may have performance
|
||||
* advantages - e.g. in certain cases some (or all) output planes
|
||||
* may be references to input planes, rather than copies.
|
||||
* @param src The source frame. If the data buffers are set to NULL, then
|
||||
* this function behaves identically to `sws_frame_setup`.
|
||||
* @return >= 0 on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/*************************
|
||||
* Legacy (stateful) API *
|
||||
*************************/
|
||||
|
||||
#define SWS_SRC_V_CHR_DROP_MASK 0x30000
|
||||
#define SWS_SRC_V_CHR_DROP_SHIFT 16
|
||||
|
||||
#define SWS_PARAM_DEFAULT 123456
|
||||
|
||||
#define SWS_PRINT_INFO 0x1000
|
||||
|
||||
//the following 3 flags are not completely implemented
|
||||
//internal chrominance subsampling info
|
||||
#define SWS_FULL_CHR_H_INT 0x2000
|
||||
//input subsampling info
|
||||
#define SWS_FULL_CHR_H_INP 0x4000
|
||||
#define SWS_DIRECT_BGR 0x8000
|
||||
#define SWS_ACCURATE_RND 0x40000
|
||||
#define SWS_BITEXACT 0x80000
|
||||
#define SWS_ERROR_DIFFUSION 0x800000
|
||||
|
||||
#define SWS_MAX_REDUCE_CUTOFF 0.002
|
||||
|
||||
#define SWS_CS_ITU709 1
|
||||
@@ -126,8 +399,6 @@ typedef struct SwsFilter {
|
||||
SwsVector *chrV;
|
||||
} SwsFilter;
|
||||
|
||||
struct SwsContext;
|
||||
|
||||
/**
|
||||
* Return a positive value if pix_fmt is a supported input format, 0
|
||||
* otherwise.
|
||||
@@ -147,27 +418,25 @@ int sws_isSupportedOutput(enum AVPixelFormat pix_fmt);
|
||||
*/
|
||||
int sws_isSupportedEndiannessConversion(enum AVPixelFormat pix_fmt);
|
||||
|
||||
/**
|
||||
* Allocate an empty SwsContext. This must be filled and passed to
|
||||
* sws_init_context(). For filling see AVOptions, options.c and
|
||||
* sws_setColorspaceDetails().
|
||||
*/
|
||||
struct SwsContext *sws_alloc_context(void);
|
||||
|
||||
/**
|
||||
* Initialize the swscaler context sws_context.
|
||||
*
|
||||
* This function is considered deprecated, and provided only for backwards
|
||||
* compatibility with sws_scale() and sws_start_frame(). The preferred way to
|
||||
* use libswscale is to set all frame properties correctly and call
|
||||
* sws_scale_frame() directly, without explicitly initializing the context.
|
||||
*
|
||||
* @return zero or positive value on success, a negative value on
|
||||
* error
|
||||
*/
|
||||
av_warn_unused_result
|
||||
int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
|
||||
int sws_init_context(SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
|
||||
|
||||
/**
|
||||
* Free the swscaler context swsContext.
|
||||
* If swsContext is NULL, then does nothing.
|
||||
*/
|
||||
void sws_freeContext(struct SwsContext *swsContext);
|
||||
void sws_freeContext(SwsContext *swsContext);
|
||||
|
||||
/**
|
||||
* Allocate and return an SwsContext. You need it to perform
|
||||
@@ -190,15 +459,16 @@ void sws_freeContext(struct SwsContext *swsContext);
|
||||
* @note this function is to be removed after a saner alternative is
|
||||
* written
|
||||
*/
|
||||
struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH, enum AVPixelFormat dstFormat,
|
||||
int flags, SwsFilter *srcFilter,
|
||||
SwsFilter *dstFilter, const double *param);
|
||||
SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH, enum AVPixelFormat dstFormat,
|
||||
int flags, SwsFilter *srcFilter,
|
||||
SwsFilter *dstFilter, const double *param);
|
||||
|
||||
/**
|
||||
* Scale the image slice in srcSlice and put the resulting scaled
|
||||
* slice in the image in dst. A slice is a sequence of consecutive
|
||||
* rows in an image.
|
||||
* rows in an image. Requires a context that has been previously
|
||||
* been initialized with sws_init_context().
|
||||
*
|
||||
* Slices have to be provided in sequential order, either in
|
||||
* top-bottom or bottom-top order. If slices are provided in
|
||||
@@ -221,31 +491,15 @@ struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcForm
|
||||
* the destination image
|
||||
* @return the height of the output slice
|
||||
*/
|
||||
int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[],
|
||||
int sws_scale(SwsContext *c, const uint8_t *const srcSlice[],
|
||||
const int srcStride[], int srcSliceY, int srcSliceH,
|
||||
uint8_t *const dst[], const int dstStride[]);
|
||||
|
||||
/**
|
||||
* Scale source data from src and write the output to dst.
|
||||
*
|
||||
* This is merely a convenience wrapper around
|
||||
* - sws_frame_start()
|
||||
* - sws_send_slice(0, src->height)
|
||||
* - sws_receive_slice(0, dst->height)
|
||||
* - sws_frame_end()
|
||||
*
|
||||
* @param c The scaling context
|
||||
* @param dst The destination frame. See documentation for sws_frame_start() for
|
||||
* more details.
|
||||
* @param src The source frame.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR code on failure
|
||||
*/
|
||||
int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Initialize the scaling process for a given pair of source/destination frames.
|
||||
* Must be called before any calls to sws_send_slice() and sws_receive_slice().
|
||||
* Requires a context that has been previously been initialized with
|
||||
* sws_init_context().
|
||||
*
|
||||
* This function will retain references to src and dst, so they must both use
|
||||
* refcounted buffers (if allocated by the caller, in case of dst).
|
||||
@@ -268,7 +522,7 @@ int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
*
|
||||
* @see sws_frame_end()
|
||||
*/
|
||||
int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
int sws_frame_start(SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Finish the scaling process for a pair of source/destination frames previously
|
||||
@@ -278,7 +532,7 @@ int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
|
||||
*
|
||||
* @param c The scaling context
|
||||
*/
|
||||
void sws_frame_end(struct SwsContext *c);
|
||||
void sws_frame_end(SwsContext *c);
|
||||
|
||||
/**
|
||||
* Indicate that a horizontal slice of input data is available in the source
|
||||
@@ -292,7 +546,7 @@ void sws_frame_end(struct SwsContext *c);
|
||||
*
|
||||
* @return a non-negative number on success, a negative AVERROR code on failure.
|
||||
*/
|
||||
int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
|
||||
int sws_send_slice(SwsContext *c, unsigned int slice_start,
|
||||
unsigned int slice_height);
|
||||
|
||||
/**
|
||||
@@ -312,18 +566,19 @@ int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
|
||||
* output can be produced
|
||||
* another negative AVERROR code on other kinds of scaling failure
|
||||
*/
|
||||
int sws_receive_slice(struct SwsContext *c, unsigned int slice_start,
|
||||
int sws_receive_slice(SwsContext *c, unsigned int slice_start,
|
||||
unsigned int slice_height);
|
||||
|
||||
/**
|
||||
* Get the alignment required for slices
|
||||
* Get the alignment required for slices. Requires a context that has been
|
||||
* previously been initialized with sws_init_context().
|
||||
*
|
||||
* @param c The scaling context
|
||||
* @return alignment required for output slices requested with sws_receive_slice().
|
||||
* Slice offsets and sizes passed to sws_receive_slice() must be
|
||||
* multiples of the value returned from this function.
|
||||
*/
|
||||
unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
|
||||
unsigned int sws_receive_slice_alignment(const SwsContext *c);
|
||||
|
||||
/**
|
||||
* @param c the scaling context
|
||||
@@ -338,7 +593,7 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
|
||||
* @return A negative error code on error, non negative otherwise.
|
||||
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
|
||||
*/
|
||||
int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
|
||||
int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4],
|
||||
int srcRange, const int table[4], int dstRange,
|
||||
int brightness, int contrast, int saturation);
|
||||
|
||||
@@ -346,7 +601,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
|
||||
* @return A negative error code on error, non negative otherwise.
|
||||
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
|
||||
*/
|
||||
int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,
|
||||
int sws_getColorspaceDetails(SwsContext *c, int **inv_table,
|
||||
int *srcRange, int **table, int *dstRange,
|
||||
int *brightness, int *contrast, int *saturation);
|
||||
|
||||
@@ -391,11 +646,11 @@ void sws_freeFilter(SwsFilter *filter);
|
||||
* Be warned that srcFilter and dstFilter are not checked, they
|
||||
* are assumed to remain the same.
|
||||
*/
|
||||
struct SwsContext *sws_getCachedContext(struct SwsContext *context,
|
||||
int srcW, int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH, enum AVPixelFormat dstFormat,
|
||||
int flags, SwsFilter *srcFilter,
|
||||
SwsFilter *dstFilter, const double *param);
|
||||
SwsContext *sws_getCachedContext(SwsContext *context, int srcW, int srcH,
|
||||
enum AVPixelFormat srcFormat, int dstW, int dstH,
|
||||
enum AVPixelFormat dstFormat, int flags,
|
||||
SwsFilter *srcFilter, SwsFilter *dstFilter,
|
||||
const double *param);
|
||||
|
||||
/**
|
||||
* Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
|
||||
@@ -421,14 +676,6 @@ void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pix
|
||||
*/
|
||||
void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette);
|
||||
|
||||
/**
|
||||
* Get the AVClass for swsContext. It can be used in combination with
|
||||
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
|
||||
*
|
||||
* @see av_opt_find().
|
||||
*/
|
||||
const AVClass *sws_get_class(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* swscale version macros
|
||||
*/
|
||||
|
||||
#define LIBSWSCALE_VERSION_MAJOR 8
|
||||
#define LIBSWSCALE_VERSION_MAJOR 9
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
|
||||
8
3rdparty/googletest/CONTRIBUTING.md
vendored
8
3rdparty/googletest/CONTRIBUTING.md
vendored
@@ -47,11 +47,11 @@ PR is acceptable as an alternative.
|
||||
## The Google Test and Google Mock Communities
|
||||
|
||||
The Google Test community exists primarily through the
|
||||
[discussion group](http://groups.google.com/group/googletestframework) and the
|
||||
[discussion group](https://groups.google.com/group/googletestframework) and the
|
||||
GitHub repository. Likewise, the Google Mock community exists primarily through
|
||||
their own [discussion group](http://groups.google.com/group/googlemock). You are
|
||||
definitely encouraged to contribute to the discussion and you can also help us
|
||||
to keep the effectiveness of the group high by following and promoting the
|
||||
their own [discussion group](https://groups.google.com/group/googlemock). You
|
||||
are definitely encouraged to contribute to the discussion and you can also help
|
||||
us to keep the effectiveness of the group high by following and promoting the
|
||||
guidelines listed here.
|
||||
|
||||
### Please Be Friendly
|
||||
|
||||
15
3rdparty/googletest/README.md
vendored
15
3rdparty/googletest/README.md
vendored
@@ -2,27 +2,18 @@
|
||||
|
||||
### Announcements
|
||||
|
||||
#### Live at Head
|
||||
|
||||
GoogleTest now follows the
|
||||
[Abseil Live at Head philosophy](https://abseil.io/about/philosophy#upgrade-support).
|
||||
We recommend
|
||||
[updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it).
|
||||
We do publish occasional semantic versions, tagged with
|
||||
`v${major}.${minor}.${patch}` (e.g. `v1.16.0`).
|
||||
|
||||
#### Documentation Updates
|
||||
|
||||
Our documentation is now live on GitHub Pages at
|
||||
https://google.github.io/googletest/. We recommend browsing the documentation on
|
||||
GitHub Pages rather than directly in the repository.
|
||||
|
||||
#### Release 1.16.0
|
||||
#### Release 1.17.0
|
||||
|
||||
[Release 1.16.0](https://github.com/google/googletest/releases/tag/v1.16.0) is
|
||||
[Release 1.17.0](https://github.com/google/googletest/releases/tag/v1.17.0) is
|
||||
now available.
|
||||
|
||||
The 1.16.x branch requires at least C++14.
|
||||
The 1.17.x branch [requires at least C++17]((https://opensource.google/documentation/policies/cplusplus-support#c_language_standard).
|
||||
|
||||
#### Continuous Integration
|
||||
|
||||
|
||||
@@ -835,6 +835,10 @@ class Action<R(Args...)> {
|
||||
Result operator()(const InArgs&...) const {
|
||||
return function_impl();
|
||||
}
|
||||
template <typename... InArgs>
|
||||
Result operator()(const InArgs&...) {
|
||||
return function_impl();
|
||||
}
|
||||
|
||||
FunctionImpl function_impl;
|
||||
};
|
||||
@@ -1451,6 +1455,30 @@ struct WithArgsAction {
|
||||
return OA{std::move(inner_action)};
|
||||
}
|
||||
|
||||
// As above, but in the case where we want to create a OnceAction from a const
|
||||
// WithArgsAction. This is fine as long as the inner action doesn't need to
|
||||
// move any of its state to create a OnceAction.
|
||||
template <
|
||||
typename R, typename... Args,
|
||||
typename std::enable_if<
|
||||
std::is_convertible<const InnerAction&,
|
||||
OnceAction<R(internal::TupleElement<
|
||||
I, std::tuple<Args...>>...)>>::value,
|
||||
int>::type = 0>
|
||||
operator OnceAction<R(Args...)>() const& { // NOLINT
|
||||
struct OA {
|
||||
OnceAction<InnerSignature<R, Args...>> inner_action;
|
||||
|
||||
R operator()(Args&&... args) && {
|
||||
return std::move(inner_action)
|
||||
.Call(std::get<I>(
|
||||
std::forward_as_tuple(std::forward<Args>(args)...))...);
|
||||
}
|
||||
};
|
||||
|
||||
return OA{inner_action};
|
||||
}
|
||||
|
||||
template <
|
||||
typename R, typename... Args,
|
||||
typename std::enable_if<
|
||||
@@ -1703,9 +1731,8 @@ template <size_t k>
|
||||
struct ReturnArgAction {
|
||||
template <typename... Args,
|
||||
typename = typename std::enable_if<(k < sizeof...(Args))>::type>
|
||||
auto operator()(Args&&... args) const
|
||||
-> decltype(std::get<k>(
|
||||
std::forward_as_tuple(std::forward<Args>(args)...))) {
|
||||
auto operator()(Args&&... args) const -> decltype(std::get<k>(
|
||||
std::forward_as_tuple(std::forward<Args>(args)...))) {
|
||||
return std::get<k>(std::forward_as_tuple(std::forward<Args>(args)...));
|
||||
}
|
||||
};
|
||||
@@ -1720,6 +1747,16 @@ struct SaveArgAction {
|
||||
}
|
||||
};
|
||||
|
||||
template <size_t k, typename Ptr>
|
||||
struct SaveArgByMoveAction {
|
||||
Ptr pointer;
|
||||
|
||||
template <typename... Args>
|
||||
void operator()(Args&&... args) const {
|
||||
*pointer = std::move(std::get<k>(std::tie(args...)));
|
||||
}
|
||||
};
|
||||
|
||||
template <size_t k, typename Ptr>
|
||||
struct SaveArgPointeeAction {
|
||||
Ptr pointer;
|
||||
@@ -2070,6 +2107,13 @@ internal::SaveArgAction<k, Ptr> SaveArg(Ptr pointer) {
|
||||
return {pointer};
|
||||
}
|
||||
|
||||
// Action SaveArgByMove<k>(pointer) moves the k-th (0-based) argument of the
|
||||
// mock function into *pointer.
|
||||
template <size_t k, typename Ptr>
|
||||
internal::SaveArgByMoveAction<k, Ptr> SaveArgByMove(Ptr pointer) {
|
||||
return {pointer};
|
||||
}
|
||||
|
||||
// Action SaveArgPointee<k>(pointer) saves the value pointed to
|
||||
// by the k-th (0-based) argument of the mock function to *pointer.
|
||||
template <size_t k, typename Ptr>
|
||||
@@ -2213,9 +2257,9 @@ template <typename F, typename Impl>
|
||||
}
|
||||
|
||||
#define GMOCK_INTERNAL_ARG_UNUSED(i, data, el) \
|
||||
, GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED const arg##i##_type& arg##i
|
||||
#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_ \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED const args_type& args GMOCK_PP_REPEAT( \
|
||||
, [[maybe_unused]] const arg##i##_type& arg##i
|
||||
#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_ \
|
||||
[[maybe_unused]] const args_type& args GMOCK_PP_REPEAT( \
|
||||
GMOCK_INTERNAL_ARG_UNUSED, , 10)
|
||||
|
||||
#define GMOCK_INTERNAL_ARG(i, data, el) , const arg##i##_type& arg##i
|
||||
@@ -2280,8 +2324,8 @@ template <typename F, typename Impl>
|
||||
std::shared_ptr<const gmock_Impl> impl_; \
|
||||
}; \
|
||||
template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
|
||||
inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( \
|
||||
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) GTEST_MUST_USE_RESULT_; \
|
||||
[[nodiscard]] inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( \
|
||||
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)); \
|
||||
template <GMOCK_ACTION_TYPENAME_PARAMS_(params)> \
|
||||
inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name( \
|
||||
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) { \
|
||||
@@ -2316,7 +2360,7 @@ template <typename F, typename Impl>
|
||||
return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
|
||||
}; \
|
||||
}; \
|
||||
inline name##Action name() GTEST_MUST_USE_RESULT_; \
|
||||
[[nodiscard]] inline name##Action name(); \
|
||||
inline name##Action name() { return name##Action(); } \
|
||||
template <typename function_type, typename return_type, typename args_type, \
|
||||
GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
|
||||
|
||||
@@ -257,6 +257,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
@@ -1311,6 +1312,15 @@ class AllOfMatcherImpl : public MatcherInterface<const T&> {
|
||||
|
||||
bool MatchAndExplain(const T& x,
|
||||
MatchResultListener* listener) const override {
|
||||
if (!listener->IsInterested()) {
|
||||
// Fast path to avoid unnecessary formatting.
|
||||
for (const Matcher<T>& matcher : matchers_) {
|
||||
if (!matcher.Matches(x)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// This method uses matcher's explanation when explaining the result.
|
||||
// However, if matcher doesn't provide one, this method uses matcher's
|
||||
// description.
|
||||
@@ -1430,6 +1440,15 @@ class AnyOfMatcherImpl : public MatcherInterface<const T&> {
|
||||
|
||||
bool MatchAndExplain(const T& x,
|
||||
MatchResultListener* listener) const override {
|
||||
if (!listener->IsInterested()) {
|
||||
// Fast path to avoid unnecessary formatting of match explanations.
|
||||
for (const Matcher<T>& matcher : matchers_) {
|
||||
if (matcher.Matches(x)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// This method uses matcher's explanation when explaining the result.
|
||||
// However, if matcher doesn't provide one, this method uses matcher's
|
||||
// description.
|
||||
@@ -2097,11 +2116,11 @@ class WhenDynamicCastToMatcher<To&> : public WhenDynamicCastToMatcherBase<To&> {
|
||||
template <typename Class, typename FieldType>
|
||||
class FieldMatcher {
|
||||
public:
|
||||
FieldMatcher(FieldType Class::*field,
|
||||
FieldMatcher(FieldType Class::* field,
|
||||
const Matcher<const FieldType&>& matcher)
|
||||
: field_(field), matcher_(matcher), whose_field_("whose given field ") {}
|
||||
|
||||
FieldMatcher(const std::string& field_name, FieldType Class::*field,
|
||||
FieldMatcher(const std::string& field_name, FieldType Class::* field,
|
||||
const Matcher<const FieldType&>& matcher)
|
||||
: field_(field),
|
||||
matcher_(matcher),
|
||||
@@ -2145,7 +2164,7 @@ class FieldMatcher {
|
||||
return MatchAndExplainImpl(std::false_type(), *p, listener);
|
||||
}
|
||||
|
||||
const FieldType Class::*field_;
|
||||
const FieldType Class::* field_;
|
||||
const Matcher<const FieldType&> matcher_;
|
||||
|
||||
// Contains either "whose given field " if the name of the field is unknown
|
||||
@@ -2855,6 +2874,54 @@ class ContainsMatcherImpl : public QuantifierMatcherImpl<Container> {
|
||||
}
|
||||
};
|
||||
|
||||
// Implements DistanceFrom(target, get_distance, distance_matcher) for the given
|
||||
// argument types:
|
||||
// * V is the type of the value to be matched.
|
||||
// * T is the type of the target value.
|
||||
// * Distance is the type of the distance between V and T.
|
||||
// * GetDistance is the type of the functor for computing the distance between
|
||||
// V and T.
|
||||
template <typename V, typename T, typename Distance, typename GetDistance>
|
||||
class DistanceFromMatcherImpl : public MatcherInterface<V> {
|
||||
public:
|
||||
// Arguments:
|
||||
// * target: the target value.
|
||||
// * get_distance: the functor for computing the distance between the value
|
||||
// being matched and target.
|
||||
// * distance_matcher: the matcher for checking the distance.
|
||||
DistanceFromMatcherImpl(T target, GetDistance get_distance,
|
||||
Matcher<const Distance&> distance_matcher)
|
||||
: target_(std::move(target)),
|
||||
get_distance_(std::move(get_distance)),
|
||||
distance_matcher_(std::move(distance_matcher)) {}
|
||||
|
||||
// Describes what this matcher does.
|
||||
void DescribeTo(::std::ostream* os) const override {
|
||||
distance_matcher_.DescribeTo(os);
|
||||
*os << " away from " << PrintToString(target_);
|
||||
}
|
||||
|
||||
void DescribeNegationTo(::std::ostream* os) const override {
|
||||
distance_matcher_.DescribeNegationTo(os);
|
||||
*os << " away from " << PrintToString(target_);
|
||||
}
|
||||
|
||||
bool MatchAndExplain(V value, MatchResultListener* listener) const override {
|
||||
const auto distance = get_distance_(value, target_);
|
||||
const bool match = distance_matcher_.Matches(distance);
|
||||
if (!match && listener->IsInterested()) {
|
||||
*listener << "which is " << PrintToString(distance) << " away from "
|
||||
<< PrintToString(target_);
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
||||
private:
|
||||
const T target_;
|
||||
const GetDistance get_distance_;
|
||||
const Matcher<const Distance&> distance_matcher_;
|
||||
};
|
||||
|
||||
// Implements Each(element_matcher) for the given argument type Container.
|
||||
// Symmetric to ContainsMatcherImpl.
|
||||
template <typename Container>
|
||||
@@ -2990,6 +3057,52 @@ auto Second(T& x, Rank1) -> decltype((x.second)) { // NOLINT
|
||||
}
|
||||
} // namespace pair_getters
|
||||
|
||||
// Default functor for computing the distance between two values.
|
||||
struct DefaultGetDistance {
|
||||
template <typename T, typename U>
|
||||
auto operator()(const T& lhs, const U& rhs) const {
|
||||
using std::abs;
|
||||
// Allow finding abs() in the type's namespace via ADL.
|
||||
return abs(lhs - rhs);
|
||||
}
|
||||
};
|
||||
|
||||
// Implements polymorphic DistanceFrom(target, get_distance, distance_matcher)
|
||||
// matcher. Template arguments:
|
||||
// * T is the type of the target value.
|
||||
// * GetDistance is the type of the functor for computing the distance between
|
||||
// the value being matched and the target.
|
||||
// * DistanceMatcher is the type of the matcher for checking the distance.
|
||||
template <typename T, typename GetDistance, typename DistanceMatcher>
|
||||
class DistanceFromMatcher {
|
||||
public:
|
||||
// Arguments:
|
||||
// * target: the target value.
|
||||
// * get_distance: the functor for computing the distance between the value
|
||||
// being matched and target.
|
||||
// * distance_matcher: the matcher for checking the distance.
|
||||
DistanceFromMatcher(T target, GetDistance get_distance,
|
||||
DistanceMatcher distance_matcher)
|
||||
: target_(std::move(target)),
|
||||
get_distance_(std::move(get_distance)),
|
||||
distance_matcher_(std::move(distance_matcher)) {}
|
||||
|
||||
DistanceFromMatcher(const DistanceFromMatcher& other) = default;
|
||||
|
||||
// Implicitly converts to a monomorphic matcher of the given type.
|
||||
template <typename V>
|
||||
operator Matcher<V>() const { // NOLINT
|
||||
using Distance = decltype(get_distance_(std::declval<V>(), target_));
|
||||
return Matcher<V>(new DistanceFromMatcherImpl<V, T, Distance, GetDistance>(
|
||||
target_, get_distance_, distance_matcher_));
|
||||
}
|
||||
|
||||
private:
|
||||
const T target_;
|
||||
const GetDistance get_distance_;
|
||||
const DistanceMatcher distance_matcher_;
|
||||
};
|
||||
|
||||
// Implements Key(inner_matcher) for the given argument pair type.
|
||||
// Key(inner_matcher) matches an std::pair whose 'first' field matches
|
||||
// inner_matcher. For example, Contains(Key(Ge(5))) can be used to match an
|
||||
@@ -3197,8 +3310,8 @@ class PairMatcher {
|
||||
};
|
||||
|
||||
template <typename T, size_t... I>
|
||||
auto UnpackStructImpl(const T& t, std::index_sequence<I...>,
|
||||
int) -> decltype(std::tie(get<I>(t)...)) {
|
||||
auto UnpackStructImpl(const T& t, std::index_sequence<I...>, int)
|
||||
-> decltype(std::tie(get<I>(t)...)) {
|
||||
static_assert(std::tuple_size<T>::value == sizeof...(I),
|
||||
"Number of arguments doesn't match the number of fields.");
|
||||
return std::tie(get<I>(t)...);
|
||||
@@ -3305,6 +3418,21 @@ auto UnpackStructImpl(const T& u, std::make_index_sequence<20>, char) {
|
||||
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t] = u;
|
||||
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
|
||||
}
|
||||
template <typename T>
|
||||
auto UnpackStructImpl(const T& in, std::make_index_sequence<21>, char) {
|
||||
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u] =
|
||||
in;
|
||||
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,
|
||||
u);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
auto UnpackStructImpl(const T& in, std::make_index_sequence<22>, char) {
|
||||
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
|
||||
v] = in;
|
||||
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
|
||||
v);
|
||||
}
|
||||
#endif // defined(__cpp_structured_bindings)
|
||||
|
||||
template <size_t I, typename T>
|
||||
@@ -3480,7 +3608,7 @@ class ElementsAreMatcherImpl : public MatcherInterface<Container> {
|
||||
StlContainerReference stl_container = View::ConstReference(container);
|
||||
auto it = stl_container.begin();
|
||||
size_t exam_pos = 0;
|
||||
bool mismatch_found = false; // Have we found a mismatched element yet?
|
||||
bool unmatched_found = false;
|
||||
|
||||
// Go through the elements and matchers in pairs, until we reach
|
||||
// the end of either the elements or the matchers, or until we find a
|
||||
@@ -3496,11 +3624,23 @@ class ElementsAreMatcherImpl : public MatcherInterface<Container> {
|
||||
}
|
||||
|
||||
if (!match) {
|
||||
mismatch_found = true;
|
||||
unmatched_found = true;
|
||||
// We cannot store the iterator for the unmatched element to be used
|
||||
// later, as some users use ElementsAre() with a "container" whose
|
||||
// iterator is not copy-constructible or copy-assignable.
|
||||
//
|
||||
// We cannot store a pointer to the element either, as some container's
|
||||
// iterators return a temporary.
|
||||
//
|
||||
// We cannot store the element itself either, as the element may not be
|
||||
// copyable.
|
||||
//
|
||||
// Therefore, we just remember the index of the unmatched element,
|
||||
// and use it later to print the unmatched element.
|
||||
break;
|
||||
}
|
||||
}
|
||||
// If mismatch_found is true, 'exam_pos' is the index of the mismatch.
|
||||
// If unmatched_found is true, exam_pos is the index of the mismatch.
|
||||
|
||||
// Find how many elements the actual container has. We avoid
|
||||
// calling size() s.t. this code works for stream-like "containers"
|
||||
@@ -3521,10 +3661,27 @@ class ElementsAreMatcherImpl : public MatcherInterface<Container> {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mismatch_found) {
|
||||
if (unmatched_found) {
|
||||
// The element count matches, but the exam_pos-th element doesn't match.
|
||||
if (listener_interested) {
|
||||
*listener << "whose element #" << exam_pos << " doesn't match";
|
||||
// Find the unmatched element.
|
||||
auto unmatched_it = stl_container.begin();
|
||||
// We cannot call std::advance() on the iterator, as some users use
|
||||
// ElementsAre() with a "container" whose iterator is incompatible with
|
||||
// std::advance() (e.g. it may not have the difference_type member
|
||||
// type).
|
||||
for (size_t i = 0; i != exam_pos; ++i) {
|
||||
++unmatched_it;
|
||||
}
|
||||
|
||||
// If the array is long or the elements' print-out is large, it may be
|
||||
// hard for the user to find the mismatched element and its
|
||||
// corresponding matcher description. Therefore we print the index, the
|
||||
// value of the mismatched element, and the corresponding matcher
|
||||
// description to ease debugging.
|
||||
*listener << "whose element #" << exam_pos << " ("
|
||||
<< PrintToString(*unmatched_it) << ") ";
|
||||
matchers_[exam_pos].DescribeNegationTo(listener->stream());
|
||||
PrintIfNotEmpty(explanations[exam_pos], listener->stream());
|
||||
}
|
||||
return false;
|
||||
@@ -3930,15 +4087,15 @@ GTEST_API_ std::string FormatMatcherDescription(
|
||||
// Overloads to support `OptionalMatcher` being used with a type that either
|
||||
// supports implicit conversion to bool or a `has_value()` method.
|
||||
template <typename Optional>
|
||||
auto IsOptionalEngaged(const Optional& optional,
|
||||
Rank1) -> decltype(!!optional) {
|
||||
auto IsOptionalEngaged(const Optional& optional, Rank1)
|
||||
-> decltype(!!optional) {
|
||||
// The use of double-negation here is to preserve historical behavior where
|
||||
// the matcher used `operator!` rather than directly using `operator bool`.
|
||||
return !static_cast<bool>(!optional);
|
||||
}
|
||||
template <typename Optional>
|
||||
auto IsOptionalEngaged(const Optional& optional,
|
||||
Rank0) -> decltype(!optional.has_value()) {
|
||||
auto IsOptionalEngaged(const Optional& optional, Rank0)
|
||||
-> decltype(!optional.has_value()) {
|
||||
return optional.has_value();
|
||||
}
|
||||
|
||||
@@ -3979,6 +4136,10 @@ class OptionalMatcher {
|
||||
return false;
|
||||
}
|
||||
const ValueType& value = *optional;
|
||||
if (!listener->IsInterested()) {
|
||||
// Fast path to avoid unnecessary generation of match explanation.
|
||||
return value_matcher_.Matches(value);
|
||||
}
|
||||
StringMatchResultListener value_listener;
|
||||
const bool match = value_matcher_.MatchAndExplain(value, &value_listener);
|
||||
*listener << "whose value " << PrintToString(value)
|
||||
@@ -4365,6 +4526,42 @@ inline internal::FloatingEqMatcher<double> DoubleNear(double rhs,
|
||||
return internal::FloatingEqMatcher<double>(rhs, false, max_abs_error);
|
||||
}
|
||||
|
||||
// The DistanceFrom(target, get_distance, m) and DistanceFrom(target, m)
|
||||
// matchers work on arbitrary types that have the "distance" concept. What they
|
||||
// do:
|
||||
//
|
||||
// 1. compute the distance between the value and the target using
|
||||
// get_distance(value, target) if get_distance is provided; otherwise compute
|
||||
// the distance as abs(value - target).
|
||||
// 2. match the distance against the user-provided matcher m; if the match
|
||||
// succeeds, the DistanceFrom() match succeeds.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// // 0.5's distance from 0.6 should be <= 0.2.
|
||||
// EXPECT_THAT(0.5, DistanceFrom(0.6, Le(0.2)));
|
||||
//
|
||||
// Vector2D v1(3.0, 4.0), v2(3.2, 6.0);
|
||||
// // v1's distance from v2, as computed by EuclideanDistance(v1, v2),
|
||||
// // should be >= 1.0.
|
||||
// EXPECT_THAT(v1, DistanceFrom(v2, EuclideanDistance, Ge(1.0)));
|
||||
|
||||
template <typename T, typename GetDistance, typename DistanceMatcher>
|
||||
inline internal::DistanceFromMatcher<T, GetDistance, DistanceMatcher>
|
||||
DistanceFrom(T target, GetDistance get_distance,
|
||||
DistanceMatcher distance_matcher) {
|
||||
return internal::DistanceFromMatcher<T, GetDistance, DistanceMatcher>(
|
||||
std::move(target), std::move(get_distance), std::move(distance_matcher));
|
||||
}
|
||||
|
||||
template <typename T, typename DistanceMatcher>
|
||||
inline internal::DistanceFromMatcher<T, internal::DefaultGetDistance,
|
||||
DistanceMatcher>
|
||||
DistanceFrom(T target, DistanceMatcher distance_matcher) {
|
||||
return DistanceFrom(std::move(target), internal::DefaultGetDistance(),
|
||||
std::move(distance_matcher));
|
||||
}
|
||||
|
||||
// Creates a matcher that matches any double argument approximately equal to
|
||||
// rhs, up to the specified max absolute error bound, including NaN values when
|
||||
// rhs is NaN. The max absolute error bound must be non-negative.
|
||||
@@ -4430,7 +4627,7 @@ WhenDynamicCastTo(const Matcher<To>& inner_matcher) {
|
||||
// matches a Foo object x if and only if x.number >= 5.
|
||||
template <typename Class, typename FieldType, typename FieldMatcher>
|
||||
inline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType>> Field(
|
||||
FieldType Class::*field, const FieldMatcher& matcher) {
|
||||
FieldType Class::* field, const FieldMatcher& matcher) {
|
||||
return MakePolymorphicMatcher(internal::FieldMatcher<Class, FieldType>(
|
||||
field, MatcherCast<const FieldType&>(matcher)));
|
||||
// The call to MatcherCast() is required for supporting inner
|
||||
@@ -4443,7 +4640,7 @@ inline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType>> Field(
|
||||
// messages.
|
||||
template <typename Class, typename FieldType, typename FieldMatcher>
|
||||
inline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType>> Field(
|
||||
const std::string& field_name, FieldType Class::*field,
|
||||
const std::string& field_name, FieldType Class::* field,
|
||||
const FieldMatcher& matcher) {
|
||||
return MakePolymorphicMatcher(internal::FieldMatcher<Class, FieldType>(
|
||||
field_name, field, MatcherCast<const FieldType&>(matcher)));
|
||||
@@ -4453,6 +4650,10 @@ inline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType>> Field(
|
||||
// matches 'matcher'. For example,
|
||||
// Property(&Foo::str, StartsWith("hi"))
|
||||
// matches a Foo object x if and only if x.str() starts with "hi".
|
||||
//
|
||||
// Warning: Don't use `Property()` against member functions that you do not
|
||||
// own, because taking addresses of functions is fragile and generally not part
|
||||
// of the contract of the function.
|
||||
template <typename Class, typename PropertyType, typename PropertyMatcher>
|
||||
inline PolymorphicMatcher<internal::PropertyMatcher<
|
||||
Class, PropertyType, PropertyType (Class::*)() const>>
|
||||
@@ -5551,8 +5752,7 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
|
||||
template <typename arg_type> \
|
||||
bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain( \
|
||||
const arg_type& arg, \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED ::testing::MatchResultListener* \
|
||||
result_listener) const
|
||||
[[maybe_unused]] ::testing::MatchResultListener* result_listener) const
|
||||
|
||||
#define MATCHER_P(name, p0, description) \
|
||||
GMOCK_INTERNAL_MATCHER(name, name##MatcherP, description, (#p0), (p0))
|
||||
@@ -5637,8 +5837,8 @@ PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
|
||||
bool full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)>:: \
|
||||
gmock_Impl<arg_type>::MatchAndExplain( \
|
||||
const arg_type& arg, \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED ::testing:: \
|
||||
MatchResultListener* result_listener) const
|
||||
[[maybe_unused]] ::testing::MatchResultListener* result_listener) \
|
||||
const
|
||||
|
||||
#define GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args) \
|
||||
GMOCK_PP_TAIL( \
|
||||
|
||||
@@ -521,9 +521,8 @@
|
||||
GMOCK_INTERNAL_DECL_##value_params) \
|
||||
GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
|
||||
= default; \
|
||||
, \
|
||||
: impl_(std::make_shared<gmock_Impl>( \
|
||||
GMOCK_INTERNAL_LIST_##value_params)){}) \
|
||||
, : impl_(std::make_shared<gmock_Impl>( \
|
||||
GMOCK_INTERNAL_LIST_##value_params)){}) \
|
||||
GMOCK_ACTION_CLASS_(name, value_params)(const GMOCK_ACTION_CLASS_( \
|
||||
name, value_params) &) noexcept GMOCK_INTERNAL_DEFN_COPY_ \
|
||||
##value_params \
|
||||
@@ -551,10 +550,10 @@
|
||||
}; \
|
||||
template <GMOCK_INTERNAL_DECL_##template_params \
|
||||
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
||||
GMOCK_ACTION_CLASS_( \
|
||||
[[nodiscard]] GMOCK_ACTION_CLASS_( \
|
||||
name, value_params)<GMOCK_INTERNAL_LIST_##template_params \
|
||||
GMOCK_INTERNAL_LIST_TYPE_##value_params> \
|
||||
name(GMOCK_INTERNAL_DECL_##value_params) GTEST_MUST_USE_RESULT_; \
|
||||
name(GMOCK_INTERNAL_DECL_##value_params); \
|
||||
template <GMOCK_INTERNAL_DECL_##template_params \
|
||||
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
||||
inline GMOCK_ACTION_CLASS_( \
|
||||
|
||||
@@ -467,11 +467,6 @@ struct Function<R(Args...)> {
|
||||
using MakeResultIgnoredValue = IgnoredValue(Args...);
|
||||
};
|
||||
|
||||
#ifdef GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
|
||||
template <typename R, typename... Args>
|
||||
constexpr size_t Function<R(Args...)>::ArgumentCount;
|
||||
#endif
|
||||
|
||||
// Workaround for MSVC error C2039: 'type': is not a member of 'std'
|
||||
// when std::tuple_element is used.
|
||||
// See: https://github.com/google/googletest/issues/3931
|
||||
|
||||
6
3rdparty/googletest/googletest/README.md
vendored
6
3rdparty/googletest/googletest/README.md
vendored
@@ -25,7 +25,7 @@ When building GoogleTest as a standalone project, the typical workflow starts
|
||||
with
|
||||
|
||||
```
|
||||
git clone https://github.com/google/googletest.git -b v1.16.0
|
||||
git clone https://github.com/google/googletest.git -b v1.17.0
|
||||
cd googletest # Main directory of the cloned repository.
|
||||
mkdir build # Create a directory to hold the build output.
|
||||
cd build
|
||||
@@ -124,9 +124,9 @@ match the project in which it is included.
|
||||
|
||||
#### C++ Standard Version
|
||||
|
||||
An environment that supports C++14 is required in order to successfully build
|
||||
An environment that supports C++17 is required in order to successfully build
|
||||
GoogleTest. One way to ensure this is to specify the standard in the top-level
|
||||
project, for example by using the `set(CMAKE_CXX_STANDARD 14)` command along
|
||||
project, for example by using the `set(CMAKE_CXX_STANDARD 17)` command along
|
||||
with `set(CMAKE_CXX_STANDARD_REQUIRED ON)`. If this is not feasible, for example
|
||||
in a C project using GoogleTest for validation, then it can be specified by
|
||||
adding it to the options for cmake via the`-DCMAKE_CXX_FLAGS` option.
|
||||
|
||||
@@ -129,6 +129,13 @@ namespace testing {
|
||||
//
|
||||
// Expected: Foo() is even
|
||||
// Actual: it's 5
|
||||
//
|
||||
|
||||
// Returned AssertionResult objects may not be ignored.
|
||||
// Note: Disabled for SWIG as it doesn't parse attributes correctly.
|
||||
#if !defined(SWIG)
|
||||
class [[nodiscard]] AssertionResult;
|
||||
#endif // !SWIG
|
||||
|
||||
class GTEST_API_ AssertionResult {
|
||||
public:
|
||||
|
||||
@@ -174,6 +174,7 @@ TEST_P(DerivedTest, DoesBlah) {
|
||||
|
||||
#endif // 0
|
||||
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
@@ -413,7 +414,8 @@ internal::CartesianProductHolder<Generator...> Combine(const Generator&... g) {
|
||||
// Synopsis:
|
||||
// ConvertGenerator<T>(gen)
|
||||
// - returns a generator producing the same elements as generated by gen, but
|
||||
// each element is static_cast to type T before being returned
|
||||
// each T-typed element is static_cast to a type deduced from the interface
|
||||
// that accepts this generator, and then returned
|
||||
//
|
||||
// It is useful when using the Combine() function to get the generated
|
||||
// parameters in a custom type instead of std::tuple
|
||||
@@ -441,10 +443,65 @@ internal::CartesianProductHolder<Generator...> Combine(const Generator&... g) {
|
||||
// Combine(Values("cat", "dog"),
|
||||
// Values(BLACK, WHITE))));
|
||||
//
|
||||
template <typename T>
|
||||
internal::ParamConverterGenerator<T> ConvertGenerator(
|
||||
internal::ParamGenerator<T> gen) {
|
||||
return internal::ParamConverterGenerator<T>(gen);
|
||||
template <typename RequestedT>
|
||||
internal::ParamConverterGenerator<RequestedT> ConvertGenerator(
|
||||
internal::ParamGenerator<RequestedT> gen) {
|
||||
return internal::ParamConverterGenerator<RequestedT>(std::move(gen));
|
||||
}
|
||||
|
||||
// As above, but takes a callable as a second argument. The callable converts
|
||||
// the generated parameter to the test fixture's parameter type. This allows you
|
||||
// to use a parameter type that does not have a converting constructor from the
|
||||
// generated type.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// This will instantiate tests in test suite AnimalTest each one with
|
||||
// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
|
||||
// tuple("dog", BLACK), and tuple("dog", WHITE):
|
||||
//
|
||||
// enum Color { BLACK, GRAY, WHITE };
|
||||
// struct ParamType {
|
||||
// std::string animal;
|
||||
// Color color;
|
||||
// };
|
||||
// class AnimalTest
|
||||
// : public testing::TestWithParam<ParamType> {...};
|
||||
//
|
||||
// TEST_P(AnimalTest, AnimalLooksNice) {...}
|
||||
//
|
||||
// INSTANTIATE_TEST_SUITE_P(
|
||||
// AnimalVariations, AnimalTest,
|
||||
// ConvertGenerator(Combine(Values("cat", "dog"), Values(BLACK, WHITE)),
|
||||
// [](std::tuple<std::string, Color> t) {
|
||||
// return ParamType{.animal = std::get<0>(t),
|
||||
// .color = std::get<1>(t)};
|
||||
// }));
|
||||
//
|
||||
template <typename T, int&... ExplicitArgumentBarrier, typename Gen,
|
||||
typename Func,
|
||||
typename StdFunction = decltype(std::function(std::declval<Func>()))>
|
||||
internal::ParamConverterGenerator<T, StdFunction> ConvertGenerator(Gen&& gen,
|
||||
Func&& f) {
|
||||
return internal::ParamConverterGenerator<T, StdFunction>(
|
||||
std::forward<Gen>(gen), std::forward<Func>(f));
|
||||
}
|
||||
|
||||
// As above, but infers the T from the supplied std::function instead of
|
||||
// having the caller specify it.
|
||||
template <int&... ExplicitArgumentBarrier, typename Gen, typename Func,
|
||||
typename StdFunction = decltype(std::function(std::declval<Func>()))>
|
||||
auto ConvertGenerator(Gen&& gen, Func&& f) {
|
||||
constexpr bool is_single_arg_std_function =
|
||||
internal::IsSingleArgStdFunction<StdFunction>::value;
|
||||
if constexpr (is_single_arg_std_function) {
|
||||
return ConvertGenerator<
|
||||
typename internal::FuncSingleParamType<StdFunction>::type>(
|
||||
std::forward<Gen>(gen), std::forward<Func>(f));
|
||||
} else {
|
||||
static_assert(is_single_arg_std_function,
|
||||
"The call signature must contain a single argument.");
|
||||
}
|
||||
}
|
||||
|
||||
#define TEST_P(test_suite_name, test_name) \
|
||||
@@ -469,7 +526,7 @@ internal::ParamConverterGenerator<T> ConvertGenerator(
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__)); \
|
||||
return 0; \
|
||||
} \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static int gtest_registering_dummy_; \
|
||||
[[maybe_unused]] static int gtest_registering_dummy_; \
|
||||
}; \
|
||||
int GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
test_name)::gtest_registering_dummy_ = \
|
||||
@@ -493,39 +550,38 @@ internal::ParamConverterGenerator<T> ConvertGenerator(
|
||||
#define GTEST_GET_FIRST_(first, ...) first
|
||||
#define GTEST_GET_SECOND_(first, second, ...) second
|
||||
|
||||
#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...) \
|
||||
static ::testing::internal::ParamGenerator<test_suite_name::ParamType> \
|
||||
gtest_##prefix##test_suite_name##_EvalGenerator_() { \
|
||||
return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_)); \
|
||||
} \
|
||||
static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_( \
|
||||
const ::testing::TestParamInfo<test_suite_name::ParamType>& info) { \
|
||||
if (::testing::internal::AlwaysFalse()) { \
|
||||
::testing::internal::TestNotEmpty(GTEST_EXPAND_(GTEST_GET_SECOND_( \
|
||||
__VA_ARGS__, \
|
||||
::testing::internal::DefaultParamName<test_suite_name::ParamType>, \
|
||||
DUMMY_PARAM_))); \
|
||||
auto t = std::make_tuple(__VA_ARGS__); \
|
||||
static_assert(std::tuple_size<decltype(t)>::value <= 2, \
|
||||
"Too Many Args!"); \
|
||||
} \
|
||||
return ((GTEST_EXPAND_(GTEST_GET_SECOND_( \
|
||||
__VA_ARGS__, \
|
||||
::testing::internal::DefaultParamName<test_suite_name::ParamType>, \
|
||||
DUMMY_PARAM_))))(info); \
|
||||
} \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static int \
|
||||
gtest_##prefix##test_suite_name##_dummy_ = \
|
||||
::testing::UnitTest::GetInstance() \
|
||||
->parameterized_test_registry() \
|
||||
.GetTestSuitePatternHolder<test_suite_name>( \
|
||||
GTEST_STRINGIFY_(test_suite_name), \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestSuiteInstantiation( \
|
||||
GTEST_STRINGIFY_(prefix), \
|
||||
>est_##prefix##test_suite_name##_EvalGenerator_, \
|
||||
>est_##prefix##test_suite_name##_EvalGenerateName_, \
|
||||
__FILE__, __LINE__)
|
||||
#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...) \
|
||||
static ::testing::internal::ParamGenerator<test_suite_name::ParamType> \
|
||||
gtest_##prefix##test_suite_name##_EvalGenerator_() { \
|
||||
return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_)); \
|
||||
} \
|
||||
static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_( \
|
||||
const ::testing::TestParamInfo<test_suite_name::ParamType>& info) { \
|
||||
if (::testing::internal::AlwaysFalse()) { \
|
||||
::testing::internal::TestNotEmpty(GTEST_EXPAND_(GTEST_GET_SECOND_( \
|
||||
__VA_ARGS__, \
|
||||
::testing::internal::DefaultParamName<test_suite_name::ParamType>, \
|
||||
DUMMY_PARAM_))); \
|
||||
auto t = std::make_tuple(__VA_ARGS__); \
|
||||
static_assert(std::tuple_size<decltype(t)>::value <= 2, \
|
||||
"Too Many Args!"); \
|
||||
} \
|
||||
return ((GTEST_EXPAND_(GTEST_GET_SECOND_( \
|
||||
__VA_ARGS__, \
|
||||
::testing::internal::DefaultParamName<test_suite_name::ParamType>, \
|
||||
DUMMY_PARAM_))))(info); \
|
||||
} \
|
||||
[[maybe_unused]] static int gtest_##prefix##test_suite_name##_dummy_ = \
|
||||
::testing::UnitTest::GetInstance() \
|
||||
->parameterized_test_registry() \
|
||||
.GetTestSuitePatternHolder<test_suite_name>( \
|
||||
GTEST_STRINGIFY_(test_suite_name), \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__)) \
|
||||
->AddTestSuiteInstantiation( \
|
||||
GTEST_STRINGIFY_(prefix), \
|
||||
>est_##prefix##test_suite_name##_EvalGenerator_, \
|
||||
>est_##prefix##test_suite_name##_EvalGenerateName_, __FILE__, \
|
||||
__LINE__)
|
||||
|
||||
// Allow Marking a Parameterized test class as not needing to be instantiated.
|
||||
#define GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(T) \
|
||||
|
||||
@@ -194,34 +194,33 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
|
||||
typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type \
|
||||
GTEST_NAME_GENERATOR_(CaseName)
|
||||
|
||||
#define TYPED_TEST(CaseName, TestName) \
|
||||
static_assert(sizeof(GTEST_STRINGIFY_(TestName)) > 1, \
|
||||
"test-name must not be empty"); \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
|
||||
: public CaseName<gtest_TypeParam_> { \
|
||||
private: \
|
||||
typedef CaseName<gtest_TypeParam_> TestFixture; \
|
||||
typedef gtest_TypeParam_ TypeParam; \
|
||||
void TestBody() override; \
|
||||
}; \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool \
|
||||
gtest_##CaseName##_##TestName##_registered_ = \
|
||||
::testing::internal::TypeParameterizedTest< \
|
||||
CaseName, \
|
||||
::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_( \
|
||||
CaseName, TestName)>, \
|
||||
GTEST_TYPE_PARAMS_( \
|
||||
CaseName)>::Register("", \
|
||||
::testing::internal::CodeLocation( \
|
||||
__FILE__, __LINE__), \
|
||||
GTEST_STRINGIFY_(CaseName), \
|
||||
GTEST_STRINGIFY_(TestName), 0, \
|
||||
::testing::internal::GenerateNames< \
|
||||
GTEST_NAME_GENERATOR_(CaseName), \
|
||||
GTEST_TYPE_PARAMS_(CaseName)>()); \
|
||||
template <typename gtest_TypeParam_> \
|
||||
void GTEST_TEST_CLASS_NAME_(CaseName, \
|
||||
#define TYPED_TEST(CaseName, TestName) \
|
||||
static_assert(sizeof(GTEST_STRINGIFY_(TestName)) > 1, \
|
||||
"test-name must not be empty"); \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
|
||||
: public CaseName<gtest_TypeParam_> { \
|
||||
private: \
|
||||
typedef CaseName<gtest_TypeParam_> TestFixture; \
|
||||
typedef gtest_TypeParam_ TypeParam; \
|
||||
void TestBody() override; \
|
||||
}; \
|
||||
[[maybe_unused]] static bool gtest_##CaseName##_##TestName##_registered_ = \
|
||||
::testing::internal::TypeParameterizedTest< \
|
||||
CaseName, \
|
||||
::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName, \
|
||||
TestName)>, \
|
||||
GTEST_TYPE_PARAMS_( \
|
||||
CaseName)>::Register("", \
|
||||
::testing::internal::CodeLocation( \
|
||||
__FILE__, __LINE__), \
|
||||
GTEST_STRINGIFY_(CaseName), \
|
||||
GTEST_STRINGIFY_(TestName), 0, \
|
||||
::testing::internal::GenerateNames< \
|
||||
GTEST_NAME_GENERATOR_(CaseName), \
|
||||
GTEST_TYPE_PARAMS_(CaseName)>()); \
|
||||
template <typename gtest_TypeParam_> \
|
||||
void GTEST_TEST_CLASS_NAME_(CaseName, \
|
||||
TestName)<gtest_TypeParam_>::TestBody()
|
||||
|
||||
// Legacy API is deprecated but still available
|
||||
@@ -268,23 +267,22 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
|
||||
TYPED_TEST_SUITE_P
|
||||
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
|
||||
|
||||
#define TYPED_TEST_P(SuiteName, TestName) \
|
||||
namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class TestName : public SuiteName<gtest_TypeParam_> { \
|
||||
private: \
|
||||
typedef SuiteName<gtest_TypeParam_> TestFixture; \
|
||||
typedef gtest_TypeParam_ TypeParam; \
|
||||
void TestBody() override; \
|
||||
}; \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool \
|
||||
gtest_##TestName##_defined_ = \
|
||||
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \
|
||||
__FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName), \
|
||||
GTEST_STRINGIFY_(TestName)); \
|
||||
} \
|
||||
template <typename gtest_TypeParam_> \
|
||||
void GTEST_SUITE_NAMESPACE_( \
|
||||
#define TYPED_TEST_P(SuiteName, TestName) \
|
||||
namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class TestName : public SuiteName<gtest_TypeParam_> { \
|
||||
private: \
|
||||
typedef SuiteName<gtest_TypeParam_> TestFixture; \
|
||||
typedef gtest_TypeParam_ TypeParam; \
|
||||
void TestBody() override; \
|
||||
}; \
|
||||
[[maybe_unused]] static bool gtest_##TestName##_defined_ = \
|
||||
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \
|
||||
__FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName), \
|
||||
GTEST_STRINGIFY_(TestName)); \
|
||||
} \
|
||||
template <typename gtest_TypeParam_> \
|
||||
void GTEST_SUITE_NAMESPACE_( \
|
||||
SuiteName)::TestName<gtest_TypeParam_>::TestBody()
|
||||
|
||||
// Note: this won't work correctly if the trailing arguments are macros.
|
||||
@@ -292,8 +290,8 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
|
||||
namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \
|
||||
typedef ::testing::internal::Templates<__VA_ARGS__> gtest_AllTests_; \
|
||||
} \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static const char* const \
|
||||
GTEST_REGISTERED_TEST_NAMES_(SuiteName) = \
|
||||
[[maybe_unused]] static const char* const GTEST_REGISTERED_TEST_NAMES_( \
|
||||
SuiteName) = \
|
||||
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).VerifyRegisteredTestNames( \
|
||||
GTEST_STRINGIFY_(SuiteName), __FILE__, __LINE__, #__VA_ARGS__)
|
||||
|
||||
@@ -305,24 +303,22 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
|
||||
REGISTER_TYPED_TEST_SUITE_P
|
||||
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
|
||||
|
||||
#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...) \
|
||||
static_assert(sizeof(GTEST_STRINGIFY_(Prefix)) > 1, \
|
||||
"test-suit-prefix must not be empty"); \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool \
|
||||
gtest_##Prefix##_##SuiteName = \
|
||||
::testing::internal::TypeParameterizedTestSuite< \
|
||||
SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_, \
|
||||
::testing::internal::GenerateTypeList<Types>::type>:: \
|
||||
Register( \
|
||||
GTEST_STRINGIFY_(Prefix), \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), \
|
||||
>EST_TYPED_TEST_SUITE_P_STATE_(SuiteName), \
|
||||
GTEST_STRINGIFY_(SuiteName), \
|
||||
GTEST_REGISTERED_TEST_NAMES_(SuiteName), \
|
||||
::testing::internal::GenerateNames< \
|
||||
::testing::internal::NameGeneratorSelector< \
|
||||
__VA_ARGS__>::type, \
|
||||
::testing::internal::GenerateTypeList<Types>::type>())
|
||||
#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...) \
|
||||
static_assert(sizeof(GTEST_STRINGIFY_(Prefix)) > 1, \
|
||||
"test-suit-prefix must not be empty"); \
|
||||
[[maybe_unused]] static bool gtest_##Prefix##_##SuiteName = \
|
||||
::testing::internal::TypeParameterizedTestSuite< \
|
||||
SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_, \
|
||||
::testing::internal::GenerateTypeList<Types>::type>:: \
|
||||
Register(GTEST_STRINGIFY_(Prefix), \
|
||||
::testing::internal::CodeLocation(__FILE__, __LINE__), \
|
||||
>EST_TYPED_TEST_SUITE_P_STATE_(SuiteName), \
|
||||
GTEST_STRINGIFY_(SuiteName), \
|
||||
GTEST_REGISTERED_TEST_NAMES_(SuiteName), \
|
||||
::testing::internal::GenerateNames< \
|
||||
::testing::internal::NameGeneratorSelector< \
|
||||
__VA_ARGS__>::type, \
|
||||
::testing::internal::GenerateTypeList<Types>::type>())
|
||||
|
||||
// Legacy API is deprecated but still available
|
||||
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
|
||||
|
||||
@@ -1123,7 +1123,7 @@ class GTEST_API_ UnitTest {
|
||||
// This method can only be called from the main thread.
|
||||
//
|
||||
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
|
||||
int Run() GTEST_MUST_USE_RESULT_;
|
||||
[[nodiscard]] int Run();
|
||||
|
||||
// Returns the working directory when the first TEST() or TEST_F()
|
||||
// was executed. The UnitTest object owns the string.
|
||||
@@ -2329,7 +2329,7 @@ TestInfo* RegisterTest(const char* test_suite_name, const char* test_name,
|
||||
//
|
||||
// This function was formerly a macro; thus, it is in the global
|
||||
// namespace and has an all-caps name.
|
||||
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_;
|
||||
[[nodiscard]] int RUN_ALL_TESTS();
|
||||
|
||||
inline int RUN_ALL_TESTS() { return ::testing::UnitTest::GetInstance()->Run(); }
|
||||
|
||||
|
||||
@@ -290,17 +290,17 @@ class FloatingPoint {
|
||||
// around may change its bits, although the new value is guaranteed
|
||||
// to be also a NAN. Therefore, don't expect this constructor to
|
||||
// preserve the bits in x when x is a NAN.
|
||||
explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
|
||||
explicit FloatingPoint(RawType x) { memcpy(&bits_, &x, sizeof(x)); }
|
||||
|
||||
// Static methods
|
||||
|
||||
// Reinterprets a bit pattern as a floating-point number.
|
||||
//
|
||||
// This function is needed to test the AlmostEquals() method.
|
||||
static RawType ReinterpretBits(const Bits bits) {
|
||||
FloatingPoint fp(0);
|
||||
fp.u_.bits_ = bits;
|
||||
return fp.u_.value_;
|
||||
static RawType ReinterpretBits(Bits bits) {
|
||||
RawType fp;
|
||||
memcpy(&fp, &bits, sizeof(fp));
|
||||
return fp;
|
||||
}
|
||||
|
||||
// Returns the floating-point number that represent positive infinity.
|
||||
@@ -309,16 +309,16 @@ class FloatingPoint {
|
||||
// Non-static methods
|
||||
|
||||
// Returns the bits that represents this number.
|
||||
const Bits& bits() const { return u_.bits_; }
|
||||
const Bits& bits() const { return bits_; }
|
||||
|
||||
// Returns the exponent bits of this number.
|
||||
Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
|
||||
Bits exponent_bits() const { return kExponentBitMask & bits_; }
|
||||
|
||||
// Returns the fraction bits of this number.
|
||||
Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
|
||||
Bits fraction_bits() const { return kFractionBitMask & bits_; }
|
||||
|
||||
// Returns the sign bit of this number.
|
||||
Bits sign_bit() const { return kSignBitMask & u_.bits_; }
|
||||
Bits sign_bit() const { return kSignBitMask & bits_; }
|
||||
|
||||
// Returns true if and only if this is NAN (not a number).
|
||||
bool is_nan() const {
|
||||
@@ -332,23 +332,16 @@ class FloatingPoint {
|
||||
//
|
||||
// - returns false if either number is (or both are) NAN.
|
||||
// - treats really large numbers as almost equal to infinity.
|
||||
// - thinks +0.0 and -0.0 are 0 DLP's apart.
|
||||
// - thinks +0.0 and -0.0 are 0 ULP's apart.
|
||||
bool AlmostEquals(const FloatingPoint& rhs) const {
|
||||
// The IEEE standard says that any comparison operation involving
|
||||
// a NAN must return false.
|
||||
if (is_nan() || rhs.is_nan()) return false;
|
||||
|
||||
return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) <=
|
||||
kMaxUlps;
|
||||
return DistanceBetweenSignAndMagnitudeNumbers(bits_, rhs.bits_) <= kMaxUlps;
|
||||
}
|
||||
|
||||
private:
|
||||
// The data type used to store the actual floating-point number.
|
||||
union FloatingPointUnion {
|
||||
RawType value_; // The raw floating-point number.
|
||||
Bits bits_; // The bits that represent the number.
|
||||
};
|
||||
|
||||
// Converts an integer from the sign-and-magnitude representation to
|
||||
// the biased representation. More precisely, let N be 2 to the
|
||||
// power of (kBitCount - 1), an integer x is represented by the
|
||||
@@ -364,7 +357,7 @@ class FloatingPoint {
|
||||
//
|
||||
// Read https://en.wikipedia.org/wiki/Signed_number_representations
|
||||
// for more details on signed number representations.
|
||||
static Bits SignAndMagnitudeToBiased(const Bits& sam) {
|
||||
static Bits SignAndMagnitudeToBiased(Bits sam) {
|
||||
if (kSignBitMask & sam) {
|
||||
// sam represents a negative number.
|
||||
return ~sam + 1;
|
||||
@@ -376,14 +369,13 @@ class FloatingPoint {
|
||||
|
||||
// Given two numbers in the sign-and-magnitude representation,
|
||||
// returns the distance between them as an unsigned number.
|
||||
static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits& sam1,
|
||||
const Bits& sam2) {
|
||||
static Bits DistanceBetweenSignAndMagnitudeNumbers(Bits sam1, Bits sam2) {
|
||||
const Bits biased1 = SignAndMagnitudeToBiased(sam1);
|
||||
const Bits biased2 = SignAndMagnitudeToBiased(sam2);
|
||||
return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
|
||||
}
|
||||
|
||||
FloatingPointUnion u_;
|
||||
Bits bits_; // The bits that represent the number.
|
||||
};
|
||||
|
||||
// Typedefs the instances of the FloatingPoint template class that we
|
||||
@@ -894,11 +886,6 @@ class HasDebugStringAndShortDebugString {
|
||||
HasDebugStringType::value && HasShortDebugStringType::value;
|
||||
};
|
||||
|
||||
#ifdef GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
|
||||
template <typename T>
|
||||
constexpr bool HasDebugStringAndShortDebugString<T>::value;
|
||||
#endif
|
||||
|
||||
// When the compiler sees expression IsContainerTest<C>(0), if C is an
|
||||
// STL-style container class, the first overload of IsContainerTest
|
||||
// will be viable (since both C::iterator* and C::const_iterator* are
|
||||
@@ -1241,30 +1228,40 @@ class FlatTuple
|
||||
|
||||
// Utility functions to be called with static_assert to induce deprecation
|
||||
// warnings.
|
||||
GTEST_INTERNAL_DEPRECATED(
|
||||
[[deprecated(
|
||||
"INSTANTIATE_TEST_CASE_P is deprecated, please use "
|
||||
"INSTANTIATE_TEST_SUITE_P")
|
||||
constexpr bool InstantiateTestCase_P_IsDeprecated() { return true; }
|
||||
"INSTANTIATE_TEST_SUITE_P")]]
|
||||
constexpr bool InstantiateTestCase_P_IsDeprecated() {
|
||||
return true;
|
||||
}
|
||||
|
||||
GTEST_INTERNAL_DEPRECATED(
|
||||
[[deprecated(
|
||||
"TYPED_TEST_CASE_P is deprecated, please use "
|
||||
"TYPED_TEST_SUITE_P")
|
||||
constexpr bool TypedTestCase_P_IsDeprecated() { return true; }
|
||||
"TYPED_TEST_SUITE_P")]]
|
||||
constexpr bool TypedTestCase_P_IsDeprecated() {
|
||||
return true;
|
||||
}
|
||||
|
||||
GTEST_INTERNAL_DEPRECATED(
|
||||
[[deprecated(
|
||||
"TYPED_TEST_CASE is deprecated, please use "
|
||||
"TYPED_TEST_SUITE")
|
||||
constexpr bool TypedTestCaseIsDeprecated() { return true; }
|
||||
"TYPED_TEST_SUITE")]]
|
||||
constexpr bool TypedTestCaseIsDeprecated() {
|
||||
return true;
|
||||
}
|
||||
|
||||
GTEST_INTERNAL_DEPRECATED(
|
||||
[[deprecated(
|
||||
"REGISTER_TYPED_TEST_CASE_P is deprecated, please use "
|
||||
"REGISTER_TYPED_TEST_SUITE_P")
|
||||
constexpr bool RegisterTypedTestCase_P_IsDeprecated() { return true; }
|
||||
"REGISTER_TYPED_TEST_SUITE_P")]]
|
||||
constexpr bool RegisterTypedTestCase_P_IsDeprecated() {
|
||||
return true;
|
||||
}
|
||||
|
||||
GTEST_INTERNAL_DEPRECATED(
|
||||
[[deprecated(
|
||||
"INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use "
|
||||
"INSTANTIATE_TYPED_TEST_SUITE_P")
|
||||
constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; }
|
||||
"INSTANTIATE_TYPED_TEST_SUITE_P")]]
|
||||
constexpr bool InstantiateTypedTestCase_P_IsDeprecated() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace testing
|
||||
@@ -1501,8 +1498,7 @@ class NeverThrown {
|
||||
\
|
||||
private: \
|
||||
void TestBody() override; \
|
||||
GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static ::testing::TestInfo* const \
|
||||
test_info_; \
|
||||
[[maybe_unused]] static ::testing::TestInfo* const test_info_; \
|
||||
}; \
|
||||
\
|
||||
::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -529,8 +530,7 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
|
||||
// prefix). test_base_name is the name of an individual test without
|
||||
// parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
|
||||
// test suite base name and DoBar is test base name.
|
||||
void AddTestPattern(const char*,
|
||||
const char* test_base_name,
|
||||
void AddTestPattern(const char*, const char* test_base_name,
|
||||
TestMetaFactoryBase<ParamType>* meta_factory,
|
||||
CodeLocation code_location) {
|
||||
tests_.emplace_back(
|
||||
@@ -952,11 +952,11 @@ class CartesianProductHolder {
|
||||
std::tuple<Gen...> generators_;
|
||||
};
|
||||
|
||||
template <typename From, typename To>
|
||||
template <typename From, typename To, typename Func>
|
||||
class ParamGeneratorConverter : public ParamGeneratorInterface<To> {
|
||||
public:
|
||||
ParamGeneratorConverter(ParamGenerator<From> gen) // NOLINT
|
||||
: generator_(std::move(gen)) {}
|
||||
ParamGeneratorConverter(ParamGenerator<From> gen, Func converter) // NOLINT
|
||||
: generator_(std::move(gen)), converter_(std::move(converter)) {}
|
||||
|
||||
ParamIteratorInterface<To>* Begin() const override {
|
||||
return new Iterator(this, generator_.begin(), generator_.end());
|
||||
@@ -965,13 +965,21 @@ class ParamGeneratorConverter : public ParamGeneratorInterface<To> {
|
||||
return new Iterator(this, generator_.end(), generator_.end());
|
||||
}
|
||||
|
||||
// Returns the std::function wrapping the user-supplied converter callable. It
|
||||
// is used by the iterator (see class Iterator below) to convert the object
|
||||
// (of type FROM) returned by the ParamGenerator to an object of a type that
|
||||
// can be static_cast to type TO.
|
||||
const Func& TypeConverter() const { return converter_; }
|
||||
|
||||
private:
|
||||
class Iterator : public ParamIteratorInterface<To> {
|
||||
public:
|
||||
Iterator(const ParamGeneratorInterface<To>* base, ParamIterator<From> it,
|
||||
Iterator(const ParamGeneratorConverter* base, ParamIterator<From> it,
|
||||
ParamIterator<From> end)
|
||||
: base_(base), it_(it), end_(end) {
|
||||
if (it_ != end_) value_ = std::make_shared<To>(static_cast<To>(*it_));
|
||||
if (it_ != end_)
|
||||
value_ =
|
||||
std::make_shared<To>(static_cast<To>(base->TypeConverter()(*it_)));
|
||||
}
|
||||
~Iterator() override = default;
|
||||
|
||||
@@ -980,7 +988,9 @@ class ParamGeneratorConverter : public ParamGeneratorInterface<To> {
|
||||
}
|
||||
void Advance() override {
|
||||
++it_;
|
||||
if (it_ != end_) value_ = std::make_shared<To>(static_cast<To>(*it_));
|
||||
if (it_ != end_)
|
||||
value_ =
|
||||
std::make_shared<To>(static_cast<To>(base_->TypeConverter()(*it_)));
|
||||
}
|
||||
ParamIteratorInterface<To>* Clone() const override {
|
||||
return new Iterator(*this);
|
||||
@@ -1000,30 +1010,54 @@ class ParamGeneratorConverter : public ParamGeneratorInterface<To> {
|
||||
private:
|
||||
Iterator(const Iterator& other) = default;
|
||||
|
||||
const ParamGeneratorInterface<To>* const base_;
|
||||
const ParamGeneratorConverter* const base_;
|
||||
ParamIterator<From> it_;
|
||||
ParamIterator<From> end_;
|
||||
std::shared_ptr<To> value_;
|
||||
}; // class ParamGeneratorConverter::Iterator
|
||||
|
||||
ParamGenerator<From> generator_;
|
||||
Func converter_;
|
||||
}; // class ParamGeneratorConverter
|
||||
|
||||
template <class Gen>
|
||||
template <class GeneratedT,
|
||||
typename StdFunction =
|
||||
std::function<const GeneratedT&(const GeneratedT&)>>
|
||||
class ParamConverterGenerator {
|
||||
public:
|
||||
ParamConverterGenerator(ParamGenerator<Gen> g) // NOLINT
|
||||
: generator_(std::move(g)) {}
|
||||
ParamConverterGenerator(ParamGenerator<GeneratedT> g) // NOLINT
|
||||
: generator_(std::move(g)), converter_(Identity) {}
|
||||
|
||||
ParamConverterGenerator(ParamGenerator<GeneratedT> g, StdFunction converter)
|
||||
: generator_(std::move(g)), converter_(std::move(converter)) {}
|
||||
|
||||
template <typename T>
|
||||
operator ParamGenerator<T>() const { // NOLINT
|
||||
return ParamGenerator<T>(new ParamGeneratorConverter<Gen, T>(generator_));
|
||||
return ParamGenerator<T>(
|
||||
new ParamGeneratorConverter<GeneratedT, T, StdFunction>(generator_,
|
||||
converter_));
|
||||
}
|
||||
|
||||
private:
|
||||
ParamGenerator<Gen> generator_;
|
||||
static const GeneratedT& Identity(const GeneratedT& v) { return v; }
|
||||
|
||||
ParamGenerator<GeneratedT> generator_;
|
||||
StdFunction converter_;
|
||||
};
|
||||
|
||||
// Template to determine the param type of a single-param std::function.
|
||||
template <typename T>
|
||||
struct FuncSingleParamType;
|
||||
template <typename R, typename P>
|
||||
struct FuncSingleParamType<std::function<R(P)>> {
|
||||
using type = std::remove_cv_t<std::remove_reference_t<P>>;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct IsSingleArgStdFunction : public std::false_type {};
|
||||
template <typename R, typename P>
|
||||
struct IsSingleArgStdFunction<std::function<R(P)>> : public std::true_type {};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace testing
|
||||
|
||||
|
||||
@@ -194,7 +194,6 @@
|
||||
//
|
||||
// Macros for basic C++ coding:
|
||||
// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
|
||||
// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
|
||||
// GTEST_INTENTIONAL_CONST_COND_PUSH_ - start code section where MSVC C4127 is
|
||||
// suppressed (constant conditional).
|
||||
// GTEST_INTENTIONAL_CONST_COND_POP_ - finish code section where MSVC C4127
|
||||
@@ -260,11 +259,6 @@
|
||||
// BoolFromGTestEnv() - parses a bool environment variable.
|
||||
// Int32FromGTestEnv() - parses an int32_t environment variable.
|
||||
// StringFromGTestEnv() - parses a string environment variable.
|
||||
//
|
||||
// Deprecation warnings:
|
||||
// GTEST_INTERNAL_DEPRECATED(message) - attribute marking a function as
|
||||
// deprecated; calling a marked function
|
||||
// should generate a compiler warning
|
||||
|
||||
// The definition of GTEST_INTERNAL_CPLUSPLUS_LANG comes first because it can
|
||||
// potentially be used as an #include guard.
|
||||
@@ -275,8 +269,8 @@
|
||||
#endif
|
||||
|
||||
#if !defined(GTEST_INTERNAL_CPLUSPLUS_LANG) || \
|
||||
GTEST_INTERNAL_CPLUSPLUS_LANG < 201402L
|
||||
#error C++ versions less than C++14 are not supported.
|
||||
GTEST_INTERNAL_CPLUSPLUS_LANG < 201703L
|
||||
#error C++ versions less than C++17 are not supported.
|
||||
#endif
|
||||
|
||||
// MSVC >= 19.11 (VS 2017 Update 3) supports __has_include.
|
||||
@@ -288,10 +282,14 @@
|
||||
|
||||
// Detect C++ feature test macros as gracefully as possible.
|
||||
// MSVC >= 19.15, Clang >= 3.4.1, and GCC >= 4.1.2 support feature test macros.
|
||||
#if GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L && \
|
||||
(!defined(__has_include) || GTEST_INTERNAL_HAS_INCLUDE(<version>))
|
||||
#include <version> // C++20 and later
|
||||
#elif (!defined(__has_include) || GTEST_INTERNAL_HAS_INCLUDE(<ciso646>))
|
||||
//
|
||||
// GCC15 warns that <ciso646> is deprecated in C++17 and suggests using
|
||||
// <version> instead, even though <version> is not available in C++17 mode prior
|
||||
// to GCC9.
|
||||
#if GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L || \
|
||||
GTEST_INTERNAL_HAS_INCLUDE(<version>)
|
||||
#include <version> // C++20 or <version> support.
|
||||
#else
|
||||
#include <ciso646> // Pre-C++20
|
||||
#endif
|
||||
|
||||
@@ -772,25 +770,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
#define GTEST_HAVE_FEATURE_(x) 0
|
||||
#endif
|
||||
|
||||
// Use this annotation after a variable or parameter declaration to tell the
|
||||
// compiler the variable/parameter may be used.
|
||||
// Example:
|
||||
//
|
||||
// GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED int foo = bar();
|
||||
//
|
||||
// This can be removed once we only support only C++17 or newer and
|
||||
// [[maybe_unused]] is available on all supported platforms.
|
||||
#if GTEST_INTERNAL_HAVE_CPP_ATTRIBUTE(maybe_unused)
|
||||
#define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
|
||||
#elif GTEST_HAVE_ATTRIBUTE_(unused)
|
||||
// This is inferior to [[maybe_unused]] as it can produce a
|
||||
// -Wused-but-marked-unused warning on optionally used symbols, but it is all we
|
||||
// have.
|
||||
#define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
#define GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED
|
||||
#endif
|
||||
|
||||
// Use this annotation before a function that takes a printf format string.
|
||||
#if GTEST_HAVE_ATTRIBUTE_(format) && defined(__MINGW_PRINTF_FORMAT)
|
||||
// MinGW has two different printf implementations. Ensure the format macro
|
||||
@@ -805,17 +784,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)
|
||||
#endif
|
||||
|
||||
// Tell the compiler to warn about unused return values for functions declared
|
||||
// with this macro. The macro should be used on function declarations
|
||||
// following the argument list:
|
||||
//
|
||||
// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
|
||||
#if GTEST_HAVE_ATTRIBUTE_(warn_unused_result)
|
||||
#define GTEST_MUST_USE_RESULT_ __attribute__((warn_unused_result))
|
||||
#else
|
||||
#define GTEST_MUST_USE_RESULT_
|
||||
#endif
|
||||
|
||||
// MS C++ compiler emits warning when a conditional expression is compile time
|
||||
// constant. In some contexts this warning is false positive and needs to be
|
||||
// suppressed. Use the following two macros in such cases:
|
||||
@@ -2367,26 +2335,6 @@ const char* StringFromGTestEnv(const char* flag, const char* default_val);
|
||||
} // namespace internal
|
||||
} // namespace testing
|
||||
|
||||
#if !defined(GTEST_INTERNAL_DEPRECATED)
|
||||
|
||||
// Internal Macro to mark an API deprecated, for googletest usage only
|
||||
// Usage: class GTEST_INTERNAL_DEPRECATED(message) MyClass or
|
||||
// GTEST_INTERNAL_DEPRECATED(message) <return_type> myFunction(); Every usage of
|
||||
// a deprecated entity will trigger a warning when compiled with
|
||||
// `-Wdeprecated-declarations` option (clang, gcc, any __GNUC__ compiler).
|
||||
// For msvc /W3 option will need to be used
|
||||
// Note that for 'other' compilers this macro evaluates to nothing to prevent
|
||||
// compilations errors.
|
||||
#if defined(_MSC_VER)
|
||||
#define GTEST_INTERNAL_DEPRECATED(message) __declspec(deprecated(message))
|
||||
#elif defined(__GNUC__)
|
||||
#define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
|
||||
#else
|
||||
#define GTEST_INTERNAL_DEPRECATED(message)
|
||||
#endif
|
||||
|
||||
#endif // !defined(GTEST_INTERNAL_DEPRECATED)
|
||||
|
||||
#ifdef GTEST_HAS_ABSL
|
||||
// Always use absl::any for UniversalPrinter<> specializations if googletest
|
||||
// is built with absl support.
|
||||
@@ -2527,12 +2475,6 @@ using Variant = ::std::variant<T...>;
|
||||
#define GTEST_INTERNAL_HAS_VARIANT 0
|
||||
#endif
|
||||
|
||||
#if (defined(__cpp_constexpr) && !defined(__cpp_inline_variables)) || \
|
||||
(defined(GTEST_INTERNAL_CPLUSPLUS_LANG) && \
|
||||
GTEST_INTERNAL_CPLUSPLUS_LANG < 201703L)
|
||||
#define GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL 1
|
||||
#endif
|
||||
|
||||
#if (defined(__cpp_lib_three_way_comparison) || \
|
||||
(GTEST_INTERNAL_HAS_INCLUDE(<compare>) && \
|
||||
GTEST_INTERNAL_CPLUSPLUS_LANG >= 201907L))
|
||||
|
||||
@@ -826,6 +826,10 @@ class GTEST_API_ UnitTestImpl {
|
||||
bool catch_exceptions() const { return catch_exceptions_; }
|
||||
|
||||
private:
|
||||
// Returns true if a warning should be issued if no tests match the test
|
||||
// filter flag.
|
||||
bool ShouldWarnIfNoTestsMatchFilter() const;
|
||||
|
||||
struct CompareTestSuitesByPointer {
|
||||
bool operator()(const TestSuite* lhs, const TestSuite* rhs) const {
|
||||
return lhs->name_ < rhs->name_;
|
||||
|
||||
86
3rdparty/googletest/googletest/src/gtest.cc
vendored
86
3rdparty/googletest/googletest/src/gtest.cc
vendored
@@ -192,12 +192,17 @@ static const char kDefaultOutputFormat[] = "xml";
|
||||
// The default output file.
|
||||
static const char kDefaultOutputFile[] = "test_detail";
|
||||
|
||||
// These environment variables are set by Bazel.
|
||||
// https://bazel.build/reference/test-encyclopedia#initial-conditions
|
||||
//
|
||||
// The environment variable name for the test shard index.
|
||||
static const char kTestShardIndex[] = "GTEST_SHARD_INDEX";
|
||||
// The environment variable name for the total number of test shards.
|
||||
static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS";
|
||||
// The environment variable name for the test shard status file.
|
||||
static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE";
|
||||
// The environment variable name for the test output warnings file.
|
||||
static const char kTestWarningsOutputFile[] = "TEST_WARNINGS_OUTPUT_FILE";
|
||||
|
||||
namespace internal {
|
||||
|
||||
@@ -258,6 +263,12 @@ GTEST_DEFINE_bool_(
|
||||
testing::GetDefaultFailFast()),
|
||||
"True if and only if a test failure should stop further test execution.");
|
||||
|
||||
GTEST_DEFINE_bool_(
|
||||
fail_if_no_test_linked,
|
||||
testing::internal::BoolFromGTestEnv("fail_if_no_test_linked", false),
|
||||
"True if and only if the test should fail if no test case (including "
|
||||
"disabled test cases) is linked.");
|
||||
|
||||
GTEST_DEFINE_bool_(
|
||||
also_run_disabled_tests,
|
||||
testing::internal::BoolFromGTestEnv("also_run_disabled_tests", false),
|
||||
@@ -5869,6 +5880,23 @@ TestSuite* UnitTestImpl::GetTestSuite(
|
||||
static void SetUpEnvironment(Environment* env) { env->SetUp(); }
|
||||
static void TearDownEnvironment(Environment* env) { env->TearDown(); }
|
||||
|
||||
// If the environment variable TEST_WARNINGS_OUTPUT_FILE was provided, appends
|
||||
// `str` to the file, creating the file if necessary.
|
||||
#if GTEST_HAS_FILE_SYSTEM
|
||||
static void AppendToTestWarningsOutputFile(const std::string& str) {
|
||||
const char* const filename = posix::GetEnv(kTestWarningsOutputFile);
|
||||
if (filename == nullptr) {
|
||||
return;
|
||||
}
|
||||
auto* const file = posix::FOpen(filename, "a");
|
||||
if (file == nullptr) {
|
||||
return;
|
||||
}
|
||||
GTEST_CHECK_(fwrite(str.data(), 1, str.size(), file) == str.size());
|
||||
GTEST_CHECK_(posix::FClose(file) == 0);
|
||||
}
|
||||
#endif // GTEST_HAS_FILE_SYSTEM
|
||||
|
||||
// Runs all tests in this UnitTest object, prints the result, and
|
||||
// returns true if all tests are successful. If any exception is
|
||||
// thrown during a test, the test is considered to be failed, but the
|
||||
@@ -5890,6 +5918,28 @@ bool UnitTestImpl::RunAllTests() {
|
||||
// user didn't call InitGoogleTest.
|
||||
PostFlagParsingInit();
|
||||
|
||||
// Handle the case where the program has no tests linked.
|
||||
// Sometimes this is a programmer mistake, but sometimes it is intended.
|
||||
if (total_test_count() == 0) {
|
||||
constexpr char kNoTestLinkedMessage[] =
|
||||
"This test program does NOT link in any test case.";
|
||||
constexpr char kNoTestLinkedFatal[] =
|
||||
"This is INVALID. Please make sure to link in at least one test case.";
|
||||
constexpr char kNoTestLinkedWarning[] =
|
||||
"Please make sure this is intended.";
|
||||
const bool fail_if_no_test_linked = GTEST_FLAG_GET(fail_if_no_test_linked);
|
||||
ColoredPrintf(
|
||||
GTestColor::kRed, "%s %s\n", kNoTestLinkedMessage,
|
||||
fail_if_no_test_linked ? kNoTestLinkedFatal : kNoTestLinkedWarning);
|
||||
if (fail_if_no_test_linked) {
|
||||
return false;
|
||||
}
|
||||
#if GTEST_HAS_FILE_SYSTEM
|
||||
AppendToTestWarningsOutputFile(std::string(kNoTestLinkedMessage) + ' ' +
|
||||
kNoTestLinkedWarning + '\n');
|
||||
#endif // GTEST_HAS_FILE_SYSTEM
|
||||
}
|
||||
|
||||
#if GTEST_HAS_FILE_SYSTEM
|
||||
// Even if sharding is not on, test runners may want to use the
|
||||
// GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
|
||||
@@ -6063,6 +6113,17 @@ bool UnitTestImpl::RunAllTests() {
|
||||
environments_.clear();
|
||||
}
|
||||
|
||||
// Try to warn the user if no tests matched the test filter.
|
||||
if (ShouldWarnIfNoTestsMatchFilter()) {
|
||||
const std::string filter_warning =
|
||||
std::string("filter \"") + GTEST_FLAG_GET(filter) +
|
||||
"\" did not match any test; no tests were run\n";
|
||||
ColoredPrintf(GTestColor::kRed, "WARNING: %s", filter_warning.c_str());
|
||||
#if GTEST_HAS_FILE_SYSTEM
|
||||
AppendToTestWarningsOutputFile(filter_warning);
|
||||
#endif // GTEST_HAS_FILE_SYSTEM
|
||||
}
|
||||
|
||||
if (!gtest_is_initialized_before_run_all_tests) {
|
||||
ColoredPrintf(
|
||||
GTestColor::kRed,
|
||||
@@ -6231,6 +6292,30 @@ int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
|
||||
return num_selected_tests;
|
||||
}
|
||||
|
||||
// Returns true if a warning should be issued if no tests match the test filter
|
||||
// flag. We can't simply count the number of tests that ran because, for
|
||||
// instance, test sharding and death tests might mean no tests are expected to
|
||||
// run in this process, but will run in another process.
|
||||
bool UnitTestImpl::ShouldWarnIfNoTestsMatchFilter() const {
|
||||
if (total_test_count() == 0) {
|
||||
// No tests were linked in to program.
|
||||
// This case is handled by a different warning.
|
||||
return false;
|
||||
}
|
||||
const PositiveAndNegativeUnitTestFilter gtest_flag_filter(
|
||||
GTEST_FLAG_GET(filter));
|
||||
for (auto* test_suite : test_suites_) {
|
||||
const std::string& test_suite_name = test_suite->name_;
|
||||
for (TestInfo* test_info : test_suite->test_info_list()) {
|
||||
const std::string& test_name = test_info->name_;
|
||||
if (gtest_flag_filter.MatchesTest(test_suite_name, test_name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Prints the given C-string on a single line by replacing all '\n'
|
||||
// characters with string "\\n". If the output takes more than
|
||||
// max_length characters, only prints the first max_length characters
|
||||
@@ -6677,6 +6762,7 @@ static bool ParseGoogleTestFlag(const char* const arg) {
|
||||
GTEST_INTERNAL_PARSE_FLAG(death_test_style);
|
||||
GTEST_INTERNAL_PARSE_FLAG(death_test_use_fork);
|
||||
GTEST_INTERNAL_PARSE_FLAG(fail_fast);
|
||||
GTEST_INTERNAL_PARSE_FLAG(fail_if_no_test_linked);
|
||||
GTEST_INTERNAL_PARSE_FLAG(filter);
|
||||
GTEST_INTERNAL_PARSE_FLAG(internal_run_death_test);
|
||||
GTEST_INTERNAL_PARSE_FLAG(list_tests);
|
||||
|
||||
7687
3rdparty/imgui/CHANGELOG.txt
vendored
Normal file
7687
3rdparty/imgui/CHANGELOG.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user