Compare commits

...

737 Commits

Author SHA1 Message Date
Mrlinkwii
b4293a40d2 Docs: update Gamedb documentation 2026-01-30 18:06:59 +01:00
Mrlinkwii
9acadb21fe GameDB: remove left over schemea options 2026-01-30 18:06:02 +01:00
TJnotJT
e82fa0bba5 GS/HW: Require 32 bit RT for accumulation blend on max blend. 2026-01-30 11:06:13 +01:00
Ziemas
45490d903a SPU: Slow down DMA 2026-01-29 22:26:28 -05:00
PCSX2 Bot
76dadf792a [ci skip] Qt: Update Base Translation. 2026-01-30 02:03:26 +01:00
wxvu
204829865d GameDB: Add fixes for Puchi Copter 2 2026-01-29 14:21:14 +01:00
lightningterror
84dc2959c5 GSDumpRunner: Use utf-8 encoding for opening files.
Allows the dump compare to work normally with unique characters.
2026-01-29 14:17:02 +01:00
refractionpcsx2
a85b203689 GS/TC: More fixes for dst_matches and old target deletion. 2026-01-29 14:17:02 +01:00
lightningterror
135d40fb7f GS/TC: Remove targets in reverse lookup if the targets are old. 2026-01-29 14:17:02 +01:00
lightningterror
a0bc7a5d0e GS/TC: Update depth lookup when looking up targets. 2026-01-29 14:17:02 +01:00
SternXD
955b925633 FullscreenUI: Run translation script
Signed-off-by: SternXD <stern@sidestore.io>
2026-01-29 14:15:17 +01:00
SternXD
cc338cdd9d Tools: Refactor translation string extraction to support multiple source files
Signed-off-by: SternXD <stern@sidestore.io>

f
2026-01-29 14:15:17 +01:00
SternXD
082a28dc13 FullscreenUI: Cleanup headers
Signed-off-by: SternXD <stern@sidestore.io>
2026-01-29 14:15:17 +01:00
SternXD
664e14bd6c FullscreenUI: Extract Settings into separate source and add internal header
Signed-off-by: SternXD <stern@sidestore.io>
2026-01-29 14:15:17 +01:00
refractionpcsx2
7ea33400a9 GS: Update the stored transfer rect if worked out to be different 2026-01-29 14:13:39 +01:00
refractionpcsx2
32a3e8e62d GS/HW: On EE->GS transfer only invalidate area actually transferred 2026-01-29 14:13:39 +01:00
refractionpcsx2
fa953d7bb3 GS/TC: Allow creation of target during GS->GS transfer with offset 2026-01-29 14:12:45 +01:00
TheLastRar
66cd51bcd5 GS/DX: Fix per game fullscreen mode setting 2026-01-29 14:11:58 +01:00
PCSX2 Bot
ed7ebb77ca [ci skip] Qt: Update Base Translation. 2026-01-29 02:44:25 +01:00
Ziemas
10fc9a790d SPU: Emulate voice decode buffers
This makes the timing of NAX advancing more similar to console since it
emulates the decode buffer behaviour of it rushing ahead of playback
until the buffer is full.

It also makes interpolation of the first four samples more correct by
using real data instead of the zero filled previous values.

[SAVEVERSION+]
2026-01-28 12:18:43 -05:00
Ziemas
c42330eebf SPU: Remove unused voice struct members
Might as well If the saveversion is already being bumped.

[SAVEVERSION+]
2026-01-28 12:18:43 -05:00
Ziemas
680e05fead SPU: clang-format mixer.cpp 2026-01-28 12:18:43 -05:00
chaoticgd
1f7b98bf6b Debugger: Allow removing conditions from the breakpoint dialog 2026-01-28 12:13:39 -05:00
TheLastRar
c3a20d421e GS/DX12: Fix recreating swapchain failing on vsync mode changes 2026-01-28 01:30:12 +01:00
TheLastRar
f03ab6f728 Deps: Bump ffnvcodec to 13.0.19.0 2026-01-28 01:14:08 +01:00
PCSX2 Bot
e9275d78b5 [ci skip] Qt: Update Base Translation. 2026-01-28 01:04:00 +01:00
lightningterror
8ababb3890 GS/DX/VK: Properly align uniform buffers.
Make sure uniform buffers are 16 bytes aligned.
Make sure full size is 32 bytes with padding, was 28 previously which can be bad for cpu cache.
2026-01-28 01:00:36 +01:00
Mrlinkwii
422aba4b20 UI : rename fast boot option heading 2026-01-27 12:01:20 +01:00
wxvu
045b9bbf40 GameDB: Add EE Nearest Rounding to Steambot Chronicles (Bumpy Trot)
GameDB: Add EE Nearest Rounding to Steambot Chronicles (Bumpy Trot)

GameDB: Add EE Nearest Rounding to Steambot Chronicles (Bumpy Trot)
2026-01-27 12:00:25 +01:00
PCSX2 Bot
1f519acf92 [ci skip] Qt: Update Base Translation. 2026-01-27 11:59:55 +01:00
lightningterror
ac9ebdecba GS/DX12: Check if D3D12GetInterface is supported first.
On older versions of Windows 10 (example 2019 LTSC) D3D12GetInterface may fail because it doesn't exist, in such case we can check if D3D12GetInterface exists first.
2026-01-27 00:09:43 +01:00
Ariel Nogueira Kovaljski
1861394216 Qt: Fix shortcut creation when special folders have been moved.
Use SHGetKnownFolderPath to get the path of special folders instead of building the path from %USERPROFILE%.

Special folders like "Desktop" and "Start Menu\Programs" can be moved from their default paths, which breaks the shortcut creation due to the assumption that they will always be present in the user's home directory (%USERPROFILE%).
2026-01-26 23:59:24 +01:00
PCSX2 Bot
11cc884c96 [ci skip] PAD: Update to latest controller database. 2026-01-26 23:34:42 +01:00
TJnotJT
5710c2740c GS/HW: Enable Z floor only when needed. 2026-01-26 23:30:09 +01:00
TJnotJT
ec96feb22e GS/HW: Use conservative depth for shader depth output. 2026-01-26 23:30:09 +01:00
TJnotJT
a1173c53d3 GS/HW: Reduce barriers in triangle strips/fans.
Account for triangles forming non-overlapping quads in triangles strips/fans.
2026-01-26 11:57:20 +01:00
JordanTheToaster
ac0deff9b2 Memcard: Purge automatic save management 2026-01-26 03:35:44 +01:00
refractionpcsx2
3ae707464c GS/HW: Ignore point draws for a single black pixel in the top left 2026-01-26 03:19:49 +01:00
refractionpcsx2
00ef419023 GS/TC: Enhance depth clear behaviour to improve heuristics 2026-01-26 03:19:49 +01:00
refractionpcsx2
448a279cd4 GS/HW: Further improve clear behaviour 2026-01-26 03:19:49 +01:00
refractionpcsx2
70e13adfde GS/TC: Improve wrapping behaviour for inside target lookups 2026-01-26 03:19:49 +01:00
refractionpcsx2
25bc280818 GS/HW: Clear GS memory if not zero or target overwrite 2026-01-26 03:19:49 +01:00
TheLastRar
32e073002a [ci skip] CI/Linux: Fix contribute link 2026-01-25 19:55:48 +01:00
PCSX2 Bot
911314e948 [ci skip] Qt: Update Base Translation. 2026-01-25 02:38:54 +01:00
lightningterror
a73fcb343c GS: Default to DX12 on NV/AMD.
DX12 trades blows with Vulkan on AMD depending on cpu usage and will be stable on RDNA 3 so let's default to it.

NVIDIA: 590 drivers on Nvidia are bad causing performance regressions so let's switch to DX12 as the default.
2026-01-24 20:28:04 +01:00
TheLastRar
251b2960f8 Revert "GS/VK: Use the compute queues for present" 2026-01-24 20:27:30 +01:00
refractionpcsx2
5bb99105c3 GS/HW: Clear downscale source on draw to avoid cross game corruption 2026-01-24 18:32:43 +01:00
lightningterror
fa6e1b0949 GS/DX12: Don't end render passes on enhanced barriers. 2026-01-23 11:19:11 +01:00
oltolm
4297918ce2 cmake: remove Qt6::GuiPrivate dependency on WIN32 and APPLE 2026-01-21 18:56:00 -05:00
PCSX2 Bot
629a58469b [ci skip] Qt: Update Base Translation. 2026-01-21 09:06:57 +01:00
TheLastRar
5ff1eed28c Deps: Add DX12 Agility SDK 2026-01-21 09:06:44 +01:00
TheLastRar
4506ff1c46 GS/DX12: Use Enhanced Barriers API 2026-01-21 09:06:44 +01:00
TheLastRar
4daa455524 GS/VK: Fix the Nvidia present fix 2026-01-20 21:54:14 +01:00
TheLastRar
433e99baec GS/VK: Hackfix impatient present on Nvidia 2026-01-20 08:03:00 +01:00
Ty
a1ac6662d3 QT: Focus the main window when the DisplayWidget is focused to get its toolbar 2026-01-19 09:31:55 -05:00
JordanTheToaster
87366cda9d 3rdparty: Update rcheevos to 12.2.1 2026-01-18 10:35:14 -05:00
refractionpcsx2
edb2b37a92 GS/HW: Use old hazard copy method when there's no multidraw or barriers 2026-01-17 19:48:01 +01:00
refractionpcsx2
4462b3f91d GS/HW: Add detection for continuous possible vertical shuffles 2026-01-17 19:48:01 +01:00
refractionpcsx2
57ded8a022 GS/HW: Support offsetting for channel shuffle instead of copying 2026-01-17 19:48:01 +01:00
refractionpcsx2
304a7f9d30 GameDB: Add necessary fixes for MotoGP 2026-01-17 18:18:00 +01:00
refractionpcsx2
73a09ffe6c GS/HW: Improve channel shuffle detection and use on 24bit sources 2026-01-17 18:18:00 +01:00
refractionpcsx2
4e5d7bd407 GS/TC: Delete empty target after height adjust 2026-01-17 16:58:37 +01:00
refractionpcsx2
2a3452a489 GameDB: Remove Preload Frame from PachiPara as it just causes problems 2026-01-17 16:52:27 +01:00
refractionpcsx2
2e7f951399 GS/HW: Fix up iRem CRC hack to be more accurate 2026-01-17 16:52:27 +01:00
refractionpcsx2
efb66c1d37 GS/TC: Small optimization to local memory invalidation 2026-01-17 16:32:10 +01:00
refractionpcsx2
6fc88a4499 GS/HW: Improve fog modulation accuracy in HW renderers 2026-01-17 16:32:10 +01:00
refractionpcsx2
238b29836e GS/TC: Only bilinearly scale render target if preserve_scale is not set 2026-01-17 15:53:08 +01:00
refractionpcsx2
58cbb61aac GS/TC: Only bilinear filter depth scales 2026-01-17 15:53:08 +01:00
refractionpcsx2
2c7a168029 GS/HW: Properly scale depth up if required when native scaling is in use 2026-01-17 15:53:08 +01:00
JordanTheToaster
bb4ee5f0fb GS/HW: Optimize source sizes when using CLAMP_CLAMP 2026-01-16 14:37:22 -05:00
RedPanda4552
1940fdb3d3 Revert "Qt: Patch for distinguishing left and right variants of shift/alt/ctrl keys"
This reverts commit 3871d1bd5d.
2026-01-16 12:55:41 -05:00
RedPanda4552
bf269e1295 Revert "PAD: Fix hotkeys to differentiate between left and right keyboard keys"
This reverts commit 3e87bec0c0.
2026-01-16 12:55:41 -05:00
KamFretoZ
262bbdae9f Translations: Fix BPM crash on Chinese Traditional 2026-01-16 16:14:18 +01:00
lightningterror
6e5c228980 GS/DX12: Adjust partial depth copies.
Check if depth copies are supported first.

If depth copies aren't supported fallback to doing full depth copies, also make sure source and destination rects match.
2026-01-16 03:45:06 +01:00
lightningterror
62d46797ca GS/DX11: Make sure source and destination rect matches for depth copies. 2026-01-16 03:45:06 +01:00
lightningterror
3b561be221 GS/TC: Do a shader copy/blit for depth textures when doing tc moves.
dx11 doesn't support partial depth copies.
dx12 supports depth copies with Programmable Sample Positions tier 1 and up.
Add missing osd copy counts for moves.

We can just do blit for all since performance is the same.
2026-01-16 03:45:06 +01:00
PCSX2 Bot
d1e1e59059 [ci skip] Qt: Update Base Translation. 2026-01-15 02:23:51 +01:00
SternXD
d983b2b066 Copyright: Change year from 2002-2025 to 2002-2026 2026-01-15 00:22:32 +01:00
TheLastRar
82e5f80f11 GS/DX: Fix exclusive fullscreen potentially using wrong resolution 2026-01-15 00:20:58 +01:00
TheLastRar
44ba9e283e Qt: Fix exclusive fullscreen sometimes appearing on wrong screen 2026-01-15 00:20:58 +01:00
refractionpcsx2
0244cde98d GS: Correct GS to GS direction check and simplify 2026-01-15 00:19:25 +01:00
TheLastRar
d75612e4c9 GS/VK: Fixes to queue creation 2026-01-15 00:19:11 +01:00
SternXD
cbfc838aab FullscreenUI: Remove unnecessary menu scrollbars, standardize dialogs, and improve textboxes 2026-01-14 03:34:20 +01:00
TheLastRar
6a760e05a8 GS/VK: Use the compute queues for present 2026-01-13 19:41:36 -05:00
oltolm
5278477de9 GS: remove unused function BitCast 2026-01-13 19:41:05 -05:00
oltolm
0da84c2c69 Misc: use concepts instead of SFINAE 2026-01-13 19:41:05 -05:00
Ziemas
ad6d0f7a6b EE JIT: Fix LUT weirdness 2026-01-13 19:37:18 -05:00
SternXD
3e87bec0c0 PAD: Fix hotkeys to differentiate between left and right keyboard keys 2026-01-13 19:35:57 -05:00
PCSX2 Bot
860921dab9 [ci skip] Qt: Update Base Translation. 2026-01-14 01:21:16 +01:00
Mrlinkwii
18c9f00b53 GameDB: add patch for Street Mahjong Trans-Asakami 2 2026-01-14 01:20:43 +01:00
refractionpcsx2
eec3951315 GS/TC: Check format matches on invalidation rect translation 2026-01-14 01:20:08 +01:00
lightningterror
e5119e8ef2 Qt/FSUI: Mark DX11 as Legacy. 2026-01-14 01:19:38 +01:00
refractionpcsx2
4e6b6904cb GS: Improve PCRTC offset wrapping and simplify some deinterlacing 2026-01-13 07:54:37 +01:00
refractionpcsx2
4e1975ec80 GS: Fix copy/paste typo in TextureMinMax calculation, clean up code 2026-01-13 04:11:49 +01:00
PCSX2 Bot
43453b6f22 [ci skip] PAD: Update to latest controller database. 2026-01-13 02:27:22 +01:00
PCSX2 Bot
2e12b2ee0a [ci skip] Qt: Update Base Translation. 2026-01-13 02:26:57 +01:00
refractionpcsx2
be5e98b47f GS/HW: Small improvement to texture shuffle heuristics 2026-01-12 13:49:15 +01:00
JordanTheToaster
293b60a85c Deps: Update SDL3 to v3.4.0 2026-01-12 12:17:03 +01:00
KamFretoZ
3e8c2ef9a9 FSUI: Adds more icons 2026-01-12 12:05:17 +01:00
KamFretoZ
213569f3d7 Deps: Remove version number from fontawesome 2026-01-12 12:05:17 +01:00
KamFretoZ
0edcdf91db Deps: Bump FontAwesome to 7.1.0 2026-01-12 12:05:17 +01:00
Léane GRASSER
8253207bd2 UI: Rename Limit Depth to 24 Bits option values 2026-01-12 12:03:58 +01:00
Léane GRASSER
bc00be2ce5 Qt: Rename Limit 24 Bit Depth to Limit Depth to 24 Bits 2026-01-12 12:03:58 +01:00
refractionpcsx2
89c7463eb5 GS: Correct scaling of image for screenshots when Bilinear Sharp is enabled 2026-01-12 09:24:21 +01:00
PCSX2 Bot
93027c1e2e [ci skip] Qt: Update Base Translation. 2026-01-12 02:59:52 +01:00
TheLastRar
ee15846dd4 USB: Fix missing Train Mascon case warning 2026-01-11 16:45:05 -05:00
Ty
de03d2f672 Debugger: Properly reset the breakpoint skip first when skipped 2026-01-11 14:32:21 -05:00
YukiXXL
ae33c3d991 GameDB: SFOS cop2 fixes. (#13460)
SCES-52033:
Fixed "Cop2 problems." code that. Second address was wrong and was producing a bug.

SCUS-97264:
added fixes for Review Prototype (cop2, other languages)

SCUS-97397:
added fixes (cop2)

TCES-52033:
added fixes (cop2)
2026-01-11 10:12:31 +01:00
refractionpcsx2
61280a945d GS/HW: Tweak Native Scale Upscaled to work in more scenarios 2026-01-11 09:36:00 +01:00
PCSX2 Bot
e82712bf52 [ci skip] Qt: Update Base Translation. 2026-01-11 09:28:44 +01:00
refractionpcsx2
06307abd03 GS/HW: Only enable depth writes/floor calculation if depth is output 2026-01-11 02:36:55 +01:00
refractionpcsx2
daf735b047 GS/HW: Floor depth writes to improve Z testing 2026-01-11 02:36:55 +01:00
JordanTheToaster
f591c88aff GS/HW: Add Limit 24 Bit Depth Hack 2026-01-10 15:53:25 -05:00
refractionpcsx2
ca47a08882 GS: Fix up adding GS_to_GS transfers to the draw_transfers list 2026-01-10 15:50:59 -05:00
refractionpcsx2
92adacf99e GS: Disallow flipped GS->GS transfer when destination overwrites source 2026-01-10 15:50:59 -05:00
JordanTheToaster
43e5ec25ab microVU: Ignore MAC flags in block match if not required 2026-01-10 15:49:57 -05:00
KamFretoZ
1018b75847 DiscordRPC: Simplify Game Icon Retrieval 2026-01-10 15:49:45 -05:00
Shiva9361
3871d1bd5d Qt: Patch for distinguishing left and right variants of shift/alt/ctrl keys 2026-01-10 15:49:18 -05:00
Mrlinkwii
976d4a8dbb Revert "CI/Windows: Disable Qt's PCRE2 JIT"
This reverts commit 1ec4c248fb.
2026-01-10 15:47:32 -05:00
Ty
40b1b9b717 Qt: Add an EE SIO RX input textbox to the log window 2026-01-10 15:46:59 -05:00
Ty
a3b817cb1f Core: Use deque for EE SIO RX/TX FIFOs 2026-01-10 15:46:59 -05:00
SternXD
83e152cd21 GameDB: Add post-bloom alignment and native scaling for Urban Reign 2026-01-10 17:18:43 +01:00
TheLastRar
50a9568d65 GS/DX12: Backport DATE stencil one single pass from DX11/VK
Co-Authored-By: lightningterror <18107717+lightningterror@users.noreply.github.com>
2026-01-09 03:36:58 +01:00
KamFretoZ
a33cbdee09 Qt: Fix alternate row colors for Ruby/Emerald/Sapphire theme
For consistency
2026-01-08 20:18:11 +01:00
KamFretoZ
b02bcc5690 Qt: Cobalt Sky theme refresh 2026-01-08 20:18:11 +01:00
KamFretoZ
2e60a1d081 Qt: AMOLED theme refresh 2026-01-08 20:18:11 +01:00
oltolm
28da984b01 UI: remove unnecessary uses of QOverload 2026-01-07 15:23:29 +01:00
oltolm
967987b25f GS, UI: use u32 instead of s32 for width and height 2026-01-07 14:15:00 +01:00
PCSX2 Bot
e41f63b821 [ci skip] Qt: Update Base Translation. 2026-01-07 01:03:59 +01:00
SilentHeII
0f82503cf7 GameDB: Added various memory card filters
Reads Twisted Metal Black for bonus unlockable.

Adds memcardFilters for Shadow Hearts: Covenant

Ignore my previous pull request. I have no idea why it formatted it so obnoxiously.

Anyway, you get extra ingame items if you have a save file from Shadow Hearts 1.

GameIndex changes

Added memcardFilters for Biohazard Outbreak & Biohazard Outbreak File 2 to allow for creation of network configurations.

Added missing titles

Added missing titles to allow games to load their own saves.
2026-01-06 20:56:26 +01:00
Christopher Obbard
33f625a4e2 cmake: only require Qt modules when Qt UI is enabled
The Qt6 CorePrivate/GuiPrivate/WidgetsPrivate components are only needed
for the Qt UI build. Move their find_package() call under ENABLE_QT_UI
to avoid requiring private Qt modules when building without the UI.

Signed-off-by: Christopher Obbard <obbardc@gmail.com>
2026-01-06 20:44:35 +01:00
JordanTheToaster
5b0c22c343 Mac: Update MoltenVK to v1.4.1 2026-01-06 20:37:29 +01:00
Florin9doi
ea963ffd72 USB: Train Mascon and Master Controller emulation 2026-01-06 20:18:15 +01:00
lightningterror
bd9dcbe441 GS/D3D: Default to DX12 on older GCN amd cards. 2026-01-06 20:09:04 +01:00
PCSX2 Bot
2a1f29c641 [ci skip] Qt: Update Base Translation. 2026-01-06 20:08:18 +01:00
TheLastRar
38883e8df4 GS/DX12: Use cmdlist parameter for read depth transitions 2026-01-06 20:08:02 +01:00
PCSX2 Bot
f971040912 [ci skip] PAD: Update to latest controller database. 2026-01-06 20:07:43 +01:00
Jordan
9aac7e8426 [ci skip] GameDB: CMR 2005 Fixes (#13782)
hotpatch!!!
2026-01-05 17:44:44 -05:00
Ty Lamontagne
96284205a1 [ci skip] Release 2.6 2026-01-04 14:20:16 -05:00
RedPanda4552
4a1d9d31d0 Achievements: Store token to separate ini 2026-01-04 13:56:14 -05:00
Ty
12d6087f2a Translations: Syncing Crowdin translations 2026-01-04 13:55:43 -05:00
Ty
251962c415 Qt: Don't show the dev name if it equals the displayname 2026-01-04 13:49:18 -05:00
Ty
1bdd7d2352 FSUI: Don't show the name if it equals the displayname when listing 2026-01-04 13:49:18 -05:00
SternXD
7b98259ea1 FullscreenUI: Update auto mapping to include device names with display names 2026-01-03 23:59:57 -05:00
Ty
ee8166d1fe Debugger: Check PC instead of cycles when stopping for a breakpoint 2026-01-03 10:14:21 -05:00
TheLastRar
43e073a18d GS/DX12: Fix validation errors when depth testing and sampling 2026-01-01 01:20:13 +01:00
JordanTheToaster
bc41666d53 GameDB: Various fixes 2026-01-01 01:09:27 +01:00
PCSX2 Bot
5b85d6a758 [ci skip] PAD: Update to latest controller database. 2025-12-29 17:04:38 +01:00
TheLastRar
1fdc000815 GS/DX12: Don't move to next command list until after wait 2025-12-29 17:04:28 +01:00
TheLastRar
3a57bb46ab GS/DX12: Correct descriptor allocation error messages 2025-12-26 16:20:43 +01:00
TheLastRar
2cb75e60b3 GS/DX12: Free from correct descriptor heap in error handling 2025-12-26 16:20:43 +01:00
TheLastRar
600ac6ec4f GS/DX12: Always require barrier of feedback read 2025-12-24 21:13:31 +01:00
JordanTheToaster
ed0cd628f8 GameDB: Warhammer 40k FW Fixes 2025-12-24 21:12:59 +01:00
JordanTheToaster
33a825c17f GameDB: Guitar Hero Smash Hits fixes 2025-12-23 09:44:52 -05:00
JordanTheToaster
660a165533 3rdparty: Update rcheevos to 12.2.0 2025-12-22 19:10:10 +01:00
TheLastRar
bfe2d5abb2 GS/HW: Split draws before modifying the index buffer 2025-12-21 17:44:21 +01:00
PCSX2 Bot
d5b36da6b0 [ci skip] Qt: Update Base Translation. 2025-12-21 14:35:27 +01:00
PCSX2 Bot
328cebd5fc [ci skip] Qt: Update Base Translation. 2025-12-20 14:07:05 +01:00
lightningterror
579cb7bd27 GS/HW: Use copies if barriers aren't supported properly.
VK/GL: Tex is fb requires the copy to be bound on slot 0 as well.
Fixes validation errors on VK when barriers are force disabled.

DX12: Always create a copy if barriers aren't supported for sw blend or tex is fb.
Fixes issues when barriers are force disabled.
2025-12-20 14:06:40 +01:00
TheLastRar
aab889535f GS/VK: Enable surface maintenance extension if supported 2025-12-20 14:01:21 +01:00
chaoticgd
e0362f7879 FullscreenUI: Fix crash during HDD creation 2025-12-20 14:00:53 +01:00
PCSX2 Bot
009ae1fb02 [ci skip] Qt: Update Base Translation. 2025-12-18 17:52:57 +01:00
chaoticgd
d40289e977 Qt: Add missing include 2025-12-18 08:45:22 -05:00
PCSX2 Bot
c2fd4af163 [ci skip] Qt: Update Base Translation. 2025-12-17 13:12:29 +01:00
SternXD
5bdee3a611 Qt: Add RA Logo to Achievement Login Dialog 2025-12-16 20:19:47 -05:00
TheLastRar
cb026a6946 GS/DX12: Fix handling of stencil DATE one
Co-Authored-By: lightningterror <18107717+lightningterror@users.noreply.github.com>
2025-12-16 16:57:16 +01:00
TheLastRar
cb5124da4b GS/DX12: Enable GBV with the debug device 2025-12-16 16:57:16 +01:00
TheLastRar
7c88af9c73 GS/DX12: Use aliasing resources for feedback 2025-12-16 16:57:16 +01:00
JordanTheToaster
465a31bbd5 GameDB: Juiced post fixes 2025-12-16 13:38:51 +01:00
TheLastRar
6deb43bde2 GS/VK: Support VK_KHR_swapchain_maintenance1
Co-Authored-By: refractionpcsx2 <6278726+refractionpcsx2@users.noreply.github.com>
2025-12-16 12:14:11 +01:00
TheLastRar
8e7dcb83a8 GS/VK: Don't reference old swapchain when recreating on AMD 2025-12-16 12:14:11 +01:00
TheLastRar
51ead1e00f GS/VK: Reduce spam when swapchain needs to be recreated 2025-12-16 12:13:12 +01:00
TheLastRar
27bcb7c29a GS/VK: Don't recreate swapchain during EndPresent 2025-12-16 12:13:12 +01:00
TheLastRar
aaed4a4983 Qt: Don't contain display surface when entering fullscreen/separate on Windows 2025-12-16 12:09:06 +01:00
PCSX2 Bot
748f232976 [ci skip] Qt: Update Base Translation. 2025-12-15 19:50:06 -05:00
chaoticgd
a33612cf7d Qt: Display when the hovered cheat will be applied in the UI 2025-12-15 14:20:58 -05:00
chaoticgd
5c123f3183 Patch: Fix bug causing the UI to show the wrong place value 2025-12-15 14:20:58 -05:00
PCSX2 Bot
d30a7fb991 [ci skip] PAD: Update to latest controller database. 2025-12-15 19:37:04 +01:00
chaoticgd
d4f661c27c SaveState: Swap two OSD error messages that were the wrong way round 2025-12-15 10:40:43 -05:00
dependabot[bot]
6d05d0220d [ci skip] Bump the ci-deps group with 4 updates (#13708)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 08:26:27 -05:00
PCSX2 Bot
7fab935c2d [ci skip] Qt: Update Base Translation. 2025-12-14 19:22:23 -05:00
chaoticgd
cd120c3cfd Patch: Restore original behaviour of PPT_ONCE_ON_LOAD, add new PPT_ON_LOAD_OR_WHEN_ENABLED place option, and display when a patch is applied in the GUI (#13698) 2025-12-14 09:09:53 -05:00
Stern
0180ec060b FSUI/Qt: Add Center/Tile background modes and remove redundant Qt null checks (#13564)
Signed-off-by: SternXD <stern@sidestore.io>
Signed-off-by: SternXD <stern@sidestore.io
Co-authored-by: KamFretoZ <14798312+kamfretoz@users.noreply.github.com>
2025-12-14 09:08:34 -05:00
chaoticgd
cf4412ecbe SaveState: Fix error handling in SaveState_ZipToDisk 2025-12-13 21:42:52 -05:00
chaoticgd
743b0b11d8 VMManager: Reword save state error messages 2025-12-13 21:42:52 -05:00
chaoticgd
e8c2cfa843 SaveState: Rework error handling when saving states 2025-12-13 21:42:52 -05:00
chaoticgd
764875ddbf Qt: Add setting to show state load errors using a dialog or OSD message 2025-12-13 21:42:52 -05:00
KamFretoZ
92c7eaa383 FSUI: Add Start Big Picture UI Option 2025-12-13 20:00:17 -05:00
KamFretoZ
4d2c1a82c9 Qt: Misc Shortcut Cleanups 2025-12-13 20:00:17 -05:00
KamFretoZ
eb50aaea35 Qt: Fixup statefile shortcut and icon name
Update ShortcutCreationDialog.cpp
2025-12-13 20:00:17 -05:00
chaoticgd
d69c71e058 Qt: Don't use wildcard disconnection for some settings combo boxes 2025-12-13 14:55:48 +01:00
lightningterror
7cc8c7eee6 GS/DX12: Add debug log when end stencil is discarded. 2025-12-13 14:48:22 +01:00
lightningterror
dd96f2c296 GS/DX12: Preserve end stencil when doing fb copies.
When copying the fb we require the stencil data to be valid so let's preserve it.
2025-12-13 14:48:22 +01:00
JordanTheToaster
3cb2f3d2d9 Deps: Update libpng-apng patch to v1.6.53 2025-12-12 13:31:35 -05:00
JordanTheToaster
1f9a9940e9 Deps: Update libpng to v1.6.53 2025-12-12 13:31:35 -05:00
Ty
8164f2b2db CDVD: Fix an out of bounds read exploit in MG SCMD handlers 2025-12-12 11:39:53 -05:00
Triticum0
d0c54de330 [ci skip] GitHub: Update issue template program version. (#13691) 2025-12-12 16:41:46 +01:00
KamFretoZ
af5cd8d48e Qt/FSUI: Base Translation Update
Co-Authored-By: TellowKrinkle <3315070+TellowKrinkle@users.noreply.github.com>
2025-12-12 16:31:57 +01:00
KamFretoZ
a43f051852 Qt: Add Dedup Comment hint to toolbar buttons 2025-12-12 16:31:57 +01:00
KamFretoZ
0f8c5066e3 Qt: Fix untranslatable strings 2025-12-12 16:31:57 +01:00
KamFretoZ
1bf1f458d0 Qt/Shortcut: Fix missing parenthesis 2025-12-12 16:31:57 +01:00
KamFretoZ
5ef1993496 Qt: Remove unused String 2025-12-12 16:31:57 +01:00
KamFretoZ
80baa73578 Qt/FSUI: Unify VSync String 2025-12-12 16:31:57 +01:00
KamFretoZ
b46c85ee7f FSUI: Translation Strings Fixes 2025-12-12 16:31:57 +01:00
KamFretoZ
7f233ca620 Qt: Translation Fixes From Crowdin
Co-Authored-By: TellowKrinkle <3315070+TellowKrinkle@users.noreply.github.com>
2025-12-12 16:31:57 +01:00
KamFretoZ
47fe2344a5 Qt/FSUI: Few Save State String Fixes 2025-12-12 16:31:57 +01:00
KamFretoZ
4e763d6ff7 Qt/FSUI: Fix FIFA case spelling 2025-12-12 16:31:57 +01:00
KamFretoZ
e1cc994cca Qt: Unify Bilinear Dirty Upscale string 2025-12-12 16:31:57 +01:00
KamFretoZ
5b7f85e571 Qt: Unify Skip Draw String 2025-12-12 16:31:57 +01:00
KamFretoZ
7475cfb325 Qt: Clarify open directory menu 2025-12-12 16:31:57 +01:00
KamFretoZ
cee01a22e1 Qt/Host: Clarify download error message
This is used if it can't write the downloaded data
2025-12-12 16:31:57 +01:00
KamFretoZ
c6437bccad Qt/Debugger: Dont translate symbolSourceErrorMessage 2025-12-12 16:31:57 +01:00
KamFretoZ
7419311296 Qt: Fix DEV9 Host name header title 2025-12-12 16:31:57 +01:00
KamFretoZ
2807a06d76 Qt: Fix audio sync description confusion 2025-12-12 16:31:57 +01:00
refractionpcsx2
14f76c5627 GS/HW: Detect offset shuffle on TexIsFB 2025-12-12 13:27:51 +01:00
PCSX2 Bot
260eaa6c6c [ci skip] Qt: Update Base Translation. 2025-12-12 07:58:41 +01:00
TJnotJT
461f01718c GS/HW: Prevent assertion in StretchRect().
Depth copy was using the color StretchRect() causing an assertion in debug builds.
2025-12-12 00:01:25 +01:00
SternXD
65e209b0f0 FullscreenUI: use RegionToFlagFilename for flag textures
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-11 10:55:28 -05:00
SternXD
36ffe3a521 GameList: Add RegionToFlagFilename function to map regions to flag filenames
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-11 10:55:28 -05:00
SternXD
359d552245 Resources: Add new SVG flag icons for various countries and remove obsolete flag files
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-11 10:55:28 -05:00
SternXD
180377181d Qt: Add language flag icons to settings and setup
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-11 10:55:28 -05:00
chaoticgd
2805bf376a VMManager: Improve error handling for initialization functions 2025-12-11 10:53:27 -05:00
chaoticgd
eaa834d238 Host: Remove ConfirmMessage and ConfirmFormattedMessage functions 2025-12-11 10:53:27 -05:00
chaoticgd
8cc28c25d8 VMManager: Fix deadlock when asking to disable hardcore in fullscreen 2025-12-11 10:53:27 -05:00
chaoticgd
0cd14c9919 VMManager: Fix read from moved-from string boot_params.filename 2025-12-11 10:53:27 -05:00
refractionpcsx2
3a33400ca6 EE: Correct addresses for counter event test 2025-12-09 22:44:57 +01:00
SternXD
2f5afc40b6 Achievements: Fix leaderboard headers and selection focus 2025-12-09 13:16:59 +01:00
GovanifY
fe9915cbd0 flatpak: allow gamescope socket 2025-12-09 11:04:04 +01:00
KamFretoZ
70ce7e024f Tools: Small housekeeping
- Make generate_redump_yaml.py executable and fix the trailing whitespace
- Fix shebang for retry.sh
2025-12-08 23:46:07 +01:00
KamFretoZ
cab81ac23a Deps/Bin: Update Redump database 2025-12-08 23:46:07 +01:00
dependabot[bot]
dbb6d2769f [ci skip] Bump softprops/action-gh-release from 2.4.2 to 2.5.0 in the ci-deps group (#13670)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-08 12:50:01 -05:00
PCSX2 Bot
cce1b82e11 [ci skip] PAD: Update to latest controller database. 2025-12-08 11:24:38 -05:00
PCSX2 Bot
e906717146 [ci skip] Qt: Update Base Translation. 2025-12-08 01:15:31 +01:00
Ty
a841151446 GS SW: Use implicit GSVector4i int32x4_t conversion 2025-12-07 18:42:19 -05:00
lightningterror
426261ebbe Qt/FSUI: Not needed to mark dx12 as Not Recommended anymore. 2025-12-07 18:00:13 +01:00
lightningterror
aedaf5a9a7 GS/DX12: Disable broken point sampler, only dx11 requires it. 2025-12-07 18:00:13 +01:00
lightningterror
d83417ba0d GS/HW: Properly disable dual source output between multipass blending.
Fixes api warning on dx11: The Pixel Shader expects a Render Target View bound to slot 1, but none is bound.

Might also fix some potential crashes on intel gpus on all apis (mostly dx11/12).
2025-12-07 18:00:13 +01:00
lightningterror
23cd5a9da7 GS/HW: Remove the extra conditions when texture barrier/multidraw fb copy is not supported.
No longer needed, these conditions were originally used to use less copies on dx11/12 on basic blend.

Currently all renderers by default will hit the code so the old checks are kinda redundant, also copies are faster than they used to be.
2025-12-07 18:00:13 +01:00
PCSX2 Bot
1fd017f410 [ci skip] Qt: Update Base Translation. 2025-12-07 13:14:24 +01:00
JordanTheToaster
0afc9d6d10 GameDB: Small fixes 2025-12-07 06:22:03 -05:00
JordanTheToaster
2f4583f2e4 Git/CI: Bump controller db create-pull-request to v7.0.11 2025-12-07 04:45:26 -06:00
JordanTheToaster
86af608bfc Git/CI: Bump translations create-pull-request to v7.0.11 2025-12-07 04:20:22 -06:00
TJnotJT
3a7489b2cc GS: Fix typos in GSState::EarlyDetectShuffle(). 2025-12-07 07:20:14 +01:00
lightningterror
51947f8f93 GS/GL: Only issue barriers for framebuffer optimizations if needed.
Check if the state changed previous draw/pass and if not then we
need to issue a barrier or render pass then to ensure writes.
2025-12-06 22:51:02 +01:00
KamFretoZ
e07f02d9bc Qt: Fix default value for texture replacements OSD 2025-12-06 14:51:20 +01:00
KamFretoZ
6c07160503 OSD: Cleanup Unused Headers 2025-12-06 14:51:20 +01:00
KamFretoZ
a02e1b3487 OSD: Formatting Cleanup 2025-12-06 14:51:20 +01:00
KamFretoZ
86a7e97025 OSD: Decouple Indicator from Performance Overlay 2025-12-06 14:51:20 +01:00
Silent
5d641e4a9d Achievements: Fix label names for subsets 2025-12-06 14:36:09 +01:00
chaoticgd
a5f7b4e8c6 FullscreenUI: Fix crash when changing settings with a background set 2025-12-06 14:33:49 +01:00
SternXD
9bb30dcb44 Qt: Fix status bar widgets being cut off with longer translations 2025-12-06 14:29:51 +01:00
lightningterror
4eb0b097d6 GS/HW: Adjust color_dest_blend, color_dest_blend2, blend_zero_to_one_range conditions.
Don't enable color_dest_blend if it's a channel shuffle or dithering draw.

Don't enable color_dest_blend2 if it's preferring sw blend or dithering draw.

Don't enable blend_zero_to_one_range if it's preferring sw blend or dithering draw.
2025-12-06 11:11:09 +01:00
lightningterror
38f61b9658 GS/HW: Exclude date check for late draw cancel.
No rt change, no rgba write, no depth write, no need to check date this late.
2025-12-06 11:11:09 +01:00
lightningterror
80ffb82a4a GS/HW: PrimID Date shouldn't enable feedbackloop check. 2025-12-06 11:11:09 +01:00
refractionpcsx2
3cecd894a3 GameDB: Brazenly remove patches for ESPN games 2025-12-05 11:20:15 -05:00
refractionpcsx2
02f0921b2d EE: Force sync on EE timer read 2025-12-05 11:20:15 -05:00
TheTechnician27
94bd268a51 Emulog: Print user-selected BIOS time zone 2025-12-05 10:17:03 -05:00
SternXD
746174d73d 3rdparty: Update fast_float to v8.1.0
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
98c74b939a 3rdparty: Update fmt to 12.1.0
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
775f381685 3rdparty: Update simpleini to 4.25
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
3d2ecafb01 3rdparty: Update rapidyaml to v0.10.0
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
ee6b080fa2 3rdparty: Update xbyak to v7.30
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
cf0bf4db5a 3rdparty: Update ImGui to 1.92.5
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
7f211d7fbf 3rdparty: Update Vulkan-Headers to v1.4.335
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
35efe8fcb6 3rdparty: Update CPUInfo to commit 161a9ec374884f4b3e85725cb22e05f9458fdc93
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
eb0b23a284 Deps: Update SDL3 to 3.2.26 on runner
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
a4b7b6e9d7 Deps: Update zlib URL
Jordan says the website keeps going down so GitHub it is

Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
4ac3adcdd8 Deps: Update harfbuzz to 12.2.0
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
7f4c4b0e3e Deps: Update libpng to v1.6.51
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
37c8d988eb Deps: Update shaderc to 2025.4
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
SternXD
dafb9042e4 Deps: Update plutovg to v1.3.2
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-05 09:43:06 -05:00
Ziemas
e1ba9bacda SPU: Deduplicate DMA counter code 2025-12-05 09:42:26 -05:00
Ziemas
169022923c SPU: Remove redundant update on DMA
The SPU will update the counters and run to the current cycle by itself
when DMA happens, so this should be redundant.
2025-12-05 09:41:44 -05:00
chaoticgd
4acf27234e Debugger: Fix some incorrect comments 2025-12-05 06:57:02 -05:00
TellowKrinkle
e9977f2a2c CI:AppImage: Build our own ffmpeg 2025-12-04 15:46:33 -05:00
TellowKrinkle
df8d809506 CI:AppImage: Add soversion to our harfbuzz to match system one 2025-12-04 15:46:33 -05:00
TellowKrinkle
4d89fec9ff CI:AppImage: Re-enable cmake logging when building Qt
Qt turns it off but we'd like it to stay on...
2025-12-04 15:46:33 -05:00
TellowKrinkle
27b641d048 CI:AppImage: Set proper package search paths when building dependencies 2025-12-04 15:46:33 -05:00
TellowKrinkle
e475c0df06 CI:AppImage: Build harfbuzz-gobject
GTK+3 needs it, and qt relies on GTK+3
2025-12-04 15:46:33 -05:00
SternXD
9877129815 GS: Add texture replacement dump/load indicators to OSD
Signed-off-by: SternXD <stern@sidestore.io>
2025-12-02 11:58:33 -05:00
TellowKrinkle
3376001d45 GS:OGL: Apply Nvidia bug workaround only on Nvidia
It's making fbfetch users very unhappy with lots of unnecessary barriers.
2025-11-30 17:17:38 +01:00
GovanifY
0cbd884234 Qt: delay resize events using a timer (#13614) 2025-11-29 18:17:05 -05:00
dependabot[bot]
3e8327e934 GH Actions: Bump actions/checkout from 5 to 6 in the ci-deps group (#13596)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-29 18:05:06 -05:00
TheLastRar
ca9d88f47b Ci: Specify toolchain file when building QtApng for Arm64 on Windows 2025-11-29 17:59:20 -05:00
TheLastRar
bf92ffffa3 GS: Remove Vulkan specific include from common GSDevice header 2025-11-29 17:59:20 -05:00
chaoticgd
eccec21ada Debugger: Exclude end address when scanning for functions 2025-11-29 17:50:12 -05:00
TheLastRar
03aaf7db6a SDLInputSource: Support full axis binds of gamepad axes 2025-11-29 17:48:58 -05:00
chaoticgd
6d9e0482b4 Debugger: Fix memory explosion due to wrapped address range 2025-11-29 23:03:08 +01:00
TheLastRar
34f2328a79 DEV9: Add missing RedtapeWindows include 2025-11-29 22:54:16 +01:00
TheLastRar
2569193b05 DEV9: Make socket auto adapter name translatable 2025-11-29 22:54:16 +01:00
TheTechnician27
b935ec3d19 OSD: Fix settings order in UI 2025-11-29 07:22:19 -05:00
refractionpcsx2
e0e6b0d9a5 GS: Mask GS regs on dirty checks.
This is kind of avoiding an optimization bug with MSVC in 2022, but may also reduce false dirtying if a game is writing to the pad area
2025-11-29 05:08:01 +01:00
TJnotJT
580218d495 GS: Do scissor test in autoflush handler.
The autoflush handler is called before the scissor test in the vertex kick.
To save some work and prevent unnecessary autoflushes, do the scissor test
in the autoflush handler also.
2025-11-29 04:55:03 +01:00
TJnotJT
519f280fa5 GS: Early detection of shuffles in vertex kick to prevent autoflushing. 2025-11-29 04:55:03 +01:00
TJnotJT
a33ee13bb4 GS: Add LOD checking to HandleAutoflush().
Only enabled when the draw might use mipmapping.
2025-11-29 04:55:03 +01:00
TJnotJT
0c70cc7e5a GS: Add checking of multiple LODs to IsAutoFlushDraw(). 2025-11-29 04:55:03 +01:00
PCSX2 Bot
2cba346ff5 [ci skip] Qt: Update Base Translation. 2025-11-29 01:04:48 +01:00
lightningterror
db2509edb3 GS/HW: Expand the rt check if it's written outside of blending.
Catches more cases.
2025-11-29 00:45:04 +01:00
chaoticgd
e3063d6cd6 VMManager: Fix LoadStateFromSlot error messages 2025-11-28 13:58:51 -05:00
chaoticgd
8d30e8cee8 FullscreenUI: Fix save state loading 2025-11-28 10:50:41 -05:00
chaoticgd
ff2f1998ad Debugger: Pick out some new icons 2025-11-27 18:59:25 -05:00
TheTechnician27
7942ee438a GameListWidget: Fix header width bug 2025-11-27 17:18:29 +01:00
TJnotJT
f322dfb1d4 GS/SW: Use non-saturating ARM instructions for color gradient setup.
This is more efficient on ARM, though the equivalent instructions are not currently used in the x64 JIT and C++ versions of GSVector.

Co-authored-by: TellowKrinkle
2025-11-26 20:25:10 +01:00
TJnotJT
a7f5ddfe0d GS/SW: Mask color gradients to prevent incorrect clamping.
Co-authored-by: TellowKrinkle
2025-11-26 20:25:10 +01:00
PCSX2 Bot
0cdfb75fd0 [ci skip] Qt: Update Base Translation. 2025-11-25 19:03:17 -05:00
TJnotJT
35624a12d9 GS/HW: Refactor StretchRect() to have single entry to renderer/reduce duplication. 2025-11-25 18:38:52 +01:00
JordanTheToaster
9b147cc57c GameDB: FFX-2 FMV FIxes 2025-11-25 17:50:06 +01:00
JordanTheToaster
10e13cfece GS/HW: Test double buffer offset from target base address on lookup 2025-11-25 17:50:06 +01:00
lightningterror
7b2eb7bc47 GS/DX11: Do Stencil date_one in a single pass if there's a barrier.
We currently have a barrier so let's do date_one in a single pass, plus this avoids any issues with copies and stencil issues.
On dx copies are slower so we can only use the optimization if we have barriers already present.
2025-11-25 16:58:27 +01:00
PCSX2 Bot
ab1cb802d8 [ci skip] Qt: Update Base Translation. 2025-11-25 01:01:42 +01:00
TheLastRar
366cdd8df0 Qt: Remove incorrect check in shouldMouseLock() 2025-11-24 18:34:43 -05:00
TheLastRar
bc3cfb1373 Qt: Improve mouse lock DPI handling 2025-11-24 18:34:43 -05:00
SternXD
db6792af2e Achievements/Qt: Show success feedback on RetroAchievements login 2025-11-24 18:19:08 -05:00
SternXD
a1485fb7cd FullscreenUI: Allow pause menu to wrap around 2025-11-24 18:14:44 -05:00
Ty
c72c309218 InputRecording: Use u32 for frames since that's what the core uses (warning fixes) 2025-11-24 18:07:25 -05:00
Ty
58899a9ed3 MTVU: uptr to u32 implicit cast fix 2025-11-24 18:07:25 -05:00
Ty
0823c70460 VTLB: uptr to u32 implicit cast warning fix 2025-11-24 18:07:25 -05:00
Ty
e5c29a3975 BiosTools: s64 to to u32 implicit cast warning fix 2025-11-24 18:07:25 -05:00
Ty
1174ae99c9 GS SW: size_t to int implicit cast warning fixes 2025-11-24 18:07:25 -05:00
Ty
e2d3680038 GSPerfMon: Use int rather than u64 for a frame count to match the rest of the core 2025-11-24 18:07:25 -05:00
Ty
8630893cb1 GIF: implicit cast to u32 warning fix 2025-11-24 18:07:25 -05:00
Ty
53598b970d IopBios: Use typedefs and explicit casting 2025-11-24 18:07:25 -05:00
Ty
89de00ac36 DEV9: Implicit size_t to int conversion warning fix 2025-11-24 18:07:25 -05:00
Ty
d5ddf07958 Counters: u32 implicit cast warning fix 2025-11-24 18:07:25 -05:00
PCSX2 Bot
30dcf4a14a [ci skip] PAD: Update to latest controller database. 2025-11-24 19:11:46 +01:00
JordanTheToaster
a87710e4bc GameDB: Simple 91/ All Star Fighters fixes 2025-11-24 19:11:33 +01:00
JordanTheToaster
a12f87fec2 Github: Use pip install yamllint 2025-11-24 16:57:40 +01:00
JordanTheToaster
8ba9bba094 ImGuiOverlays: Various text changes 2025-11-24 16:57:40 +01:00
JordanTheToaster
1363571c14 GameDB: Fixes of various kinds 2025-11-24 16:57:40 +01:00
chaoticgd
80de666fcc Debugger: Fix crash in getEEThreads 2025-11-24 16:52:15 +01:00
chaoticgd
ff0a2f84fa Config: Initialize AchievementsOptions bitset to zero 2025-11-24 16:12:27 +01:00
JordanTheToaster
0676f145bc Deps: Add additional fixes for Mac OS 11 compat
cheeseus
2025-11-24 16:11:40 +01:00
JordanTheToaster
e19ae2bf60 Deps: Update Qt to 6.10.1 2025-11-24 16:11:40 +01:00
lightningterror
7782d930d5 GS/HW: Always swap DATE with DATE_BARRIER if we have barriers on when alpha write is masked.
This is always enabled on vk/gl but not on dx11/12 as copies are
slow so we can selectively enable it like now.
2025-11-24 16:09:46 +01:00
lightningterror
d1a53fe29b GS/DX11/GL: Move vertices for stencil date in SetupDATE.
The vertices are used only in SetupDATE so let's move them there.
VK/DX12 already do this.
2025-11-24 16:09:46 +01:00
lightningterror
c484cf286c GS/DX11: Don't unbind shader resource if depth stencil view is read only.
We don't need to unbind conflicting srv with dsv if the dsv itself is read only, it is used for depth testing and both can be bind at the same time.

Avoids re binding srv using a read only dsv.
2025-11-24 16:08:50 +01:00
PCSX2 Bot
f8882c4da6 [ci skip] Qt: Update Base Translation. 2025-11-22 06:31:36 +01:00
Ty
52c17e67a5 MipsStackWalk: Fix s64 -> u32 implicit casting warning 2025-11-21 18:20:58 -05:00
Ty
615cd00147 DEV9 / ATA: Fix u64 to u32 implicit casting warning 2025-11-21 18:20:58 -05:00
Ty
cb0bf953d3 Interpreter: Fix warning from reading 64 bit GPR into u32 variable.
The PS2 has 32 bit addresses!
2025-11-21 18:20:58 -05:00
Ty
26a68ef76a GSDumpReplayer: Fix possible memcpy out of bounds read and fix different size implicit casting warnings 2025-11-21 18:20:58 -05:00
Ty
e4c1dc2359 CDVD / Common: Use u32 for PSXCLK instead of u64 (yeah, it fixes warnings) 2025-11-21 18:20:58 -05:00
Ty
40425e3bee Translations: Warning fix, use qsizetype instead of int 2025-11-21 18:20:58 -05:00
Ty
e51e4a35fe MemoryCardSettings: Warning fix, use qsizetype instead of int 2025-11-21 18:20:58 -05:00
Ty
bd1b9ea718 Debugger: size_t -> int warning fix. Switched to u32. 2025-11-21 18:20:58 -05:00
Ty
faaa376232 Console: size_t -> u32 when constructing smallstring warning fix 2025-11-21 18:20:58 -05:00
Ty Lamontagne
e9ca1a6ead Image.cpp: Cast between types instead of using offsetof 2025-11-21 18:20:58 -05:00
Ty Lamontagne
4d3149eacb Host / Cubeb: Use size_t to iterate cubeb_backend_names 2025-11-21 18:20:58 -05:00
Ty Lamontagne
78822c96fb GSVK: Remove unused variable 2025-11-21 18:20:58 -05:00
Ty Lamontagne
a78617b987 Config: Fix GSOptions bitset comparison 2025-11-21 18:20:58 -05:00
Ty Lamontagne
3059ab2b12 QT GameList: Replace deprecated invalidateRowsFilter usage 2025-11-21 18:20:58 -05:00
Ty Lamontagne
1d0f6cc5b7 3rdparty/soundtouch: Fix -Wdeprecated-ofast warning 2025-11-21 18:20:58 -05:00
Ty Lamontagne
38a35043a8 GS/Patches: Explicitly cast non-trivially copyable types during memset / memcpy
Warning fixes
2025-11-21 18:20:58 -05:00
Ty Lamontagne
7385cbe40a Qt: Fix nodiscard warning when opening HTML files for the about dialog 2025-11-21 18:20:58 -05:00
oltolm
9955e07470 Misc: use std::lock_guard 2025-11-20 21:41:45 -05:00
Ty
74db386144 misc: big changes (jk the release machine just broke, need a new release me thinks) 2025-11-19 20:23:42 -05:00
PCSX2 Bot
3f72efeb7a [ci skip] Qt: Update Base Translation. 2025-11-20 01:07:57 +01:00
lightningterror
d0f8905439 Qt: Check if main window exists before updating performance metrics. 2025-11-20 00:06:59 +01:00
TheTechnician27
5a60259ef5 GameListWidget: Overhaul serialization of table header state 2025-11-19 15:06:21 +01:00
SternXD
c8dffccaa7 Image: Support loading bmp files
Signed-off-by: SternXD <stern@sidestore.io>

f
2025-11-19 15:03:44 +01:00
SternXD
87a82b16ff BPM: Add custom background support to Big Picture Mode
Signed-off-by: SternXD <stern@sidestore.io>
2025-11-19 15:03:44 +01:00
KamFretoZ
5666902638 Qt: Improve custom background scaling option 2025-11-19 15:01:29 +01:00
TJnotJT
f1dc232f91 GSRunner: Use correct config name to disable shader cache. 2025-11-19 02:50:01 +01:00
TheLastRar
5476c5a17f Qt: Don't detach surface from container when deleting the surface 2025-11-19 01:46:30 +01:00
lightningterror
9aabb197e6 GS/DX12: Misc Fixes.
Properly unbind slot 0 if previous draw was tex is fb or tex is ds.
Mirrors vk behavior.

Don't recycle draw_rt_clone in colclip, it's null at this point anyway.

Don't bind rt on slot 2 if we have multidraw fb copy enabled.
Mirrors barrier behavior on vk.
2025-11-19 01:45:42 +01:00
PCSX2 Bot
c2488c9269 [ci skip] Qt: Update Base Translation. 2025-11-19 01:03:29 +01:00
TheTechnician27
7e40ab8e7e OSD: More relevant save state timestamps 2025-11-18 18:11:46 +01:00
lightningterror
902b3c5033 GS/HW: Enable barrier date on alpha masked blend case.
If alpha write is masked and barrier/copy enabled then we can switch to DATE_BARRIER since it uses the destination alpha for testing anyway.

By default this is enabled on vk/gl but not on dx11/12 as copies are slow so we can enable it now since rt alpha is read anyway.
2025-11-18 15:19:43 +01:00
TheLastRar
4d1afb9fdd Qt: Handle display surface Drag & Drop events 2025-11-18 15:03:57 +01:00
chaoticgd
4209900351 Debugger: Fix some infinite loops 2025-11-17 07:17:57 +01:00
PCSX2 Bot
780c599b49 [ci skip] Qt: Update Base Translation. 2025-11-17 05:06:56 +01:00
TheLastRar
908d35bf77 Qt: Round window sizes after applying DPI scaling 2025-11-16 22:29:57 +01:00
TheLastRar
cfea84b934 Qt: Use QWindow as display surface 2025-11-16 22:29:57 +01:00
TheTechnician27
e5d94e255b OSD: Eliminate performance overlay flickering via caching 2025-11-16 22:16:38 +01:00
refractionpcsx2
080858b97c GS/HW: Apply native scaling to exact GPU CLUTs 2025-11-16 22:10:22 +01:00
TheLastRar
d883076573 GSRunner: Move more of VM setup to CPU thread 2025-11-16 22:08:13 +01:00
chaoticgd
b80101fbd6 Debugger: Rewrite menu bar layout logic 2025-11-16 22:02:59 +01:00
refractionpcsx2
aca775f8b8 GS/HW: Reintroduce slightly more aggressive region offset for Align to Native 2025-11-16 21:36:14 +01:00
PCSX2 Bot
4f4a26769c [ci skip] Qt: Update Base Translation. 2025-11-16 21:29:11 +01:00
Wes Copeland
d19eaa1b8e Achievements: Support a custom host 2025-11-16 15:27:22 -05:00
TJnotJT
be1af0cd0f GS: Allow dumping draw/frames stats. 2025-11-16 21:26:10 +01:00
TheTechnician27
6ab02e76f1 Docs: Remove Debugger.md 2025-11-15 14:55:28 -05:00
TheTechnician27
f87bc7d72b UI: Make 'Start fullscreen' option work for BPM and improve variable name
Co-authored-by: Geraldi Kusuma Arnanto <981538+aldee@users.noreply.github.com>
2025-11-15 13:37:21 -05:00
chaoticgd
086f4f11e1 Qt: Prevent entering/exiting fullscreen while the VM is locked 2025-11-15 13:31:23 -05:00
TJnotJT
6f54da6234 GS/HW/TC: Do not force temporary source creation for PSMT8 sources that request outside a target valid area. 2025-11-15 16:56:57 +01:00
TJnotJT
44f47f11b8 GS/HW/TC: Force a temporary source creation in edges cases.
Case: When looking up a source, we find a perfect BP hit for a target.
However, the requested area is outside the target's valid area.
Don't use the target direct and instead load from memory in a temporary source.

Co-authored-by: refraction
2025-11-15 16:56:57 +01:00
TJnotJT
b5a2d04b2e GS/HW/TC: Remove outside target PSM check in LookupSource.
Co-autored-by: refraction
2025-11-15 16:56:57 +01:00
TJnotJT
8508ebb7d3 GS/HW: Remove legacy code for changing RT from depth to color in TC invalidation.
Co-authored-by: refraction
2025-11-15 16:56:57 +01:00
lightningterror
3234e45f33 GS/HW: Also check if blend will update the rt.
If it doesn't and there is no depth buffer we can abort the draw(s) safely.
2025-11-15 16:54:12 +01:00
lightningterror
53d1320d83 GS/HW: Re check if RT is written after we know the source alpha. 2025-11-15 16:54:12 +01:00
TheTechnician27
9b545809be Docs: Remove debugger.txt and Debugger.pdf 2025-11-14 20:46:06 -05:00
chaoticgd
79400acf2a Build: Add VectorIntrin.h to precompiled header 2025-11-14 08:03:27 -05:00
PCSX2 Bot
3107c4103a [ci skip] Qt: Update Base Translation. 2025-11-12 19:06:36 -05:00
chaoticgd
68c88f692e Qt: Fix use-after-free in GameSummaryWidget 2025-11-12 18:51:57 -05:00
chaoticgd
df19b37d6d Qt: Fix game list deadlock when changing discs 2025-11-12 18:51:57 -05:00
chaoticgd
1b5c352566 Debugger: Improve symbol tree enum editing 2025-11-12 18:46:10 -05:00
PCSX2 Bot
bed6a9e4d4 [ci skip] Qt: Update Base Translation. 2025-11-12 01:03:38 +01:00
lightningterror
d602ad1d3e GS/HW: Purge no longer needed/replaced crc hacks GSC_ZettaiZetsumeiToshi2, GSC_SteambotChronicles. 2025-11-11 22:36:46 +01:00
refractionpcsx2
51c31347df GS/HW: Remove clamp hack for edge garbage.
Not seemingly required anymore, might be because NS is a thing.
2025-11-11 22:36:46 +01:00
refractionpcsx2
00876e7076 GameDB: Fixes for later IRem games 2025-11-11 22:36:46 +01:00
refractionpcsx2
47eb499893 GS/HW: Add CRC hack to cover IRem games to deal with depth deswizzle shuffle 2025-11-11 22:36:46 +01:00
refractionpcsx2
b8680c3139 GS/HW: Mask channel offsets in channel shuffle heuristic 2025-11-11 22:36:46 +01:00
refractionpcsx2
9b4e3b8f74 GS/HW: Adjust target lookup to better check on source match 2025-11-11 22:36:46 +01:00
refractionpcsx2
3e858167bc Build: Update gamedb documentation and linter 2025-11-11 21:19:02 +01:00
refractionpcsx2
44d66555cc GS/HW: Add options to maintain upscale in Native Scaling
This will adjust how the box filter samples to simulate bilinear when upscaling
2025-11-11 21:19:02 +01:00
refractionpcsx2
c5438ceca3 GS/HW: Fix up invalidly selected Tex in RT targets 2025-11-11 20:58:35 +01:00
JordanTheToaster
3e1927ae44 GameDB: Ore no Shita de Agake fixes 2025-11-11 14:59:04 +01:00
TheTechnician27
b688117002 RTC: Automatically detect timezone 2025-11-10 20:14:36 -06:00
dependabot[bot]
e62e6fb6c3 Bump softprops/action-gh-release in the ci-deps group
Bumps the ci-deps group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `softprops/action-gh-release` from 2.4.1 to 2.4.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](6da8fa9354...5be0e66d93)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 19:28:32 -05:00
PCSX2 Bot
262e94e5d7 [ci skip] PAD: Update to latest controller database. 2025-11-10 20:01:35 +01:00
PCSX2 Bot
11a4b4e7ff [ci skip] Qt: Update Base Translation. 2025-11-10 01:07:34 +01:00
chaoticgd
a98cfcf28c CDVD: Synchronise access from different threads 2025-11-09 09:27:27 -05:00
PCSX2 Bot
d02f30ee62 [ci skip] Qt: Update Base Translation. 2025-11-08 18:23:15 -06:00
JordanTheToaster
c0bf01a646 MacOS: Patch Tahoe unclickable buttons 2025-11-08 08:31:46 -05:00
TheTechnician27
babb985e9e GS Hotkeys: Improve upscale and downscale hotkeys 2025-11-07 20:28:27 -05:00
PCSX2 Bot
e379c8317d [ci skip] Qt: Update Base Translation. 2025-11-07 03:49:56 +01:00
chaoticgd
5098277474 Debugger: Fix 1 pixel gap under layout tabs on non-Windows platforms 2025-11-06 09:32:29 -05:00
TheLastRar
4a94cb6cbd DEV9: Remove using namespace in TAPAdapter header 2025-11-05 16:44:10 -05:00
TheTechnician27
e245454b91 GameListWidget: Fix icon cell highlights and column widths 2025-11-05 16:43:28 -05:00
TheTechnician27
b003eadd2d VMManager: More helpful error message on no BIOS present 2025-11-03 12:52:28 -05:00
JordanTheToaster
a5984d8213 Flatpak: Update KDE runtime to 6.10 2025-11-03 12:49:35 -05:00
Stern
4dbd95b0bb labeler: Add OSD / ImGui labeler 2025-11-03 10:38:26 -05:00
JordanTheToaster
68803229da Core: Bump savestate version.
[SAVEVERSION+]
2025-11-02 20:19:38 -05:00
chaoticgd
b661a2a149 Deps: Update KDDockWidgets to 2.4.0 2025-11-02 15:02:25 -05:00
PCSX2 Bot
63cd355d7a [ci skip] Qt: Update Base Translation. 2025-11-02 14:43:04 -05:00
Ziemas
0f5ff68679 SPU: Remove KON delay/check key once per T 2025-11-02 14:36:54 -05:00
JordanTheToaster
bd74921926 Deps: Update SDL3 to v3.2.26 2025-11-01 11:32:32 -04:00
TheLastRar
78f83514f4 Deps: Force lib directory for libjpeg-turbo build 2025-11-01 11:31:20 -04:00
TheTechnician27
2c36259b88 DB: Remove some unsupported or nonexistent serials 2025-11-01 11:29:27 -04:00
TheTechnician27
32a0bed6af GameListModel: Touch up a couple functions 2025-11-01 11:28:59 -04:00
TheTechnician27
d415f8364c Snapshots: Clean up per-game snapshots folder code 2025-11-01 11:14:55 -04:00
Ty Lamontagne
7c768b6833 Qt: Mouse Lock: Add warning about mixed-resolution non 100% DPI configs 2025-11-01 10:21:54 -04:00
Ty Lamontagne
773f6968a4 Qt: Implement mouse locking when rendering to separate window 2025-11-01 10:21:54 -04:00
Ty Lamontagne
1021199512 Qt: Visually disable the mouse lock button on wayland 2025-11-01 10:21:54 -04:00
Ty Lamontagne
08ef9e2bd9 Qt: Make mouse screen locking DPI aware
Also removed some global mouse hook stuff. Don't ever want to use that anyways.
2025-11-01 10:21:54 -04:00
refractionpcsx2
6ba3f96f27 GS/MAD: Try to reconstruct centre line if previous version was weaved in motion 2025-11-01 09:29:09 -04:00
TheTechnician27
7d5b7bc3ce FUNDING.yml: Add Liberapay 2025-11-01 09:20:57 -04:00
TheTechnician27
0d43d30346 OSD: Fix uninitialized save state slot timestamp 2025-10-31 22:19:07 -04:00
PCSX2 Bot
da824b4e9e [ci skip] Qt: Update Base Translation. 2025-10-31 01:03:12 +01:00
chaoticgd
ed08b5f34e Memcard: Fix infinite loop caused by UB when YAML parsing fails 2025-10-30 14:02:55 -04:00
chaoticgd
0ce312c1c3 GameDB: Fix infinite loops caused by UB when YAML parsing fails 2025-10-30 14:02:55 -04:00
PCSX2 Bot
07bc2fa452 [ci skip] Qt: Update Base Translation. 2025-10-28 01:19:58 +01:00
TheTechnician27
bfd2775074 Qt: Add TextBrowserInteraction to labels where appropriate 2025-10-28 00:36:00 +01:00
TheTechnician27
94ccafd745 MainWindow: Make Settings > Video Capture checkbox toggle correctly 2025-10-27 19:25:25 -04:00
KamFretoZ
5c6049c4ae Qt: Add Create game shortcut functionality 2025-10-28 00:11:09 +01:00
PCSX2 Bot
090464c42d [ci skip] PAD: Update to latest controller database. 2025-10-27 18:43:11 +01:00
PCSX2 Bot
89a00db3d6 [ci skip] Qt: Update Base Translation. 2025-10-27 14:08:50 +01:00
dependabot[bot]
fc415dff93 GHActions: Update action scripts
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 08:36:36 -04:00
TheTechnician27
f648a9a438 QtHost: Fix locale crash on non-Windows machines 2025-10-25 17:58:00 -04:00
chaoticgd
cac6669423 Debugger: Respond to OS colour scheme changes 2025-10-25 09:48:18 -04:00
TheTechnician27
7db487a49b Game List: Improve dialog for Reset Play Time 2025-10-25 15:32:52 +02:00
TJnotJT
c96607fe37 GSRunner: Allow loading GS settings from INI. 2025-10-24 21:44:52 -04:00
SternXD
ba0dae5f57 ImGui: Rename BackgroundProgressDialog to ProgressDialog
Signed-off-by: SternXD <stern@sidestore.io>
2025-10-24 21:41:42 -04:00
SternXD
5fe5148e86 BPM: Add Network and HDD settings page
Signed-off-by: SternXD <stern@sidestore.io>
2025-10-24 21:41:42 -04:00
TJnotJT
5445cb516a GS: Handle zero clears separately in transfer dump. 2025-10-24 21:40:37 -04:00
PCSX2 Bot
84a29ffcca [ci skip] Qt: Update Base Translation. 2025-10-25 02:03:31 +02:00
PCSX2 Bot
e56075976f [ci skip] Qt: Update Base Translation. 2025-10-24 15:53:19 -04:00
SternXD
0f709735c0 FullscreenUI: Add footer for clear bindings
Signed-off-by: SternXD <stern@sidestore.io>
2025-10-24 15:53:05 -04:00
SternXD
ad3f0fd6cd ImGuiFullscreen: Add append and queue footer hints
Signed-off-by: SternXD <stern@sidestore.io>
2025-10-24 15:53:05 -04:00
TheTechnician27
fbfdacd589 Game Grid: Set Size Hint for List View 2025-10-24 15:50:44 -04:00
chaoticgd
aedc51e151 Qt: Set QStyleHints colorScheme property properly 2025-10-23 20:17:23 -04:00
TheTechnician27
fe95a697f4 GameListModel: Remove dead, nonsense switch case 2025-10-23 19:52:38 -04:00
TheTechnician27
f99cf28429 MainWindow: Add a separator between Achievements and Controllers 2025-10-23 10:38:43 -04:00
JordanTheToaster
bea1eb0cf9 MacOS: Fix for missing Metal Toolchain 2025-10-23 09:03:43 -04:00
Silent
3cf21e0ab6 usb_eyetoy: Clean up COM initialization, prevent a double-release
If the EyeToy camera was enabled in the settings, but not enabled
by the game, it would call CoUninitialize without having called
CoInitializeEx first.
2025-10-22 09:48:06 -04:00
Silent
521b32c253 USB: Initialize COM before using Cubeb on Windows 2025-10-22 09:48:06 -04:00
Silent
190b525ca6 CubebAudioStream: Call CoInitializeEx before creating cubeb 2025-10-22 09:48:06 -04:00
PCSX2 Bot
baa00e4d38 [ci skip] Qt: Update Base Translation. 2025-10-22 13:37:14 +02:00
TheTechnician27
51bc6c1465 pcsx2-qt: Add buddies and tabstops 2025-10-21 18:48:54 -04:00
JordanTheToaster
ea8492082a Windows: Optimize Qt build for size 2025-10-21 12:06:14 -04:00
dependabot[bot]
9d1fd23d78 Bump the ci-deps group with 2 updates
Bumps the ci-deps group with 2 updates: [flatpak/flatpak-github-actions](https://github.com/flatpak/flatpak-github-actions) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `flatpak/flatpak-github-actions` from 6.5 to 6.6
- [Release notes](https://github.com/flatpak/flatpak-github-actions/releases)
- [Commits](https://github.com/flatpak/flatpak-github-actions/compare/v6.5...92ae9851ad316786193b1fd3f40c4b51eb5cb101)

Updates `actions/setup-node` from 5 to 6
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: flatpak/flatpak-github-actions
  dependency-version: '6.6'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci-deps
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 11:44:24 -04:00
TellowKrinkle
9ff575377d GHActions: Reduce ccache max size
Reduces the amount of GH cache quota they take up.

[ci skip]
2025-10-21 11:43:37 -04:00
JordanTheToaster
47250293cd Mac OS: Use Xcode 26.0.1 2025-10-20 19:01:03 -04:00
JordanTheToaster
f9b346521d Mac OS: Bump runner to Mac OS 26 2025-10-20 19:01:03 -04:00
TheTechnician27
b5a4c71eff RTC: Add option to choose between system locale and yyyy-MM-dd HH:mm:ss 2025-10-20 18:20:41 +02:00
JordanTheToaster
2604256424 GameDB: Various fixes 2025-10-20 17:49:22 +02:00
chaoticgd
906ac6a8ea Patch: Fix some incorrect format strings 2025-10-20 15:38:33 +02:00
TheTechnician27
3db21e0579 FSUI: Remove defunct option and move OSD position options 2025-10-19 22:29:31 -05:00
PCSX2 Bot
abd03884de [ci skip] Qt: Update Base Translation. 2025-10-19 20:02:42 -05:00
TheLastRar
a159256b07 FSUI: Allow specifying default button in message dialogs 2025-10-18 02:26:09 +02:00
Silent
d9a2618b7a Achievements: Use the actual image names for cache
Fixes an issue where PCSX2 cache was unaware of the game or achievement
icon getting updated in the backend, and it continued to show
the old image
2025-10-18 02:24:04 +02:00
PCSX2 Bot
dca0291cfb [ci skip] Qt: Update Base Translation. 2025-10-18 02:23:19 +02:00
JordanTheToaster
b261873471 GameDB: Wild Arms 5 SPS fix 2025-10-18 02:23:03 +02:00
TellowKrinkle
bfd01c913a macOS: Update to Qt 6.10.0 2025-10-17 18:11:04 -04:00
TellowKrinkle
818b3fe779 macOS: Update to Qt 6.9.3 2025-10-17 18:11:04 -04:00
TellowKrinkle
66a28e4488 macOS: Optimize Qt build for size
Saves a MB or so, there's no reason we need speed optimizations in our GUI toolkit
2025-10-17 18:11:04 -04:00
TellowKrinkle
28e2ecf920 macOS: Fix parallel kddockwidgets build for universal dependencies 2025-10-17 18:11:04 -04:00
TellowKrinkle
d3dbf53fa7 MacOS: Make universal build script executable 2025-10-17 18:11:04 -04:00
SternXD
8fb2940f25 Qt/BPM: Improve memory card shutdown warning clarity and safety emphasis 2025-10-15 23:48:35 -05:00
chaoticgd
55498762f9 Qt: Fix typo in Windows dependencies build script 2025-10-15 18:07:05 -04:00
JordanTheToaster
50baaf39d6 Deps: Update Mac OS ffmpeg to 8.0 2025-10-15 08:32:19 -04:00
lightningterror
4743ccac8c GS/HW/Shaders: Fix afail shader typo.
No dual source blend means PS_NO_COLOR1 is true, no output on target 1.
2025-10-15 00:57:33 +02:00
lightningterror
0dc3fc6228 GS/HW: Unify blend levels when barriers are and are not supported.
When barriers/multidraw fb copy is supported no change.
When barriers/multidraw fb copy isn't supported keep the same levels but only enable them if there's no overlap.
2025-10-14 02:19:43 +02:00
lightningterror
a7a4583c84 GS/HW: Enable any fbmask emulation if Blending is above minimum.
Since dx11/12 now supports sw blending and copies/draw area/quads optimizations have been made perf impact will be lower so we can use the same unified path if texture barriers are disabled.
2025-10-14 02:19:43 +02:00
lightningterror
6b52937262 GS/TC: Make sure target is created before setting any flags.
Xenosaga 3 fails to create a target because the rect is empty so we should avoid setting any flags since it's null.
2025-10-14 02:19:08 +02:00
PCSX2 Bot
df9caf6fb8 [ci skip] Qt: Update Base Translation. 2025-10-14 02:17:24 +02:00
Jordan
be5f8d2e60 GameDB: Various fixes for issues in Xenosaga 3 HyperSonic Xtreme Jeopardy and Jak 3. 2025-10-13 21:56:30 +02:00
Sean
b0e01ca518 Debugger: Floating point display in memory view (#13362) 2025-10-13 12:51:37 -04:00
TheTechnician27
4e85272393 Settings: Remove obsolete transitionary function 2025-10-13 12:47:20 -04:00
dependabot[bot]
bffed9a839 [ci skip] CI: Bump softprops/action-gh-release from 2.3.4 to 2.4.1 (#13383)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 08:49:29 -04:00
PCSX2 Bot
7ed0c0d031 [ci skip] Qt: Update Base Translation. 2025-10-13 10:38:02 +02:00
TheTechnician27
ae6e4c98f6 AudioSettingsWidget: Disambiguate overloaded volume name 2025-10-12 17:17:59 -05:00
TheTechnician27
38cfa9912d SPU2: Fix interface for output muting 2025-10-12 17:17:59 -05:00
JordanTheToaster
b02318e2b6 Misc: Qt 6.10.0 Build Fixes 2025-10-12 00:39:34 -05:00
JordanTheToaster
db45263221 Deps: Update Windows and Linux to Qt 6.10.0 2025-10-12 00:39:34 -05:00
JordanTheToaster
3fd9625f1c 3rdparty: Update rcheevos v12.1.0 2025-10-11 20:17:13 +02:00
JordanTheToaster
2978b6050d GameDB: Black adjust HPO 2025-10-11 20:05:44 +02:00
PCSX2 Bot
274acddcf1 [ci skip] Qt: Update Base Translation. 2025-10-11 20:04:52 +02:00
JordanTheToaster
8dffc85707 Misc: Qt 6.10.0 Build Fixes 2025-10-10 23:20:48 -05:00
lightningterror
f799631a70 Qt: Update dx12 info.
Allow texture barrier override, update blending tooltip.
2025-10-10 08:10:31 +02:00
lightningterror
d744f0dfeb GS/DX12: Backport multidraw fb copy from dx11 to dx12. 2025-10-10 08:10:31 +02:00
Ty
bdb8de6d3b translations: Syncing Crowdin translations (#13372) 2025-10-09 16:37:44 -04:00
TJnotJT
e751f367ca GS/SW: Rewrite vertex ST values if they might overflow the rasterizer fixed point format. 2025-10-09 19:42:27 +02:00
TJnotJT
13f2d87ba8 GS: Add ST NaN tracking to the vertex trace.
Add fields that will trace if any of the S/Q or T/Q values is NaN. Ignore any NaN ST values while calculating min/max.
2025-10-09 19:42:27 +02:00
TheLastRar
3cac2cf7c2 Qt: Add null check for gamelist icons 2025-10-09 16:57:55 +02:00
TheLastRar
a67409bfc6 Deps: Patch SDL3 to fix erroneous uninitialise 2025-10-09 12:53:40 +02:00
lightningterror
6a556c9968 GS/HW: Fix manual de swizzle -Wsign-compare warnings. 2025-10-09 03:28:00 +02:00
TJnotJT
4d93285ca2 GS: Use triangle quad detection in primitive overlap detection.
Coauthored-by: TellowKrinkle
2025-10-09 03:26:08 +02:00
Ty
98c35a308d ci: Set NPROCS in the linux gs runner dependency script 2025-10-08 16:24:15 -04:00
Ty Lamontagne
7da97e6d80 cmake/ci: Allow gs runner builds without building all of pcsx2-qt 2025-10-08 15:26:34 -04:00
Ty Lamontagne
edf686752a GSRunner: Support GNU/Linux 2025-10-08 15:26:34 -04:00
lightningterror
b7e17646a3 GS/DX12: Backport dx11 full rt copy optimizations.
We are copying the whole RT so just call CopyResource instead of CopyTextureRegion which will be faster.
2025-10-08 02:24:32 +02:00
JordanTheToaster
3f437e7496 3rdparty: Update fmt to 12.0.0 2025-10-07 15:12:49 +02:00
lightningterror
7ab6c62dee GS/HW: Update manual deswizzle detection.
Check if a draw is either a palette or 32bit depth format, also check for swizzle format is 16 or 32bit.

Expand/update quadrant detection, use the quadrant size of what it should be
from the page size and compare it to the actual quadrant size from the vertex positions.
2025-10-07 11:48:32 +02:00
lightningterror
2a7bf35f20 GS/TC: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets.
Issue is it was erasing the source which doesn't get passed back to the main draw function,
so we should be setting m_from_target to either new target or null because it is linked.
2025-10-07 11:48:32 +02:00
TJnotJT
08552a83cc GS/SW: Clamp colors, Z, fog to allowed ranges. 2025-10-07 07:34:26 +02:00
TJnotJT
ee417ee4c5 GS/SW: Silence code analyzer warnings. 2025-10-07 07:34:26 +02:00
TJnotJT
869837f5f0 GS/SW: Accurate rounding for points. 2025-10-07 07:34:26 +02:00
TJnotJT
7ab6bac39a GS/SW: Improve accuracy of line drawing and edge antialiasing. 2025-10-07 07:34:26 +02:00
dependabot[bot]
e388294004 [ci skip] GitHub Action updates
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 18:46:46 -04:00
JordanTheToaster
bba5ef67ff GameDB: Various fixes 2025-10-06 18:45:20 -04:00
JordanTheToaster
83dc2de6ca GameDB: Hot Wheels Beat That fixes 2025-10-05 14:55:22 -04:00
PCSX2 Bot
f47fbda0e6 [ci skip] Qt: Update Base Translation. 2025-10-04 02:02:43 +02:00
KamFretoZ
d34d2af849 OSD: Add ability to show the amount of activated patches 2025-10-04 01:59:41 +02:00
JordanTheToaster
db92af8ca4 Deps: Update SDL3 to v3.2.24 2025-10-04 01:56:36 +02:00
lightningterror
47897fc2be GS/TC: Add caching to block offset calculation for TranslateAlignedRectByPage and DirtyRectByPage. 2025-10-04 01:55:52 +02:00
lightningterror
b451602f69 GS/TC: Check for y offset when calculating block offset.
Make sure the rect starts at the beginning.
2025-10-04 01:55:52 +02:00
lightningterror
96ac35a4bd GS/TC: Optimize block offset calculations in ComputeSurfaceOffset.
Same deal as before, swap the fast linear loops to be second since they will be faster.
2025-10-04 01:55:52 +02:00
lightningterror
ddd33a0701 GS/HW: Make sure we use date barrier on sw fbmask instead of primid date.
Edge case when we have sw fbmask but no sw blending.
2025-10-04 01:55:07 +02:00
lightningterror
d5e4a1c896 GS/DX11: Add missing write_rg shader bit for date barrier on texture shuffle. 2025-10-03 07:39:52 +02:00
lightningterror
9674fd773c GS/DX12/VK: Fix CopyRect partial clear regression.
Partial clears texture type should be either render target or depth stencil.
2025-10-03 07:39:52 +02:00
lightningterror
01e916b132 GS/HW: Remove rebinding read only dsv after framebuffer optimizations on dx11.
The condition would never be triggered so useless.

Clean up SendHWDraw across renderers.

Recycle tex for rt copy if colclip tex fails.

Set flags for colclip CreateRenderTarget clear to false on dx11, consistent across renderers.
2025-10-03 07:39:52 +02:00
lightningterror
1867791653 GS/DX12: Backport depth test and sampling from dx11.
Unlike in dx11 where we create a separate dsv as read only we can transition the current dsv as read only which is cleaner.
2025-10-03 07:39:52 +02:00
JordanTheToaster
bc11ff0571 3rdparty: Update cubeb to e495bee 2025-10-01 19:11:12 -04:00
lightningterror
e550cf9b63 GS/TC: Optimize block offset calculation.
Swap offset x and y loops:
Having the y loop first allows for better optimizations/caching since it's bigger.
Also optimize start point loop conditions for target rect.
2025-09-30 22:01:46 +02:00
TJnotJT
bafd87694c GS/HW: Unify barrier handling in DX11/GL/VK/MTL.
Make sure the one_barrier/full_barrier flags are passed correctly depending on the pass (main or alpha second pass).

Check that the drawlist is non-empty when a full barrier is requested.
2025-09-30 05:53:59 +02:00
TJnotJT
caf6298ad1 GS/DX11: Unify batched/per-prim multidraw and do partial copies for barriers. 2025-09-30 05:53:59 +02:00
TJnotJT
7f0d287512 GS: Refactor drawlist saving for full barrier multidraw.
Get drawlist when needing full barriers and API doesn't support texture barrier.

Make drawlist computation lazy (only computed when will be used).

When API does not provide barriers get bbox of batched draws.
2025-09-30 05:53:59 +02:00
PCSX2 Bot
2177de2238 [ci skip] Qt: Update Base Translation. 2025-09-30 02:19:21 +02:00
Ty
32973c746e CI: Use pull_request_target for deps dispatch 2025-09-29 20:05:27 -04:00
xujibbs
3bf94330ef CDVD: Make IsoHasher string translatable 2025-09-29 11:50:12 -04:00
Ty
34ae3b1eb0 [ci skip] CI: Use GITHUB_TOKEN to dispatch actions onto windows deps 2025-09-29 11:47:49 -04:00
JordanTheToaster
b9288d4845 Deps: Update harfbuzz to 12.0.0 2025-09-29 11:40:11 -04:00
PCSX2 Bot
a13cb32eb1 [ci skip] Qt: Update Base Translation. 2025-09-29 04:42:45 +02:00
Ty
9d72ad785d CI: Automatically build windows deps when PRs change them 2025-09-28 18:58:56 -04:00
JordanTheToaster
0afde446c4 Deps: Update kddockwidgets to v2.3.0 2025-09-28 18:15:23 -04:00
SternXD
49111a6fbe Achievements: Harden RetroAchievements Hardcore Compliance
Fixes #13273
 - Totally block save state loading, frame advance, and disable cheats in hardcore
 - Disable load state UI buttons when hardcore mode active (leave message telling them if they want to load state if the user somehow gets past this)
 - Add consistent OSD messaging for all hardcore restrictions

Signed-off-by: SternXD <stern@sidestore.io>
2025-09-28 18:14:33 -04:00
sean
251140fd52 Debugger: Store validated copies of pasted instructions 2025-09-28 17:53:13 -04:00
sean
f57c7d216c Debugger: Validate new instructions before pasting 2025-09-28 17:53:13 -04:00
sean
36157402c8 Debugger: Move position of paste instruction text in context menu 2025-09-28 17:53:13 -04:00
recursean
51ee8f4015 Debugger: start context function for multi-instruction paste 2025-09-28 17:53:13 -04:00
JordanTheToaster
fb85bb9076 GameDB: Various fixes 2025-09-26 20:36:56 +02:00
PCSX2 Bot
0a391e2407 [ci skip] Qt: Update Base Translation. 2025-09-26 03:36:33 +02:00
chaoticgd
52f03c900f Debugger: Improve logic for applying custom font sizes 2025-09-25 18:26:20 -04:00
lightningterror
74be344ce6 GS/Debug: Add log for CopyRect if rect is empty. 2025-09-26 00:10:19 +02:00
Ty
14574ef4eb CI: Update Flatpak builder action version 2025-09-25 18:09:29 -04:00
TheTechnician27
fe565afff0 GameList: Prioritize file title over serial for covers 2025-09-25 18:08:50 -04:00
TellowKrinkle
5fcd0f94c2 GS:Capture: Allow selecting hardware device 2025-09-25 18:07:37 -04:00
TheTechnician27
e22609ea29 QtHost: Fix verbose status toggle 2025-09-25 18:00:22 -04:00
chaoticgd
1d068ffde9 Patch: Clear R5900 recompiler cache after updating dynamic patches 2025-09-25 11:08:01 -04:00
TJnotJT
fe133b3c0c GS: Remove unused PRMODE register from dump. 2025-09-25 03:55:06 +02:00
TJnotJT
eb42ce3343 GS: Add prim class name in vertex dump for better readability. 2025-09-25 03:55:06 +02:00
TJnotJT
c50c24e3c9 GS: Adjust spacing in vertex dump for better readability.
Space between each primitive in the vertex list.

Extra space for negative X, Y, U, V coordinates.

Avoid double blank lines after vertex list.
2025-09-25 03:55:06 +02:00
TJnotJT
ab85d759b0 GS: Add fog coefficient to the vertex dump. 2025-09-25 03:55:06 +02:00
lightningterror
2ef2adf517 GS/HW: Abort copy if rect is empty. 2025-09-25 03:42:25 +02:00
chaoticgd
c13e23ab68 Debugger: Fix some use-after-free bugs in the disassembly view 2025-09-25 03:16:49 +02:00
chaoticgd
ec57e9c178 Debugger: Fix some user-after-free race conditions in the memory view 2025-09-25 03:16:49 +02:00
chaoticgd
b5a2fe3223 Debugger: Fix a dormant use-after-free bug in the breakpoint model 2025-09-25 03:16:49 +02:00
chaoticgd
88d378d293 Qt: Fix some possible use-after-free bugs related to input recording 2025-09-25 03:16:49 +02:00
chaoticgd
c79e6ecc2c Qt: Fix use-after-free race condition in achievement login dialog 2025-09-25 03:16:49 +02:00
PCSX2 Bot
a46ee17537 [ci skip] Qt: Update Base Translation. 2025-09-25 03:16:31 +02:00
JordanTheToaster
b6dbffa251 3rdparty: Update ImGui to 1.92.3 2025-09-25 03:14:19 +02:00
JordanTheToaster
4af1f7846d Deps: Update libjpegturbo to 3.1.2 2025-09-25 03:14:19 +02:00
JordanTheToaster
f5e706f753 Deps: Update plutovg to 1.3.1 2025-09-25 03:14:19 +02:00
JordanTheToaster
2dcf602666 Deps: Update FreeType to 2.14.1 2025-09-25 03:14:19 +02:00
JordanTheToaster
42be070727 Deps: Update harfbuzz to 11.5.0 2025-09-25 03:14:19 +02:00
TheTechnician27
98ded09177 ImGui: Add contingent for empty binding in save state select menu 2025-09-24 15:30:05 +02:00
JordanTheToaster
24cb93d7c5 3rdparty: Update rcheevos to commit 0a7508d 2025-09-24 15:19:10 +02:00
Vermaaaaaa
535ebdbc8c Qt/FSUI: Added FR #13128 Show Titles Option 2025-09-24 15:18:06 +02:00
TJnotJT
42a6076967 GS: Ignore output on RC1/2 when the data is not used. 2025-09-24 15:12:22 +02:00
pgert
fb27549bed GameDB: Correct Pro Evolution Soccer 2014 region.
SLES-55675 has Greek (and Italian) in menu, not German (and Italian).
2025-09-24 15:11:24 +02:00
TJnotJT
6720c9ef83 GS/SW: Misc code cleanup. 2025-09-23 15:22:07 +02:00
PCSX2 Bot
b7c135586e [ci skip] Qt: Update Base Translation. 2025-09-21 20:08:05 -04:00
KamFretoZ
f47b55ce42 Qt: Cleanup leftover menu 2025-09-21 18:09:28 -04:00
KamFretoZ
a635796b12 Qt: Add option to fill custom background 2025-09-21 18:09:28 -04:00
KamFretoZ
fbbd11bc18 Qt: Move the settings to the interface section 2025-09-21 18:09:28 -04:00
KamFretoZ
4134dd015d Qt: Support APNG backgrounds
Co-Authored-By: TheLastRar <TheLastRar@users.noreply.github.com>
2025-09-21 18:09:28 -04:00
KamFretoZ
b0dedcc590 Deps: Add additional libwebp libraries
Needed for animated WEBPs to work on Windows.

Co-Authored-By: TheLastRar <TheLastRar@users.noreply.github.com>
2025-09-21 18:09:28 -04:00
KamFretoZ
f5ce81d72c Qt: Add Custom background support
Qt: Make sure custom background aren't active when game list isn't shown

To save on CPU Power and be more efficient

Co-Authored-By: TheLastRar <TheLastRar@users.noreply.github.com>
2025-09-21 18:09:28 -04:00
RedPanda4552
9810d2923c Pad: De-duplicate analog light/lock attributes, add public getters 2025-09-21 16:47:40 -04:00
PCSX2 Bot
92ede270ce [ci skip] Qt: Update Base Translation. 2025-09-20 02:32:20 +02:00
lightningterror
427096dc29 GS/HW: Adjust texture copies perfmon info for CopyRect.
If we are optimizing out copies we don't need to increment the perf monitor info.

Also remove duplicate tex copies perf monitor info in tc as we already add it in CopyRect function.
2025-09-20 02:27:50 +02:00
lightningterror
a7f948c00f GS: Backport and unify CopyRect optimizations to avoid redundant copies.
Moved the shared code in GSDevice where it can be shared between renderers.

Backported optimizations to DX11/GL/Metal:
Source is cleared, destination is a render target, and it's a full copy
we can clear it instead.

Source is cleared, destination is a render target, destination is cleared,
if it's the same colour and rect, we can just avoid this entirely.
2025-09-20 02:27:50 +02:00
TellowKrinkle
4afa5b8409 GS:SW: Use accurate fog equation 2025-09-19 23:56:03 +02:00
JordanTheToaster
7f285b2164 VMManager: Warn when integer scaling is enabled 2025-09-19 23:52:17 +02:00
JordanTheToaster
9dac7825d7 VMManager: Warn when disabling dithering 2025-09-19 23:52:17 +02:00
JordanTheToaster
305d0e81d6 Qt/FSUI: Adjust renderer nomenclature 2025-09-19 23:52:17 +02:00
JordanTheToaster
56f3d6ea09 VMManager: Warn when using Force 32bit dithering 2025-09-19 23:52:17 +02:00
PCSX2 Bot
edc04fb8e3 [ci skip] Qt: Update Base Translation. 2025-09-17 20:08:33 -04:00
JordanTheToaster
a72f78fd79 Config: Increase space in GS config struct 2025-09-17 14:43:46 +02:00
PCSX2 Bot
aadd0fd65e [ci skip] Qt: Update Base Translation. 2025-09-17 09:40:02 +02:00
SternXD
e2bc80a96f FSUI: Fix regression allowing Save State load in Hardcore Mode via ESC menu 2025-09-16 09:43:39 -04:00
TJnotJT
704e531c1f GS: Make sure transfers are dumped between consecutive vsyncs. 2025-09-16 14:02:10 +02:00
TJnotJT
203981182d GS: Make privileged registers dumping YAML. 2025-09-16 14:02:10 +02:00
TJnotJT
14b67e3ac3 GS: Make context dump YAML. Add comments to output. 2025-09-16 14:02:10 +02:00
TJnotJT
f83e11892b GS: Add dumping of transfer bitmaps. 2025-09-16 14:02:10 +02:00
TJnotJT
a8c549baee GS: Refactor duplicated debugging code in HW/SW renderer.
Specifically, code for dumping the draw information (vertices, registers, transfers).
2025-09-16 14:02:10 +02:00
TJnotJT
13142dd31d GS: Add memory transfers dumping as a text file.
In addition to vertices and registers, dumps the memory transfers that occurred just before the draw. Helps with debugging.
2025-09-16 14:02:10 +02:00
TJnotJT
ed5c364603 GS: YAML dumping of vertices. 2025-09-16 14:02:10 +02:00
PCSX2 Bot
0ccf7d2e10 [ci skip] Qt: Update Base Translation. 2025-09-15 18:22:33 +02:00
PCSX2 Bot
ebb0dc7cc5 [ci skip] PAD: Update to latest controller database. 2025-09-15 18:22:20 +02:00
TheTechnician27
52ebebc739 Toolbar: Add 'Hotkeys' action 2025-09-14 13:28:14 -04:00
dependabot[bot]
c8141261f2 actions: Bump the ci-deps group with 3 updates (#13244)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 12:15:08 -04:00
KamFretoZ
9c7750b85d OSD: Add Accessories type indicator to USB Input OSD 2025-09-14 12:10:19 -04:00
chaoticgd
bf10b55aa1 PINE: Use the correct naming convention for static globals 2025-09-13 14:45:10 -04:00
chaoticgd
43d9ea99b0 PINE: Don't crash with SIGPIPE if the client dies while writing 2025-09-13 14:45:10 -04:00
Ziemas
37f28e95b6 Core: Calculate EE/IOPmemSize based on structs 2025-09-11 12:45:12 +02:00
Ziemas
1870193615 Core: Fix EEmemSize
It's got desynced from the actual size of the EEVM_MemoryAllocMess
struct at some point.
2025-09-11 12:45:12 +02:00
lightningterror
189374d19c GS: Bump shader cache version.
Forgot to re include it when I reset the commit.
2025-09-09 20:32:25 +02:00
lightningterror
ac04695edd GS/shaders: Fix false positive warning for pow being negative.
Replaced pow with exp2 log2.
2025-09-09 20:29:02 +02:00
lightningterror
93bf9db0b4 GS/shaders: Fix types mismatch for ps_convert_rgb5a1_8i shader.
Fixes shader compile errors and warnings on mesa, also synch vk and dx shaders for consistency.
2025-09-09 20:29:02 +02:00
PCSX2 Bot
9219a1a38b [ci skip] PAD: Update to latest controller database. 2025-09-08 18:15:01 +02:00
PCSX2 Bot
1a28d6f0d1 [ci skip] Qt: Update Base Translation. 2025-09-08 18:14:48 +02:00
JordanTheToaster
aca1b4478e Deps: Update SDL3 to v3.2.22 2025-09-07 10:30:26 -04:00
TheTechnician27
9a794f7aaa CDVD: Add message for attempting to remove a disc when no disc exists 2025-09-07 10:29:55 -04:00
TheTechnician27
6e65558d42 Hotkeys: Better organize hotkeys page 2025-09-07 10:28:52 -04:00
JordanTheToaster
74936f49e0 GameDB: Deadly Strike fixes 2025-09-02 14:50:37 +02:00
PCSX2 Bot
9864cd97de [ci skip] PAD: Update to latest controller database. 2025-09-02 04:16:00 +02:00
TheTechnician27
6d7deb57a0 CDVD: Fix block index past EoF error message 2025-09-01 08:07:58 +02:00
PCSX2 Bot
21876ff590 [ci skip] Qt: Update Base Translation. 2025-09-01 02:04:57 +02:00
chaoticgd
c543c05968 Debugger: Save symbol tree display options to layout files 2025-08-31 17:31:37 -04:00
chaoticgd
a5537da4df Debugger: Add option to show leading zeroes in the symbol trees 2025-08-31 17:31:37 -04:00
chaoticgd
edaddeecc4 Debugger: Add option to change the base of integers in the symbol trees 2025-08-31 17:31:37 -04:00
chaoticgd
6b30a199da Qt: Use the correct case for the name of the custom.qss file 2025-08-31 17:29:43 -04:00
lightningterror
23c637e3e5 GS/DX11: Post dx11 multidraw fb copy cleanup.
Don't clear stencil for stencil date.
We don't want to do this unless we always sample with stencil date like vk/gl.
Only swap primid date with barrier date if there is overlap, stencil date might send the wrong alpha on a previous draw which could be wrong when we use the alpha to sample from.
2025-08-31 02:51:36 +02:00
lightningterror
313b0fe3b5 GS/DX: Fully implement tex is fb on dx11, extend partially on dx12.
Always use tex is fb for dx11.

Partial support for dx12 if prims don't overlap.

Previously it didn't work on dx because we used input.t which is interpolated, instead of absolute cords when fb sampling.
2025-08-31 02:16:13 +02:00
PCSX2 Bot
90818c3627 [ci skip] Qt: Update Base Translation. 2025-08-30 20:03:21 -04:00
JordanTheToaster
89877aba58 Deps: Update Windows and Linux to Qt 6.9.2 2025-08-30 20:02:37 -04:00
Ty
80cb381b35 EE Cache: Use GSVector instead of intrinsics 2025-08-30 20:02:19 -04:00
JordanTheToaster
73a4d258a9 3rdparty: Update ffmpeg to 8.0 2025-08-30 20:01:28 -04:00
lightningterror
26fcbc712e [ci skip] DumpRunner: Fix race condition when creating files/folders, set process priority to below normal. (#13203)
Fixes race condition when running in parallel multiple threads when creating dump folder/files.
Makes the process priority below normal so the system remains more usable even with more threads.
2025-08-31 00:30:03 +02:00
chaoticgd
7e4bc6ba22 Hotkeys: Fix crash when swapping memory cards 2025-08-31 00:19:24 +02:00
TheTechnician27
a975a472b8 GameDB: Add Korean names to serials 2025-08-31 00:18:59 +02:00
PCSX2 Bot
29a1304218 [ci skip] Qt: Update Base Translation. 2025-08-29 04:11:33 +02:00
TJnotJT
af5279cf56 GS/HW: Handle texture shuffle with pixel reversals. 2025-08-28 18:55:47 +02:00
lightningterror
4a59a80f1d GS: Cleanup some casts, nullptr check, compare warning. 2025-08-28 17:42:46 +02:00
lightningterror
501088b859 Qt/FSUI: Update DX11/12 renderer info. 2025-08-28 17:42:46 +02:00
lightningterror
aa0bd38134 GS/DX11: Clear stencil for date one if fb is already sampled. 2025-08-28 17:42:46 +02:00
lightningterror
35d3bf2f2d GS/DX11: Skip fb copy on alpha second pass when no overlap.
For alpha second pass we can reuse the copy snapshot from the first pass.
2025-08-28 17:42:46 +02:00
lightningterror
09d0ff2577 GS/DX: Implement barrier DATE.
Will only be used when fb is already copied and we want to switch from primid date,
or if date one is present and a barrier/fb copy is already on.
2025-08-28 17:42:46 +02:00
lightningterror
567b0173ec GS/DX11: Support multidraw framebuffer copy for sw blending, fbmask.
Instead of using barriers we can do a multi fb copy for each draw split to replicate
barrier behavior, however it will be much slower.
2025-08-28 17:42:46 +02:00
PCSX2 Bot
20411aa8d6 [ci skip] Qt: Update Base Translation. 2025-08-28 09:29:18 +02:00
NightFyre
be94aa97db Core: Fix vumem export and offsets 2025-08-27 16:55:11 -04:00
chaoticgd
f65c1dd5bc Debugger: Split debugger event actions strings for easier translation 2025-08-27 16:53:41 -04:00
chaoticgd
a92297ceec Debugger: Fix some untranslatable strings 2025-08-27 16:53:41 -04:00
chaoticgd
a8ea4e55ef Debugger: Fix Automatically Select Symbols To Clear checkbox 2025-08-27 16:51:45 -04:00
dependabot[bot]
3195befab1 Bump baptiste0928/cargo-install from 3.3.1 to 3.3.2 in the ci-deps group
Bumps the ci-deps group with 1 update: [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install).


Updates `baptiste0928/cargo-install` from 3.3.1 to 3.3.2
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](e38323ef01...b687c656bd)

---
updated-dependencies:
- dependency-name: baptiste0928/cargo-install
  dependency-version: 3.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-27 16:50:51 -04:00
JordanTheToaster
2cdc65c06b GameDB: Jumanji half right fixes 2025-08-27 11:42:10 +02:00
lightningterror
0529715640 GS/DX11: Only optimize out depth for CopyResource.
Fixes recent CopyResource/CopySubresourceRegion regression.
2025-08-26 19:22:05 +02:00
lightningterror
2534cb2c9d GS/DX11: Implement depth testing and sampling.
When tex is depth, instead of copying the depth if it needs to be read only
we can instead simultaneously bind a read only depth stencil view and
shader resource view at the same time with no cost avoiding copies.

If the z buffer is read only then no copies are created and can be safely read.
If the z buffer isn't safe to be read then a copy was already created on a previous pass
so we don't have to create another copy on the following pass for reading and doing testing.
2025-08-26 19:22:05 +02:00
JordanTheToaster
49f4c36b0e 3rdparty: Update ImGui to 1.92.2b 2025-08-26 15:08:32 +02:00
lightningterror
4b08672f99 GS/DX11: Use CopyResource instead of CopySubresourceRegion if possible.
For full texture or depth copies we can use CopyResource instead of CopySubresourceRegion which is generally faster, less overhead.
2025-08-26 14:58:03 +02:00
PCSX2 Bot
73f7cb1fa7 [ci skip] Qt: Update Base Translation. 2025-08-26 03:15:42 +02:00
TellowKrinkle
8f64d118c8 iMMI: Unbreak PMSUBW, PMULTW, and PMADDUW
Fixes: 9c61053fe0
2025-08-25 19:26:11 -05:00
PCSX2 Bot
e31625d2bd [ci skip] PAD: Update to latest controller database. 2025-08-25 21:20:24 +02:00
TellowKrinkle
7907ead7fc iMMI: Unbreak PPAC5/PEXT5 when D == T
Fixes: 8779bf44d8
2025-08-24 22:50:12 -05:00
TellowKrinkle
276193d876 iFPU: Use AVX instructions 2025-08-24 20:16:24 -05:00
TellowKrinkle
9c61053fe0 iMMI: Use more AVX instructions 2025-08-24 20:16:24 -05:00
TellowKrinkle
8779bf44d8 iMMI: Use AVX instructions 2025-08-24 20:16:24 -05:00
TellowKrinkle
5ea4c55a6a Common: Add tests for SSE 3arg polyfill 2025-08-24 20:16:24 -05:00
TellowKrinkle
4662d0e5dc Common: Disable and remove ALWAYS_USE_MOVAPS
In AVX, MOVAPS is the same size as all the other instructions.

In Nehalem (one of the main targets of SSE4), there are bypass penalties for using the wrong mov.
2025-08-24 20:16:24 -05:00
TellowKrinkle
cc5f594384 Common: Remove dedicated AVX instructions
The main instructions *are* AVX instructions now
2025-08-24 20:16:24 -05:00
TellowKrinkle
d9ff9d7aa1 Common: Remove old SIMD helpers 2025-08-24 20:16:24 -05:00
TellowKrinkle
08b9037781 Common: Switch g1 and g3 SIMD to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
59125c9b12 Core: Don't create xImpl_G1Logic instances 2025-08-24 20:16:24 -05:00
TellowKrinkle
e5ba376985 Common: Use inheritance for group 1/3 ops 2025-08-24 20:16:24 -05:00
TellowKrinkle
165595008e Common: Remove xImpl_G1Compare
We already have SIMD compare under xCMPXXX.PS
2025-08-24 20:16:24 -05:00
TellowKrinkle
8dc905e827 Common: Switch movmsk to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
7cc8e5887f Common: Switch movnt to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
3599438e57 Common: Switch movss/d to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
88515d58ab Common: Switch movd/q to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
338e1a71a9 Common: Switch movsl/hdup to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
d9fc763f82 Common: Switch pmovzx/sx to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
7eeb6c7aca Common: Switch blend to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
a045c917e7 Common: Switch simd mov to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
a052a43b84 Common: Switch movh/lps to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
94d87a35be Common: Switch pack/unpack instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
0c8c798051 Common: Switch integer shuffle/insert/extract instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
c9ddab444a Common: Switch fp shuffle/insert/extract instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
1222270e44 Common: Switch simd integer bitwise instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
86b5de8785 Common: Switch simd integer compare instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
e97f03ed8b Common: Disable clang-format on simd.cpp
It's breaking all the formatting
2025-08-24 20:16:24 -05:00
TellowKrinkle
0a76c5a64d Common: Switch fp compare instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
01a1b017e8 Common: Switch hadd/dp/round instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
ddefb8a393 Common: Switch pabs/psign/pmadd instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
62a5cd98da Common: Switch sqrt/rsqrt/andn instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
8ad9d7d047 Common: Switch SIMD padd/pmul instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
10ed797881 Common: Switch SIMD shift instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
23918e25c2 Common: Switch CVT instructions to auto SSE/AVX 2025-08-24 20:16:24 -05:00
TellowKrinkle
de022ab68d Common: Add auto-switching AVX/SSE emitter functions 2025-08-24 20:16:24 -05:00
TellowKrinkle
5561884126 Use MultiISA CPU detection for rec
Allows us to use overrides to test older ISA codegen on newer computers
2025-08-24 20:16:24 -05:00
PCSX2 Bot
406d7468dd [ci skip] Qt: Update Base Translation. 2025-08-25 02:03:22 +02:00
JordanTheToaster
41124994fa GameDB: Onimusha Dawn of Dreams fixes 2025-08-25 01:53:34 +02:00
JordanTheToaster
c4e048eedf GameDB: Meet the Robinsons fixes 2025-08-24 22:05:56 +02:00
lightningterror
eff9b4167c GS/HW: Partially remove GSC_UrbanReign that skips draws.
Fixes lightning issues, tex in rt properly fixes the black rain/lightning.
2025-08-24 21:23:47 +02:00
xujibbs
47931a0689 Debugger: Update description in breakpoint model to be translatable. (#13172) 2025-08-24 18:39:33 +02:00
JohnSmith774
34ca40fa2a GameDB: Add memcard filters for Gundam series (Limited Edition).
Add a memcard filter to the following games.

Mobile Suit Gundam - Meguriai Sora [Limited Edition]
Mobile Suit Gundam Ver.1.5 [Limited Edition]
2025-08-24 02:35:08 +02:00
PCSX2 Bot
821f732ff9 [ci skip] Qt: Update Base Translation. 2025-08-24 02:33:45 +02:00
TheLastRar
54c8ef7ee6 FSUI: Don't attempt to translate savestate load error
It wouldn't have worked anyway
2025-08-23 10:15:27 -04:00
chaoticgd
dc9e531cb1 Qt: Fix various settings window layout issues 2025-08-21 19:04:57 -04:00
chaoticgd
2bd151e6f2 Qt: Improve logic for calculating settings widget margins 2025-08-21 19:04:57 -04:00
chaoticgd
ae084643c4 Qt: Refactor the remaining settings widgets 2025-08-21 19:04:57 -04:00
chaoticgd
bd1b91b862 Qt: Refactor graphics settings widget 2025-08-21 19:04:57 -04:00
chaoticgd
f221c85e17 Qt: Refactor debug settings widget 2025-08-21 19:04:57 -04:00
dependabot[bot]
e2fe93e403 [ci skip] Bump the ci-deps group across 1 directory with 2 updates (#13150)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 18:54:16 -04:00
JordanTheToaster
f98e23f061 GameDB: Various fixes 2025-08-21 18:51:54 -04:00
Gd7
18f6518d41 GameDB: Final Fantasy X FMV Fix.
Added preloadFrameData to the gamedb for every version of Final Fantasy X as well as removing the obsolete SoftwareRendererFMVHack setting.
2025-08-21 19:38:19 +02:00
JordanTheToaster
74598b3055 GameDB: DQV Mount Evil camera fixes 2025-08-20 23:56:12 +02:00
TJnotJT
6159cd4114 GS/SW: Fix bbox computation in SW draw().
The bbox was missing right/bottom pixels if they were exactly on a pixel center (exact integer). Removed the extra check for 0 width/height bbox for lines/points since they are no longer needed (the bbox will always be at least 1 pixel now). Appears to only affect the SW rasterizer when the bbox right/bottom end point is a multiple of 16 (SW rasterizer allocates scanlines to threads in blocks of 16).
2025-08-20 23:55:49 +02:00
TJnotJT
3c70d7f575 GS/HW: Handle texture shuffle sprite not 16-pixel-multiple wide. 2025-08-20 21:53:55 +02:00
JordanTheToaster
bd70f1ca4a GameDB: Summoner missing shadows fix 2025-08-19 19:42:13 +02:00
PCSX2 Bot
0e67507d3a [ci skip] PAD: Update to latest controller database. 2025-08-18 19:08:52 +02:00
KamFretoZ
beab573758 GameDB: Pac-Man Rally Fixes 2025-08-18 13:50:15 +02:00
TheLastRar
e46890fd76 FSUI: Use ImGui::Shortcut for most input handling 2025-08-16 03:29:21 +02:00
TheLastRar
3888638f8c FSUI: Don't move IMGUI cursor unnecessarily in DrawSaveStateSelector() 2025-08-16 03:29:21 +02:00
Flávio Sousa
44778c374f Achievements: Move notification position setting to "Notifications" section 2025-08-16 03:27:48 +02:00
Flávio Sousa
207d4df5e7 Achievements: Add in-game leaderboard overlays toggle 2025-08-16 03:27:48 +02:00
1538 changed files with 416709 additions and 275215 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,4 @@
# These are supported funding model platforms
github: [PCSX2]
liberapay: PCSX2

View File

@@ -59,7 +59,7 @@ body:
attributes:
label: PCSX2 Revision
description: "Please ensure you are on the latest version before making an issue"
placeholder: "Example: v1.7.1337"
placeholder: "Example: v2.5.374"
validations:
required: true
- type: dropdown

View File

@@ -76,7 +76,7 @@ body:
attributes:
label: PCSX2 Revision
description: "We only accept bug reports for the latest dev version. Please try upgrading before making an issue."
placeholder: "Example: v1.7.1337"
placeholder: "Example: v2.5.374"
validations:
required: true
- type: dropdown

11
.github/labeler.yml vendored
View File

@@ -22,6 +22,10 @@
- '3rdparty/**/*'
- '**/3rdpartyDeps.props'
- '.gitmodules'
'requires-win-deps-build':
- changed-files:
- any-glob-to-any-file:
- '.github/workflows/scripts/windows/*'
'Documentation':
- changed-files:
- any-glob-to-any-file:
@@ -36,6 +40,13 @@
- 'pcsx2-qt/**/*'
- '3rdparty/Qt/*'
- '3rdparty/Qt/**/*'
'OSD / ImGui':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/ImGui/*'
- 'pcsx2/ImGui/**/*'
- '3rdparty/imgui/*'
- '3rdparty/imgui/**/*'
'GameDB':
- changed-files:
- any-glob-to-any-file:

View File

@@ -4,6 +4,17 @@ on:
schedule:
- cron: "0 0 * * *" # Every day at 12am UTC.
workflow_dispatch: # As well as manually.
inputs:
stableBuild:
description: 'Build stable version'
required: false
type: boolean
default: false
publish:
description: 'Publish to Flathub'
required: false
type: boolean
default: true
jobs:
@@ -52,8 +63,8 @@ jobs:
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
publish: true
publish: ${{ inputs.publish || true }}
fetchTags: true
stableBuild: false
stableBuild: ${{ inputs.stableBuild || false }}
secrets: inherit

View File

@@ -11,13 +11,13 @@ jobs:
name: "Update Base Translation"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Update Base Translation
run: ./.github/workflows/scripts/common/update_base_translation.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
with:
title: "Qt: Update Base Translation"
commit-message: "[ci skip] Qt: Update Base Translation."

View File

@@ -9,7 +9,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get Latest DB and Prepare DB File
run: |
@@ -19,7 +19,7 @@ jobs:
mv ./game_controller_db.txt ${{github.workspace}}/bin/resources/game_controller_db.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
with:
title: "PAD: Update to latest controller database"
commit-message: "[ci skip] PAD: Update to latest controller database."

View File

@@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install Packages
run: |
npm install -g ajv-cli prettier
sudo apt-get -y install yamllint
pip install yamllint
- name: Validate YAML
run: |

View File

@@ -45,13 +45,13 @@ jobs:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.7
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.9
options: --privileged
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
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
@@ -93,7 +93,7 @@ jobs:
- name: Build Flatpak (beta)
if: ${{ inputs.stableBuild == false || inputs.stableBuild == 'false' }}
uses: flatpak/flatpak-github-actions/flatpak-builder@10a3c29f0162516f0f68006be14c92f34bd4fa6c
uses: flatpak/flatpak-github-actions/flatpak-builder@92ae9851ad316786193b1fd3f40c4b51eb5cb101
with:
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
upload-artifact: false
@@ -109,7 +109,7 @@ jobs:
- name: Build Flatpak (stable)
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
uses: flatpak/flatpak-github-actions/flatpak-builder@10a3c29f0162516f0f68006be14c92f34bd4fa6c
uses: flatpak/flatpak-github-actions/flatpak-builder@92ae9851ad316786193b1fd3f40c4b51eb5cb101
with:
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
upload-artifact: false
@@ -129,7 +129,7 @@ jobs:
- name: Push to Flathub (beta)
if: ${{ inputs.publish == true && (inputs.stableBuild == false || inputs.stableBuild == 'false') }}
uses: flatpak/flatpak-github-actions/flat-manager@10a3c29f0162516f0f68006be14c92f34bd4fa6c
uses: flatpak/flatpak-github-actions/flat-manager@92ae9851ad316786193b1fd3f40c4b51eb5cb101
with:
flat-manager-url: https://hub.flathub.org/
repository: beta
@@ -138,7 +138,7 @@ jobs:
- name: Push to Flathub (stable)
if: ${{ inputs.publish == true && (inputs.stableBuild == true || inputs.stableBuild == 'true') }}
uses: flatpak/flatpak-github-actions/flat-manager@10a3c29f0162516f0f68006be14c92f34bd4fa6c
uses: flatpak/flatpak-github-actions/flat-manager@92ae9851ad316786193b1fd3f40c4b51eb5cb101
with:
flat-manager-url: https://hub.flathub.org/
repository: stable
@@ -153,7 +153,7 @@ jobs:
mv "./${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak" "$GITHUB_WORKSPACE"/ci-artifacts/
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -55,11 +55,11 @@ jobs:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 500M
CCACHE_MAXSIZE: 100M
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -92,7 +92,7 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
@@ -104,24 +104,24 @@ jobs:
sudo tools/retry.sh apt-add-repository -n 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo tools/retry.sh apt-get update
sudo tools/retry.sh apt-get -y install \
build-essential ccache clang-17 cmake curl extra-cmake-modules git libasound2-dev libaio-dev libavcodec-dev libavformat-dev libavutil-dev \
build-essential ccache clang-17 cmake curl extra-cmake-modules git libasound2-dev libaio-dev \
libcurl4-openssl-dev libdbus-1-dev libdecor-0-dev libegl-dev libevdev-dev libfontconfig-dev libfreetype-dev libfuse2 libgtk-3-dev libgudev-1.0-dev \
libharfbuzz-dev libinput-dev libopengl-dev libpcap-dev libpipewire-0.3-dev libpulse-dev libssl-dev libswresample-dev libswscale-dev libudev-dev \
libwayland-dev libx11-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-cursor-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-icccm4-dev \
libharfbuzz-dev libinput-dev libopengl-dev libopus-dev libpcap-dev libpipewire-0.3-dev libpulse-dev libssl-dev libudev-dev libva-dev libvpl2 libvpl-dev \
libwayland-dev libx11-dev libx11-xcb-dev libx264-dev libxcb1-dev libxcb-composite0-dev libxcb-cursor-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-icccm4-dev \
libxcb-image0-dev libxcb-keysyms1-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev \
libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev libxcb-xfixes0-dev libxcb-xinput-dev libxcb-xkb-dev libxext-dev libxkbcommon-x11-dev libxrandr-dev \
lld-17 llvm-17 ninja-build patchelf pkg-config zlib1g-dev
lld-17 llvm-17 nasm ninja-build patchelf pkg-config zlib1g-dev
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh', '.github/workflows/scripts/common/*.patch') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .github/workflows/scripts/linux/build-dependencies-qt.sh "$HOME/deps"
run: BUILD_FFMPEG=1 .github/workflows/scripts/linux/build-dependencies-qt.sh "$HOME/deps"
- name: Download patches
run: |
@@ -174,7 +174,7 @@ jobs:
- name: Upload artifact
if: inputs.buildAppImage == true
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -12,7 +12,7 @@ on:
os:
required: false
type: string
default: macos-15
default: macos-26
patchesUrl:
required: false
type: string
@@ -42,13 +42,13 @@ jobs:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 500M
CCACHE_MAXSIZE: 100M
# Only way to use a secret in an if statement
SIGN_KEY: ${{ secrets.APPLE_SIGN_P12_B64 }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
@@ -62,8 +62,11 @@ jobs:
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Use Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- name: Use Xcode 26.0.1
run: sudo xcode-select -s /Applications/Xcode_26.0.1.app
- name: Install Metal Toolchain
run: xcodebuild -downloadComponent MetalToolchain
- name: Prepare Artifact Metadata
id: artifact-metadata
@@ -88,10 +91,10 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/deps
key: ${{ inputs.os }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh', '.github/workflows/scripts/common/*.patch') }}
key: ${{ inputs.os }} deps ${{ hashFiles('.github/workflows/scripts/macos/*', '.github/workflows/scripts/common/*.patch') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -109,7 +112,7 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: Cache ccache cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: .ccache
key: ${{ inputs.os }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
@@ -194,7 +197,7 @@ jobs:
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" ci-artifacts/macOS.tar.xz
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: "*.tar.xz"

View File

@@ -12,7 +12,7 @@ on:
- master
workflow_dispatch:
inputs:
is_prelease:
is_prerelease:
description: 'Should be a pre-release?'
required: true
default: 'true'
@@ -35,7 +35,7 @@ jobs:
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
@@ -68,16 +68,16 @@ jobs:
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
- name: Create a GitHub Release (Manual)
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
if: steps.tag_version.outputs.new_tag && github.event_name == 'workflow_dispatch'
with:
body_path: ./release-notes.md
draft: true
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.is_prelease == 'true' }}
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.is_prerelease == 'true' }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}
- name: Create a GitHub Release (Push)
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
if: steps.tag_version.outputs.new_tag && github.event_name != 'workflow_dispatch'
with:
body_path: ./release-notes.md
@@ -100,7 +100,7 @@ jobs:
cmakeflags: ""
buildAppImage: true
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prerelease == 'false' }}
secrets: inherit
build_linux_flatpak:
@@ -114,9 +114,9 @@ jobs:
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang
cmakeflags: ""
publish: false
publish: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prerelease == 'false' }} # prerelease builds are published by the cron job
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
stableBuild: ${{ inputs.is_prerelease == 'false' }}
secrets: inherit
# Windows
@@ -133,7 +133,7 @@ jobs:
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prerelease == 'false' }}
secrets: inherit
# MacOS
@@ -147,7 +147,7 @@ jobs:
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prerelease == 'false' }}
sign_and_notarize: true
secrets: inherit
@@ -163,12 +163,12 @@ jobs:
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Prepare Artifact Folder
run: mkdir ./ci-artifacts/
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
name: Download all Artifacts
with:
path: ./ci-artifacts/
@@ -203,7 +203,7 @@ jobs:
echo "TAG_VAL=${TAG_VAL}"
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: 22

View File

@@ -1,13 +0,0 @@
diff --git a/src/core/indicators/ClassicDropIndicatorOverlay.h b/src/core/indicators/ClassicDropIndicatorOverlay.h
index 2dfb9718a..9b01f002e 100644
--- a/src/core/indicators/ClassicDropIndicatorOverlay.h
+++ b/src/core/indicators/ClassicDropIndicatorOverlay.h
@@ -11,7 +11,7 @@
#pragma once
-#include "core/DropIndicatorOverlay.h"
+#include <kddockwidgets/core/DropIndicatorOverlay.h>
namespace KDDockWidgets {

View File

@@ -0,0 +1,60 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bace076..bfb1c66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,10 @@ endif ()
find_package(Qt${APNG_QT_VERSION} REQUIRED COMPONENTS Core Gui)
+set(CMAKE_FIND_FRAMEWORK NEVER)
+find_package(PNG 1.6.40 REQUIRED)
+find_package(ZLIB REQUIRED)
+
add_subdirectory(src)
if(APNG_TESTS)
diff --git a/cmake/FindZLib.cmake b/cmake/FindZLib.cmake
deleted file mode 100644
index f8e9220..0000000
--- a/cmake/FindZLib.cmake
+++ /dev/null
@@ -1 +0,0 @@
-add_library(ZLIB::ZLIB ALIAS zlibstatic) # use our zlib
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 697df95..0e89371 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,2 +1 @@
-add_subdirectory(3rdparty EXCLUDE_FROM_ALL)
add_subdirectory(plugins)
diff --git a/src/plugins/imageformats/apng/CMakeLists.txt b/src/plugins/imageformats/apng/CMakeLists.txt
index e1b3fd9..72164fb 100644
--- a/src/plugins/imageformats/apng/CMakeLists.txt
+++ b/src/plugins/imageformats/apng/CMakeLists.txt
@@ -14,13 +14,10 @@ target_sources(ApngImagePlugin PRIVATE ${APNG_SOURCES})
target_link_libraries(ApngImagePlugin PRIVATE
Qt${APNG_QT_VERSION}::Core
Qt${APNG_QT_VERSION}::Gui
- png_static
- zlibstatic
+ PNG::PNG
+ ZLIB::ZLIB
)
-get_target_property(_png_include png_static INCLUDE_DIRECTORIES)
-target_include_directories(ApngImagePlugin PRIVATE ${_png_include})
-
target_compile_definitions(ApngImagePlugin PRIVATE
QT_DEPRECATED_WARNINGS
QT_ASCII_CAST_WARNINGS
@@ -31,3 +28,10 @@ set_target_properties(ApngImagePlugin PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins/imageformats"
LIBRARY_OUTPUT_NAME qapng
)
+
+install(TARGETS ApngImagePlugin DESTINATION "plugins/imageformats")
+
+if(WIN32 AND MSVC)
+ set_target_properties(ApngImagePlugin PROPERTIES DEBUG_POSTFIX d)
+ install(FILES $<TARGET_PDB_FILE:ApngImagePlugin> DESTINATION "plugins/imageformats" OPTIONAL)
+endif()

View File

@@ -41,21 +41,12 @@ 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=(
'libwayland-client.so*'
'libwayland-cursor.so*'
'libwayland-egl.so*'
)
set -e
LINUXDEPLOY=./linuxdeploy-x86_64.AppImage
@@ -80,18 +71,6 @@ 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=()
for lib in "${MANUAL_LIBS[@]}"; do
@@ -130,7 +109,7 @@ echo "Running linuxdeploy to create AppDir..."
# Interestingly, specifying the module doesn't copy the module, only the required plugins for it
# https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/160#issuecomment-2655543893
EXTRA_QT_MODULES="core;gui;svg;waylandclient;waylandcompositor;widgets;xcbqpa" \
EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
EXTRA_PLATFORM_PLUGINS="libqwayland.so" \
DEPLOY_PLATFORM_THEMES="1" \
QMAKE="$DEPSDIR/bin/qmake" \
NO_STRIP="1" \
@@ -140,16 +119,6 @@ $LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt
echo "Copying resources into AppDir..."
cp -a "$BUILDDIR/bin/resources" "$OUTDIR/usr/bin"
# Why do we have to manually remove these libs? Because the linuxdeploy Qt plugin
# copies them, not the "main" linuxdeploy binary, and plugins don't inherit the
# include list...
for lib in "${REMOVE_LIBS[@]}"; do
for libpath in $(find "$OUTDIR/usr/lib" -name "$lib"); do
echo " Removing problematic library ${libpath}."
rm -f "$libpath"
done
done
# Restore unstripped deps (for cache).
rm -fr "$DEPSDIR"
mv "$DEPSDIR.bak" "$DEPSDIR"

View File

@@ -7,6 +7,10 @@ if [ "$#" -ne 1 ]; then
exit 1
fi
# The bundled ffmpeg has a lot of things disabled to reduce code size.
# Users may want to use system ffmpeg for additional features
: ${BUILD_FFMPEG:=0}
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
NPROCS="$(getconf _NPROCESSORS_ONLN)"
INSTALLDIR="$1"
@@ -14,50 +18,61 @@ if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
FREETYPE=2.13.3
HARFBUZZ=11.2.0
FFMPEG=8.0
FREETYPE=2.14.1
HARFBUZZ=12.2.0
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
LIBJPEGTURBO=3.1.1
LIBPNG=1.6.50
LIBJPEGTURBO=3.1.2
LIBPNG=1.6.53
LIBWEBP=1.6.0
SDL=SDL3-3.2.20
QT=6.9.1
NVENC=13.0.19.0
SDL=SDL3-3.4.0
QT=6.10.1
QTAPNG=1.3.0
LZ4=1.10.0
VULKAN=1.4.328.1
ZSTD=1.5.7
KDDOCKWIDGETS=2.2.3
PLUTOVG=1.3.0
KDDOCKWIDGETS=2.4.0
PLUTOVG=1.3.2
PLUTOSVG=0.0.7
SHADERC=2025.3
SHADERC_GLSLANG=efd24d75bcbc55620e759f6bf42c45a32abac5f8
SHADERC_SPIRVHEADERS=2a611a970fdbc41ac2e3e328802aed9985352dca
SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
SHADERC=2025.4
SHADERC_GLSLANG=7a47e2531cb334982b2a2dd8513dca0a3de4373d
SHADERC_SPIRVHEADERS=b824a462d4256d720bebb40e78b9eb8f78bbb305
SHADERC_SPIRVTOOLS=971a7b6e8d7740035bbff089bbbf9f42951ecfd5
mkdir -p deps-build
cd deps-build
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
cat > SHASUMS <<EOF
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
f63fc519f150465bd0bdafcdf3d0e9c23474f4c474171cd515ea1b3a72c081fb harfbuzz-$HARFBUZZ.tar.gz
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
aadc97ea91f6ef078b0ae3a62bba69e008d9a7db19b34e4ac973b19b71b4217c libjpeg-turbo-$LIBJPEGTURBO.tar.gz
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4 libpng-$LIBPNG.tar.xz
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8 $SDL.tar.gz
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
13da39edb3a40ed9713ae390ca89faa2f1202c9dda869ef306a8d4383e242bee nv-codec-headers-$NVENC.tar.gz
c465aa56757e7746ac707f582b6e2d51546569a4a2488c1172fb543aa5fdfc2c vulkan-sdk-$VULKAN.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
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
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
8148408380ffea03101a26305c812b612ea30dbc07121e58707601522404d49b qttools-everywhere-src-$QT.tar.xz
8e49a2df88a12c376a479ae7bd272a91cf57ebb4e7c0cf7341b3565df99d2314 qttranslations-everywhere-src-$QT.tar.xz
49bf6db800227a6b2c971f4c5d03dd1e81297e7ffb296ce4a96437304f27cb13 qtwayland-everywhere-src-$QT.tar.xz
f1d3be3489f758efe1a8f12118a212febbe611aa670af32e0159fa3c1feab2a6 QtApng-$QTAPNG.tar.gz
8a89fb6612ace8954470aae004623374a8fc8b7a34a4277bee5527173b064faf shaderc-$SHADERC.tar.gz
272d2725b140e09e85b96eecdc59c2e00c1a14cda2301767e1bf3c363a44b931 shaderc-glslang-$SHADERC_GLSLANG.tar.gz
c693867f10a7760ef1bcf85419d51783586768cc2c601d03841bc6a8b2554b9c shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
06b0a042f2e121e954badb4fd78c9e2d4bc7ed6087eceb26ab559c23cf94334f shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
51dbf24fe72e43dd7cb9a289d3cab47112010f1a2ed69b6fc8ac0dff31991ed2 KDDockWidgets-$KDDOCKWIDGETS.tar.gz
7bd4e79ce18b1d47517e7e91fbb7cf19d4f01942804a519bc7c0bf32b6325dd5 plutovg-$PLUTOVG.tar.gz
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
EOF
@@ -67,16 +82,21 @@ curl -L \
-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" \
-O "https://download.sourceforge.net/libpng-apng/libpng-$LIBPNG-apng.patch.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-$VULKAN.tar.gz" \
-O "https://github.com/FFmpeg/nv-codec-headers/releases/download/n$NVENC/nv-codec-headers-$NVENC.tar.gz" \
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz" \
-o "QtApng-$QTAPNG.tar.gz" "https://github.com/jurplel/QtApng/archive/refs/tags/$QTAPNG.tar.gz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
@@ -87,6 +107,37 @@ curl -L \
shasum -a 256 --check SHASUMS
if [ "$BUILD_FFMPEG" -ne 0 ]; then
echo "Installing vulkan headers..."
rm -fr "Vulkan-Headers-vulkan-sdk-$VULKAN"
tar xf "vulkan-sdk-$VULKAN.tar.gz"
cd "Vulkan-Headers-vulkan-sdk-$VULKAN"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
make -C build install
cd ..
echo "Installing nvenc headers..."
rm -fr "nv-codec-headers-$NVENC"
tar xf "nv-codec-headers-$NVENC.tar.gz"
make -C "nv-codec-headers-$NVENC" PREFIX="$INSTALLDIR" install
echo "Installing FFmpeg..."
rm -fr "ffmpeg-$FFMPEG"
tar xf "ffmpeg-$FFMPEG.tar.xz"
cd "ffmpeg-$FFMPEG"
CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
./configure --prefix="$INSTALLDIR" \
--disable-all --disable-autodetect --disable-static --enable-shared \
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \
--enable-gpl --enable-libx264 --enable-libopus --enable-vulkan --enable-ffnvcodec --enable-nvenc --enable-vaapi --enable-libvpl \
--enable-encoder=ffv1,qtrle,libx264*,aac,flac,libopus,pcm_s16be,pcm_s16le,*_vulkan,*_qsv,*_nvenc,*_vaapi \
--enable-muxer=avi,matroska,mov,mp3,mp4,wav \
--enable-protocol=file
make "-j$NPROCS"
make install
cd ..
fi
echo "Building libbacktrace..."
rm -fr "libbacktrace-$LIBBACKTRACE"
unzip "$LIBBACKTRACE.zip"
@@ -99,7 +150,9 @@ cd ..
echo "Building libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
gunzip -d -f "libpng-$LIBPNG-apng.patch.gz"
cd "libpng-$LIBPNG"
patch -p1 < "../libpng-$LIBPNG-apng.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
@@ -109,7 +162,9 @@ echo "Building libjpegturbo..."
rm -fr "libjpeg-turbo-$LIBJPEGTURBO"
tar xf "libjpeg-turbo-$LIBJPEGTURBO.tar.gz"
cd "libjpeg-turbo-$LIBJPEGTURBO"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -B build -G Ninja
# On non debian or debian based Linux systems, libjpeg-turbo will set CMAKE_INSTALL_DEFAULT_LIBDIR "lib64" (or libx32)
# That will prevent CMake from finding the deps libjpeg later on. if we set CMAKE_INSTALL_DEFAULT_LIBDIR, libjpeg-turbo will leave it as is, so set it to "lib"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DENABLE_STATIC=OFF -DENABLE_SHARED=ON -DCMAKE_INSTALL_DEFAULT_LIBDIR="lib" -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
@@ -156,7 +211,9 @@ 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
# Add an SOVERSION to match system harfbuzz
sed -i 's/PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)/PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE SOVERSION 0)/g' CMakeLists.txt
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 -DHB_HAVE_GOBJECT=ON -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
@@ -174,7 +231,7 @@ echo "Building SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
cd "$SDL"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -DSDL_X11_XSCRNSAVER=OFF -DSDL_TESTS=OFF -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
@@ -190,7 +247,7 @@ tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
mkdir build
cd build
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- --log-level=STATUS -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
cmake --build . --parallel
ninja install
cd ../../
@@ -250,11 +307,20 @@ cmake --build . --parallel
ninja install
cd ../../
echo "Building Qt APNG..."
rm -fr "QtApng-$QTAPNG"
tar xf "QtApng-$QTAPNG.tar.gz"
cd "QtApng-$QTAPNG"
patch -p1 < "$SCRIPTDIR/../common/qtapng-cmake.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building KDDockWidgets..."
rm -fr "KDDockWidgets-$KDDOCKWIDGETS"
tar xf "KDDockWidgets-$KDDOCKWIDGETS.tar.gz"
cd "KDDockWidgets-$KDDOCKWIDGETS"
patch -p1 < "$SCRIPTDIR/../common/kddockwidgets-dodgy-include.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets -B build -G Ninja
cmake --build build --parallel
ninja -C build install

View File

@@ -0,0 +1,196 @@
#!/usr/bin/env bash
set -e
if [ "$#" -ne 1 ]; then
echo "Syntax: $0 <output directory>"
exit 1
fi
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
NPROCS="$(getconf _NPROCESSORS_ONLN)"
INSTALLDIR="$1"
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
FREETYPE=2.14.1
HARFBUZZ=12.2.0
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
LIBPNG=1.6.51
LIBWEBP=1.6.0
SDL=SDL3-3.2.26
LZ4=1.10.0
ZSTD=1.5.7
PLUTOVG=1.3.2
PLUTOSVG=0.0.7
SHADERC=2025.4
SHADERC_GLSLANG=7a47e2531cb334982b2a2dd8513dca0a3de4373d
SHADERC_SPIRVHEADERS=b824a462d4256d720bebb40e78b9eb8f78bbb305
SHADERC_SPIRVTOOLS=971a7b6e8d7740035bbff089bbbf9f42951ecfd5
mkdir -p deps-build
cd deps-build
cat > SHASUMS <<EOF
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
f63fc519f150465bd0bdafcdf3d0e9c23474f4c474171cd515ea1b3a72c081fb harfbuzz-$HARFBUZZ.tar.gz
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
a050a892d3b4a7bb010c3a95c7301e49656d72a64f1fc709a90b8aded192bed2 libpng-$LIBPNG.tar.xz
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2 $SDL.tar.gz
9c16ec5654be709f062a705d0c6f529193f1c2123fe7f102fda6733913689023 libpng-$LIBPNG-apng.patch.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
8a89fb6612ace8954470aae004623374a8fc8b7a34a4277bee5527173b064faf shaderc-$SHADERC.tar.gz
272d2725b140e09e85b96eecdc59c2e00c1a14cda2301767e1bf3c363a44b931 shaderc-glslang-$SHADERC_GLSLANG.tar.gz
c693867f10a7760ef1bcf85419d51783586768cc2c601d03841bc6a8b2554b9c shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
06b0a042f2e121e954badb4fd78c9e2d4bc7ed6087eceb26ab559c23cf94334f shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
7bd4e79ce18b1d47517e7e91fbb7cf19d4f01942804a519bc7c0bf32b6325dd5 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://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://download.sourceforge.net/libpng-apng/libpng-$LIBPNG-apng.patch.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz" \
-o "plutovg-$PLUTOVG.tar.gz" "https://github.com/sammycage/plutovg/archive/v$PLUTOVG.tar.gz" \
-o "plutosvg-$PLUTOSVG.tar.gz" "https://github.com/sammycage/plutosvg/archive/v$PLUTOSVG.tar.gz"
shasum -a 256 --check SHASUMS
echo "Building libbacktrace..."
rm -fr "libbacktrace-$LIBBACKTRACE"
unzip "$LIBBACKTRACE.zip"
cd "libbacktrace-$LIBBACKTRACE"
./configure --prefix="$INSTALLDIR"
make
make install
cd ..
echo "Building libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
gunzip -d -f "libpng-$LIBPNG-apng.patch.gz"
cd "libpng-$LIBPNG"
patch -p1 < "../libpng-$LIBPNG-apng.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building LZ4..."
rm -fr "lz4-$LZ4"
tar xf "lz4-$LZ4.tar.gz"
cd "lz4-$LZ4"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir -G Ninja build/cmake
cmake --build build-dir --parallel
ninja -C build-dir install
cd ..
echo "Building Zstandard..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=OFF -DZSTD_BUILD_PROGRAMS=OFF -B build -G Ninja build/cmake
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 WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -B build -G Ninja \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
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"
cd "$SDL"
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building PlutoVG..."
rm -fr "plutovg-$PLUTOVG"
tar xf "plutovg-$PLUTOVG.tar.gz"
cd "plutovg-$PLUTOVG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
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=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Building shaderc..."
rm -fr "shaderc-$SHADERC"
tar xf "shaderc-$SHADERC.tar.gz"
cd "shaderc-$SHADERC"
cd third_party
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
mv "glslang-$SHADERC_GLSLANG" "glslang"
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
cd ..
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
echo "Cleaning up..."
cd ..
rm -r deps-build

View File

@@ -14,8 +14,8 @@
"sources": [
{
"type": "archive",
"url": "https://libsdl.org/release/SDL3-3.2.20.tar.gz",
"sha256": "467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67"
"url": "https://libsdl.org/release/SDL3-3.4.0.tar.gz",
"sha256": "082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8"
}
],
"cleanup": [

View File

@@ -15,24 +15,24 @@
{
"type": "git",
"url": "https://github.com/google/shaderc.git",
"commit": "8c2e602ce440b7739c95ff3d69cecb1adf6becda"
"commit": "73743588fe9c39f2f1c780a087d94afac691a189"
},
{
"type": "archive",
"url": "https://github.com/KhronosGroup/glslang/archive/efd24d75bcbc55620e759f6bf42c45a32abac5f8.tar.gz",
"sha256": "9427deccbdf4bde6a269938df38c6bd75247493786a310d8d733a2c82065ef47",
"url": "https://github.com/KhronosGroup/glslang/archive/7a47e2531cb334982b2a2dd8513dca0a3de4373d.tar.gz",
"sha256": "272d2725b140e09e85b96eecdc59c2e00c1a14cda2301767e1bf3c363a44b931",
"dest": "third_party/glslang"
},
{
"type": "archive",
"url": "https://github.com/KhronosGroup/SPIRV-Headers/archive/2a611a970fdbc41ac2e3e328802aed9985352dca.tar.gz",
"sha256": "c2225a49c3d7efa5c4f4ce4a6b42081e6ea3daca376f3353d9d7c2722d77a28a",
"url": "https://github.com/KhronosGroup/SPIRV-Headers/archive/b824a462d4256d720bebb40e78b9eb8f78bbb305.tar.gz",
"sha256": "c693867f10a7760ef1bcf85419d51783586768cc2c601d03841bc6a8b2554b9c",
"dest": "third_party/spirv-headers"
},
{
"type": "archive",
"url": "https://github.com/KhronosGroup/SPIRV-Tools/archive/33e02568181e3312f49a3cf33df470bf96ef293a.tar.gz",
"sha256": "44d1005880c583fc00a0fb41c839214c68214b000ea8dcb54d352732fee600ff",
"url": "https://github.com/KhronosGroup/SPIRV-Tools/archive/971a7b6e8d7740035bbff089bbbf9f42951ecfd5.tar.gz",
"sha256": "06b0a042f2e121e954badb4fd78c9e2d4bc7ed6087eceb26ab559c23cf94334f",
"dest": "third_party/spirv-tools"
},
{

View File

@@ -14,13 +14,9 @@
{
"type": "git",
"url": "https://github.com/KDAB/KDDockWidgets.git",
"tag": "v2.2.3",
"commit": "28d16d0431d7cdc9f36cb619d22621146fdfab44",
"tag": "v2.3.0",
"commit": "c38711026e17e34916dd82c6fcbdcc0d2342f541",
"disable-submodules": true
},
{
"type": "patch",
"path": "../../../common/kddockwidgets-dodgy-include.patch"
}
],
"cleanup": [

View File

@@ -13,8 +13,8 @@
{
"type": "git",
"url": "https://github.com/sammycage/plutovg.git",
"tag": "v1.3.0",
"commit": "1596f459d6796b37f3f6d610ce598de2403350b5"
"tag": "v1.3.2",
"commit": "5695a711dd1cff1f01fa6542f3fe6a15de082c63"
}
],
"cleanup": [

View File

@@ -0,0 +1,46 @@
{
"name": "libpng",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DPNG_TESTS=OFF",
"-DPNG_STATIC=OFF",
"-DPNG_SHARED=ON",
"-DPNG_TOOLS=OFF"
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "archive",
"url": "https://downloads.sourceforge.net/project/libpng/libpng16/1.6.53/libpng-1.6.53.tar.xz",
"sha256": "1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4"
},
{
"type": "file",
"url": "https://download.sourceforge.net/libpng-apng/libpng-1.6.53-apng.patch.gz",
"dest-filename": "libpng-1.6.53-apng.patch.gz",
"sha256": "452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c"
},
{
"type": "shell",
"commands":
[
"gunzip -f libpng-1.6.53-apng.patch.gz",
"patch -p1 < \"libpng-1.6.53-apng.patch\""
]
}
],
"cleanup": [
"/bin",
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/libpng",
"/lib/pkgconfig",
"/share/man"
]
}

View File

@@ -0,0 +1,29 @@
{
"name": "qtapng",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_PREFIX_PATH=\"${FLATPAK_DEST}\""
],
"build-options": {
"strip": true
},
"sources": [
{
"type": "git",
"url": "https://github.com/jurplel/QtApng.git",
"tag": "1.3.0",
"commit": "bd15516b281204e90ecd5b80b00d1274b062f5fc"
},
{
"type": "patch",
"path": "../../../common/qtapng-cmake.patch"
}
],
"cleanup": [
"/plugins"
],
"post-install": [
"mv ${FLATPAK_DEST}/plugins/* ${FLATPAK_DEST}/bin/"
]
}

View File

@@ -1,15 +1,15 @@
{
"app-id": "net.pcsx2.PCSX2",
"runtime": "org.kde.Platform",
"runtime-version": "6.9",
"runtime-version": "6.10",
"sdk": "org.kde.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.llvm18"
"org.freedesktop.Sdk.Extension.llvm20"
],
"add-extensions": {
"org.freedesktop.Platform.ffmpeg-full": {
"directory": "lib/ffmpeg",
"version": "24.08",
"version": "25.08",
"add-ld-path": ".",
"autodownload": true
}
@@ -22,7 +22,8 @@
"--socket=wayland",
"--socket=fallback-x11",
"--socket=pulseaudio",
"--talk-name=org.freedesktop.ScreenSaver"
"--talk-name=org.freedesktop.ScreenSaver",
"--filesystem=xdg-run/gamescope-0:ro"
],
"modules": [
"modules/10-libpcap.json",
@@ -32,6 +33,8 @@
"modules/23-kddockwidgets.json",
"modules/24-plutovg.json",
"modules/25-plutosvg.json",
"modules/26-libpng.json",
"modules/27-qtapng.json",
{
"name": "pcsx2",
"buildsystem": "cmake-ninja",
@@ -45,10 +48,11 @@
"cxxflags": "",
"cxxflags-override": true,
"config-opts": [
"-DCMAKE_PREFIX_PATH=\"${FLATPAK_DEST}\"",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON",
"-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm18/bin/clang",
"-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm18/bin/clang++",
"-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm20/bin/clang",
"-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm20/bin/clang++",
"-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld",
"-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld",

View File

@@ -20,7 +20,7 @@
<url type="donation">https://github.com/sponsors/PCSX2</url>
<url type="faq">https://pcsx2.net/docs/</url>
<url type="help">https://pcsx2.net/discord</url>
<url type="contribute">https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md</url>
<url type="contribute">https://pcsx2.net/docs/category/contributing</url>
<url type="translate">https://crowdin.com/project/pcsx2-emulator</url>
<url type="contact">https://mastodon.social/@PCSX2</url>
<screenshots>

View File

@@ -38,25 +38,26 @@ if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
FREETYPE=2.13.3
HARFBUZZ=11.2.0
SDL=SDL3-3.2.20
FREETYPE=2.14.1
HARFBUZZ=12.2.0
SDL=SDL3-3.4.0
ZSTD=1.5.7
LZ4=1.10.0
LIBPNG=1.6.50
LIBJPEGTURBO=3.1.1
LIBPNG=1.6.53
LIBJPEGTURBO=3.1.2
LIBWEBP=1.6.0
FFMPEG=6.0
MOLTENVK=1.2.9
QT=6.7.3
KDDOCKWIDGETS=2.2.3
PLUTOVG=1.3.0
FFMPEG=8.0
MOLTENVK=1.4.1
QT=6.10.1
QTAPNG=1.3.0
KDDOCKWIDGETS=2.4.0
PLUTOVG=1.3.2
PLUTOSVG=0.0.7
SHADERC=2025.3
SHADERC_GLSLANG=efd24d75bcbc55620e759f6bf42c45a32abac5f8
SHADERC_SPIRVHEADERS=2a611a970fdbc41ac2e3e328802aed9985352dca
SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
SHADERC=2025.4
SHADERC_GLSLANG=7a47e2531cb334982b2a2dd8513dca0a3de4373d
SHADERC_SPIRVHEADERS=b824a462d4256d720bebb40e78b9eb8f78bbb305
SHADERC_SPIRVTOOLS=971a7b6e8d7740035bbff089bbbf9f42951ecfd5
mkdir -p deps-build
cd deps-build
@@ -77,27 +78,29 @@ CMAKE_ARCH_ARM64=-DCMAKE_OSX_ARCHITECTURES="arm64"
CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cat > SHASUMS <<EOF
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
f63fc519f150465bd0bdafcdf3d0e9c23474f4c474171cd515ea1b3a72c081fb harfbuzz-$HARFBUZZ.tar.gz
082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8 $SDL.tar.gz
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4 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
9fd58144081654c3373768dd96ead294023830927b14fe3d3c1ef641fb324753 qtimageformats-everywhere-src-$QT.tar.xz
40142cb71fb1e07ad612bc361b67f5d54cd9367f9979ae6b86124a064deda06b qtsvg-everywhere-src-$QT.tar.xz
f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f qttools-everywhere-src-$QT.tar.xz
dcc762acac043b9bb5e4d369b6d6f53e0ecfcf76a408fe0db5f7ef071c9d6dc8 qttranslations-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
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
9985f141902a17de818e264d17c1ce334b748e499ee02fcb4703e4dc0038f89c v$MOLTENVK.tar.gz
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
8148408380ffea03101a26305c812b612ea30dbc07121e58707601522404d49b qttools-everywhere-src-$QT.tar.xz
8e49a2df88a12c376a479ae7bd272a91cf57ebb4e7c0cf7341b3565df99d2314 qttranslations-everywhere-src-$QT.tar.xz
f1d3be3489f758efe1a8f12118a212febbe611aa670af32e0159fa3c1feab2a6 QtApng-$QTAPNG.tar.gz
8a89fb6612ace8954470aae004623374a8fc8b7a34a4277bee5527173b064faf shaderc-$SHADERC.tar.gz
272d2725b140e09e85b96eecdc59c2e00c1a14cda2301767e1bf3c363a44b931 shaderc-glslang-$SHADERC_GLSLANG.tar.gz
c693867f10a7760ef1bcf85419d51783586768cc2c601d03841bc6a8b2554b9c shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
06b0a042f2e121e954badb4fd78c9e2d4bc7ed6087eceb26ab559c23cf94334f shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
51dbf24fe72e43dd7cb9a289d3cab47112010f1a2ed69b6fc8ac0dff31991ed2 KDDockWidgets-$KDDOCKWIDGETS.tar.gz
7bd4e79ce18b1d47517e7e91fbb7cf19d4f01942804a519bc7c0bf32b6325dd5 plutovg-$PLUTOVG.tar.gz
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
EOF
@@ -108,6 +111,7 @@ curl -C - -L \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://download.sourceforge.net/libpng-apng/libpng-$LIBPNG-apng.patch.gz" \
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
@@ -117,6 +121,7 @@ curl -C - -L \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-o "QtApng-$QTAPNG.tar.gz" "https://github.com/jurplel/QtApng/archive/refs/tags/$QTAPNG.tar.gz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
@@ -200,7 +205,9 @@ cd ..
echo "Installing libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
gunzip -d -f "libpng-$LIBPNG-apng.patch.gz"
cd "libpng-$LIBPNG"
patch -p1 < "../libpng-$LIBPNG-apng.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -B build
make -C build "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -DPNG_ARM_NEON=on -B build-arm64
@@ -270,7 +277,7 @@ rm -fr "MoltenVK-${MOLTENVK}"
tar xf "v$MOLTENVK.tar.gz"
cd "MoltenVK-${MOLTENVK}"
./fetchDependencies --macos
make macos
make macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0 MVK_CONFIG_USE_METAL_PRIVATE_API=1
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
cd ..
@@ -278,6 +285,10 @@ echo "Installing Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
# Patch Qt to support macOS 11
patch -p1 < "$SCRIPTDIR/qt-macos11compat.patch"
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
# We could run macdeployqt twice, but that's even more janky than patching it.
@@ -313,7 +324,7 @@ tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL"
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DQT_GENERATE_SBOM=OFF
make "-j$NPROCS"
make install
cd ../..
@@ -324,7 +335,7 @@ tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_system_webp=ON
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DQT_GENERATE_SBOM=OFF -DFEATURE_system_webp=ON
make "-j$NPROCS"
make install
cd ../..
@@ -335,7 +346,7 @@ tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DQT_GENERATE_SBOM=OFF -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make "-j$NPROCS"
make install
cd ../..
@@ -364,19 +375,28 @@ tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL"
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DQT_GENERATE_SBOM=OFF
make "-j$NPROCS"
make install
cd ../..
echo "Building Qt APNG..."
rm -fr "QtApng-$QTAPNG"
tar xf "QtApng-$QTAPNG.tar.gz"
cd "QtApng-$QTAPNG"
patch -p1 < "$SCRIPTDIR/../common/qtapng-cmake.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building KDDockWidgets..."
rm -fr "KDDockWidgets-$KDDOCKWIDGETS"
tar xf "KDDockWidgets-$KDDOCKWIDGETS.tar.gz"
cd "KDDockWidgets-$KDDOCKWIDGETS"
patch -p1 < "$SCRIPTDIR/../common/kddockwidgets-dodgy-include.patch"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets -B build
cmake --build build --parallel
cmake --install build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building PlutoVG..."

View File

@@ -20,25 +20,26 @@ if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
FREETYPE=2.13.3
HARFBUZZ=11.2.0
SDL=SDL3-3.2.20
FREETYPE=2.14.1
HARFBUZZ=12.2.0
SDL=SDL3-3.4.0
ZSTD=1.5.7
LZ4=1.10.0
LIBPNG=1.6.50
LIBJPEGTURBO=3.1.1
LIBPNG=1.6.53
LIBJPEGTURBO=3.1.2
LIBWEBP=1.6.0
FFMPEG=6.0
MOLTENVK=1.2.9
QT=6.7.3
KDDOCKWIDGETS=2.2.3
PLUTOVG=1.3.0
FFMPEG=8.0
MOLTENVK=1.4.1
QT=6.10.1
QTAPNG=1.3.0
KDDOCKWIDGETS=2.4.0
PLUTOVG=1.3.2
PLUTOSVG=0.0.7
SHADERC=2025.3
SHADERC_GLSLANG=efd24d75bcbc55620e759f6bf42c45a32abac5f8
SHADERC_SPIRVHEADERS=2a611a970fdbc41ac2e3e328802aed9985352dca
SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
SHADERC=2025.4
SHADERC_GLSLANG=7a47e2531cb334982b2a2dd8513dca0a3de4373d
SHADERC_SPIRVHEADERS=b824a462d4256d720bebb40e78b9eb8f78bbb305
SHADERC_SPIRVTOOLS=971a7b6e8d7740035bbff089bbbf9f42951ecfd5
mkdir -p deps-build
cd deps-build
@@ -53,31 +54,34 @@ CMAKE_COMMON=(
-DCMAKE_PREFIX_PATH="$INSTALLDIR"
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
-DCMAKE_OSX_ARCHITECTURES="x86_64"
-DCMAKE_APPLE_SILICON_PROCESSOR="x86_64"
-DCMAKE_INSTALL_NAME_DIR='$<INSTALL_PREFIX>/lib'
)
cat > SHASUMS <<EOF
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
16c0204704f3ebeed057aba100fe7db18d71035505cb10e595ea33d346457fc8 harfbuzz-$HARFBUZZ.tar.gz
467600ae090dd28616fa37369faf4e3143198ff1da37729b552137e47f751a67 $SDL.tar.gz
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
f63fc519f150465bd0bdafcdf3d0e9c23474f4c474171cd515ea1b3a72c081fb harfbuzz-$HARFBUZZ.tar.gz
082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8 $SDL.tar.gz
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 libpng-$LIBPNG.tar.xz
1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4 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
9fd58144081654c3373768dd96ead294023830927b14fe3d3c1ef641fb324753 qtimageformats-everywhere-src-$QT.tar.xz
40142cb71fb1e07ad612bc361b67f5d54cd9367f9979ae6b86124a064deda06b qtsvg-everywhere-src-$QT.tar.xz
f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f qttools-everywhere-src-$QT.tar.xz
dcc762acac043b9bb5e4d369b6d6f53e0ecfcf76a408fe0db5f7ef071c9d6dc8 qttranslations-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
4b08587d782f6858e6cb815b455fd7238f45190a57094857a3123883ecb595eb plutovg-$PLUTOVG.tar.gz
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
9985f141902a17de818e264d17c1ce334b748e499ee02fcb4703e4dc0038f89c v$MOLTENVK.tar.gz
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
8148408380ffea03101a26305c812b612ea30dbc07121e58707601522404d49b qttools-everywhere-src-$QT.tar.xz
8e49a2df88a12c376a479ae7bd272a91cf57ebb4e7c0cf7341b3565df99d2314 qttranslations-everywhere-src-$QT.tar.xz
f1d3be3489f758efe1a8f12118a212febbe611aa670af32e0159fa3c1feab2a6 QtApng-$QTAPNG.tar.gz
8a89fb6612ace8954470aae004623374a8fc8b7a34a4277bee5527173b064faf shaderc-$SHADERC.tar.gz
272d2725b140e09e85b96eecdc59c2e00c1a14cda2301767e1bf3c363a44b931 shaderc-glslang-$SHADERC_GLSLANG.tar.gz
c693867f10a7760ef1bcf85419d51783586768cc2c601d03841bc6a8b2554b9c shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
06b0a042f2e121e954badb4fd78c9e2d4bc7ed6087eceb26ab559c23cf94334f shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
51dbf24fe72e43dd7cb9a289d3cab47112010f1a2ed69b6fc8ac0dff31991ed2 KDDockWidgets-$KDDOCKWIDGETS.tar.gz
7bd4e79ce18b1d47517e7e91fbb7cf19d4f01942804a519bc7c0bf32b6325dd5 plutovg-$PLUTOVG.tar.gz
78561b571ac224030cdc450ca2986b4de915c2ba7616004a6d71a379bffd15f3 plutosvg-$PLUTOSVG.tar.gz
EOF
@@ -88,6 +92,7 @@ curl -L \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://github.com/lz4/lz4/releases/download/v$LZ4/lz4-$LZ4.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://download.sourceforge.net/libpng-apng/libpng-$LIBPNG-apng.patch.gz" \
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
@@ -97,6 +102,7 @@ curl -L \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-o "QtApng-$QTAPNG.tar.gz" "https://github.com/jurplel/QtApng/archive/refs/tags/$QTAPNG.tar.gz" \
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
@@ -156,7 +162,9 @@ cd ..
echo "Installing libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
gunzip -d -f "libpng-$LIBPNG-apng.patch.gz"
cd "libpng-$LIBPNG"
patch -p1 < "../libpng-$LIBPNG-apng.patch"
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -B build
make -C build "-j$NPROCS"
make -C build install
@@ -217,7 +225,7 @@ cd "MoltenVK-${MOLTENVK}"
sed -i '' 's/xcodebuild "$@"/xcodebuild $XCODEBUILD_EXTRA_ARGS "$@"/g' fetchDependencies
sed -i '' 's/XCODEBUILD :=/XCODEBUILD ?=/g' Makefile
XCODEBUILD_EXTRA_ARGS="VALID_ARCHS=x86_64" ./fetchDependencies --macos
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0 MVK_CONFIG_USE_METAL_PRIVATE_API=1
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
cd ..
@@ -226,26 +234,15 @@ rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
# Patch Qt to support macOS 11
patch -p1 < "$SCRIPTDIR/qt-macos11compat.patch"
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
# We could run macdeployqt twice, but that's even more janky than patching it.
# https://github.com/qt/qtbase/commit/7b018629c3c3ab23665bf1da00c43c1546042035
# The QProcess default wait time of 30s may be too short in e.g. CI environments where processes may be blocked
# for a longer time waiting for CPU or IO.
patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
--- shared.cpp
+++ shared.cpp
@@ -152,7 +152,7 @@
LogDebug() << " inspecting" << binaryPath;
QProcess otool;
otool.start("otool", QStringList() << "-L" << binaryPath);
- otool.waitForFinished();
+ otool.waitForFinished(-1);
if (otool.exitStatus() != QProcess::NormalExit || otool.exitCode() != 0) {
LogError() << otool.readAllStandardError();
@@ -1122,14 +1122,8 @@
addPlugins(QStringLiteral("networkinformation"));
}
@@ -264,7 +261,7 @@ patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
// Platforminputcontext plugins if QtGui is in use
EOF
cmake -B build "${CMAKE_COMMON[@]}" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
cmake -B build "${CMAKE_COMMON[@]}" -DCMAKE_BUILD_TYPE=MinSizeRel -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
make -C build "-j$NPROCS"
make -C build install
cd ..
@@ -275,7 +272,7 @@ tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DQT_GENERATE_SBOM=OFF
make "-j$NPROCS"
make install
cd ../..
@@ -286,7 +283,7 @@ tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_system_webp=ON
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DQT_GENERATE_SBOM=OFF -DFEATURE_system_webp=ON
make "-j$NPROCS"
make install
cd ../..
@@ -297,7 +294,7 @@ tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DQT_GENERATE_SBOM=OFF -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make "-j$NPROCS"
make install
cd ../..
@@ -326,16 +323,25 @@ tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DQT_GENERATE_SBOM=OFF
make "-j$NPROCS"
make install
cd ../..
echo "Building Qt APNG..."
rm -fr "QtApng-$QTAPNG"
tar xf "QtApng-$QTAPNG.tar.gz"
cd "QtApng-$QTAPNG"
patch -p1 < "$SCRIPTDIR/../common/qtapng-cmake.patch"
cmake "${CMAKE_COMMON[@]}" -B build
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Building KDDockWidgets..."
rm -fr "KDDockWidgets-$KDDOCKWIDGETS"
tar xf "KDDockWidgets-$KDDOCKWIDGETS.tar.gz"
cd "KDDockWidgets-$KDDOCKWIDGETS"
patch -p1 < "$SCRIPTDIR/../common/kddockwidgets-dodgy-include.patch"
cmake "${CMAKE_COMMON[@]}" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets -B build
make -C build "-j$NPROCS"
make -C build install

View File

@@ -0,0 +1,116 @@
diff --git a/.cmake.conf b/.cmake.conf
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -51,7 +51,7 @@ set(QT_MAX_NEW_POLICY_CMAKE_VERSION_QT_APPLE "3.21")
set(QT_SUPPORTED_MIN_MACOS_SDK_VERSION "14")
set(QT_SUPPORTED_MAX_MACOS_SDK_VERSION "26")
set(QT_SUPPORTED_MIN_MACOS_XCODE_VERSION "15")
-set(QT_SUPPORTED_MIN_MACOS_VERSION "13")
+set(QT_SUPPORTED_MIN_MACOS_VERSION "11")
set(QT_SUPPORTED_MAX_MACOS_VERSION_TESTED "26")
set(QT_SUPPORTED_MIN_IOS_SDK_VERSION "17")
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,10 @@ cmake_minimum_required(VERSION 3.16)
# Get the repo version and CMake policy details
include(.cmake.conf)
+if(APPLE)
+ add_compile_options(-Werror=unguarded-availability-new)
+endif()
+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/QtBaseHelpers.cmake)
qt_internal_check_if_path_has_symlinks("${CMAKE_BINARY_DIR}")
diff --git a/src/corelib/global/qsysinfo.cpp b/src/corelib/global/qsysinfo.cpp
--- a/src/corelib/global/qsysinfo.cpp
+++ b/src/corelib/global/qsysinfo.cpp
@@ -1027,7 +1027,7 @@ QByteArray QSysInfo::machineUniqueId()
{
#if defined(Q_OS_DARWIN) && __has_include(<IOKit/IOKitLib.h>)
char uuid[UuidStringLen + 1];
- io_service_t service = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
+ io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
QCFString stringRef = (CFStringRef)IORegistryEntryCreateCFProperty(service, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
CFStringGetCString(stringRef, uuid, sizeof(uuid), kCFStringEncodingMacRoman);
return QByteArray(uuid);
diff --git a/src/corelib/kernel/qcore_mac.mm b/src/corelib/kernel/qcore_mac.mm
--- a/src/corelib/kernel/qcore_mac.mm
+++ b/src/corelib/kernel/qcore_mac.mm
@@ -367,7 +367,7 @@ bool qt_apple_runningWithLiquidGlass()
return config;
#endif
- QIOType<io_registry_entry_t> nvram = IORegistryEntryFromPath(kIOMainPortDefault, "IODeviceTree:/options");
+ QIOType<io_registry_entry_t> nvram = IORegistryEntryFromPath(kIOMasterPortDefault, "IODeviceTree:/options");
if (!nvram) {
qWarning("Failed to locate NVRAM entry in IO registry");
return {};
diff --git a/src/gui/platform/darwin/qappleiconengine.mm b/src/gui/platform/darwin/qappleiconengine.mm
--- a/src/gui/platform/darwin/qappleiconengine.mm
+++ b/src/gui/platform/darwin/qappleiconengine.mm
@@ -366,12 +366,16 @@
weight:NSFontWeightRegular
scale:NSImageSymbolScaleLarge];
+ auto *primaryColor = [NSColor colorWithSRGBRed:color.redF()
+ green:color.greenF()
+ blue:color.blueF()
+ alpha:color.alphaF()];
+
+ if (@available(macOS 13, *)) {
+
// Apply tint color first, which switches the configuration to palette mode
config = [config configurationByApplyingConfiguration:
- [NSImageSymbolConfiguration configurationWithPaletteColors:@[
- [NSColor colorWithSRGBRed:color.redF() green:color.greenF()
- blue:color.blueF() alpha:color.alphaF()]
- ]]];
+ [NSImageSymbolConfiguration configurationWithPaletteColors:@[primaryColor]]];
// Then switch back to monochrome, as palette mode gives a different look
// than monochrome, even with a single color.
@@ -379,6 +383,18 @@
[NSImageSymbolConfiguration configurationPreferringMonochrome]];
return [image imageWithSymbolConfiguration:config];
+
+ } else {
+ NSImage *configuredImage = [image imageWithSymbolConfiguration:config];
+ return [NSImage imageWithSize:configuredImage.size flipped:NO
+ drawingHandler:^BOOL(NSRect) {
+ [primaryColor set];
+ NSRect imageRect = {NSZeroPoint, configuredImage.size};
+ [configuredImage drawInRect:imageRect];
+ NSRectFillUsingOperation(imageRect, NSCompositingOperationSourceIn);
+ return YES;
+ }];
+ }
}
#elif defined(QT_PLATFORM_UIKIT)
auto *configuredImage(const UIImage *image, const QColor &color)
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -323,6 +323,8 @@ a normal (not maximized or full screen) top-level window.
m_view.safeAreaInsets.bottom
};
+ if (@available(macOS 12, *)) {
+
// The screen's safe area insets represent the distances from the screen's
// edges at which content isn't obscured. The view's safe area margins do
// not include the screen's insets automatically, so we need to manually
@@ -355,6 +357,10 @@ a normal (not maximized or full screen) top-level window.
};
return (screenSafeAreaMargins | viewSafeAreaMargins).toMargins();
+
+ } else {
+ return viewSafeAreaMargins.toMargins();
+ }
}
void QCocoaWindow::updateSafeAreaMarginsIfNeeded()

View File

@@ -42,49 +42,56 @@ echo INSTALLDIR=%INSTALLDIR%
cd "%BUILDDIR%"
set FREETYPE=2.13.3
set HARFBUZZ=11.2.0
set LIBJPEGTURBO=3.1.1
set LIBPNG=1650
set SDL=SDL3-3.2.20
set QT=6.9.1
set QTMINOR=6.9
set FREETYPE=2.14.1
set HARFBUZZ=12.2.0
set LIBJPEGTURBO=3.1.2
set LIBPNG=1653
set LIBPNGLONG=1.6.53
set SDL=SDL3-3.4.0
set QT=6.10.1
set QTMINOR=6.10
set QTAPNG=1.3.0
set LZ4=1.10.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.3.0
set KDDOCKWIDGETS=2.4.0
set PLUTOVG=1.3.2
set PLUTOSVG=0.0.7
set SHADERC=2025.3
set SHADERC_GLSLANG=efd24d75bcbc55620e759f6bf42c45a32abac5f8
set SHADERC_SPIRVHEADERS=2a611a970fdbc41ac2e3e328802aed9985352dca
set SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
set SHADERC=2025.4
set SHADERC_GLSLANG=7a47e2531cb334982b2a2dd8513dca0a3de4373d
set SHADERC_SPIRVHEADERS=b824a462d4256d720bebb40e78b9eb8f78bbb305
set SHADERC_SPIRVTOOLS=971a7b6e8d7740035bbff089bbbf9f42951ecfd5
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/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
set AGILITYSDK=1.618.5
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 174d9e53402e1bf9ec7277e22ec199ba3e55a6be2c0740cb18c0ee9850fc8c34 || goto error
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 31490c781bacd2ce56862555b11c51c964977c39f14f51b817dfaecf0be089fe || goto error
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1653.zip 140566abc64bb2320cb35f1d154d1cb3eb7174a12234d33bfdffb446bdc0a1d2 || goto error
call :downloadfile "lpng%LIBPNG%-apng.patch.gz" https://download.sourceforge.net/libpng-apng/libpng-%LIBPNGLONG%-apng.patch.gz 452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c || goto error
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf || 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" 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 "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 9ac2debb493e0d3e13dbd2729fb91f4bfeb00a0f4dff5e04b73cc9bac276b38d || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" c43f471a808b07fc541528410e94ce89c6745bdc1d744492e19911d35fbf7d33 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 2d828d8c999fdd18167937c071781c22321c643b04a106c714411c2356cdb26d || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" ddd74a417d2397eb085d047a9b6ba52b76e748055817f728fe691f8456035d23 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" db8e49ed50912c3c064a4f9ada7791c09eccec5a8d53463a19608eaab17679f0 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 868eb651e395d48ade5932ef2c386e606e054eb5888ebe5284fbd8cb63ed935a || goto error
call :downloadfile "QtApng-%QTAPNG%.zip" "https://github.com/jurplel/QtApng/archive/refs/tags/%QTAPNG%.zip" 5176082cdd468047a7eb1ec1f106b032f57df207aa318d559b29606b00d159ac || 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 "zlib%ZLIBSHORT%.zip" "https://github.com/madler/zlib/releases/download/v%ZLIB%/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" 5153e6b3603a253e6f86dc0b1eb5b80d1dce849ceef628369942587e86582cbb || goto error
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 47ddb48197872055f0adf8e90a7235f8a3b795ca1ee3a28ac2c504c673ae3806 || goto error
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 4fe4e48f28aa80171b2166d45c0976ab0f21eecedb52cd4c3ef73b5afb48fac9 || goto error
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 82dee2c57ad712bdd6d6d81d3e76249d89caa4b5a4214353660fd5adff12201a || goto error
call :downloadfile: "agility-sdk-%AGILITYSDK%.nupkg" "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/%AGILITYSDK%" 0027fc24f947c48dbded13ada7d280be221eb651644e23a8a476f0f1f0a079dd || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 77d2425458bca62c16b1ed49ed02de4c4114a113781bd94c1961b273bdca00fb || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" ebd389bf79c17d79d999b3e9756359945020bbef799537aa96d8900464c373c5 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" 6b954cb358a43915a54b6ca7a27db11b15c4f6e9ec547ab4cad71857354692bc || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" 00c4fa1a26de21c7c8db6947e06094a338e7d4edf972bc70d30afea9315373f2 || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" fab72d1a38eacea52710d18edb95dfd75db894ad869675d07a1eb26827da9b15 || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 4a118247386ffba9160113f146f2189ba5abe3995db357114d7112ede6bd3cd1 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" 9a38cb3b14484f5038d78cd5df89404f2f5b389a6ad91f9f1df4ae71bb9490dc || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" a26383c836a84fab5b03aed5d98e8e27d6c0a9cdbc3b0f462ccfe0a11a3d91ea || goto error
if %DEBUG%==1 (
echo Building debug and release libraries...
@@ -92,7 +99,7 @@ if %DEBUG%==1 (
echo Building release libraries...
)
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG"
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_SHARED_LINKER_FLAGS_MINSIZEREL="/DEBUG"
set ARM64TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE="%SCRIPTDIR%\cmake-toolchain-windows-arm64.cmake"
echo Building Zlib...
@@ -107,7 +114,10 @@ cd .. || goto error
echo Building libpng...
rmdir /S /Q "lpng%LIBPNG%"
%SEVENZIP% x "lpng%LIBPNG%.zip" || goto error
rem apng not in released libpng yet
%SEVENZIP% x "lpng%LIBPNG%-apng.patch.gz" -aoa || goto error
cd "lpng%LIBPNG%" || goto error
%PATCH% -p1 < "../libpng-%LIBPNGLONG%-apng.patch" || goto error
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
@@ -190,7 +200,7 @@ cd .. || goto error
if %DEBUG%==1 (
set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config"
) else (
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=MinSizeRel -G Ninja
)
echo Building Qt base...
@@ -246,6 +256,22 @@ cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
if %DEBUG%==1 (
set QTAPNGBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=all -G "Ninja Multi-Config"
) else (
set QTAPNGBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
)
echo Building Qt APNG...
rmdir /S /Q "QtApng-%QTAPNG%"
%SEVENZIP% x "QtApng-%QTAPNG%.zip" || goto error
cd "QtApng-%QTAPNG%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\qtapng-cmake.patch" || goto error
cmake -B build %ARM64TOOLCHAIN% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% %QTAPNGBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
if %DEBUG%==1 (
set KDDOCKWIDGETSBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=all -G "Ninja Multi-Config"
) else (
@@ -259,7 +285,6 @@ echo "Building KDDockWidgets..."
rmdir /S /Q "KDDockWidgets-%KDDOCKWIDGETS%"
%SEVENZIP% x "KDDockWidgets-%KDDOCKWIDGETS%.zip" || goto error
cd "KDDockWidgets-%KDDOCKWIDGETS%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\kddockwidgets-dodgy-include.patch" || goto error
cmake -B build %ARM64TOOLCHAIN% -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets %KDDOCKWIDGETSBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
@@ -283,6 +308,20 @@ cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Unpacking Agility SDK
rmdir /S /Q "agility-sdk-%AGILITYSDK%"
%SEVENZIP% x -o"agility-sdk-%AGILITYSDK%" "agility-sdk-%AGILITYSDK%.nupkg" || goto error
cd "agility-sdk-%AGILITYSDK%" || goto error
if not exist "%INSTALLDIR%\bin\D3D12" (
mkdir "%INSTALLDIR%\bin\D3D12" || goto error
)
rem the pdbs aren't in the list of distributable files, so only copy the dlls.
copy "build\native\bin\arm64\D3D12Core.dll" "%INSTALLDIR%\bin\D3D12\D3D12Core.dll" || goto error
if %DEBUG%==1 (
copy "build\native\bin\arm64\d3d12SDKLayers.dll" "%INSTALLDIR%\bin\D3D12\d3d12SDKLayers.dll" || goto error
)
cd .. || goto error
echo Building shaderc...
rmdir /S /Q "shaderc-%SHADERC%"
%SEVENZIP% x "shaderc-%SHADERC%.zip" || goto error

View File

@@ -40,49 +40,56 @@ set "PATH=%PATH%;%INSTALLDIR%\bin"
cd "%BUILDDIR%"
set FREETYPE=2.13.3
set HARFBUZZ=11.2.0
set LIBJPEGTURBO=3.1.1
set LIBPNG=1650
set SDL=SDL3-3.2.20
set QT=6.9.1
set QTMINOR=6.9
set FREETYPE=2.14.1
set HARFBUZZ=12.2.0
set LIBJPEGTURBO=3.1.2
set LIBPNG=1653
set LIBPNGLONG=1.6.53
set SDL=SDL3-3.4.0
set QT=6.10.1
set QTMINOR=6.10
set QTAPNG=1.3.0
set LZ4=1.10.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.3.0
set KDDOCKWIDGETS=2.4.0
set PLUTOVG=1.3.2
set PLUTOSVG=0.0.7
set SHADERC=2025.3
set SHADERC_GLSLANG=efd24d75bcbc55620e759f6bf42c45a32abac5f8
set SHADERC_SPIRVHEADERS=2a611a970fdbc41ac2e3e328802aed9985352dca
set SHADERC_SPIRVTOOLS=33e02568181e3312f49a3cf33df470bf96ef293a
set SHADERC=2025.4
set SHADERC_GLSLANG=7a47e2531cb334982b2a2dd8513dca0a3de4373d
set SHADERC_SPIRVHEADERS=b824a462d4256d720bebb40e78b9eb8f78bbb305
set SHADERC_SPIRVTOOLS=971a7b6e8d7740035bbff089bbbf9f42951ecfd5
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/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
set AGILITYSDK=1.618.5
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 174d9e53402e1bf9ec7277e22ec199ba3e55a6be2c0740cb18c0ee9850fc8c34 || goto error
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 31490c781bacd2ce56862555b11c51c964977c39f14f51b817dfaecf0be089fe || goto error
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1653.zip 140566abc64bb2320cb35f1d154d1cb3eb7174a12234d33bfdffb446bdc0a1d2 || goto error
call :downloadfile "lpng%LIBPNG%-apng.patch.gz" https://download.sourceforge.net/libpng-apng/libpng-%LIBPNGLONG%-apng.patch.gz 452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c || goto error
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf || 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" 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 "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 9ac2debb493e0d3e13dbd2729fb91f4bfeb00a0f4dff5e04b73cc9bac276b38d || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" c43f471a808b07fc541528410e94ce89c6745bdc1d744492e19911d35fbf7d33 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 2d828d8c999fdd18167937c071781c22321c643b04a106c714411c2356cdb26d || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" ddd74a417d2397eb085d047a9b6ba52b76e748055817f728fe691f8456035d23 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" db8e49ed50912c3c064a4f9ada7791c09eccec5a8d53463a19608eaab17679f0 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 868eb651e395d48ade5932ef2c386e606e054eb5888ebe5284fbd8cb63ed935a || goto error
call :downloadfile "QtApng-%QTAPNG%.zip" "https://github.com/jurplel/QtApng/archive/refs/tags/%QTAPNG%.zip" 5176082cdd468047a7eb1ec1f106b032f57df207aa318d559b29606b00d159ac || 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 "zlib%ZLIBSHORT%.zip" "https://github.com/madler/zlib/releases/download/v%ZLIB%/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" 5153e6b3603a253e6f86dc0b1eb5b80d1dce849ceef628369942587e86582cbb || goto error
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 47ddb48197872055f0adf8e90a7235f8a3b795ca1ee3a28ac2c504c673ae3806 || goto error
call :downloadfile "plutovg-%PLUTOVG%.zip" "https://github.com/sammycage/plutovg/archive/v%PLUTOVG%.zip" 4fe4e48f28aa80171b2166d45c0976ab0f21eecedb52cd4c3ef73b5afb48fac9 || goto error
call :downloadfile "plutosvg-%PLUTOSVG%.zip" "https://github.com/sammycage/plutosvg/archive/v%PLUTOSVG%.zip" 82dee2c57ad712bdd6d6d81d3e76249d89caa4b5a4214353660fd5adff12201a || goto error
call :downloadfile: "agility-sdk-%AGILITYSDK%.nupkg" "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/%AGILITYSDK%" 0027fc24f947c48dbded13ada7d280be221eb651644e23a8a476f0f1f0a079dd || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 77d2425458bca62c16b1ed49ed02de4c4114a113781bd94c1961b273bdca00fb || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" ebd389bf79c17d79d999b3e9756359945020bbef799537aa96d8900464c373c5 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" 6b954cb358a43915a54b6ca7a27db11b15c4f6e9ec547ab4cad71857354692bc || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" 00c4fa1a26de21c7c8db6947e06094a338e7d4edf972bc70d30afea9315373f2 || goto error
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" fab72d1a38eacea52710d18edb95dfd75db894ad869675d07a1eb26827da9b15 || goto error
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 4a118247386ffba9160113f146f2189ba5abe3995db357114d7112ede6bd3cd1 || goto error
call :downloadfile "shaderc-spirv-headers-%SHADERC_SPIRVHEADERS%.zip" "https://github.com/KhronosGroup/SPIRV-Headers/archive/%SHADERC_SPIRVHEADERS%.zip" 9a38cb3b14484f5038d78cd5df89404f2f5b389a6ad91f9f1df4ae71bb9490dc || goto error
call :downloadfile "shaderc-spirv-tools-%SHADERC_SPIRVTOOLS%.zip" "https://github.com/KhronosGroup/SPIRV-Tools/archive/%SHADERC_SPIRVTOOLS%.zip" a26383c836a84fab5b03aed5d98e8e27d6c0a9cdbc3b0f462ccfe0a11a3d91ea || goto error
if %DEBUG%==1 (
echo Building debug and release libraries...
@@ -90,7 +97,7 @@ if %DEBUG%==1 (
echo Building release libraries...
)
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="/DEBUG"
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_SHARED_LINKER_FLAGS_MINSIZEREL="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS_MINSIZEREL="/DEBUG"
echo Building Zlib...
rmdir /S /Q "zlib-%ZLIB%"
@@ -104,7 +111,10 @@ cd .. || goto error
echo Building libpng...
rmdir /S /Q "lpng%LIBPNG%"
%SEVENZIP% x "lpng%LIBPNG%.zip" || goto error
rem apng not in released libpng yet
%SEVENZIP% x "lpng%LIBPNG%-apng.patch.gz" -aoa || goto error
cd "lpng%LIBPNG%" || goto error
%PATCH% -p1 < "../libpng-%LIBPNGLONG%-apng.patch" || goto error
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build -G Ninja || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
@@ -187,17 +197,13 @@ cd .. || goto error
if %DEBUG%==1 (
set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config"
) else (
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=MinSizeRel -G Ninja
)
echo Building Qt base...
rmdir /S /Q "qtbase-everywhere-src-%QT%"
%SEVENZIP% x "qtbase-everywhere-src-%QT%.zip" || goto error
cd "qtbase-everywhere-src-%QT%" || goto error
rem Disable the PCRE2 JIT, it doesn't properly verify AVX2 support.
%PATCH% -p1 < "%SCRIPTDIR%\qtbase-disable-pcre2-jit.patch" || goto error
cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON %QTBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
@@ -226,7 +232,7 @@ ninja install || goto error
cd ..\.. || goto error
echo Building Qt Tools...
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
rmdir /S /Q "qttools-everywhere-src-%QT%"
%SEVENZIP% x "qttools-everywhere-src-%QT%.zip" || goto error
cd "qttools-everywhere-src-%QT%" || goto error
mkdir build || goto error
@@ -247,6 +253,22 @@ cmake --build . --parallel || goto error
ninja install || goto error
cd ..\.. || goto error
if %DEBUG%==1 (
set QTAPNGBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=all -G "Ninja Multi-Config"
) else (
set QTAPNGBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
)
echo Building Qt APNG...
rmdir /S /Q "QtApng-%QTAPNG%"
%SEVENZIP% x "QtApng-%QTAPNG%.zip" || goto error
cd "QtApng-%QTAPNG%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\qtapng-cmake.patch" || goto error
cmake -B build -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% %QTAPNGBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
if %DEBUG%==1 (
set KDDOCKWIDGETSBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_BUILD_TYPE=Release -DCMAKE_DEFAULT_CONFIGS=all -G "Ninja Multi-Config"
) else (
@@ -260,7 +282,6 @@ echo "Building KDDockWidgets..."
rmdir /S /Q "KDDockWidgets-%KDDOCKWIDGETS%"
%SEVENZIP% x "KDDockWidgets-%KDDOCKWIDGETS%.zip" || goto error
cd "KDDockWidgets-%KDDOCKWIDGETS%" || goto error
%PATCH% -p1 < "%SCRIPTDIR%\..\common\kddockwidgets-dodgy-include.patch" || goto error
cmake -B build -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DKDDockWidgets_QT6=true -DKDDockWidgets_EXAMPLES=false -DKDDockWidgets_FRONTENDS=qtwidgets %KDDOCKWIDGETSBUILDSPEC% || goto error
cmake --build build --parallel || goto error
ninja -C build install || goto error
@@ -284,6 +305,20 @@ cmake --build build --parallel || goto error
ninja -C build install || goto error
cd .. || goto error
echo Unpacking Agility SDK
rmdir /S /Q "agility-sdk-%AGILITYSDK%"
%SEVENZIP% x -o"agility-sdk-%AGILITYSDK%" "agility-sdk-%AGILITYSDK%.nupkg" || goto error
cd "agility-sdk-%AGILITYSDK%" || goto error
if not exist "%INSTALLDIR%\bin\D3D12" (
mkdir "%INSTALLDIR%\bin\D3D12" || goto error
)
rem the pdbs aren't in the list of distributable files, so only copy the dlls.
copy "build\native\bin\x64\D3D12Core.dll" "%INSTALLDIR%\bin\D3D12\D3D12Core.dll" || goto error
if %DEBUG%==1 (
copy "build\native\bin\x64\d3d12SDKLayers.dll" "%INSTALLDIR%\bin\D3D12\d3d12SDKLayers.dll" || goto error
)
cd .. || goto error
echo Building shaderc...
rmdir /S /Q "shaderc-%SHADERC%"
%SEVENZIP% x "shaderc-%SHADERC%.zip" || goto error

View File

@@ -1,35 +0,0 @@
--- qtbase/src/3rdparty/pcre2/CMakeLists.txt 2024-03-19 08:46:43.000000000 -0700
+++ qtbase/src/3rdparty/pcre2/CMakeLists.txt 2024-06-06 21:52:20.539619500 -0700
@@ -41,6 +41,7 @@
src/pcre2_xclass.c
DEFINES
HAVE_CONFIG_H
+ PCRE2_DISABLE_JIT
PUBLIC_DEFINES
PCRE2_CODE_UNIT_WIDTH=16
PUBLIC_INCLUDE_DIRECTORIES
@@ -52,23 +53,8 @@
## Scopes:
#####################################################################
-qt_internal_extend_target(BundledPcre2 CONDITION QNX OR UIKIT
- DEFINES
- PCRE2_DISABLE_JIT
-)
-
-qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm") AND WIN32
- DEFINES
- PCRE2_DISABLE_JIT
-)
-
-qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm64") AND WIN32
- DEFINES
- PCRE2_DISABLE_JIT
-)
-
if (APPLE)
- target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64 -DPCRE2_DISABLE_JIT")
+ target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64")
endif()
qt_internal_extend_target(BundledPcre2 CONDITION WIN32

View File

@@ -8,7 +8,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Verify VS Project Files
run: .github\workflows\scripts\windows\validate-vs-filters.ps1

View File

@@ -56,7 +56,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Configure MSBuild Clang Version
if: inputs.configuration != 'CMake'
@@ -115,7 +115,7 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: deps
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat', '.github/workflows/scripts/common/*.patch') }}
@@ -154,7 +154,7 @@ jobs:
cmake --build build --config Release --target unittests
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: |
@@ -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
@@ -186,7 +186,7 @@ jobs:
}
- name: Upload artifact - with symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
path: |

View File

@@ -0,0 +1,17 @@
name: 🖥️ 📦 Dispatch Windows Deps Build
on:
pull_request_target:
types: [closed]
jobs:
trigger:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'requires-win-deps-build')
runs-on: ubuntu-latest
steps:
- name: Dispatch to windows-dependencies repo
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.DEPS_REPO_DISPATCH_ACCESS_TOKEN }}
repository: pcsx2/pcsx2-windows-dependencies
event-type: deps-update

View File

@@ -113,13 +113,27 @@ typename SymbolList<SymbolType>::AddressToHandleMapIterators SymbolList<SymbolTy
template <typename SymbolType>
typename SymbolList<SymbolType>::AddressToHandleMapIterators SymbolList<SymbolType>::handles_from_address_range(AddressRange range) const
{
if(range.low.valid()) {
return {m_address_to_handle.lower_bound(range.low.value), m_address_to_handle.lower_bound(range.high.value)};
} else if(range.high.valid()) {
return {m_address_to_handle.begin(), m_address_to_handle.lower_bound(range.high.value)};
typename AddressToHandleMap::const_iterator begin, end;
if (range.low.valid() && range.high.valid()) {
if (range.low.value < range.high.value) {
begin = m_address_to_handle.lower_bound(range.low.value);
end = m_address_to_handle.lower_bound(range.high.value);
} else {
begin = m_address_to_handle.end();
end = m_address_to_handle.end();
}
} else if (range.low.valid()) {
begin = m_address_to_handle.lower_bound(range.low.value);
end = m_address_to_handle.end();
} else if (range.high.valid()) {
begin = m_address_to_handle.begin();
end = m_address_to_handle.lower_bound(range.high.value);
} else {
return {m_address_to_handle.end(), m_address_to_handle.end()};
begin = m_address_to_handle.end();
end = m_address_to_handle.end();
}
return {begin, end};
}
template <typename SymbolType>

View File

@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.18 FATAL_ERROR)
# ---[ Setup project
PROJECT(
@@ -108,7 +108,7 @@ IF(NOT CMAKE_SYSTEM_NAME)
"Target operating system is not specified. "
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android|FreeBSD)$")
ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android|FreeBSD|Emscripten)$")
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT IS_APPLE_OS)
MESSAGE(WARNING
"Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. "
@@ -184,10 +184,11 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
LIST(APPEND CPUINFO_SRCS src/x86/freebsd/init.c)
ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^Windows" AND CPUINFO_TARGET_PROCESSOR MATCHES "^(ARM64|arm64)$")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^Windows" AND CPUINFO_TARGET_PROCESSOR MATCHES "^(ARM64|arm64|aarch64)$")
LIST(APPEND CPUINFO_SRCS
src/arm/windows/init-by-logical-sys-info.c
src/arm/windows/init.c)
src/arm/windows/init.c
src/arm/uarch.c)
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(armv[5-8].*|aarch64|arm64.*)$" OR IOS_ARCH MATCHES "^(armv7.*|arm64.*)$")
LIST(APPEND CPUINFO_SRCS
src/arm/uarch.c
@@ -218,7 +219,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(riscv(32|64))$")
LIST(APPEND CPUINFO_SRCS
src/riscv/uarch.c)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
LIST(APPEND CPUINFO_SRCS
src/riscv/linux/init.c
src/riscv/linux/riscv-hw.c
@@ -747,6 +748,11 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS)
TARGET_LINK_LIBRARIES(pixel-2-xl-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME pixel-2-xl-test COMMAND pixel-2-xl-test)
ADD_EXECUTABLE(pixel-8-test test/mock/pixel-8.cc)
TARGET_INCLUDE_DIRECTORIES(pixel-8-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(pixel-8-test PRIVATE cpuinfo_mock gtest)
ADD_TEST(NAME pixel-8-test COMMAND pixel-8-test)
ADD_EXECUTABLE(xiaomi-mi-5c-test test/mock/xiaomi-mi-5c.cc)
TARGET_INCLUDE_DIRECTORIES(xiaomi-mi-5c-test BEFORE PRIVATE test/mock)
TARGET_LINK_LIBRARIES(xiaomi-mi-5c-test PRIVATE cpuinfo_mock gtest)

View File

@@ -1,11 +1,11 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.18 FATAL_ERROR)
PROJECT(googlebenchmark-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googlebenchmark
URL https://github.com/google/benchmark/archive/v1.6.1.zip
URL_HASH SHA256=367e963b8620080aff8c831e24751852cffd1f74ea40f25d9cc1b667a9dd5e45
URL https://github.com/google/benchmark/archive/refs/tags/v1.9.4.tar.gz
URL_HASH SHA256=b334658edd35efcf06a99d9be21e4e93e092bd5f95074c1673d5c8705d95c104
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
CONFIGURE_COMMAND ""

View File

@@ -1,11 +1,11 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.18 FATAL_ERROR)
PROJECT(googletest-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googletest
URL https://github.com/google/googletest/archive/release-1.11.0.zip
URL_HASH SHA256=353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a
URL https://github.com/google/googletest/archive/refs/tags/v1.17.0.zip
URL_HASH SHA256=40d4ec942217dcc84a9ebe2a68584ada7d4a33a8ee958755763278ea1c5e18ff
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest"
CONFIGURE_COMMAND ""

View File

@@ -373,10 +373,14 @@ 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 Airmont microarchitecture (10 nm out-of-order Atom). */
cpuinfo_uarch_tremont = 0x00100406,
/** Intel Gracemont microarchitecture (AlderLake N). */
cpuinfo_uarch_gracemont = 0x00100407,
/** Intel Crestmont microarchitecture (Sierra Forest). */
cpuinfo_uarch_crestmont = 0x00100407,
cpuinfo_uarch_crestmont = 0x00100408,
/** Intel Darkmont microarchitecture (e-core used in Clearwater Forest). */
cpuinfo_uarch_darkmont = 0x00100409,
/** Intel Knights Ferry HPC boards. */
cpuinfo_uarch_knights_ferry = 0x00100500,
@@ -388,8 +392,6 @@ 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,
@@ -508,6 +510,8 @@ enum cpuinfo_uarch {
cpuinfo_uarch_cortex_x3 = 0x00300503,
/** ARM Cortex-X4. */
cpuinfo_uarch_cortex_x4 = 0x00300504,
/** ARM Cortex-X925. */
cpuinfo_uarch_cortex_x925 = 0x00300505,
/** ARM Cortex-A510. */
cpuinfo_uarch_cortex_a510 = 0x00300551,
@@ -519,6 +523,8 @@ enum cpuinfo_uarch {
cpuinfo_uarch_cortex_a715 = 0x00300572,
/** ARM Cortex-A720. */
cpuinfo_uarch_cortex_a720 = 0x00300573,
/** ARM Cortex-A725. */
cpuinfo_uarch_cortex_a725 = 0x00300574,
/** Qualcomm Scorpion. */
cpuinfo_uarch_scorpion = 0x00400100,
@@ -730,7 +736,7 @@ struct cpuinfo_cluster {
uint64_t frequency;
};
#define CPUINFO_PACKAGE_NAME_MAX 48
#define CPUINFO_PACKAGE_NAME_MAX 64
struct cpuinfo_package {
/** SoC or processor chip model name */

View File

@@ -149,8 +149,6 @@ 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 */

View File

@@ -468,6 +468,56 @@ static bool match_universal(const char* start, const char* end, struct cpuinfo_a
return true;
}
/**
* Tries to match /s5e\d{4}$/ signature for Samsung Exynos chipsets.
* If match successful, extracts model information into \p chipset argument.
*
* @param start - start of the platform identifier (ro.product.board or
* ro.board.platform) to match.
* @param end - end of the platform identifier (ro.product.board or
* ro.board.platform) to match.
* @param[out] chipset - location where chipset information will be stored upon
* a successful match.
*
* @returns true if signature matched, false otherwise.
*/
static bool match_s5e(const char* start, const char* end, struct cpuinfo_arm_chipset chipset[restrict static 1]) {
/* Expect exactly 7 symbols: "s5e" (3 symbols) + 4-digit model number */
if (start + 7 != end) {
return false;
}
/* Check that string starts with "s5e" */
if (start[0] != 's') {
return false;
}
/* Load next 2 bytes as little endian 16-bit word */
const uint16_t expected_5e = load_u16le(start + 1);
if (expected_5e != UINT16_C(0x6535) /* "e5" = reverse("5e") */) {
return false;
}
/* Check and parse 4-digit model number */
uint32_t model = 0;
for (uint32_t i = 3; i < 7; i++) {
const uint32_t digit = (uint32_t)(uint8_t)start[i] - '0';
if (digit >= 10) {
/* Not really a digit */
return false;
}
model = model * 10 + digit;
}
/* Return parsed chipset. */
*chipset = (struct cpuinfo_arm_chipset){
.vendor = cpuinfo_arm_chipset_vendor_samsung,
.series = cpuinfo_arm_chipset_series_samsung_exynos,
.model = model,
};
return true;
}
/**
* Compares, case insensitively, a string to known values "SMDK4210" and
* "SMDK4x12" for Samsung Exynos chipsets. If platform identifier matches one of
@@ -903,7 +953,7 @@ static bool match_sc(const char* start, const char* end, struct cpuinfo_arm_chip
}
/**
* Tries to match, case-sentitively, /Unisoc T\d{3,4}/ signature for Unisoc T
* Tries to match, case-sentitively, /Unisoc T\d{3,4}/ or /UNISOC T\d{3,4}/ signature for Unisoc T
* chipset. If match successful, extracts model information into \p chipset
* argument.
*
@@ -917,7 +967,7 @@ static bool match_sc(const char* start, const char* end, struct cpuinfo_arm_chip
* @returns true if signature matched, false otherwise.
*/
static bool match_t(const char* start, const char* end, struct cpuinfo_arm_chipset chipset[restrict static 1]) {
/* Expect 11-12 symbols: "Unisoc T" (8 symbols) + 3-4-digit model number
/* Expect 11-12 symbols: "Unisoc T" / "UNISOC T" (8 symbols) + 3-4-digit model number
*/
const size_t length = end - start;
switch (length) {
@@ -928,16 +978,18 @@ static bool match_t(const char* start, const char* end, struct cpuinfo_arm_chips
return false;
}
/* Check that string starts with "Unisoc T". The first four characters
/* Check that string starts with "Unisoc T" or "UNISOC T". The first four characters
* are loaded as 32-bit little endian word */
const uint32_t expected_unis = load_u32le(start);
if (expected_unis != UINT32_C(0x73696E55) /* "sinU" = reverse("Unis") */) {
if (expected_unis != UINT32_C(0x73696E55) /* "sinU" = reverse("Unis") */ &&
expected_unis != UINT32_C(0x53494E55) /* "SINU" = reverse("UNIS") */) {
return false;
}
/* The next four characters are loaded as 32-bit little endian word */
const uint32_t expected_oc_t = load_u32le(start + 4);
if (expected_oc_t != UINT32_C(0x5420636F) /* "T co" = reverse("oc T") */) {
if (expected_oc_t != UINT32_C(0x5420636F) /* "T co" = reverse("oc T") */ &&
expected_oc_t != UINT32_C(0x5420434F) /* "T CO" = reverse("OC T") */) {
return false;
}
@@ -2837,6 +2889,15 @@ struct cpuinfo_arm_chipset cpuinfo_arm_android_decode_chipset_from_ro_product_bo
return chipset;
}
/* Check s5eXXXX (Samsung Exynos) signature */
if (match_s5e(board, board_end, &chipset)) {
cpuinfo_log_debug(
"matched S5E (Samsung Exynos) signature in ro.product.board string \"%.*s\"",
(int)board_length,
board);
return chipset;
}
#if CPUINFO_ARCH_ARM
/* Check SMDK (Samsung Exynos) signature */
if (match_and_parse_smdk(board, board_end, cores, &chipset)) {
@@ -3949,6 +4010,20 @@ static inline struct cpuinfo_arm_chipset disambiguate_spreadtrum_chipset(
return *ro_board_platform_chipset;
}
static enum cpuinfo_arm_chipset_vendor disambiguate_chipset_vendor(
enum cpuinfo_arm_chipset_vendor vendor_a,
enum cpuinfo_arm_chipset_vendor vendor_b) {
/* Some UNISOC-based platforms reporting conflicting vendor names depending
* on the source. For phones that report both UNISOC and Spreadtrum, treat it
* as UNISOC. */
if ((vendor_a == cpuinfo_arm_chipset_vendor_unisoc && vendor_b == cpuinfo_arm_chipset_vendor_spreadtrum) ||
(vendor_a == cpuinfo_arm_chipset_vendor_spreadtrum && vendor_b == cpuinfo_arm_chipset_vendor_unisoc)) {
return cpuinfo_arm_chipset_vendor_unisoc;
}
return cpuinfo_arm_chipset_vendor_unknown;
}
/*
* Decodes chipset name from Android system properties:
* - /proc/cpuinfo Hardware string
@@ -4009,10 +4084,19 @@ struct cpuinfo_arm_chipset cpuinfo_arm_android_decode_chipset(
} else if (vendor != decoded_vendor) {
/* Parsing different system properties produces
* different chipset vendors. This situation is
* rare. */
cpuinfo_log_error(
"chipset detection failed: different chipset vendors reported in different system properties");
goto finish;
* rare. Try to disambiguate for known cases,
* otherwise treat as unknown. */
enum cpuinfo_arm_chipset_vendor disambiguated_vendor =
disambiguate_chipset_vendor(vendor, decoded_vendor);
if (disambiguated_vendor != cpuinfo_arm_chipset_vendor_unknown) {
vendor = disambiguated_vendor;
} else {
cpuinfo_log_error(
"chipset detection failed: different chipset vendors reported in different system properties");
goto finish;
}
}
}
}

View File

@@ -125,6 +125,18 @@ void cpuinfo_arm_decode_vendor_uarch(
case 0xD4F: /* Neoverse V2 */
*uarch = cpuinfo_uarch_neoverse_v2;
break;
case 0xD81: /* Cortex-A720 */
*uarch = cpuinfo_uarch_cortex_a720;
break;
case 0xD82: /* Cortex-X4 */
*uarch = cpuinfo_uarch_cortex_x4;
break;
case 0xD85: /* Cortex-X925 */
*uarch = cpuinfo_uarch_cortex_x925;
break;
case 0xD87: /* Cortex-A725 */
*uarch = cpuinfo_uarch_cortex_a725;
break;
default:
switch (midr_get_part(midr) >> 8) {
#if CPUINFO_ARCH_ARM

View File

@@ -750,12 +750,6 @@ void store_core_info_per_processor(
if (cores) {
processors[processor_global_index].core = cores + core_id;
cores[core_id].core_id = core_id;
if (chip_info->uarchs == NULL) {
cpuinfo_log_error("uarch is NULL for core %d", core_id);
return;
}
cores[core_id].uarch = chip_info->uarchs[0].uarch;
cores[core_id].frequency = chip_info->uarchs[0].frequency;
@@ -842,7 +836,6 @@ static bool connect_packages_cores_clusters_by_processors(
processor->cluster = cluster;
if (chip_info) {
size_t converted_chars = 0;
if (!WideCharToMultiByte(
CP_UTF8,
WC_ERR_INVALID_CHARS,

View File

@@ -21,7 +21,6 @@ static struct woa_chip_info woa_chip_unknown = {L"Unknown", {{cpuinfo_vendor_unk
BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context) {
struct woa_chip_info* chip_info = NULL;
enum cpuinfo_vendor vendor = cpuinfo_vendor_unknown;
set_cpuinfo_isa_fields();
@@ -134,6 +133,26 @@ static struct core_info_by_chip_name get_core_info_from_midr(uint32_t midr, uint
return info;
}
/* https://developer.arm.com/documentation/ddi0601/2024-06/AArch64-Registers
CP 4000: MIDR_EL1
CP 4020: ID_AA64PFR0_EL1
CP 4021: ID_AA64PFR1_EL1
CP 4028: ID_AA64DFR0_EL1
CP 4029: ID_AA64DFR1_EL1
CP 402C: ID_AA64AFR0_EL1
CP 402D: ID_AA64AFR1_EL1
CP 4030: ID_AA64ISAR0_EL1
CP 4031: ID_AA64ISAR1_EL1
CP 4038: ID_AA64MMFR0_EL1
CP 4039: ID_AA64MMFR1_EL1
CP 403A: ID_AA64MMFR2_EL1
CP 4080: ?
CP 4081: ?
CP 4100: ?
CP 4510: ?
CP 5801: ?
*/
static struct woa_chip_info* get_system_info_from_registry(void) {
wchar_t* text_buffer = NULL;
LPCWSTR cpu0_subkey = L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
@@ -195,21 +214,40 @@ static void set_cpuinfo_isa_fields(void) {
const bool dotprod = IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.dot = dotprod;
SYSTEM_INFO system_info;
GetSystemInfo(&system_info);
switch (system_info.wProcessorLevel) {
case 0x803: // Kryo 385 Silver (Snapdragon 850)
cpuinfo_isa.fp16arith = dotprod;
cpuinfo_isa.rdm = dotprod;
break;
default:
// Assume that Dot Product support implies FP16
// arithmetics and RDM support. ARM manuals don't
// guarantee that, but it holds in practice.
cpuinfo_isa.fp16arith = dotprod;
cpuinfo_isa.rdm = dotprod;
break;
}
cpuinfo_isa.sve = IsProcessorFeaturePresent(PF_ARM_SVE_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.sve2 = IsProcessorFeaturePresent(PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.i8mm = IsProcessorFeaturePresent(PF_ARM_V82_I8MM_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.jscvt = IsProcessorFeaturePresent(PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.fcma = IsProcessorFeaturePresent(PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE) != 0;
// FEAT_FP16 Implies FEAT_FHM in 8.4
// https://developer.arm.com/documentation/109697/2025_09/Feature-descriptions/The-Armv8-4-architecture-extension?lang=en
cpuinfo_isa.fhm = IsProcessorFeaturePresent(PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.fp16arith = cpuinfo_isa.fhm;
cpuinfo_isa.sme = IsProcessorFeaturePresent(PF_ARM_SME_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.sme2 = IsProcessorFeaturePresent(PF_ARM_SME2_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.sme2p1 = IsProcessorFeaturePresent(PF_ARM_SME2_1_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.sme_b16b16 = IsProcessorFeaturePresent(PF_ARM_SME_B16B16_INSTRUCTIONS_AVAILABLE) != 0;
cpuinfo_isa.sme_f16f16 = IsProcessorFeaturePresent(PF_ARM_SME_F16F16_INSTRUCTIONS_AVAILABLE) != 0;
// TODO: Add when available in Windows SDK
// - sme_i16i32
// - sme_bi32i32
cpuinfo_isa.bf16 = IsProcessorFeaturePresent(PF_ARM_V86_BF16_INSTRUCTIONS_AVAILABLE) != 0;
// TODO: This is not available in the Windows SDK yet , so conservatively go with the lowest value (128 bits)
// https://developer.arm.com/documentation/101427/0102/Register-descriptions/Scalable-vector-extensions--SVE--registers/ZCR-EL1--SVE-Control-Register--EL1
cpuinfo_isa.svelen =
cpuinfo_isa.sve ? 128 / 8 : 0; // This value is in bytes, see cpuinfo_get_max_arm_sve_length
// TODO : Fetch from feature registers when available
// cpuinfo_isa.smelen = 0;
// Assume that Dot Product support implies FP16
// arithmetics and RDM support. ARM manuals don't
// guarantee that, but it holds in practice.
cpuinfo_isa.rdm = dotprod;
/* Windows API reports all or nothing for cryptographic instructions. */
const bool crypto = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0;
@@ -219,4 +257,4 @@ static void set_cpuinfo_isa_fields(void) {
cpuinfo_isa.pmull = crypto;
cpuinfo_isa.crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) != 0;
}
}

View File

@@ -19,3 +19,63 @@ struct woa_chip_info {
};
bool cpu_info_init_by_logical_sys_info(const struct woa_chip_info* chip_info, enum cpuinfo_vendor vendor);
#ifndef PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE
#define PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE (27)
#endif
#ifndef PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE (34)
#endif
#ifndef PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE (44)
#endif
#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE (46)
#endif
#ifndef PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE (47)
#endif
#ifndef PF_ARM_SME_BI32I32_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME_BI32I32_INSTRUCTIONS_AVAILABLE (55)
#endif
#ifndef PF_ARM_V82_I8MM_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V82_I8MM_INSTRUCTIONS_AVAILABLE (66)
#endif
#ifndef PF_ARM_V86_BF16_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V86_BF16_INSTRUCTIONS_AVAILABLE (68)
#endif
#ifndef PF_ARM_SME_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME_INSTRUCTIONS_AVAILABLE (70)
#endif
#ifndef PF_ARM_SME2_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME2_INSTRUCTIONS_AVAILABLE (71)
#endif
#ifndef PF_ARM_SME2_1_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME2_1_INSTRUCTIONS_AVAILABLE (72)
#endif
#ifndef PF_ARM_SME2_2_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME2_2_INSTRUCTIONS_AVAILABLE (73)
#endif
#ifndef PF_ARM_SME_F16F16_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME_F16F16_INSTRUCTIONS_AVAILABLE (83)
#endif
#ifndef PF_ARM_SME_B16B16_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SME_B16B16_INSTRUCTIONS_AVAILABLE (84)
#endif
#ifndef PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE (67)
#endif

View File

@@ -105,6 +105,7 @@ CPUINFO_INTERNAL void cpuinfo_x86_detect_topology(
CPUINFO_INTERNAL void cpuinfo_x86_detect_cache(
uint32_t max_base_index,
uint32_t max_extended_index,
/* amd_topology_extensions is not used, kept for backward compatibility */
bool amd_topology_extensions,
enum cpuinfo_vendor vendor,
const struct cpuinfo_x86_model_info* model_info,

View File

@@ -87,7 +87,7 @@ void cpuinfo_x86_detect_cache(
}
}
}
if (amd_topology_extensions && max_extended_index >= UINT32_C(0x8000001D)) {
if (max_extended_index >= UINT32_C(0x8000001D)) {
struct cpuid_regs leaf0x8000001D;
uint32_t input_ecx = 0;
do {

View File

@@ -72,7 +72,7 @@ void cpuinfo_x86_init_processor(struct cpuinfo_x86_processor* processor) {
for (uint32_t i = 0; i < 3; i++) {
brand_string[i] = cpuid(UINT32_C(0x80000002) + i);
}
memcpy(processor->brand_string, brand_string, sizeof(processor->brand_string));
memcpy(processor->brand_string, brand_string, sizeof(brand_string));
cpuinfo_log_debug("raw CPUID brand string: \"%48s\"", processor->brand_string);
}
}

View File

@@ -188,10 +188,17 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
case 0x5A: // Moorefield
case 0x5D: // SoFIA
return cpuinfo_uarch_silvermont;
case 0xBE: // Twin Lake
case 0x86: // Jasper Lake
case 0x8A: // Lakefield
case 0x96: // Elkhart Lake
case 0x9C: // Jacobsville
return cpuinfo_uarch_tremont;
case 0xBE: // Alder Lake-N
return cpuinfo_uarch_gracemont;
case 0xAF: // Sierra Forest
return cpuinfo_uarch_crestmont;
case 0xDD: // Clearwater Forest
return cpuinfo_uarch_darkmont;
case 0x4C: // Braswell, Cherry
// Trail
case 0x75: // Spreadtrum
@@ -208,8 +215,6 @@ 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:

View File

@@ -1,7 +1,117 @@
# libcubeb - Cross-platform Audio I/O Library
[![Build Status](https://github.com/mozilla/cubeb/actions/workflows/build.yml/badge.svg)](https://github.com/mozilla/cubeb/actions/workflows/build.yml)
See INSTALL.md for build instructions.
`libcubeb` is a cross-platform C library for high and low-latency audio input/output. It provides a simple, consistent API for audio playback and recording across multiple platforms and audio backends. It is written in C, C++ and Rust, with a C ABI and [Rust](https://github.com/mozilla/cubeb-rs) bindings. While originally written for use in the Firefox Web browser, a number of other software projects have adopted it.
See [Backend Support](https://github.com/mozilla/cubeb/wiki/Backend-Support) in the wiki for the support level of each backend.
## Features
Licensed under an ISC-style license. See LICENSE for details.
- **Cross-platform support**: Windows, macOS, Linux, Android, and other platforms
- **Versatile**: Optimized for low-latency real-time audio applications, or power efficient higher latency playback
- **A/V sync**: Latency compensated audio clock reporting for easy audio/video synchronization
- **Full-duplex support**: Simultaneous audio input and output, reclocked
- **Device enumeration**: Query available audio devices
- **Audio processing for speech**: Can use VoiceProcessing IO on recent macOS
## Supported Backends & status
| *Backend* | *Support Level* | *Platform version* | *Notes* |
|-------------------|-----------------|--------------------|--------------------------------------------------|
| PulseAudio (Rust) | Tier-1 | | Main Linux desktop backend |
| AudioUnit (Rust) | Tier-1 | | Main macOS backend |
| WASAPI | Tier-1 | Windows >= 7 | Main Windows backend |
| AAudio | Tier-1 | Android >= 8 | Main Android backend for most devices |
| OpenSL | Tier-1 | Android >= 2.3 | Android backend for older devices |
| OSS | Tier-2 | | |
| sndio | Tier-2 | | |
| Sun | Tier-2 | | |
| WinMM | Tier-3 | Windows XP | Was Tier-1, Firefox minimum Windows version 7. |
| AudioTrack | Tier-3 | Android < 2.3 | Was Tier-1, Firefox minimum Android version 4.1. |
| ALSA | Tier-3 | | |
| JACK | Tier-3 | | |
| KAI | Tier-3 | | |
| PulseAudio (C) | Tier-4 | | Was Tier-1, superseded by Rust |
| AudioUnit (C++) | Tier-4 | | Was Tier-1, superseded by Rust |
Tier-1: Actively maintained. Should have CI coverage. Critical for Firefox.
Tier-2: Actively maintained by contributors. CI coverage appreciated.
Tier-3: Maintainers/patches accepted. Status unclear.
Tier-4: Deprecated, obsolete. Scheduled to be removed.
Note that the support level is not a judgement of the relative merits
of a backend, only the current state of support, which is informed
by Firefox's needs, the responsiveness of a backend's
maintainer, and the level of contributions to that backend.
## Building
### Prerequisites
- CMake 3.15 or later
- Non-ancient MSVC, clang or gcc, for compiling both C and C++
- Platform-specific audio libraries (automatically detected)
- Optional but recommended: Rust compiler to compile and link more recent backends for macOS and PulseAudio
### Quick build
```bash
git clone https://github.com/mozilla/cubeb.git
cd cubeb
cmake -B build
cmake --build build
```
### Better build with Rust backends
```bash
git clone --recursive https://github.com/mozilla/cubeb.git
cd cubeb
cmake -B build -DBUILD_RUST_LIBS=ON
cmake --build build
```
### Platform-Specific Notes
**Windows**: Supports Visual Studio 2015+ and MinGW-w64. Use `-G "Visual Studio 16 2019"` or `-G "MinGW Makefiles"`.
**macOS**: Requires Xcode command line tools. Audio frameworks are automatically linked.
**Linux**: Development packages for desired backends:
```bash
# Ubuntu/Debian
sudo apt-get install libpulse-dev libasound2-dev libjack-dev
# Fedora/RHEL
sudo dnf install pulseaudio-libs-devel alsa-lib-devel jack-audio-connection-kit-devel
```
**Android**: Use with Android NDK. AAudio requires API level 26+.
## Testing
Run the test suite:
```bash
cd build
ctest
```
Use the interactive test tool:
```bash
./cubeb-test
```
## License
Licensed under an ISC-style license. See [LICENSE](LICENSE) for details.
## Contributing
Contributions are welcome! Please see the [contribution guidelines](CONTRIBUTING.md) and check the [issue tracker](https://github.com/mozilla/cubeb/issues).
## Links
- [GitHub Repository](https://github.com/mozilla/cubeb)
- [API Documentation](https://mozilla.github.io/cubeb/)

View File

@@ -49,6 +49,7 @@ extern "C" {
output_params.channels = 2;
output_params.layout = CUBEB_LAYOUT_UNDEFINED;
output_params.prefs = CUBEB_STREAM_PREF_NONE;
output_params.input_params = CUBEB_INPUT_PROCESSING_PARAM_NONE;
rv = cubeb_get_min_latency(app_ctx, &output_params, &latency_frames);
if (rv != CUBEB_OK) {
@@ -62,6 +63,7 @@ extern "C" {
input_params.channels = 1;
input_params.layout = CUBEB_LAYOUT_UNDEFINED;
input_params.prefs = CUBEB_STREAM_PREF_NONE;
input_params.input_params = CUBEB_INPUT_PROCESSING_PARAM_NONE;
cubeb_stream * stm;
rv = cubeb_stream_init(app_ctx, &stm, "Example Stream 1",
@@ -193,39 +195,39 @@ typedef uint32_t cubeb_channel_layout;
// Some common layout definitions.
enum {
CUBEB_LAYOUT_UNDEFINED = 0, // Indicate the speaker's layout is undefined.
CUBEB_LAYOUT_MONO = (uint32_t)CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_MONO_LFE = (uint32_t)CUBEB_LAYOUT_MONO | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_STEREO = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT,
CUBEB_LAYOUT_STEREO_LFE = (uint32_t)CUBEB_LAYOUT_STEREO | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_MONO = CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_MONO_LFE = CUBEB_LAYOUT_MONO | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_STEREO = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT,
CUBEB_LAYOUT_STEREO_LFE = CUBEB_LAYOUT_STEREO | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F =
(uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT | (uint32_t)CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F_LFE = (uint32_t)CUBEB_LAYOUT_3F | (uint32_t)CHANNEL_LOW_FREQUENCY,
CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F_LFE = CUBEB_LAYOUT_3F | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_2F1 =
(uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT | (uint32_t)CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_2F1_LFE = (uint32_t)CUBEB_LAYOUT_2F1 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F1 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_3F1_LFE = (uint32_t)CUBEB_LAYOUT_3F1 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_2F2 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_SIDE_LEFT | (uint32_t)CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_2F2_LFE = (uint32_t)CUBEB_LAYOUT_2F2 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_QUAD = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_BACK_LEFT | (uint32_t)CHANNEL_BACK_RIGHT,
CUBEB_LAYOUT_QUAD_LFE = (uint32_t)CUBEB_LAYOUT_QUAD | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_SIDE_LEFT |
(uint32_t)CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F2_LFE = (uint32_t)CUBEB_LAYOUT_3F2 | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2_BACK = (uint32_t)CUBEB_LAYOUT_QUAD | (uint32_t)CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F2_LFE_BACK = (uint32_t)CUBEB_LAYOUT_3F2_BACK | (uint32_t)CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F3R_LFE = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_LOW_FREQUENCY |
(uint32_t)CHANNEL_BACK_CENTER | (uint32_t)CHANNEL_SIDE_LEFT |
(uint32_t)CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F4_LFE = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_LOW_FREQUENCY |
(uint32_t)CHANNEL_BACK_LEFT | (uint32_t)CHANNEL_BACK_RIGHT |
(uint32_t)CHANNEL_SIDE_LEFT | (uint32_t)CHANNEL_SIDE_RIGHT,
CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_2F1_LFE = CUBEB_LAYOUT_2F1 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F1 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_BACK_CENTER,
CUBEB_LAYOUT_3F1_LFE = CUBEB_LAYOUT_3F1 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_2F2 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_2F2_LFE = CUBEB_LAYOUT_2F2 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_QUAD = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT,
CUBEB_LAYOUT_QUAD_LFE = CUBEB_LAYOUT_QUAD | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_SIDE_LEFT |
CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F2_LFE = CUBEB_LAYOUT_3F2 | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F2_BACK = CUBEB_LAYOUT_QUAD | CHANNEL_FRONT_CENTER,
CUBEB_LAYOUT_3F2_LFE_BACK = CUBEB_LAYOUT_3F2_BACK | CHANNEL_LOW_FREQUENCY,
CUBEB_LAYOUT_3F3R_LFE = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY |
CHANNEL_BACK_CENTER | CHANNEL_SIDE_LEFT |
CHANNEL_SIDE_RIGHT,
CUBEB_LAYOUT_3F4_LFE = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY |
CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT |
CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT,
};
/** Miscellaneous stream preferences. */
@@ -279,7 +281,10 @@ typedef struct {
cubeb_channel_layout
layout; /**< Requested channel layout. This must be consistent with the
provided channels. CUBEB_LAYOUT_UNDEFINED if unknown */
cubeb_stream_prefs prefs; /**< Requested preferences. */
cubeb_stream_prefs prefs; /**< Requested preferences. */
cubeb_input_processing_params input_params; /**< Requested input processing
params. Ignored for output streams. At present, only supported on the
WASAPI backend; others should use cubeb_set_input_processing_params. */
} cubeb_stream_params;
/** Audio device description */
@@ -414,6 +419,13 @@ typedef struct {
size_t count; /**< Device count in collection. */
} cubeb_device_collection;
/** Array of compiled backends returned by `cubeb_get_backend_names`. */
typedef struct {
const char * const *
names; /**< Array of strings representing backend names. */
size_t count; /**< Length of the array. */
} cubeb_backend_names;
/** User supplied data callback.
- Calling other cubeb functions from this callback is unsafe.
- The code in the callback should be non-blocking.
@@ -454,6 +466,8 @@ typedef void (*cubeb_device_changed_callback)(void * user_ptr);
/**
* User supplied callback called when the underlying device collection changed.
* This callback will be called when devices are added or removed from the
* system, or when the default device changes for the specified device type.
* @param context A pointer to the cubeb context.
* @param user_ptr The pointer passed to
* cubeb_register_device_collection_changed. */
@@ -485,17 +499,18 @@ CUBEB_EXPORT int
cubeb_init(cubeb ** context, char const * context_name,
char const * backend_name);
/** Returns a list of backend names which can be supplid to cubeb_init().
Array is null-terminated. */
CUBEB_EXPORT const char**
cubeb_get_backend_names();
/** Get a read-only string identifying this context's current backend.
@param context A pointer to the cubeb context.
@retval Read-only string identifying current backend. */
CUBEB_EXPORT char const *
cubeb_get_backend_id(cubeb * context);
/** Get a read-only array of strings identifying available backends.
These can be passed as `backend_name` parameter to `cubeb_init`.
@retval Struct containing the array with backend names. */
CUBEB_EXPORT cubeb_backend_names
cubeb_get_backend_names();
/** Get the maximum possible number of channels.
@param context A pointer to the cubeb context.
@param max_channels The maximum number of channels.
@@ -674,7 +689,7 @@ cubeb_stream_get_current_device(cubeb_stream * stm,
application is accessing audio input. When all inputs are muted they can
prove to the user that the application is not actively capturing any input.
@param stream the stream for which to set input mute state
@param muted whether the input should mute or not
@param mute whether the input should mute or not
@retval CUBEB_OK
@retval CUBEB_ERROR_INVALID_PARAMETER if this stream does not have an input
device
@@ -745,14 +760,16 @@ cubeb_device_collection_destroy(cubeb * context,
cubeb_device_collection * collection);
/** Registers a callback which is called when the system detects
a new device or a device is removed.
a new device or a device is removed, or when the default device
changes for the specified device type.
@param context
@param devtype device type to include. Different callbacks and user pointers
can be registered for each devtype. The hybrid devtype
`CUBEB_DEVICE_TYPE_INPUT | CUBEB_DEVICE_TYPE_OUTPUT` is also valid
and will register the provided callback and user pointer in both
sides.
@param callback a function called whenever the system device list changes.
@param callback a function called whenever the system device list changes,
including when default devices change.
Passing NULL allow to unregister a function. You have to unregister
first before you register a new callback.
@param user_ptr pointer to user specified data which will be present in

View File

@@ -31,6 +31,10 @@ struct cubeb_stream {
int
pulse_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_PULSE_RUST)
int
pulse_rust_init(cubeb ** contet, char const * context_name);
#endif
#if defined(USE_JACK)
int
jack_init(cubeb ** context, char const * context_name);
@@ -43,6 +47,10 @@ alsa_init(cubeb ** context, char const * context_name);
int
audiounit_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_AUDIOUNIT_RUST)
int
audiounit_rust_init(cubeb ** contet, char const * context_name);
#endif
#if defined(USE_WINMM)
int
winmm_init(cubeb ** context, char const * context_name);
@@ -55,10 +63,30 @@ wasapi_init(cubeb ** context, char const * context_name);
int
sndio_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_SUN)
int
sun_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_OPENSL)
int
opensl_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_OSS)
int
oss_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_AAUDIO)
int
aaudio_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_AUDIOTRACK)
int
audiotrack_init(cubeb ** context, char const * context_name);
#endif
#if defined(USE_KAI)
int
kai_init(cubeb ** context, char const * context_name);
#endif
static int
validate_stream_params(cubeb_stream_params * input_stream_params,
@@ -123,6 +151,10 @@ cubeb_init(cubeb ** context, char const * context_name,
if (!strcmp(backend_name, "pulse")) {
#if defined(USE_PULSE)
init_oneshot = pulse_init;
#endif
} else if (!strcmp(backend_name, "pulse-rust")) {
#if defined(USE_PULSE_RUST)
init_oneshot = pulse_rust_init;
#endif
} else if (!strcmp(backend_name, "jack")) {
#if defined(USE_JACK)
@@ -135,6 +167,10 @@ cubeb_init(cubeb ** context, char const * context_name,
} else if (!strcmp(backend_name, "audiounit")) {
#if defined(USE_AUDIOUNIT)
init_oneshot = audiounit_init;
#endif
} else if (!strcmp(backend_name, "audiounit-rust")) {
#if defined(USE_AUDIOUNIT_RUST)
init_oneshot = audiounit_rust_init;
#endif
} else if (!strcmp(backend_name, "wasapi")) {
#if defined(USE_WASAPI)
@@ -147,10 +183,30 @@ cubeb_init(cubeb ** context, char const * context_name,
} else if (!strcmp(backend_name, "sndio")) {
#if defined(USE_SNDIO)
init_oneshot = sndio_init;
#endif
} else if (!strcmp(backend_name, "sun")) {
#if defined(USE_SUN)
init_oneshot = sun_init;
#endif
} else if (!strcmp(backend_name, "opensl")) {
#if defined(USE_OPENSL)
init_oneshot = opensl_init;
#endif
} else if (!strcmp(backend_name, "oss")) {
#if defined(USE_OSS)
init_oneshot = oss_init;
#endif
} else if (!strcmp(backend_name, "aaudio")) {
#if defined(USE_AAUDIO)
init_oneshot = aaudio_init;
#endif
} else if (!strcmp(backend_name, "audiotrack")) {
#if defined(USE_AUDIOTRACK)
init_oneshot = audiotrack_init;
#endif
} else if (!strcmp(backend_name, "kai")) {
#if defined(USE_KAI)
init_oneshot = kai_init;
#endif
} else {
/* Already set */
@@ -163,6 +219,9 @@ cubeb_init(cubeb ** context, char const * context_name,
* to override all other choices
*/
init_oneshot,
#if defined(USE_PULSE_RUST)
pulse_rust_init,
#endif
#if defined(USE_PULSE)
pulse_init,
#endif
@@ -178,6 +237,9 @@ cubeb_init(cubeb ** context, char const * context_name,
#if defined(USE_OSS)
oss_init,
#endif
#if defined(USE_AUDIOUNIT_RUST)
audiounit_rust_init,
#endif
#if defined(USE_AUDIOUNIT)
audiounit_init,
#endif
@@ -189,6 +251,18 @@ cubeb_init(cubeb ** context, char const * context_name,
#endif
#if defined(USE_SUN)
sun_init,
#endif
#if defined(USE_AAUDIO)
aaudio_init,
#endif
#if defined(USE_OPENSL)
opensl_init,
#endif
#if defined(USE_AUDIOTRACK)
audiotrack_init,
#endif
#if defined(USE_KAI)
kai_init,
#endif
};
int i;
@@ -214,13 +288,26 @@ cubeb_init(cubeb ** context, char const * context_name,
return CUBEB_ERROR;
}
const char**
char const *
cubeb_get_backend_id(cubeb * context)
{
if (!context) {
return NULL;
}
return context->ops->get_backend_id(context);
}
cubeb_backend_names
cubeb_get_backend_names()
{
static const char* backend_names[] = {
static const char * const backend_names[] = {
#if defined(USE_PULSE)
"pulse",
#endif
#if defined(USE_PULSE_RUST)
"pulse-rust",
#endif
#if defined(USE_JACK)
"jack",
#endif
@@ -230,6 +317,9 @@ cubeb_get_backend_names()
#if defined(USE_AUDIOUNIT)
"audiounit",
#endif
#if defined(USE_AUDIOUNIT_RUST)
"audiounit-rust",
#endif
#if defined(USE_WASAPI)
"wasapi",
#endif
@@ -239,23 +329,30 @@ cubeb_get_backend_names()
#if defined(USE_SNDIO)
"sndio",
#endif
#if defined(USE_SUN)
"sun",
#endif
#if defined(USE_OPENSL)
"opensl",
#endif
#if defined(USE_OSS)
"oss",
#endif
NULL,
#if defined(USE_AAUDIO)
"aaudio",
#endif
#if defined(USE_AUDIOTRACK)
"audiotrack",
#endif
#if defined(USE_KAI)
"kai",
#endif
};
return backend_names;
}
char const *
cubeb_get_backend_id(cubeb * context)
{
if (!context) {
return NULL;
}
return context->ops->get_backend_id(context);
return (cubeb_backend_names){
.names = backend_names,
.count = NELEMS(backend_names),
};
}
int

View File

@@ -213,12 +213,19 @@ struct cubeb_stream {
cubeb_device_changed_callback device_changed_callback = nullptr;
owned_critical_section device_changed_callback_lock;
/* Stream creation parameters */
cubeb_stream_params input_stream_params = {CUBEB_SAMPLE_FLOAT32NE, 0, 0,
cubeb_stream_params input_stream_params = {CUBEB_SAMPLE_FLOAT32NE,
0,
0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE};
cubeb_stream_params output_stream_params = {CUBEB_SAMPLE_FLOAT32NE, 0, 0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE};
CUBEB_STREAM_PREF_NONE,
CUBEB_INPUT_PROCESSING_PARAM_NONE};
cubeb_stream_params output_stream_params = {
CUBEB_SAMPLE_FLOAT32NE,
0,
0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE,
CUBEB_INPUT_PROCESSING_PARAM_NONE};
device_info input_device;
device_info output_device;
/* Format descriptions */

View File

@@ -16,8 +16,8 @@
#include <time.h>
#endif
static std::atomic<cubeb_log_level> g_cubeb_log_level;
static std::atomic<cubeb_log_callback> g_cubeb_log_callback;
std::atomic<cubeb_log_level> g_cubeb_log_level;
std::atomic<cubeb_log_callback> g_cubeb_log_callback;
/** The maximum size of a log message, after having been formatted. */
const size_t CUBEB_LOG_MESSAGE_MAX_SIZE = 256;
@@ -32,6 +32,133 @@ cubeb_noop_log_callback(char const * /* fmt */, ...)
{
}
/**
* This wraps an inline buffer, that represents a log message, that must be
* null-terminated.
* This class should not use system calls or other potentially blocking code.
*/
class cubeb_log_message {
public:
cubeb_log_message() { *storage = '\0'; }
cubeb_log_message(char const str[CUBEB_LOG_MESSAGE_MAX_SIZE])
{
size_t length = strlen(str);
/* paranoia against malformed message */
assert(length < CUBEB_LOG_MESSAGE_MAX_SIZE);
if (length > CUBEB_LOG_MESSAGE_MAX_SIZE - 1) {
return;
}
PodCopy(storage, str, length);
storage[length] = '\0';
}
char const * get() { return storage; }
private:
char storage[CUBEB_LOG_MESSAGE_MAX_SIZE]{};
};
/** Lock-free asynchronous logger, made so that logging from a
* real-time audio callback does not block the audio thread. */
class cubeb_async_logger {
public:
/* This is thread-safe since C++11 */
static cubeb_async_logger & get()
{
static cubeb_async_logger instance;
return instance;
}
void push(char const str[CUBEB_LOG_MESSAGE_MAX_SIZE])
{
cubeb_log_message msg(str);
auto * owned_queue = msg_queue.load();
// Check if the queue is being deallocated. If not, grab ownership. If yes,
// return, the message won't be logged.
if (!owned_queue ||
!msg_queue.compare_exchange_strong(owned_queue, nullptr)) {
return;
}
owned_queue->enqueue(msg);
// Return ownership.
msg_queue.store(owned_queue);
}
void run()
{
assert(logging_thread.get_id() == std::thread::id());
logging_thread = std::thread([this]() {
CUBEB_REGISTER_THREAD("cubeb_log");
while (!shutdown_thread) {
cubeb_log_message msg;
while (msg_queue_consumer.load()->dequeue(&msg, 1)) {
cubeb_log_internal_no_format(msg.get());
}
std::this_thread::sleep_for(
std::chrono::milliseconds(CUBEB_LOG_BATCH_PRINT_INTERVAL_MS));
}
CUBEB_UNREGISTER_THREAD();
});
}
// Tell the underlying queue the producer thread has changed, so it does not
// assert in debug. This should be called with the thread stopped.
void reset_producer_thread()
{
if (msg_queue) {
msg_queue.load()->reset_thread_ids();
}
}
void start()
{
auto * queue =
new lock_free_queue<cubeb_log_message>(CUBEB_LOG_MESSAGE_QUEUE_DEPTH);
msg_queue.store(queue);
msg_queue_consumer.store(queue);
shutdown_thread = false;
run();
}
void stop()
{
assert(((g_cubeb_log_callback == cubeb_noop_log_callback) ||
!g_cubeb_log_callback) &&
"Only call stop after logging has been disabled.");
shutdown_thread = true;
if (logging_thread.get_id() != std::thread::id()) {
logging_thread.join();
logging_thread = std::thread();
auto * owned_queue = msg_queue.load();
// Check if the queue is being used. If not, grab ownership. If yes,
// try again shortly. At this point, the logging thread has been joined,
// so nothing is going to dequeue.
// If there is a valid pointer here, then the real-time audio thread that
// logs won't attempt to write into the queue, and instead drop the
// message.
while (!msg_queue.compare_exchange_weak(owned_queue, nullptr)) {
}
delete owned_queue;
msg_queue_consumer.store(nullptr);
}
}
private:
cubeb_async_logger() {}
~cubeb_async_logger()
{
assert(logging_thread.get_id() == std::thread::id() &&
(g_cubeb_log_callback == cubeb_noop_log_callback ||
!g_cubeb_log_callback));
if (msg_queue.load()) {
delete msg_queue.load();
}
}
/** This is quite a big data structure, but is only instantiated if the
* asynchronous logger is used. The two pointers point to the same object, but
* the first one can be temporarily null when a message is being enqueued. */
std::atomic<lock_free_queue<cubeb_log_message> *> msg_queue = {nullptr};
std::atomic<lock_free_queue<cubeb_log_message> *> msg_queue_consumer = {
nullptr};
std::atomic<bool> shutdown_thread = {false};
std::thread logging_thread;
};
void
cubeb_log_internal(char const * file, uint32_t line, char const * fmt, ...)
{
@@ -49,6 +176,29 @@ cubeb_log_internal_no_format(const char * msg)
g_cubeb_log_callback.load()(msg);
}
void
cubeb_async_log(char const * fmt, ...)
{
// This is going to copy a 256 bytes array around, which is fine.
// We don't want to allocate memory here, because this is made to
// be called from a real-time callback.
va_list args;
va_start(args, fmt);
char msg[CUBEB_LOG_MESSAGE_MAX_SIZE];
vsnprintf(msg, CUBEB_LOG_MESSAGE_MAX_SIZE, fmt, args);
cubeb_async_logger::get().push(msg);
va_end(args);
}
void
cubeb_async_log_reset_threads(void)
{
if (!g_cubeb_log_callback) {
return;
}
cubeb_async_logger::get().reset_producer_thread();
}
void
cubeb_log_set(cubeb_log_level log_level, cubeb_log_callback log_callback)
{
@@ -57,8 +207,15 @@ cubeb_log_set(cubeb_log_level log_level, cubeb_log_callback log_callback)
// nullptr, to prevent a TOCTOU race between checking the pointer
if (log_callback && log_level != CUBEB_LOG_DISABLED) {
g_cubeb_log_callback = log_callback;
if (log_level == CUBEB_LOG_VERBOSE) {
cubeb_async_logger::get().start();
}
} else if (!log_callback || CUBEB_LOG_DISABLED) {
g_cubeb_log_callback = cubeb_noop_log_callback;
// This returns once the thread has joined.
// This is safe even if CUBEB_LOG_VERBOSE was not set; the thread will
// simply not be joinable.
cubeb_async_logger::get().stop();
} else {
assert(false && "Incorrect parameters passed to cubeb_log_set");
}

View File

@@ -39,7 +39,12 @@ cubeb_log_get_callback(void);
void
cubeb_log_internal_no_format(const char * msg);
void
cubeb_log_internal(const char * filename, uint32_t line, const char * fmt, ...);
cubeb_log_internal(const char * filename, uint32_t line, const char * fmt, ...)
PRINTF_FORMAT(3, 4);
void
cubeb_async_log(const char * fmt, ...) PRINTF_FORMAT(1, 2);
void
cubeb_async_log_reset_threads(void);
#ifdef __cplusplus
}
@@ -55,9 +60,16 @@ cubeb_log_internal(const char * filename, uint32_t line, const char * fmt, ...);
} \
} while (0)
#define ALOG_INTERNAL(level, fmt, ...) \
do { \
if (cubeb_log_get_level() >= level && cubeb_log_get_callback()) { \
cubeb_async_log(fmt, ##__VA_ARGS__); \
} \
} while (0)
/* Asynchronous logging macros to log in real-time callbacks. */
/* Should not be used on android due to the use of global/static variables. */
#define ALOGV(msg, ...) LOG_INTERNAL(CUBEB_LOG_VERBOSE, msg, ##__VA_ARGS__)
#define ALOG(msg, ...) LOG_INTERNAL(CUBEB_LOG_NORMAL, msg, ##__VA_ARGS__)
#define ALOGV(msg, ...) ALOG_INTERNAL(CUBEB_LOG_VERBOSE, msg, ##__VA_ARGS__)
#define ALOG(msg, ...) ALOG_INTERNAL(CUBEB_LOG_NORMAL, msg, ##__VA_ARGS__)
#endif // CUBEB_LOG

View File

@@ -371,3 +371,9 @@ cubeb_resampler_latency(cubeb_resampler * resampler)
{
return resampler->latency();
}
cubeb_resampler_stats
cubeb_resampler_stats_get(cubeb_resampler * resampler)
{
return resampler->stats();
}

View File

@@ -84,6 +84,20 @@ cubeb_resampler_destroy(cubeb_resampler * resampler);
long
cubeb_resampler_latency(cubeb_resampler * resampler);
/**
* Test-only introspection API to ensure that there is no buffering
* buildup when resampling.
*/
typedef struct {
size_t input_input_buffer_size;
size_t input_output_buffer_size;
size_t output_input_buffer_size;
size_t output_output_buffer_size;
} cubeb_resampler_stats;
cubeb_resampler_stats
cubeb_resampler_stats_get(cubeb_resampler * resampler);
#if defined(__cplusplus)
}
#endif

View File

@@ -56,6 +56,7 @@ struct cubeb_resampler {
virtual long fill(void * input_buffer, long * input_frames_count,
void * output_buffer, long frames_needed) = 0;
virtual long latency() = 0;
virtual cubeb_resampler_stats stats() = 0;
virtual ~cubeb_resampler() {}
};
@@ -86,6 +87,16 @@ public:
virtual long latency() { return 0; }
virtual cubeb_resampler_stats stats()
{
cubeb_resampler_stats stats;
stats.input_input_buffer_size = internal_input_buffer.length();
stats.input_output_buffer_size = 0;
stats.output_input_buffer_size = 0;
stats.output_output_buffer_size = 0;
return stats;
}
void drop_audio_if_needed()
{
uint32_t to_keep = min_buffered_audio_frame(sample_rate);
@@ -122,6 +133,20 @@ public:
virtual long fill(void * input_buffer, long * input_frames_count,
void * output_buffer, long output_frames_needed);
virtual cubeb_resampler_stats stats()
{
cubeb_resampler_stats stats = {};
if (input_processor) {
stats.input_input_buffer_size = input_processor->input_buffer_size();
stats.input_output_buffer_size = input_processor->output_buffer_size();
}
if (output_processor) {
stats.output_input_buffer_size = output_processor->input_buffer_size();
stats.output_output_buffer_size = output_processor->output_buffer_size();
}
return stats;
}
virtual long latency()
{
if (input_processor && output_processor) {
@@ -280,29 +305,28 @@ public:
}
/** Returns the number of frames to pass in the input of the resampler to have
* exactly `output_frame_count` resampled frames. This can return a number
* slightly bigger than what is strictly necessary, but it guaranteed that the
* number of output frames will be exactly equal. */
* at least `output_frame_count` resampled frames. */
uint32_t input_needed_for_output(int32_t output_frame_count) const
{
assert(output_frame_count >= 0); // Check overflow
int32_t unresampled_frames_left =
samples_to_frames(resampling_in_buffer.length());
int32_t resampled_frames_left =
samples_to_frames(resampling_out_buffer.length());
float input_frames_needed =
(output_frame_count - unresampled_frames_left) * resampling_ratio -
resampled_frames_left;
if (input_frames_needed < 0) {
return 0;
}
return (uint32_t)ceilf(input_frames_needed);
float input_frames_needed_frac =
static_cast<float>(output_frame_count) * resampling_ratio;
// speex_resample()` can be irregular in its consumption of input samples.
// Provide one more frame than the number that would be required with
// regular consumption, to make the speex resampler behave more regularly,
// and so predictably.
auto input_frame_needed =
1 + static_cast<int32_t>(ceilf(input_frames_needed_frac));
input_frame_needed -= std::min(unresampled_frames_left, input_frame_needed);
return input_frame_needed;
}
/** Returns a pointer to the input buffer, that contains empty space for at
* least `frame_count` elements. This is useful so that consumer can directly
* write into the input buffer of the resampler. The pointer returned is
* adjusted so that leftover data are not overwritten.
* least `frame_count` elements. This is useful so that consumer can
* directly write into the input buffer of the resampler. The pointer
* returned is adjusted so that leftover data are not overwritten.
*/
T * input_buffer(size_t frame_count)
{
@@ -312,8 +336,8 @@ public:
return resampling_in_buffer.data() + leftover_samples;
}
/** This method works with `input_buffer`, and allows to inform the processor
how much frames have been written in the provided buffer. */
/** This method works with `input_buffer`, and allows to inform the
processor how much frames have been written in the provided buffer. */
void written(size_t written_frames)
{
resampling_in_buffer.set_length(leftover_samples +
@@ -331,6 +355,9 @@ public:
}
}
size_t input_buffer_size() const { return resampling_in_buffer.length(); }
size_t output_buffer_size() const { return resampling_out_buffer.length(); }
private:
/** Wrapper for the speex resampling functions to have a typed
* interface. */
@@ -359,6 +386,7 @@ private:
output_frame_count);
assert(rv == RESAMPLER_ERR_SUCCESS);
}
/** The state for the speex resampler used internaly. */
SpeexResamplerState * speex_resampler;
/** Source rate / target rate. */
@@ -371,8 +399,8 @@ private:
auto_array<T> resampling_out_buffer;
/** Additional latency inserted into the pipeline for synchronisation. */
uint32_t additional_latency;
/** When `input_buffer` is called, this allows tracking the number of samples
that were in the buffer. */
/** When `input_buffer` is called, this allows tracking the number of
samples that were in the buffer. */
uint32_t leftover_samples;
};
@@ -417,8 +445,8 @@ public:
return delay_output_buffer.data();
}
/** Get a pointer to the first writable location in the input buffer>
* @parameter frames_needed the number of frames the user needs to write into
* the buffer.
* @parameter frames_needed the number of frames the user needs to write
* into the buffer.
* @returns a pointer to a location in the input buffer where #frames_needed
* can be writen. */
T * input_buffer(uint32_t frames_needed)
@@ -428,8 +456,8 @@ public:
frames_to_samples(frames_needed));
return delay_input_buffer.data() + leftover_samples;
}
/** This method works with `input_buffer`, and allows to inform the processor
how much frames have been written in the provided buffer. */
/** This method works with `input_buffer`, and allows to inform the
processor how much frames have been written in the provided buffer. */
void written(size_t frames_written)
{
delay_input_buffer.set_length(leftover_samples +
@@ -450,8 +478,8 @@ public:
return to_pop;
}
/** Returns the number of frames one needs to input into the delay line to get
* #frames_needed frames back.
/** Returns the number of frames one needs to input into the delay line to
* get #frames_needed frames back.
* @parameter frames_needed the number of frames one want to write into the
* delay_line
* @returns the number of frames one will get. */
@@ -469,19 +497,23 @@ public:
void drop_audio_if_needed()
{
size_t available = samples_to_frames(delay_input_buffer.length());
uint32_t available = samples_to_frames(delay_input_buffer.length());
uint32_t to_keep = min_buffered_audio_frame(sample_rate);
if (available > to_keep) {
ALOGV("Dropping %u frames", available - to_keep);
delay_input_buffer.pop(nullptr, frames_to_samples(available - to_keep));
}
}
size_t input_buffer_size() const { return delay_input_buffer.length(); }
size_t output_buffer_size() const { return delay_output_buffer.length(); }
private:
/** The length, in frames, of this delay line */
uint32_t length;
/** When `input_buffer` is called, this allows tracking the number of samples
that where in the buffer. */
/** When `input_buffer` is called, this allows tracking the number of
samples that where in the buffer. */
uint32_t leftover_samples;
/** The input buffer, where the delay is applied. */
auto_array<T> delay_input_buffer;
@@ -511,8 +543,8 @@ cubeb_resampler_create_internal(cubeb_stream * stream,
"need at least one valid parameter pointer.");
/* All the streams we have have a sample rate that matches the target
sample rate, use a no-op resampler, that simply forwards the buffers to the
callback. */
sample rate, use a no-op resampler, that simply forwards the buffers to
the callback. */
if (((input_params && input_params->rate == target_rate) &&
(output_params && output_params->rate == target_rate)) ||
(input_params && !output_params && (input_params->rate == target_rate)) ||

View File

@@ -4,8 +4,12 @@
* This program is made available under an ISC-style license. See the
* accompanying file LICENSE for details.
*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0603
#endif // !_WIN32_WINNT
#ifndef NOMINMAX
#define NOMINMAX
#endif // !NOMINMAX
#include <algorithm>
#include <atomic>
@@ -37,31 +41,6 @@
#include "cubeb_tracing.h"
#include "cubeb_utils.h"
// Some people have reported glitches with IAudioClient3 capture streams:
// http://blog.nirbheek.in/2018/03/low-latency-audio-on-windows-with.html
// https://bugzilla.mozilla.org/show_bug.cgi?id=1590902
#define ALLOW_AUDIO_CLIENT_3_FOR_INPUT 0
// IAudioClient3::GetSharedModeEnginePeriod() seem to return min latencies
// bigger than IAudioClient::GetDevicePeriod(), which is confusing (10ms vs
// 3ms), though the default latency is usually the same and we should use the
// IAudioClient3 function anyway, as it's more correct
#define USE_AUDIO_CLIENT_3_MIN_PERIOD 1
// If this is true, we allow IAudioClient3 the creation of sessions with a
// latency above the default one (usually 10ms).
// Whether we should default this to true or false depend on many things:
// -Does creating a shared IAudioClient3 session (not locked to a format)
// actually forces all the IAudioClient(1) sessions to have the same latency?
// I could find no proof of that.
// -Does creating a shared IAudioClient3 session with a latency >= the default
// one actually improve the latency (as in how late the audio is) at all?
// -Maybe we could expose this as cubeb stream pref
// (e.g. take priority over other apps)?
#define ALLOW_AUDIO_CLIENT_3_LATENCY_OVER_DEFAULT 1
// If this is true and the user specified a target latency >= the IAudioClient3
// max one, then we reject it and fall back to IAudioClient(1). There wouldn't
// be much point in having a low latency if that's not what the user wants.
#define REJECT_AUDIO_CLIENT_3_LATENCY_OVER_MAX 0
// Windows 10 exposes the IAudioClient3 interface to create low-latency streams.
// Copy the interface definition from audioclient.h here to make the code
// simpler and so that we can still access IAudioClient3 via COM if cubeb was
@@ -229,11 +208,6 @@ struct auto_stream_ref {
cubeb_stream * stm;
};
using set_mm_thread_characteristics_function =
decltype(&AvSetMmThreadCharacteristicsW);
using revert_mm_thread_characteristics_function =
decltype(&AvRevertMmThreadCharacteristics);
extern cubeb_ops const wasapi_ops;
static com_heap_ptr<wchar_t>
@@ -304,8 +278,8 @@ wasapi_enumerate_devices_internal(cubeb * context, cubeb_device_type type,
static int
wasapi_device_collection_destroy(cubeb * ctx,
cubeb_device_collection * collection);
static char const *
wstr_to_utf8(wchar_t const * str);
static std::unique_ptr<char const[]>
wstr_to_utf8(LPCWSTR str);
static std::unique_ptr<wchar_t const[]>
utf8_to_wstr(char const * str);
@@ -314,6 +288,15 @@ utf8_to_wstr(char const * str);
class wasapi_collection_notification_client;
class monitor_device_notifications;
typedef enum {
/* Clear options */
CUBEB_AUDIO_CLIENT2_NONE,
/* Use AUDCLNT_STREAMOPTIONS_RAW */
CUBEB_AUDIO_CLIENT2_RAW,
/* Use CUBEB_STREAM_PREF_COMMUNICATIONS */
CUBEB_AUDIO_CLIENT2_VOICE
} AudioClient2Option;
struct cubeb {
cubeb_ops const * ops = &wasapi_ops;
owned_critical_section lock;
@@ -331,13 +314,6 @@ struct cubeb {
nullptr;
void * output_collection_changed_user_ptr = nullptr;
UINT64 performance_counter_frequency;
/* Library dynamically opened to increase the render thread priority, and
the two function pointers we need. */
HMODULE mmcss_module = nullptr;
set_mm_thread_characteristics_function set_mm_thread_characteristics =
nullptr;
revert_mm_thread_characteristics_function revert_mm_thread_characteristics =
nullptr;
};
class wasapi_endpoint_notification_client;
@@ -360,20 +336,33 @@ struct cubeb_stream {
/* Mixer pameters. We need to convert the input stream to this
samplerate/channel layout, as WASAPI does not resample nor upmix
itself. */
cubeb_stream_params input_mix_params = {CUBEB_SAMPLE_FLOAT32NE, 0, 0,
cubeb_stream_params input_mix_params = {CUBEB_SAMPLE_FLOAT32NE,
0,
0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE};
cubeb_stream_params output_mix_params = {CUBEB_SAMPLE_FLOAT32NE, 0, 0,
CUBEB_STREAM_PREF_NONE,
CUBEB_INPUT_PROCESSING_PARAM_NONE};
cubeb_stream_params output_mix_params = {CUBEB_SAMPLE_FLOAT32NE,
0,
0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE};
CUBEB_STREAM_PREF_NONE,
CUBEB_INPUT_PROCESSING_PARAM_NONE};
/* Stream parameters. This is what the client requested,
* and what will be presented in the callback. */
cubeb_stream_params input_stream_params = {CUBEB_SAMPLE_FLOAT32NE, 0, 0,
cubeb_stream_params input_stream_params = {CUBEB_SAMPLE_FLOAT32NE,
0,
0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE};
cubeb_stream_params output_stream_params = {CUBEB_SAMPLE_FLOAT32NE, 0, 0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE};
CUBEB_STREAM_PREF_NONE,
CUBEB_INPUT_PROCESSING_PARAM_NONE};
cubeb_stream_params output_stream_params = {
CUBEB_SAMPLE_FLOAT32NE,
0,
0,
CUBEB_LAYOUT_UNDEFINED,
CUBEB_STREAM_PREF_NONE,
CUBEB_INPUT_PROCESSING_PARAM_NONE};
/* A MMDevice role for this stream: either communication or console here. */
ERole role;
/* True if this stream will transport voice-data. */
@@ -662,6 +651,10 @@ public:
LPCWSTR device_id)
{
LOG("collection: Audio device default changed, id = %S.", device_id);
/* Default device changes count as device collection changes */
monitor_notifications.notify(flow);
return S_OK;
}
@@ -772,7 +765,7 @@ public:
LPCWSTR device_id)
{
LOG("endpoint: Audio device default changed flow=%d role=%d "
"new_device_id=%ws.",
"new_device_id=%S.",
flow, role, device_id);
/* we only support a single stream type for now. */
@@ -783,11 +776,13 @@ public:
DWORD last_change_ms = timeGetTime() - last_device_change;
bool same_device = default_device_id && device_id &&
wcscmp(default_device_id.get(), device_id) == 0;
LOG("endpoint: Audio device default changed last_change=%u same_device=%d",
LOG("endpoint: Audio device default changed last_change=%lu same_device=%d",
last_change_ms, same_device);
if (last_change_ms > DEVICE_CHANGE_DEBOUNCE_MS || !same_device) {
if (device_id) {
default_device_id.reset(_wcsdup(device_id));
wchar_t * new_device_id = new wchar_t[wcslen(device_id) + 1];
wcscpy(new_device_id, device_id);
default_device_id.reset(new_device_id);
} else {
default_device_id.reset();
}
@@ -863,16 +858,12 @@ intern_device_id(cubeb * ctx, wchar_t const * id)
auto_lock lock(ctx->lock);
char const * tmp = wstr_to_utf8(id);
std::unique_ptr<char const[]> tmp = wstr_to_utf8(id);
if (!tmp) {
return nullptr;
}
char const * interned = cubeb_strings_intern(ctx->device_ids, tmp);
free((void *)tmp);
return interned;
return cubeb_strings_intern(ctx->device_ids, tmp.get());
}
bool
@@ -977,7 +968,7 @@ refill(cubeb_stream * stm, void * input_buffer, long input_frames_count,
cubeb_resampler_fill(stm->resampler.get(), input_buffer,
&input_frames_count, dest, output_frames_needed);
if (out_frames < 0) {
ALOGV("Callback refill error: %d", out_frames);
ALOGV("Callback refill error: %ld", out_frames);
wasapi_state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
return out_frames;
}
@@ -1263,8 +1254,8 @@ refill_callback_duplex(cubeb_stream * stm)
XASSERT(has_input(stm) && has_output(stm));
if (stm->input_stream_params.prefs & CUBEB_STREAM_PREF_LOOPBACK) {
HRESULT rv = get_input_buffer(stm);
if (FAILED(rv)) {
rv = get_input_buffer(stm);
if (!rv) {
return rv;
}
}
@@ -1274,7 +1265,6 @@ refill_callback_duplex(cubeb_stream * stm)
rv = get_output_buffer(stm, output_buffer, output_frames);
if (!rv) {
hr = stm->render_client->ReleaseBuffer(output_frames, 0);
return rv;
}
@@ -1291,9 +1281,11 @@ refill_callback_duplex(cubeb_stream * stm)
stm->total_output_frames += output_frames;
ALOGV("in: %zu, out: %zu, missing: %ld, ratio: %f", stm->total_input_frames,
stm->total_output_frames,
static_cast<long>(stm->total_output_frames) - stm->total_input_frames,
ALOGV("in: %llu, out: %llu, missing: %ld, ratio: %f",
(unsigned long long)stm->total_input_frames,
(unsigned long long)stm->total_output_frames,
static_cast<long long>(stm->total_output_frames) -
static_cast<long long>(stm->total_input_frames),
static_cast<float>(stm->total_output_frames) / stm->total_input_frames);
long got;
@@ -1438,8 +1430,7 @@ static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream)
/* We could consider using "Pro Audio" here for WebAudio and
maybe WebRTC. */
mmcss_handle =
stm->context->set_mm_thread_characteristics(L"Audio", &mmcss_task_index);
mmcss_handle = AvSetMmThreadCharacteristicsA("Audio", &mmcss_task_index);
if (!mmcss_handle) {
/* This is not fatal, but we might glitch under heavy load. */
LOG("Unable to use mmcss to bump the render thread priority: %lx",
@@ -1519,8 +1510,8 @@ static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream)
is_playing = stm->refill_callback(stm);
break;
case WAIT_OBJECT_0 + 3: { /* input available */
HRESULT rv = get_input_buffer(stm);
if (FAILED(rv)) {
bool rv = get_input_buffer(stm);
if (!rv) {
is_playing = false;
continue;
}
@@ -1532,8 +1523,11 @@ static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream)
break;
}
default:
LOG("case %lu not handled in render loop.", waitResult);
XASSERT(false);
LOG("render_loop: waitResult=%lu (lastError=%lu) unhandled, exiting",
waitResult, GetLastError());
is_playing = false;
hr = E_FAIL;
continue;
}
}
@@ -1547,7 +1541,7 @@ static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream)
}
if (mmcss_handle) {
stm->context->revert_mm_thread_characteristics(mmcss_handle);
AvRevertMmThreadCharacteristics(mmcss_handle);
}
if (FAILED(hr)) {
@@ -1560,18 +1554,6 @@ static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream)
void
wasapi_destroy(cubeb * context);
HANDLE WINAPI
set_mm_thread_characteristics_noop(LPCWSTR, LPDWORD mmcss_task_index)
{
return (HANDLE)1;
}
BOOL WINAPI
revert_mm_thread_characteristics_noop(HANDLE mmcss_handle)
{
return true;
}
HRESULT
register_notification_client(cubeb_stream * stm)
{
@@ -1807,31 +1789,6 @@ wasapi_init(cubeb ** context, char const * context_name)
ctx->performance_counter_frequency = 0;
}
ctx->mmcss_module = LoadLibraryW(L"Avrt.dll");
bool success = false;
if (ctx->mmcss_module) {
ctx->set_mm_thread_characteristics =
reinterpret_cast<set_mm_thread_characteristics_function>(
GetProcAddress(ctx->mmcss_module, "AvSetMmThreadCharacteristicsW"));
ctx->revert_mm_thread_characteristics =
reinterpret_cast<revert_mm_thread_characteristics_function>(
GetProcAddress(ctx->mmcss_module,
"AvRevertMmThreadCharacteristics"));
success = ctx->set_mm_thread_characteristics &&
ctx->revert_mm_thread_characteristics;
}
if (!success) {
// This is not a fatal error, but we might end up glitching when
// the system is under high load.
LOG("Could not load avrt.dll or fetch AvSetMmThreadCharacteristicsW "
"AvRevertMmThreadCharacteristics: %lx",
GetLastError());
ctx->set_mm_thread_characteristics = &set_mm_thread_characteristics_noop;
ctx->revert_mm_thread_characteristics =
&revert_mm_thread_characteristics_noop;
}
*context = ctx;
return CUBEB_OK;
@@ -1839,7 +1796,6 @@ wasapi_init(cubeb ** context, char const * context_name)
}
namespace {
enum ShutdownPhase { OnStop, OnDestroy };
bool
stop_and_join_render_thread(cubeb_stream * stm)
@@ -1855,16 +1811,7 @@ stop_and_join_render_thread(cubeb_stream * stm)
return false;
}
/* Wait five seconds for the rendering thread to return. It's supposed to
* check its event loop very often, five seconds is rather conservative.
* Note: 5*1s loop to work around timer sleep issues on pre-Windows 8. */
DWORD r;
for (int i = 0; i < 5; ++i) {
r = WaitForSingleObject(stm->thread, 1000);
if (r == WAIT_OBJECT_0) {
break;
}
}
DWORD r = WaitForSingleObject(stm->thread, INFINITE);
if (r != WAIT_OBJECT_0) {
LOG("stop_and_join_render_thread: WaitForSingleObject on thread failed: "
"%lx, %lx",
@@ -1888,10 +1835,6 @@ wasapi_destroy(cubeb * context)
}
}
if (context->mmcss_module) {
FreeLibrary(context->mmcss_module);
}
delete context;
}
@@ -1949,44 +1892,6 @@ wasapi_get_min_latency(cubeb * ctx, cubeb_stream_params params,
return CUBEB_ERROR;
}
#if USE_AUDIO_CLIENT_3_MIN_PERIOD
// This is unreliable as we can't know the actual mixer format cubeb will
// ask for later on (nor we can branch on ALLOW_AUDIO_CLIENT_3_FOR_INPUT),
// and the min latency can change based on that.
com_ptr<IAudioClient3> client3;
hr = device->Activate(__uuidof(IAudioClient3), CLSCTX_INPROC_SERVER, NULL,
client3.receive_vpp());
if (SUCCEEDED(hr)) {
WAVEFORMATEX * mix_format = nullptr;
hr = client3->GetMixFormat(&mix_format);
if (SUCCEEDED(hr)) {
uint32_t default_period = 0, fundamental_period = 0, min_period = 0,
max_period = 0;
hr = client3->GetSharedModeEnginePeriod(mix_format, &default_period,
&fundamental_period, &min_period,
&max_period);
auto sample_rate = mix_format->nSamplesPerSec;
CoTaskMemFree(mix_format);
if (SUCCEEDED(hr)) {
// Print values in the same format as IAudioDevice::GetDevicePeriod()
REFERENCE_TIME min_period_rt(frames_to_hns(sample_rate, min_period));
REFERENCE_TIME default_period_rt(
frames_to_hns(sample_rate, default_period));
LOG("default device period: %I64d, minimum device period: %I64d",
default_period_rt, min_period_rt);
*latency_frames = hns_to_frames(params.rate, min_period_rt);
LOG("Minimum latency in frames: %u", *latency_frames);
return CUBEB_OK;
}
}
}
#endif
com_ptr<IAudioClient> client;
hr = device->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL,
client.receive_vpp());
@@ -2006,8 +1911,18 @@ wasapi_get_min_latency(cubeb * ctx, cubeb_stream_params params,
LOG("default device period: %I64d, minimum device period: %I64d",
default_period, minimum_period);
// The minimum_period is only relevant in exclusive streams.
/* If we're on Windows 10, we can use IAudioClient3 to get minimal latency.
Otherwise, according to the docs, the best latency we can achieve is by
synchronizing the stream and the engine.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370871%28v=vs.85%29.aspx
*/
// #ifdef _WIN32_WINNT_WIN10
#if 0
*latency_frames = hns_to_frames(params.rate, minimum_period);
#else
*latency_frames = hns_to_frames(params.rate, default_period);
#endif
LOG("Minimum latency in frames: %u", *latency_frames);
@@ -2044,6 +1959,21 @@ wasapi_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate)
return CUBEB_OK;
}
int
wasapi_get_supported_input_processing_params(
cubeb * ctx, cubeb_input_processing_params * params)
{
// This is not entirely accurate -- windows doesn't document precisely what
// AudioCategory_Communications does -- but assume that we can set all or none
// of them.
*params = static_cast<cubeb_input_processing_params>(
CUBEB_INPUT_PROCESSING_PARAM_ECHO_CANCELLATION |
CUBEB_INPUT_PROCESSING_PARAM_NOISE_SUPPRESSION |
CUBEB_INPUT_PROCESSING_PARAM_AUTOMATIC_GAIN_CONTROL |
CUBEB_INPUT_PROCESSING_PARAM_VOICE_ISOLATION);
return CUBEB_OK;
}
static void
waveformatex_update_derived_properties(WAVEFORMATEX * format)
{
@@ -2097,10 +2027,7 @@ handle_channel_layout(cubeb_stream * stm, EDataFlow direction,
if (hr == S_FALSE) {
/* Channel layout not supported, but WASAPI gives us a suggestion. Use it,
and handle the eventual upmix/downmix ourselves. Ignore the subformat of
the suggestion, since it seems to always be IEEE_FLOAT.
This fallback doesn't update the bit depth, so if a device
only supported bit depths cubeb doesn't support, so IAudioClient3
streams might fail */
the suggestion, since it seems to always be IEEE_FLOAT. */
LOG("Using WASAPI suggested format: channels: %d", closest->nChannels);
XASSERT(closest->wFormatTag == WAVE_FORMAT_EXTENSIBLE);
WAVEFORMATEXTENSIBLE * closest_pcm =
@@ -2122,7 +2049,8 @@ handle_channel_layout(cubeb_stream * stm, EDataFlow direction,
}
static int
initialize_iaudioclient2(com_ptr<IAudioClient> & audio_client)
initialize_iaudioclient2(com_ptr<IAudioClient> & audio_client,
AudioClient2Option option)
{
com_ptr<IAudioClient2> audio_client2;
audio_client->QueryInterface<IAudioClient2>(audio_client2.receive());
@@ -2131,10 +2059,14 @@ initialize_iaudioclient2(com_ptr<IAudioClient> & audio_client)
"AUDCLNT_STREAMOPTIONS_RAW.");
return CUBEB_OK;
}
AudioClientProperties properties = {0};
AudioClientProperties properties = {};
properties.cbSize = sizeof(AudioClientProperties);
#ifndef __MINGW32__
properties.Options |= AUDCLNT_STREAMOPTIONS_RAW;
if (option == CUBEB_AUDIO_CLIENT2_RAW) {
properties.Options |= AUDCLNT_STREAMOPTIONS_RAW;
} else if (option == CUBEB_AUDIO_CLIENT2_VOICE) {
properties.eCategory = AudioCategory_Communications;
}
#endif
HRESULT hr = audio_client2->SetClientProperties(&properties);
if (FAILED(hr)) {
@@ -2144,12 +2076,12 @@ initialize_iaudioclient2(com_ptr<IAudioClient> & audio_client)
return CUBEB_OK;
}
#if 0
bool
initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client,
cubeb_stream * stm,
const com_heap_ptr<WAVEFORMATEX> & mix_format,
DWORD flags, EDataFlow direction,
REFERENCE_TIME latency_hns)
DWORD flags, EDataFlow direction)
{
com_ptr<IAudioClient3> audio_client3;
audio_client->QueryInterface<IAudioClient3>(audio_client3.receive());
@@ -2165,22 +2097,24 @@ initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client,
return false;
}
// Some people have reported glitches with capture streams:
// http://blog.nirbheek.in/2018/03/low-latency-audio-on-windows-with.html
if (direction == eCapture) {
LOG("Audio stream is capture, not using IAudioClient3");
return false;
}
// Possibly initialize a shared-mode stream using IAudioClient3. Initializing
// a stream this way lets you request lower latencies, but also locks the
// global WASAPI engine at that latency.
// - If we request a shared-mode stream, streams created with IAudioClient
// might have their latency adjusted to match. When the shared-mode stream
// is closed, they'll go back to normal.
// - If there's already a shared-mode stream running, if it created with the
// AUDCLNT_STREAMOPTIONS_MATCH_FORMAT option, the audio engine would be
// locked to that format, so we have to match it (a custom one would fail).
// - We don't lock the WASAPI engine to a format, as it's antisocial towards
// other apps, especially if we locked to a latency >= than its default.
// - If the user requested latency is >= the default one, we might still
// accept it (without locking the format) depending on
// ALLOW_AUDIO_CLIENT_3_LATENCY_OVER_DEFAULT, as we might want to prioritize
// to lower our latency over other apps
// (there might still be latency advantages compared to IAudioDevice(1)).
// will
// have their latency adjusted to match. When the shared-mode stream is
// closed, they'll go back to normal.
// - If there's already a shared-mode stream running, then we cannot request
// the engine change to a different latency - we have to match it.
// - It's antisocial to lock the WASAPI engine at its default latency. If we
// would do this, then stop and use IAudioClient instead.
HRESULT hr;
uint32_t default_period = 0, fundamental_period = 0, min_period = 0,
@@ -2192,59 +2126,28 @@ initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client,
LOG("Could not get shared mode engine period: error: %lx", hr);
return false;
}
uint32_t requested_latency =
hns_to_frames(mix_format->nSamplesPerSec, latency_hns);
#if !ALLOW_AUDIO_CLIENT_3_LATENCY_OVER_DEFAULT
uint32_t requested_latency = stm->latency;
if (requested_latency >= default_period) {
LOG("Requested latency %i equal or greater than default latency %i,"
" not using IAudioClient3",
LOG("Requested latency %i greater than default latency %i, not using "
"IAudioClient3",
requested_latency, default_period);
return false;
}
#elif REJECT_AUDIO_CLIENT_3_LATENCY_OVER_MAX
if (requested_latency > max_period) {
// Fallback to IAudioClient(1) as it's more accepting of large latencies
LOG("Requested latency %i greater than max latency %i,"
" not using IAudioClient3",
requested_latency, max_period);
return false;
}
#endif
LOG("Got shared mode engine period: default=%i fundamental=%i min=%i max=%i",
default_period, fundamental_period, min_period, max_period);
// Snap requested latency to a valid value
uint32_t old_requested_latency = requested_latency;
// The period is required to be a multiple of the fundamental period
// (and >= min and <= max, which should still be true)
requested_latency -= requested_latency % fundamental_period;
if (requested_latency < min_period) {
requested_latency = min_period;
}
// Likely unnecessary, but won't hurt
if (requested_latency > max_period) {
requested_latency = max_period;
}
requested_latency -= (requested_latency - min_period) % fundamental_period;
if (requested_latency != old_requested_latency) {
LOG("Requested latency %i was adjusted to %i", old_requested_latency,
requested_latency);
}
DWORD new_flags = flags;
// Always add these flags to IAudioClient3, they might help
// if the stream doesn't have the same format as the audio engine.
new_flags |= AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM;
new_flags |= AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY;
hr = audio_client3->InitializeSharedAudioStream(new_flags, requested_latency,
hr = audio_client3->InitializeSharedAudioStream(flags, requested_latency,
mix_format.get(), NULL);
// This error should be returned first even if
// the period was locked (AUDCLNT_E_ENGINE_PERIODICITY_LOCKED)
if (hr == AUDCLNT_E_INVALID_STREAM_FLAG) {
LOG("Got AUDCLNT_E_INVALID_STREAM_FLAG, removing some flags");
hr = audio_client3->InitializeSharedAudioStream(flags, requested_latency,
mix_format.get(), NULL);
}
if (SUCCEEDED(hr)) {
return true;
} else if (hr == AUDCLNT_E_ENGINE_PERIODICITY_LOCKED) {
@@ -2256,37 +2159,22 @@ initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client,
}
uint32_t current_period = 0;
WAVEFORMATEX * current_format_ptr = nullptr;
WAVEFORMATEX * current_format = nullptr;
// We have to pass a valid WAVEFORMATEX** and not nullptr, otherwise
// GetCurrentSharedModeEnginePeriod will return E_POINTER
hr = audio_client3->GetCurrentSharedModeEnginePeriod(&current_format_ptr,
hr = audio_client3->GetCurrentSharedModeEnginePeriod(&current_format,
&current_period);
CoTaskMemFree(current_format);
if (FAILED(hr)) {
LOG("Could not get current shared mode engine period: error: %lx", hr);
return false;
}
com_heap_ptr<WAVEFORMATEX> current_format(current_format_ptr);
if (current_format->nSamplesPerSec != mix_format->nSamplesPerSec) {
// Unless some other external app locked the shared mode engine period
// within our audio initialization, this is unlikely to happen, though we
// can't respect the user selected latency, so we fallback on IAudioClient
LOG("IAudioClient3::GetCurrentSharedModeEnginePeriod() returned a "
"different mixer format (nSamplesPerSec) from "
"IAudioClient::GetMixFormat(); not using IAudioClient3");
return false;
}
#if REJECT_AUDIO_CLIENT_3_LATENCY_OVER_MAX
// Reject IAudioClient3 if we can't respect the user target latency.
// We don't need to check against default_latency anymore,
// as the current_period is already the best one we could get.
if (old_requested_latency > current_period) {
LOG("Requested latency %i greater than currently locked shared mode "
"latency %i, not using IAudioClient3",
old_requested_latency, current_period);
if (current_period >= default_period) {
LOG("Current shared mode engine period %i too high, not using IAudioClient",
current_period);
return false;
}
#endif
hr = audio_client3->InitializeSharedAudioStream(flags, current_period,
mix_format.get(), NULL);
@@ -2299,6 +2187,7 @@ initialize_iaudioclient3(com_ptr<IAudioClient> & audio_client,
LOG("Could not initialize shared stream with IAudioClient3: error: %lx", hr);
return false;
}
#endif
#define DIRECTION_NAME (direction == eCapture ? "capture" : "render")
@@ -2322,12 +2211,6 @@ setup_wasapi_stream_one_side(cubeb_stream * stm,
return CUBEB_ERROR;
}
#if ALLOW_AUDIO_CLIENT_3_FOR_INPUT
constexpr bool allow_audio_client_3 = true;
#else
const bool allow_audio_client_3 = direction == eRender;
#endif
stm->stream_reset_lock.assert_current_thread_owns();
// If user doesn't specify a particular device, we can choose another one when
// the given devid is unavailable.
@@ -2364,14 +2247,17 @@ setup_wasapi_stream_one_side(cubeb_stream * stm,
/* Get a client. We will get all other interfaces we need from
* this pointer. */
if (allow_audio_client_3) {
hr = device->Activate(__uuidof(IAudioClient3), CLSCTX_INPROC_SERVER, NULL,
audio_client.receive_vpp());
}
if (!allow_audio_client_3 || hr == E_NOINTERFACE) {
hr = device->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL,
audio_client.receive_vpp());
#if 0 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1590902
hr = device->Activate(__uuidof(IAudioClient3),
CLSCTX_INPROC_SERVER,
NULL, audio_client.receive_vpp());
if (hr == E_NOINTERFACE) {
#endif
hr = device->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL,
audio_client.receive_vpp());
#if 0
}
#endif
if (FAILED(hr)) {
LOG("Could not activate the device to get an audio"
@@ -2494,21 +2380,41 @@ setup_wasapi_stream_one_side(cubeb_stream * stm,
}
if (stream_params->prefs & CUBEB_STREAM_PREF_RAW) {
if (initialize_iaudioclient2(audio_client) != CUBEB_OK) {
if (initialize_iaudioclient2(audio_client, CUBEB_AUDIO_CLIENT2_RAW) !=
CUBEB_OK) {
LOG("Can't initialize an IAudioClient2, error: %lx", GetLastError());
// This is not fatal.
}
} else if (direction == eCapture &&
(stream_params->prefs & CUBEB_STREAM_PREF_VOICE) &&
stream_params->input_params != CUBEB_INPUT_PROCESSING_PARAM_NONE) {
if (stream_params->input_params ==
(CUBEB_INPUT_PROCESSING_PARAM_ECHO_CANCELLATION |
CUBEB_INPUT_PROCESSING_PARAM_NOISE_SUPPRESSION |
CUBEB_INPUT_PROCESSING_PARAM_AUTOMATIC_GAIN_CONTROL |
CUBEB_INPUT_PROCESSING_PARAM_VOICE_ISOLATION)) {
if (initialize_iaudioclient2(audio_client, CUBEB_AUDIO_CLIENT2_VOICE) !=
CUBEB_OK) {
LOG("Can't initialize an IAudioClient2, error: %lx", GetLastError());
// This is not fatal.
}
} else {
LOG("Invalid combination of input processing params %#x",
stream_params->input_params);
return CUBEB_ERROR;
}
}
if (allow_audio_client_3 &&
initialize_iaudioclient3(audio_client, stm, mix_format, flags, direction,
latency_hns)) {
#if 0 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1590902
if (initialize_iaudioclient3(audio_client, stm, mix_format, flags, direction)) {
LOG("Initialized with IAudioClient3");
} else {
hr = audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, flags, latency_hns,
0, mix_format.get(), NULL);
#endif
hr = audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, flags, latency_hns, 0,
mix_format.get(), NULL);
#if 0
}
#endif
if (FAILED(hr)) {
LOG("Unable to initialize audio client for %s: %lx.", DIRECTION_NAME, hr);
return CUBEB_ERROR;
@@ -2970,6 +2876,7 @@ wasapi_stream_init(cubeb * context, cubeb_stream ** stream,
}
}
cubeb_async_log_reset_threads();
stm->thread =
(HANDLE)_beginthreadex(NULL, 512 * 1024, wasapi_stream_render_loop, stm,
STACK_SIZE_PARAM_IS_A_RESERVATION, NULL);
@@ -3031,7 +2938,7 @@ wasapi_stream_add_ref(cubeb_stream * stm)
{
XASSERT(stm);
LONG result = InterlockedIncrement(&stm->ref_count);
LOGV("Stream ref count incremented = %i (%p)", result, stm);
LOGV("Stream ref count incremented = %ld (%p)", result, stm);
return result;
}
@@ -3041,7 +2948,7 @@ wasapi_stream_release(cubeb_stream * stm)
XASSERT(stm);
LONG result = InterlockedDecrement(&stm->ref_count);
LOGV("Stream ref count decremented = %i (%p)", result, stm);
LOGV("Stream ref count decremented = %ld (%p)", result, stm);
if (result == 0) {
LOG("Stream ref count hit zero, destroying (%p)", stm);
@@ -3303,7 +3210,7 @@ wasapi_stream_set_volume(cubeb_stream * stm, float volume)
return CUBEB_OK;
}
static char const *
static std::unique_ptr<char const[]>
wstr_to_utf8(LPCWSTR str)
{
int size = ::WideCharToMultiByte(CP_UTF8, 0, str, -1, nullptr, 0, NULL, NULL);
@@ -3311,8 +3218,8 @@ wstr_to_utf8(LPCWSTR str)
return nullptr;
}
char * ret = static_cast<char *>(malloc(size));
::WideCharToMultiByte(CP_UTF8, 0, str, -1, ret, size, NULL, NULL);
std::unique_ptr<char[]> ret(new char[size]);
::WideCharToMultiByte(CP_UTF8, 0, str, -1, ret.get(), size, NULL, NULL);
return ret;
}
@@ -3440,7 +3347,7 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
prop_variant namevar;
hr = propstore->GetValue(PKEY_Device_FriendlyName, &namevar);
if (SUCCEEDED(hr) && namevar.vt == VT_LPWSTR) {
ret.friendly_name = wstr_to_utf8(namevar.pwszVal);
ret.friendly_name = wstr_to_utf8(namevar.pwszVal).release();
}
if (!ret.friendly_name) {
// This is not fatal, but a valid string is expected in all cases.
@@ -3461,7 +3368,7 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
prop_variant instancevar;
hr = ps->GetValue(PKEY_Device_InstanceId, &instancevar);
if (SUCCEEDED(hr) && instancevar.vt == VT_LPWSTR) {
ret.group_id = wstr_to_utf8(instancevar.pwszVal);
ret.group_id = wstr_to_utf8(instancevar.pwszVal).release();
}
}
@@ -3477,7 +3384,8 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
ret.preferred =
(cubeb_device_pref)(ret.preferred | CUBEB_DEVICE_PREF_MULTIMEDIA |
CUBEB_DEVICE_PREF_NOTIFICATION);
} else if (defaults->is_default(flow, eCommunications, device_id.get())) {
}
if (defaults->is_default(flow, eCommunications, device_id.get())) {
ret.preferred =
(cubeb_device_pref)(ret.preferred | CUBEB_DEVICE_PREF_VOICE);
}
@@ -3504,7 +3412,6 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
CUBEB_DEVICE_FMT_S16NE);
ret.default_format = CUBEB_DEVICE_FMT_F32NE;
prop_variant fmtvar;
WAVEFORMATEX * wfx = NULL;
hr = propstore->GetValue(PKEY_AudioEngine_DeviceFormat, &fmtvar);
if (SUCCEEDED(hr) && fmtvar.vt == VT_BLOB) {
if (fmtvar.blob.cbSize == sizeof(PCMWAVEFORMAT)) {
@@ -3514,7 +3421,8 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
ret.max_rate = ret.min_rate = ret.default_rate = pcm->wf.nSamplesPerSec;
ret.max_channels = pcm->wf.nChannels;
} else if (fmtvar.blob.cbSize >= sizeof(WAVEFORMATEX)) {
wfx = reinterpret_cast<WAVEFORMATEX *>(fmtvar.blob.pBlobData);
WAVEFORMATEX * wfx =
reinterpret_cast<WAVEFORMATEX *>(fmtvar.blob.pBlobData);
if (fmtvar.blob.cbSize >= sizeof(WAVEFORMATEX) + wfx->cbSize ||
wfx->wFormatTag == WAVE_FORMAT_PCM) {
@@ -3524,30 +3432,9 @@ wasapi_create_device(cubeb * ctx, cubeb_device_info & ret,
}
}
#if USE_AUDIO_CLIENT_3_MIN_PERIOD
// Here we assume an IAudioClient3 stream will successfully
// be initialized later (it might fail)
#if ALLOW_AUDIO_CLIENT_3_FOR_INPUT
constexpr bool allow_audio_client_3 = true;
#else
const bool allow_audio_client_3 = flow == eRender;
#endif
com_ptr<IAudioClient3> client3;
uint32_t def, fun, min, max;
if (allow_audio_client_3 && wfx &&
SUCCEEDED(dev->Activate(__uuidof(IAudioClient3), CLSCTX_INPROC_SERVER,
NULL, client3.receive_vpp())) &&
SUCCEEDED(
client3->GetSharedModeEnginePeriod(wfx, &def, &fun, &min, &max))) {
ret.latency_lo = min;
// This latency might actually be used as "default" and not "max" later on,
// so we return the default (we never really want to use the max anyway)
ret.latency_hi = def;
} else
#endif
if (SUCCEEDED(dev->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER,
NULL, client.receive_vpp())) &&
SUCCEEDED(client->GetDevicePeriod(&def_period, &min_period))) {
if (SUCCEEDED(dev->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER,
NULL, client.receive_vpp())) &&
SUCCEEDED(client->GetDevicePeriod(&def_period, &min_period))) {
ret.latency_lo = hns_to_frames(ret.default_rate, min_period);
ret.latency_hi = hns_to_frames(ret.default_rate, def_period);
} else {
@@ -3638,7 +3525,7 @@ wasapi_enumerate_devices(cubeb * context, cubeb_device_type type,
{
return wasapi_enumerate_devices_internal(
context, type, out,
DEVICE_STATE_ACTIVE /*| DEVICE_STATE_DISABLED | DEVICE_STATE_UNPLUGGED*/);
DEVICE_STATE_ACTIVE | DEVICE_STATE_DISABLED | DEVICE_STATE_UNPLUGGED);
}
static int
@@ -3656,6 +3543,14 @@ wasapi_device_collection_destroy(cubeb * /*ctx*/,
return CUBEB_OK;
}
int
wasapi_set_input_processing_params(cubeb_stream * stream,
cubeb_input_processing_params params)
{
LOG("Cannot set voice processing params after init. Use cubeb_stream_init.");
return CUBEB_ERROR_NOT_SUPPORTED;
}
static int
wasapi_register_device_collection_changed(
cubeb * context, cubeb_device_type devtype,
@@ -3736,7 +3631,8 @@ cubeb_ops const wasapi_ops = {
/*.get_max_channel_count =*/wasapi_get_max_channel_count,
/*.get_min_latency =*/wasapi_get_min_latency,
/*.get_preferred_sample_rate =*/wasapi_get_preferred_sample_rate,
/*.get_supported_input_processing_params =*/NULL,
/*.get_supported_input_processing_params =*/
wasapi_get_supported_input_processing_params,
/*.enumerate_devices =*/wasapi_enumerate_devices,
/*.device_collection_destroy =*/wasapi_device_collection_destroy,
/*.destroy =*/wasapi_destroy,
@@ -3751,7 +3647,7 @@ cubeb_ops const wasapi_ops = {
/*.stream_set_name =*/NULL,
/*.stream_get_current_device =*/NULL,
/*.stream_set_input_mute =*/NULL,
/*.stream_set_input_processing_params =*/NULL,
/*.stream_set_input_processing_params =*/wasapi_set_input_processing_params,
/*.stream_device_destroy =*/NULL,
/*.stream_register_device_changed_callback =*/NULL,
/*.register_device_collection_changed =*/

View File

@@ -41,10 +41,10 @@
#ifdef FLOATING_POINT
#error You cannot compile as floating point and fixed point at the same time
#endif
#ifdef _USE_SSE
#ifdef USE_SSE
#error SSE is only for floating-point
#endif
#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
#if defined(ARM4_ASM) + defined(ARM5E_ASM) + defined(BFIN_ASM) > 1
#error Make up your mind. What CPU do you have?
#endif
#ifdef VORBIS_PSYCHO
@@ -56,10 +56,10 @@
#ifndef FLOATING_POINT
#error You now need to define either FIXED_POINT or FLOATING_POINT
#endif
#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
#if defined(ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
#endif
#ifdef FIXED_POINT_DEBUG
#ifdef FIXED_DEBUG
#error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?"
#endif
@@ -117,9 +117,9 @@ typedef spx_word32_t spx_sig_t;
#ifdef ARM5E_ASM
#include "fixed_arm5e.h"
#elif defined (ARM4_ASM)
#elif defined(ARM4_ASM)
#include "fixed_arm4.h"
#elif defined (BFIN_ASM)
#elif defined(BFIN_ASM)
#include "fixed_bfin.h"
#endif
@@ -177,16 +177,13 @@ typedef float spx_word32_t;
#define ADD32(a,b) ((a)+(b))
#define SUB32(a,b) ((a)-(b))
#define MULT16_16_16(a,b) ((a)*(b))
#define MULT16_32_32(a,b) ((a)*(b))
#define MULT16_16(a,b) ((spx_word32_t)(a)*(spx_word32_t)(b))
#define MAC16_16(c,a,b) ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
#define MULT16_32_Q11(a,b) ((a)*(b))
#define MULT16_32_Q13(a,b) ((a)*(b))
#define MULT16_32_Q14(a,b) ((a)*(b))
#define MULT16_32_Q15(a,b) ((a)*(b))
#define MULT16_32_P15(a,b) ((a)*(b))
#define MAC16_32_Q11(c,a,b) ((c)+(a)*(b))
#define MAC16_32_Q15(c,a,b) ((c)+(a)*(b))
#define MAC16_16_Q11(c,a,b) ((c)+(a)*(b))
@@ -210,7 +207,7 @@ typedef float spx_word32_t;
#endif
#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
#if defined(CONFIG_TI_C54X) || defined(CONFIG_TI_C55X)
/* 2 on TI C5x DSP */
#define BYTES_PER_CHAR 2

View File

@@ -69,22 +69,18 @@
/* result fits in 16 bits */
#define MULT16_16_16(a,b) ((((spx_word16_t)(a))*((spx_word16_t)(b))))
#define MULT16_16_16(a,b) (((spx_word16_t)(a))*((spx_word16_t)(b)))
/* result fits in 32 bits */
#define MULT16_32_32(a,b) (((spx_word16_t)(a))*((spx_word32_t)(b)))
/* (spx_word32_t)(spx_word16_t) gives TI compiler a hint that it's 16x16->32 multiply */
#define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b)))
#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
#define MULT16_32_Q12(a,b) ADD32(MULT16_16((a),SHR((b),12)), SHR(MULT16_16((a),((b)&0x00000fff)),12))
#define MULT16_32_Q13(a,b) ADD32(MULT16_16((a),SHR((b),13)), SHR(MULT16_16((a),((b)&0x00001fff)),13))
#define MULT16_32_Q14(a,b) ADD32(MULT16_16((a),SHR((b),14)), SHR(MULT16_16((a),((b)&0x00003fff)),14))
#define MULT16_32_Q11(a,b) ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11))
#define MAC16_32_Q11(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11)))
#define MULT16_32_P15(a,b) ADD32(MULT16_16((a),SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
#define MULT16_32_Q15(a,b) ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
#define MULT16_32_P15(a,b) ADD32(MULT16_32_32(a,SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
#define MULT16_32_Q15(a,b) ADD32(MULT16_32_32(a,SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
#define MAC16_32_Q15(c,a,b) ADD32(c,MULT16_32_Q15(a,b))
#define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11)))

View File

@@ -46,7 +46,7 @@
Smith, Julius O. Digital Audio Resampling Home Page
Center for Computer Research in Music and Acoustics (CCRMA),
Stanford University, 2007.
Web published at http://ccrma.stanford.edu/~jos/resample/.
Web published at https://ccrma.stanford.edu/~jos/resample/.
There is one main difference, though. This resampler uses cubic
interpolation instead of linear interpolation in the above paper. This
@@ -63,9 +63,12 @@
#ifdef OUTSIDE_SPEEX
#include <stdlib.h>
static void *speex_alloc (int size) {return calloc(size,1);}
static void *speex_realloc (void *ptr, int size) {return realloc(ptr, size);}
static void speex_free (void *ptr) {free(ptr);}
static void *speex_alloc(int size) {return calloc(size,1);}
static void *speex_realloc(void *ptr, int size) {return realloc(ptr, size);}
static void speex_free(void *ptr) {free(ptr);}
#ifndef EXPORT
#define EXPORT
#endif
#include "speex_resampler.h"
#include "arch.h"
#else /* OUTSIDE_SPEEX */
@@ -75,7 +78,6 @@ static void speex_free (void *ptr) {free(ptr);}
#include "os_support.h"
#endif /* OUTSIDE_SPEEX */
#include "stack_alloc.h"
#include <math.h>
#include <limits.h>
@@ -91,18 +93,18 @@ static void speex_free (void *ptr) {free(ptr);}
#endif
#ifndef UINT32_MAX
#define UINT32_MAX 4294967296U
#define UINT32_MAX 4294967295U
#endif
#ifdef _USE_SSE
#ifdef USE_SSE
#include "resample_sse.h"
#endif
#ifdef _USE_NEON
#ifdef USE_NEON
#include "resample_neon.h"
#endif
/* Numer of elements to allocate on the stack */
/* Number of elements to allocate on the stack */
#ifdef VAR_ARRAYS
#define FIXED_STACK_ALLOC 8192
#else
@@ -194,16 +196,14 @@ struct FuncDef {
int oversample;
};
static const struct FuncDef _KAISER12 = {kaiser12_table, 64};
#define KAISER12 (&_KAISER12)
/*static struct FuncDef _KAISER12 = {kaiser12_table, 32};
#define KAISER12 (&_KAISER12)*/
static const struct FuncDef _KAISER10 = {kaiser10_table, 32};
#define KAISER10 (&_KAISER10)
static const struct FuncDef _KAISER8 = {kaiser8_table, 32};
#define KAISER8 (&_KAISER8)
static const struct FuncDef _KAISER6 = {kaiser6_table, 32};
#define KAISER6 (&_KAISER6)
static const struct FuncDef kaiser12_funcdef = {kaiser12_table, 64};
#define KAISER12 (&kaiser12_funcdef)
static const struct FuncDef kaiser10_funcdef = {kaiser10_table, 32};
#define KAISER10 (&kaiser10_funcdef)
static const struct FuncDef kaiser8_funcdef = {kaiser8_table, 32};
#define KAISER8 (&kaiser8_funcdef)
static const struct FuncDef kaiser6_funcdef = {kaiser6_table, 32};
#define KAISER6 (&kaiser6_funcdef)
struct QualityMapping {
int base_length;
@@ -473,7 +473,7 @@ static int resampler_basic_interpolate_single(SpeexResamplerState *st, spx_uint3
}
cubic_coef(frac, interp);
sum = MULT16_32_Q15(interp[0],SHR32(accum[0], 1)) + MULT16_32_Q15(interp[1],SHR32(accum[1], 1)) + MULT16_32_Q15(interp[2],SHR32(accum[2], 1)) + MULT16_32_Q15(interp[3],SHR32(accum[3], 1));
sum = MULT16_32_Q15(interp[0],accum[0]) + MULT16_32_Q15(interp[1],accum[1]) + MULT16_32_Q15(interp[2],accum[2]) + MULT16_32_Q15(interp[3],accum[3]);
sum = SATURATE32PSHR(sum, 15, 32767);
#else
cubic_coef(frac, interp);
@@ -572,6 +572,7 @@ static int resampler_basic_zero(SpeexResamplerState *st, spx_uint32_t channel_in
const int frac_advance = st->frac_advance;
const spx_uint32_t den_rate = st->den_rate;
(void)in;
while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
{
out[out_stride * out_sample++] = 0;
@@ -589,16 +590,15 @@ static int resampler_basic_zero(SpeexResamplerState *st, spx_uint32_t channel_in
return out_sample;
}
static int _muldiv(spx_uint32_t *result, spx_uint32_t value, spx_uint32_t mul, spx_uint32_t div)
static int multiply_frac(spx_uint32_t *result, spx_uint32_t value, spx_uint32_t num, spx_uint32_t den)
{
speex_assert(result);
spx_uint32_t major = value / div;
spx_uint32_t remainder = value % div;
spx_uint32_t major = value / den;
spx_uint32_t remain = value % den;
/* TODO: Could use 64 bits operation to check for overflow. But only guaranteed in C99+ */
if (remainder > UINT32_MAX / mul || major > UINT32_MAX / mul
|| major * mul > UINT32_MAX - remainder * mul / div)
if (remain > UINT32_MAX / num || major > UINT32_MAX / num
|| major * num > UINT32_MAX - remain * num / den)
return RESAMPLER_ERR_OVERFLOW;
*result = remainder * mul / div + major * mul;
*result = remain * num / den + major * num;
return RESAMPLER_ERR_SUCCESS;
}
@@ -619,7 +619,7 @@ static int update_filter(SpeexResamplerState *st)
{
/* down-sampling */
st->cutoff = quality_map[st->quality].downsample_bandwidth * st->den_rate / st->num_rate;
if (_muldiv(&st->filt_len,st->filt_len,st->num_rate,st->den_rate) != RESAMPLER_ERR_SUCCESS)
if (multiply_frac(&st->filt_len,st->filt_len,st->num_rate,st->den_rate) != RESAMPLER_ERR_SUCCESS)
goto fail;
/* Round up to make sure we have a multiple of 8 for SSE */
st->filt_len = ((st->filt_len-1)&(~0x7))+8;
@@ -638,12 +638,12 @@ static int update_filter(SpeexResamplerState *st)
st->cutoff = quality_map[st->quality].upsample_bandwidth;
}
/* Choose the resampling type that requires the least amount of memory */
#ifdef RESAMPLE_FULL_SINC_TABLE
use_direct = 1;
if (INT_MAX/sizeof(spx_word16_t)/st->den_rate < st->filt_len)
goto fail;
#else
/* Choose the resampling type that requires the least amount of memory */
use_direct = st->filt_len*st->den_rate <= st->filt_len*st->oversample+8
&& INT_MAX/sizeof(spx_word16_t)/st->den_rate >= st->filt_len;
#endif
@@ -733,16 +733,18 @@ static int update_filter(SpeexResamplerState *st)
{
spx_uint32_t j;
spx_uint32_t olen = old_length;
spx_uint32_t start = i*st->mem_alloc_size;
spx_uint32_t magic_samples = st->magic_samples[i];
/*if (st->magic_samples[i])*/
{
/* Try and remove the magic samples as if nothing had happened */
/* FIXME: This is wrong but for now we need it to avoid going over the array bounds */
olen = old_length + 2*st->magic_samples[i];
for (j=old_length-1+st->magic_samples[i];j--;)
st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]] = st->mem[i*old_alloc_size+j];
for (j=0;j<st->magic_samples[i];j++)
st->mem[i*st->mem_alloc_size+j] = 0;
olen = old_length + 2*magic_samples;
for (j=old_length-1+magic_samples;j--;)
st->mem[start+j+magic_samples] = st->mem[i*old_alloc_size+j];
for (j=0;j<magic_samples;j++)
st->mem[start+j] = 0;
st->magic_samples[i] = 0;
}
if (st->filt_len > olen)
@@ -750,17 +752,18 @@ static int update_filter(SpeexResamplerState *st)
/* If the new filter length is still bigger than the "augmented" length */
/* Copy data going backward */
for (j=0;j<olen-1;j++)
st->mem[i*st->mem_alloc_size+(st->filt_len-2-j)] = st->mem[i*st->mem_alloc_size+(olen-2-j)];
st->mem[start+(st->filt_len-2-j)] = st->mem[start+(olen-2-j)];
/* Then put zeros for lack of anything better */
for (;j<st->filt_len-1;j++)
st->mem[i*st->mem_alloc_size+(st->filt_len-2-j)] = 0;
st->mem[start+(st->filt_len-2-j)] = 0;
/* Adjust last_sample */
st->last_sample[i] += (st->filt_len - olen)/2;
} else {
/* Put back some of the magic! */
st->magic_samples[i] = (olen - st->filt_len)/2;
for (j=0;j<st->filt_len-1+st->magic_samples[i];j++)
st->mem[i*st->mem_alloc_size+j] = st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]];
magic_samples = (olen - st->filt_len)/2;
for (j=0;j<st->filt_len-1+magic_samples;j++)
st->mem[start+j] = st->mem[start+j+magic_samples];
st->magic_samples[i] = magic_samples;
}
}
} else if (st->filt_len < old_length)
@@ -977,8 +980,7 @@ EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t cha
const spx_uint32_t xlen = st->mem_alloc_size - (st->filt_len - 1);
#ifdef VAR_ARRAYS
const unsigned int ylen = (olen < FIXED_STACK_ALLOC) ? olen : FIXED_STACK_ALLOC;
VARDECL(spx_word16_t *ystack);
ALLOC(ystack, ylen, spx_word16_t);
spx_word16_t ystack[ylen];
#else
const unsigned int ylen = FIXED_STACK_ALLOC;
spx_word16_t ystack[FIXED_STACK_ALLOC];
@@ -1093,7 +1095,7 @@ EXPORT void speex_resampler_get_rate(SpeexResamplerState *st, spx_uint32_t *in_r
*out_rate = st->out_rate;
}
static inline spx_uint32_t _gcd(spx_uint32_t a, spx_uint32_t b)
static inline spx_uint32_t compute_gcd(spx_uint32_t a, spx_uint32_t b)
{
while (b != 0)
{
@@ -1123,7 +1125,7 @@ EXPORT int speex_resampler_set_rate_frac(SpeexResamplerState *st, spx_uint32_t r
st->num_rate = ratio_num;
st->den_rate = ratio_den;
fact = _gcd (st->num_rate, st->den_rate);
fact = compute_gcd(st->num_rate, st->den_rate);
st->num_rate /= fact;
st->den_rate /= fact;
@@ -1132,7 +1134,7 @@ EXPORT int speex_resampler_set_rate_frac(SpeexResamplerState *st, spx_uint32_t r
{
for (i=0;i<st->nb_channels;i++)
{
if (_muldiv(&st->samp_frac_num[i],st->samp_frac_num[i],st->den_rate,old_den) != RESAMPLER_ERR_SUCCESS)
if (multiply_frac(&st->samp_frac_num[i],st->samp_frac_num[i],st->den_rate,old_den) != RESAMPLER_ERR_SUCCESS)
return RESAMPLER_ERR_OVERFLOW;
/* Safety net */
if (st->samp_frac_num[i] >= st->den_rate)

View File

@@ -36,14 +36,26 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <arm_neon.h>
#include <stdint.h>
#ifdef FIXED_POINT
#ifdef __thumb2__
#if defined(__aarch64__)
static inline int32_t saturate_32bit_to_16bit(int32_t a) {
int32_t ret;
asm ("fmov s0, %w[a]\n"
"sqxtn h0, s0\n"
"sxtl v0.4s, v0.4h\n"
"fmov %w[ret], s0\n"
: [ret] "=r" (ret)
: [a] "r" (a)
: "v0" );
return ret;
}
#elif defined(__thumb2__)
static inline int32_t saturate_32bit_to_16bit(int32_t a) {
int32_t ret;
asm ("ssat %[ret], #16, %[a]"
: [ret] "=&r" (ret)
: [ret] "=r" (ret)
: [a] "r" (a)
: );
return ret;
@@ -54,7 +66,7 @@ static inline int32_t saturate_32bit_to_16bit(int32_t a) {
asm ("vmov.s32 d0[0], %[a]\n"
"vqmovn.s32 d0, q0\n"
"vmov.s16 %[ret], d0[0]\n"
: [ret] "=&r" (ret)
: [ret] "=r" (ret)
: [a] "r" (a)
: "q0");
return ret;
@@ -64,7 +76,63 @@ static inline int32_t saturate_32bit_to_16bit(int32_t a) {
#define WORD2INT(x) (saturate_32bit_to_16bit(x))
#define OVERRIDE_INNER_PRODUCT_SINGLE
/* Only works when len % 4 == 0 */
/* Only works when len % 4 == 0 and len >= 4 */
#if defined(__aarch64__)
static inline int32_t inner_product_single(const int16_t *a, const int16_t *b, unsigned int len)
{
int32_t ret;
uint32_t remainder = len % 16;
len = len - remainder;
asm volatile (" cmp %w[len], #0\n"
" b.ne 1f\n"
" ld1 {v16.4h}, [%[b]], #8\n"
" ld1 {v20.4h}, [%[a]], #8\n"
" subs %w[remainder], %w[remainder], #4\n"
" smull v0.4s, v16.4h, v20.4h\n"
" b.ne 4f\n"
" b 5f\n"
"1:"
" ld1 {v16.4h, v17.4h, v18.4h, v19.4h}, [%[b]], #32\n"
" ld1 {v20.4h, v21.4h, v22.4h, v23.4h}, [%[a]], #32\n"
" subs %w[len], %w[len], #16\n"
" smull v0.4s, v16.4h, v20.4h\n"
" smlal v0.4s, v17.4h, v21.4h\n"
" smlal v0.4s, v18.4h, v22.4h\n"
" smlal v0.4s, v19.4h, v23.4h\n"
" b.eq 3f\n"
"2:"
" ld1 {v16.4h, v17.4h, v18.4h, v19.4h}, [%[b]], #32\n"
" ld1 {v20.4h, v21.4h, v22.4h, v23.4h}, [%[a]], #32\n"
" subs %w[len], %w[len], #16\n"
" smlal v0.4s, v16.4h, v20.4h\n"
" smlal v0.4s, v17.4h, v21.4h\n"
" smlal v0.4s, v18.4h, v22.4h\n"
" smlal v0.4s, v19.4h, v23.4h\n"
" b.ne 2b\n"
"3:"
" cmp %w[remainder], #0\n"
" b.eq 5f\n"
"4:"
" ld1 {v18.4h}, [%[b]], #8\n"
" ld1 {v22.4h}, [%[a]], #8\n"
" subs %w[remainder], %w[remainder], #4\n"
" smlal v0.4s, v18.4h, v22.4h\n"
" b.ne 4b\n"
"5:"
" saddlv d0, v0.4s\n"
" sqxtn s0, d0\n"
" sqrshrn h0, s0, #15\n"
" sxtl v0.4s, v0.4h\n"
" fmov %w[ret], s0\n"
: [ret] "=r" (ret), [a] "+r" (a), [b] "+r" (b),
[len] "+r" (len), [remainder] "+r" (remainder)
:
: "cc", "v0",
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23");
return ret;
}
#else
static inline int32_t inner_product_single(const int16_t *a, const int16_t *b, unsigned int len)
{
int32_t ret;
@@ -112,33 +180,104 @@ static inline int32_t inner_product_single(const int16_t *a, const int16_t *b, u
" vqmovn.s64 d0, q0\n"
" vqrshrn.s32 d0, q0, #15\n"
" vmov.s16 %[ret], d0[0]\n"
: [ret] "=&r" (ret), [a] "+r" (a), [b] "+r" (b),
: [ret] "=r" (ret), [a] "+r" (a), [b] "+r" (b),
[len] "+r" (len), [remainder] "+r" (remainder)
:
: "cc", "q0",
"d16", "d17", "d18", "d19",
"d20", "d21", "d22", "d23");
"d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23");
return ret;
}
#elif defined(FLOATING_POINT)
#endif // !defined(__aarch64__)
#elif defined(FLOATING_POINT)
#if defined(__aarch64__)
static inline int32_t saturate_float_to_16bit(float a) {
int32_t ret;
asm ("fcvtas s1, %s[a]\n"
"sqxtn h1, s1\n"
"sxtl v1.4s, v1.4h\n"
"fmov %w[ret], s1\n"
: [ret] "=r" (ret)
: [a] "w" (a)
: "v1");
return ret;
}
#else
static inline int32_t saturate_float_to_16bit(float a) {
int32_t ret;
asm ("vmov.f32 d0[0], %[a]\n"
"vcvt.s32.f32 d0, d0, #15\n"
"vqrshrn.s32 d0, q0, #15\n"
"vmov.s16 %[ret], d0[0]\n"
: [ret] "=&r" (ret)
: [ret] "=r" (ret)
: [a] "r" (a)
: "q0");
return ret;
}
#endif
#undef WORD2INT
#define WORD2INT(x) (saturate_float_to_16bit(x))
#define OVERRIDE_INNER_PRODUCT_SINGLE
/* Only works when len % 4 == 0 */
/* Only works when len % 4 == 0 and len >= 4 */
#if defined(__aarch64__)
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
{
float ret;
uint32_t remainder = len % 16;
len = len - remainder;
asm volatile (" cmp %w[len], #0\n"
" b.ne 1f\n"
" ld1 {v16.4s}, [%[b]], #16\n"
" ld1 {v20.4s}, [%[a]], #16\n"
" subs %w[remainder], %w[remainder], #4\n"
" fmul v1.4s, v16.4s, v20.4s\n"
" b.ne 4f\n"
" b 5f\n"
"1:"
" ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [%[b]], #64\n"
" ld1 {v20.4s, v21.4s, v22.4s, v23.4s}, [%[a]], #64\n"
" subs %w[len], %w[len], #16\n"
" fmul v1.4s, v16.4s, v20.4s\n"
" fmul v2.4s, v17.4s, v21.4s\n"
" fmul v3.4s, v18.4s, v22.4s\n"
" fmul v4.4s, v19.4s, v23.4s\n"
" b.eq 3f\n"
"2:"
" ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [%[b]], #64\n"
" ld1 {v20.4s, v21.4s, v22.4s, v23.4s}, [%[a]], #64\n"
" subs %w[len], %w[len], #16\n"
" fmla v1.4s, v16.4s, v20.4s\n"
" fmla v2.4s, v17.4s, v21.4s\n"
" fmla v3.4s, v18.4s, v22.4s\n"
" fmla v4.4s, v19.4s, v23.4s\n"
" b.ne 2b\n"
"3:"
" fadd v16.4s, v1.4s, v2.4s\n"
" fadd v17.4s, v3.4s, v4.4s\n"
" cmp %w[remainder], #0\n"
" fadd v1.4s, v16.4s, v17.4s\n"
" b.eq 5f\n"
"4:"
" ld1 {v18.4s}, [%[b]], #16\n"
" ld1 {v22.4s}, [%[a]], #16\n"
" subs %w[remainder], %w[remainder], #4\n"
" fmla v1.4s, v18.4s, v22.4s\n"
" b.ne 4b\n"
"5:"
" faddp v1.4s, v1.4s, v1.4s\n"
" faddp %[ret].4s, v1.4s, v1.4s\n"
: [ret] "=w" (ret), [a] "+r" (a), [b] "+r" (b),
[len] "+r" (len), [remainder] "+r" (remainder)
:
: "cc", "v1", "v2", "v3", "v4",
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23");
return ret;
}
#else
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
{
float ret;
@@ -191,11 +330,12 @@ static inline float inner_product_single(const float *a, const float *b, unsigne
" vadd.f32 d0, d0, d1\n"
" vpadd.f32 d0, d0, d0\n"
" vmov.f32 %[ret], d0[0]\n"
: [ret] "=&r" (ret), [a] "+r" (a), [b] "+r" (b),
: [ret] "=r" (ret), [a] "+r" (a), [b] "+r" (b),
[len] "+l" (len), [remainder] "+l" (remainder)
:
: "cc", "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8",
"q9", "q10", "q11");
: "cc", "q0", "q1", "q2", "q3",
"q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11");
return ret;
}
#endif // defined(__aarch64__)
#endif

View File

@@ -71,7 +71,7 @@ static inline float interpolate_product_single(const float *a, const float *b, u
return ret;
}
#ifdef _USE_SSE2
#ifdef USE_SSE2
#include <emmintrin.h>
#define OVERRIDE_INNER_PRODUCT_DOUBLE

View File

@@ -57,6 +57,7 @@ Example:
```C++
#include "fast_float/fast_float.h"
#include <iostream>
#include <string>
int main() {
std::string input = "3.1416 xyz ";
@@ -68,6 +69,25 @@ int main() {
}
```
Though the C++17 standard has you do a comparison with `std::errc()` to check whether the conversion worked, you can avoid it by casting the result to a `bool` like so:
```cpp
#include "fast_float/fast_float.h"
#include <iostream>
#include <string>
int main() {
std::string input = "3.1416 xyz ";
double result;
if(auto answer = fast_float::from_chars(input.data(), input.data() + input.size(), result)) {
std::cout << "parsed the number " << result << std::endl;
return EXIT_SUCCESS;
}
std::cerr << "failed to parse " << result << std::endl;
return EXIT_FAILURE;
}
```
You can parse delimited numbers:
```C++
@@ -357,6 +377,34 @@ int main() {
}
```
## Multiplication of an integer by a power of 10
An integer `W` can be multiplied by a power of ten `10^Q` and
converted to `double` with correctly rounded value
(in "round to nearest, tie to even" fashion) using
`fast_float::integer_times_pow10()`, e.g.:
```C++
const uint64_t W = 12345678901234567;
const int Q = 23;
const double result = fast_float::integer_times_pow10(W, Q);
std::cout.precision(17);
std::cout << W << " * 10^" << Q << " = " << result << " ("
<< (result == 12345678901234567e23 ? "==" : "!=") << "expected)\n";
```
outputs
```
12345678901234567 * 10^23 = 1.2345678901234567e+39 (==expected)
```
`fast_float::integer_times_pow10()` gives the same result as
using `fast_float::from_chars()` when parsing the string `"WeQ"`
(in this example `"12345678901234567e23"`),
except `fast_float::integer_times_pow10()` does not report out-of-range errors, and
underflows to zero or overflows to infinity when the resulting value is
out of range.
Overloads of `fast_float::integer_times_pow10()` are provided for
signed and unsigned integer types: `int64_t`, `uint64_t`, etc.
## Users and Related Work
The fast_float library is part of:
@@ -364,6 +412,8 @@ The fast_float library is part of:
* GCC (as of version 12): the `from_chars` function in GCC relies on fast_float,
* [Chromium](https://github.com/Chromium/Chromium), the engine behind Google
Chrome, Microsoft Edge, and Opera,
* Boost JSON, MySQL, etc.
* Blender
* [WebKit](https://github.com/WebKit/WebKit), the engine behind Safari (Apple's
web browser),
* [DuckDB](https://duckdb.org),
@@ -376,7 +426,10 @@ The fast_float library is part of:
The fastfloat algorithm is part of the [LLVM standard
libraries](https://github.com/llvm/llvm-project/commit/87c016078ad72c46505461e4ff8bfa04819fe7ba).
There is a [derived implementation part of
AdaCore](https://github.com/AdaCore/VSS).
AdaCore](https://github.com/AdaCore/VSS). The [SerenityOS operating
system](https://github.com/SerenityOS/serenity/commit/53b7f5e6a11e663c83df8030c3171c5945cb75ec)
has a derived implementation that is inherited by the [Ladybird
Browser](https://github.com/LadybirdBrowser/ladybird).
The fast_float library provides a performance similar to that of the
[fast_double_parser](https://github.com/lemire/fast_double_parser) library but
@@ -385,6 +438,14 @@ API more in line with the expectations of C++ programmers. The
fast_double_parser library is part of the [Microsoft LightGBM machine-learning
framework](https://github.com/microsoft/LightGBM).
Packages
------
[![Packaging status](https://repology.org/badge/vertical-allrepos/fastfloat.svg)](https://repology.org/project/fastfloat/versions)
## References
* Daniel Lemire, [Number Parsing at a Gigabyte per
@@ -455,7 +516,7 @@ sufficiently recent version of CMake (3.11 or better at least):
FetchContent_Declare(
fast_float
GIT_REPOSITORY https://github.com/fastfloat/fast_float.git
GIT_TAG tags/v8.0.2
GIT_TAG tags/v8.1.0
GIT_SHALLOW TRUE)
FetchContent_MakeAvailable(fast_float)
@@ -471,7 +532,7 @@ You may also use [CPM](https://github.com/cpm-cmake/CPM.cmake), like so:
CPMAddPackage(
NAME fast_float
GITHUB_REPOSITORY "fastfloat/fast_float"
GIT_TAG v8.0.2)
GIT_TAG v8.1.0)
```
## Using as single header
@@ -483,7 +544,7 @@ if desired as described in the command line help.
You may directly download automatically generated single-header files:
<https://github.com/fastfloat/fast_float/releases/download/v8.0.2/fast_float.h>
<https://github.com/fastfloat/fast_float/releases/download/v8.1.0/fast_float.h>
## Benchmarking
@@ -522,6 +583,7 @@ cmake --build build
manager](https://conan.io/center/recipes/fast_float).
* It is part of the [brew package
manager](https://formulae.brew.sh/formula/fast_float).
* fast_float is available on [xmake](https://xmake.io) repository.
* Some Linux distribution like Fedora include fast_float (e.g., as
`fast_float-devel`).

View File

@@ -441,7 +441,7 @@ parse_number_string(UC const *p, UC const *pend,
if (digit_count > 19) {
answer.too_many_digits = true;
// Let us start again, this time, avoiding overflows.
// We don't need to check if is_integer, since we use the
// We don't need to call if is_integer, since we use the
// pre-tokenized spans from above.
i = 0;
p = answer.integer.ptr;
@@ -451,7 +451,7 @@ parse_number_string(UC const *p, UC const *pend,
i = i * 10 + uint64_t(*p - UC('0'));
++p;
}
if (i >= minimal_nineteen_digit_integer) { // We have a big integers
if (i >= minimal_nineteen_digit_integer) { // We have a big integer
exponent = end_of_integer_part - p + exp_number;
} else { // We have a value with a fractional component.
p = answer.fraction.ptr;

View File

@@ -45,6 +45,24 @@ FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
from_chars_advanced(UC const *first, UC const *last, T &value,
parse_options_t<UC> options) noexcept;
/**
* This function multiplies an integer number by a power of 10 and returns
* the result as a double precision floating-point value that is correctly
* rounded. The resulting floating-point value is the closest floating-point
* value, using the "round to nearest, tie to even" convention for values that
* would otherwise fall right in-between two values. That is, we provide exact
* conversion according to the IEEE standard.
*
* On overflow infinity is returned, on underflow 0 is returned.
*
* The implementation does not throw and does not allocate memory (e.g., with
* `new` or `malloc`).
*/
FASTFLOAT_CONSTEXPR20 inline double
integer_times_pow10(uint64_t mantissa, int decimal_exponent) noexcept;
FASTFLOAT_CONSTEXPR20 inline double
integer_times_pow10(int64_t mantissa, int decimal_exponent) noexcept;
/**
* from_chars for integer types.
*/

View File

@@ -16,8 +16,8 @@
#include "constexpr_feature_detect.h"
#define FASTFLOAT_VERSION_MAJOR 8
#define FASTFLOAT_VERSION_MINOR 0
#define FASTFLOAT_VERSION_PATCH 2
#define FASTFLOAT_VERSION_MINOR 1
#define FASTFLOAT_VERSION_PATCH 0
#define FASTFLOAT_STRINGIZE_IMPL(x) #x
#define FASTFLOAT_STRINGIZE(x) FASTFLOAT_STRINGIZE_IMPL(x)
@@ -58,6 +58,11 @@ enum class chars_format : uint64_t {
template <typename UC> struct from_chars_result_t {
UC const *ptr;
std::errc ec;
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2497r0.html
constexpr explicit operator bool() const noexcept {
return ec == std::errc();
}
};
using from_chars_result = from_chars_result_t<char>;
@@ -88,11 +93,12 @@ using parse_options = parse_options_t<char>;
defined(__MINGW64__) || defined(__s390x__) || \
(defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
defined(__PPC64LE__)) || \
defined(__loongarch64))
defined(__loongarch64) || (defined(__riscv) && __riscv_xlen == 64))
#define FASTFLOAT_64BIT 1
#elif (defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__arm__) || defined(_M_ARM) || defined(__ppc__) || \
defined(__MINGW32__) || defined(__EMSCRIPTEN__))
defined(__MINGW32__) || defined(__EMSCRIPTEN__) || \
(defined(__riscv) && __riscv_xlen == 32))
#define FASTFLOAT_32BIT 1
#else
// Need to check incrementally, since SIZE_MAX is a size_t, avoid overflow.
@@ -1126,7 +1132,12 @@ template <typename T> constexpr uint64_t int_luts<T>::min_safe_u64[];
template <typename UC>
fastfloat_really_inline constexpr uint8_t ch_to_digit(UC c) {
return int_luts<>::chdigit[static_cast<unsigned char>(c)];
// wchar_t and char can be signed, so we need to be careful.
using UnsignedUC = typename std::make_unsigned<UC>::type;
return int_luts<>::chdigit[static_cast<unsigned char>(
static_cast<UnsignedUC>(c) &
static_cast<UnsignedUC>(
-((static_cast<UnsignedUC>(c) & ~0xFFull) == 0)))];
}
fastfloat_really_inline constexpr size_t max_digits_u64(int base) {

View File

@@ -188,32 +188,17 @@ from_chars(UC const *first, UC const *last, T &value,
parse_options_t<UC>(fmt));
}
/**
* This function overload takes parsed_number_string_t structure that is created
* and populated either by from_chars_advanced function taking chars range and
* parsing options or other parsing custom function implemented by user.
*/
template <typename T, typename UC>
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
from_chars_advanced(parsed_number_string_t<UC> &pns, T &value) noexcept {
static_assert(is_supported_float_type<T>::value,
"only some floating-point types are supported");
static_assert(is_supported_char_type<UC>::value,
"only char, wchar_t, char16_t and char32_t are supported");
from_chars_result_t<UC> answer;
answer.ec = std::errc(); // be optimistic
answer.ptr = pns.lastmatch;
template <typename T>
fastfloat_really_inline FASTFLOAT_CONSTEXPR20 bool
clinger_fast_path_impl(uint64_t mantissa, int64_t exponent, bool is_negative,
T &value) noexcept {
// The implementation of the Clinger's fast path is convoluted because
// we want round-to-nearest in all cases, irrespective of the rounding mode
// selected on the thread.
// We proceed optimistically, assuming that detail::rounds_to_nearest()
// returns true.
if (binary_format<T>::min_exponent_fast_path() <= pns.exponent &&
pns.exponent <= binary_format<T>::max_exponent_fast_path() &&
!pns.too_many_digits) {
if (binary_format<T>::min_exponent_fast_path() <= exponent &&
exponent <= binary_format<T>::max_exponent_fast_path()) {
// Unfortunately, the conventional Clinger's fast path is only possible
// when the system rounds to the nearest float.
//
@@ -224,41 +209,64 @@ from_chars_advanced(parsed_number_string_t<UC> &pns, T &value) noexcept {
if (!cpp20_and_in_constexpr() && detail::rounds_to_nearest()) {
// We have that fegetround() == FE_TONEAREST.
// Next is Clinger's fast path.
if (pns.mantissa <= binary_format<T>::max_mantissa_fast_path()) {
value = T(pns.mantissa);
if (pns.exponent < 0) {
value = value / binary_format<T>::exact_power_of_ten(-pns.exponent);
if (mantissa <= binary_format<T>::max_mantissa_fast_path()) {
value = T(mantissa);
if (exponent < 0) {
value = value / binary_format<T>::exact_power_of_ten(-exponent);
} else {
value = value * binary_format<T>::exact_power_of_ten(pns.exponent);
value = value * binary_format<T>::exact_power_of_ten(exponent);
}
if (pns.negative) {
if (is_negative) {
value = -value;
}
return answer;
return true;
}
} else {
// We do not have that fegetround() == FE_TONEAREST.
// Next is a modified Clinger's fast path, inspired by Jakub Jelínek's
// proposal
if (pns.exponent >= 0 &&
pns.mantissa <=
binary_format<T>::max_mantissa_fast_path(pns.exponent)) {
if (exponent >= 0 &&
mantissa <= binary_format<T>::max_mantissa_fast_path(exponent)) {
#if defined(__clang__) || defined(FASTFLOAT_32BIT)
// Clang may map 0 to -0.0 when fegetround() == FE_DOWNWARD
if (pns.mantissa == 0) {
value = pns.negative ? T(-0.) : T(0.);
return answer;
if (mantissa == 0) {
value = is_negative ? T(-0.) : T(0.);
return true;
}
#endif
value = T(pns.mantissa) *
binary_format<T>::exact_power_of_ten(pns.exponent);
if (pns.negative) {
value = T(mantissa) * binary_format<T>::exact_power_of_ten(exponent);
if (is_negative) {
value = -value;
}
return answer;
return true;
}
}
}
return false;
}
/**
* This function overload takes parsed_number_string_t structure that is created
* and populated either by from_chars_advanced function taking chars range and
* parsing options or other parsing custom function implemented by user.
*/
template <typename T, typename UC>
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
from_chars_advanced(parsed_number_string_t<UC> &pns, T &value) noexcept {
static_assert(is_supported_float_type<T>::value,
"only some floating-point types are supported");
static_assert(is_supported_char_type<UC>::value,
"only char, wchar_t, char16_t and char32_t are supported");
from_chars_result_t<UC> answer;
answer.ec = std::errc(); // be optimistic
answer.ptr = pns.lastmatch;
if (!pns.too_many_digits &&
clinger_fast_path_impl(pns.mantissa, pns.exponent, pns.negative, value))
return answer;
adjusted_mantissa am =
compute_float<binary_format<T>>(pns.exponent, pns.mantissa);
if (pns.too_many_digits && am.power2 >= 0) {
@@ -336,6 +344,49 @@ from_chars(UC const *first, UC const *last, T &value, int base) noexcept {
return from_chars_advanced(first, last, value, options);
}
FASTFLOAT_CONSTEXPR20 inline double
integer_times_pow10(uint64_t mantissa, int decimal_exponent) noexcept {
double value;
if (clinger_fast_path_impl(mantissa, decimal_exponent, false, value))
return value;
adjusted_mantissa am =
compute_float<binary_format<double>>(decimal_exponent, mantissa);
to_float(false, am, value);
return value;
}
FASTFLOAT_CONSTEXPR20 inline double
integer_times_pow10(int64_t mantissa, int decimal_exponent) noexcept {
const bool is_negative = mantissa < 0;
const uint64_t m = static_cast<uint64_t>(is_negative ? -mantissa : mantissa);
double value;
if (clinger_fast_path_impl(m, decimal_exponent, is_negative, value))
return value;
adjusted_mantissa am =
compute_float<binary_format<double>>(decimal_exponent, m);
to_float(is_negative, am, value);
return value;
}
// the following overloads are here to avoid surprising ambiguity for int,
// unsigned, etc.
template <typename Int>
FASTFLOAT_CONSTEXPR20 inline typename std::enable_if<
std::is_integral<Int>::value && !std::is_signed<Int>::value, double>::type
integer_times_pow10(Int mantissa, int decimal_exponent) noexcept {
return integer_times_pow10(static_cast<uint64_t>(mantissa), decimal_exponent);
}
template <typename Int>
FASTFLOAT_CONSTEXPR20 inline typename std::enable_if<
std::is_integral<Int>::value && std::is_signed<Int>::value, double>::type
integer_times_pow10(Int mantissa, int decimal_exponent) noexcept {
return integer_times_pow10(static_cast<int64_t>(mantissa), decimal_exponent);
}
template <typename T, typename UC>
FASTFLOAT_CONSTEXPR20 from_chars_result_t<UC>
from_chars_int_advanced(UC const *first, UC const *last, T &value,

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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`

View File

@@ -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

View File

@@ -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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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.

View File

@@ -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.
*

View File

@@ -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);
/**
* @}
*/

View File

@@ -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 */

View File

@@ -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, \

View File

@@ -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 */

View File

@@ -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
/**
* @}

View File

@@ -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, \

View File

@@ -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

View File

@@ -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__)

View File

@@ -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 */

View File

@@ -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);
/**
* @}

View File

@@ -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.

View File

@@ -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

View File

@@ -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.
*/

View File

@@ -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.
*

View File

@@ -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.

View File

@@ -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);
/**
* @}
*/

View File

@@ -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

View File

@@ -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.

View File

@@ -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')

View File

@@ -26,10 +26,6 @@
#define AVUTIL_FIFO_H
#include <stddef.h>
#include <stdint.h>
#include "attributes.h"
#include "version.h"
/**
* @defgroup lavu_fifo AVFifo

View File

@@ -22,7 +22,6 @@
#include <stddef.h>
#include <stdint.h>
#include "version.h"
#include "attributes.h"
/**

Some files were not shown because too many files have changed in this diff Show More