Commit graph

32 commits

Author SHA1 Message Date
PatTheMav 8061652051 mac-videotoolbox: Refactor implementation
Existing code made use of macros which broke parsing in Xcode and
complicated debugging as crucial code was executed within macros and
not actual source code.

Use of mutable CoreFramework data structures (which were never mutated)
is replaced by use of faster non-mutable variants.

When an allocator needs to be used, `kCFAllocatorDefault` is specified
explicitly.

VideoToolbox session properties are also set in bulk instead of
multiple consecutive calls.

Also simplifies detection of Apple Silicon hosts to make code more
readable.
2023-02-21 21:29:12 +01:00
jpark37 09c2a321ce mac-videotoolbox: Add ProRes 4444 (XQ) support
Also leverage P216/P416 pixel formats to retain precision.
2023-02-21 18:48:44 +01:00
gxalpha 67e6b8649a mac-videotoolbox: Load encoders from system asynchronously
Copying the encoder list takes a while which blocks the main thread.
Doing the copying asynchronously removes instead of blocking the main
thread improves startup performance by about 60ms.
2023-02-12 17:38:21 +01:00
Translation Updater 783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
jpark37 0fc3cb1962 mac-videotoolbox: Add HDR metadata 2022-12-10 21:43:50 -08:00
jpark37 6c8028a849 mac-videotoolbox: Don't parse HEVC as AVC 2022-12-03 15:31:41 -08:00
gxalpha 838446082e mac-videotoolbox: Default to High profile 2022-11-19 15:05:05 -08:00
gxalpha 8e8148a2d5 mac-videotoolbox: Support P010 and HDR color spaces 2022-11-12 12:24:10 +01:00
PatTheMav 097e9ccecf mac-videtoolbox: Use correct size for system representation CFStrings 2022-11-02 22:44:20 +01:00
gxalpha a352f0fdd8 mac-videotoolbox: Make unsupported color format text codec agnostic 2022-11-02 22:44:20 +01:00
Developer-Ecosystem-Engineering 44c824985c mac-videotoolbox: Remove HW_ACCEL flags
The hw/sw encoder selection is enforced by the encoder IDs, so these flags are
not explicitly needed.
2022-11-02 22:44:20 +01:00
Developer-Ecosystem-Engineering 761530d34b mac-videotoolbox: Add support platform hardware and software ProRes 422
Utilize the systems ProRes software and hardware encoders on supported configurations
2022-11-02 22:44:20 +01:00
Developer-Ecosystem-Engineering e461ec4be1 mac-videotoolbox: Add support for platform hardware and software HEVC
Adds support for the system provided HEVC encoders
2022-11-02 22:44:20 +01:00
Translation Updater f065f20ce1 Update translations from Crowdin 2022-10-25 22:32:14 +00:00
gxalpha dd06fe44ad mac-videotoolbox: Remove "None" profile
Selecting this would actually fall back to "main", so we should just use
main as the default.
2022-10-09 16:58:30 -07:00
gxalpha ff0f5ca681 mac-videotoolbox: Remove unused defines 2022-10-01 16:25:05 -07:00
Translation Updater cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Translation Updater 4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
Vainock 020cd92ab5 mac-videotoolbox: Fix typo 'diffent' 2022-08-09 20:05:06 -04:00
gxalpha ad57af4c0a mac-videotoolbox: Reject color formats other than NV12 and I420 2022-08-09 16:19:30 +02:00
Translation Updater 81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
PatTheMav a001f97e3c mac-videotoolbox: Remove guard for hardware acceleration check 2022-07-31 12:21:35 +02:00
Vainock eb06594381 Use property suffixes for units everywhere 2022-07-22 08:24:51 -04:00
tytan652 5ff07c63b6 mac-videotoolbox: Guard hardware_accelerated check behind macOS 10.14 2022-07-19 12:46:42 +02:00
PatTheMav 566ce79b0f mac-videotoolbox: Enable CBR and CRF on hardware encoders only
Both rate control methods only work on hardware encoders and will error
out when selected for software encoders, so we shouldn't show them there

Co-Authored-By: Sebastian Beckmann <beckmann.sebastian@outlook.de>
2022-07-11 23:45:43 +02:00
AuroraWright 84c7d87a7f mac-videotoolbox: Add CRF support on Apple silicon
Co-Authored-By: Sebastian Beckmann <beckmann.sebastian@outlook.de>
2022-07-11 23:45:43 +02:00
Developer-Ecosystem-Engineering 9e0d7b3123 mac-videotoolbox: Add CBR support on Apple silicon / macOS 13
Implementation adjusted by the OBS Project.

Co-Authored-By: Sebastian Beckmann <beckmann.sebastian@outlook.de>
2022-07-11 23:45:43 +02:00
gxalpha 8c987a86ac mac-videotoolbox: Use type_data as it was intended 2022-07-11 23:45:43 +02:00
gxalpha fffb320225 mac-videotoolbox: Remove redundant bitrate check
The session_set_bitrate method already returns an OSStatus to confirm
that everything has been successful. As such, a second check to make
sure that the bitrate has indeed changed is redundant and only adds
unnecessary code.
2022-07-11 23:45:43 +02:00
gxalpha 182906d412 mac-videotoolbox: Rename functions to remove "h264" 2022-07-11 23:45:43 +02:00
gxalpha a129c953e8 cmake: Rename mac-vth264 plugin to mac-videotoolbox 2022-07-11 23:45:43 +02:00
gxalpha 737f0ab08a mac-videotoolbox: Rename mac-vth264 plugin to mac-videotoolbox 2022-07-11 23:45:43 +02:00