Add processing modes#1729
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the binary GPU Effects option with a comprehensive processing mode system that supports multiple bit depths and color processing modes. The change introduces five processing modes: Native 8-bit CPU, Linear 8-bit CPU, Native 10-bit CPU, Linear 10-bit CPU, and Native 10-bit GPU/CPU.
Key changes:
- Introduced
ProcessingModeenum and associated management functions - Updated video widget configuration to handle different image formats based on processing mode
- Modified project saving/loading to store processing mode information
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/videowidget.cpp | Updated consumer configuration to set image format and color transfer based on processing mode |
| src/shotcut_mlt_properties.h | Added project processing mode property constant |
| src/settings.h | Added ProcessingMode enum and related method declarations, removed legacy GPU setter |
| src/settings.cpp | Implemented processing mode management with legacy GPU mode migration |
| src/mltcontroller.h | Added processing mode support to controller |
| src/mltcontroller.cpp | Integrated processing mode into project loading/saving and controller initialization |
| src/mainwindow.ui | Replaced single GPU action with processing mode menu and actions |
| src/mainwindow.h | Updated method signatures for processing mode |
| src/mainwindow.cpp | Replaced GPU handling with comprehensive processing mode management |
| src/main.cpp | Updated command line GPU option to use new processing mode |
| src/docks/encodedock.cpp | Added processing mode support to encoding configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
52489a6 to
9911248
Compare
9911248 to
1f209c8
Compare
1f209c8 to
e2cb044
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think this is ready for review - in addition to the companion PR |
Remove the previous GPU Effects option and replace it with multiple processing modes that enable higher bit depth and linear color processing.
Reduce property lookups Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dan Dennedy <dan@dennedy.org>
Now in Export, when `color_trc` is arib-std-b67 (HLG) do not add mlt_color_trc=linear. Also, let user override `mlt_image_format` or `mlt_color_trc`.
0a13123 to
95cf147
Compare
But this will change again when project conversion is added.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
src/mainwindow.cpp:4109
- Inconsistent terminology: The dialog message refers to "GPU effects" but should use "GPU processing" to match the updated terminology used elsewhere in this PR (e.g., line 1688, 1733-1735).
showFullScreen();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| s.set(kShotcutProjectAudioChannels, m_audioChannels); | ||
| s.set(kShotcutProjectFolder, m_projectFolder.isEmpty() ? 0 : 1); | ||
| s.set(kShotcutProjectProcessingMode, | ||
| Settings.processingModeStr(Settings.processingMode()).toUtf8().constData()); |
There was a problem hiding this comment.
Potential bug: When saving, the code saves Settings.processingMode() (global settings) instead of m_processingMode (project-specific value loaded from the file). This means the saved processing mode may not match what was originally loaded from the project if they differ. Consider saving m_processingMode instead to preserve the project's processing mode.
| Settings.processingModeStr(Settings.processingMode()).toUtf8().constData()); | |
| Settings.processingModeStr(m_processingMode).toUtf8().constData()); |
There was a problem hiding this comment.
I think this only partially addresses a potential small bug:
- open Shotcut with processing mode native 8-bit
- open a project with processing mode linear 8- or 10-bit processing mode
- restart Shotcut
- processing mode is now what was last opened instead of native 8-bit
The above bug does not apply to GPU vs. not, however, thankfully.
There was a problem hiding this comment.
What behavior would we want? I think the mode selected in the menu should always match the mode being used and the saved setting. This matches the video mode behavior. So when a project is opened, the setting must necessarily be changed. We could display a status message in the status area whenever the mode is changed. Also, upon opening Shotcut, we could flash up the video mode and processing mode in the status area.
There was a problem hiding this comment.
It is behaving a little different than video mode, but I think it should be the same: changing a processing mode with no project load sets a user default. Loading a project obviously should change processing mode to reflect it but not save it to settings and overwrite the user default. Video mode behaves correctly.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Remove the previous GPU Effects option and replace it with multiple processing modes that enable higher bit depth and linear color processing.
Depends upon mltframework/mlt#1159
Update 10/25/2025
I think this is ready for testing if anyone wants to help. I believe the colors are coming through correctly now. But there are many permutations of conversions. I'm going to keep working on the todo items.
TODO: