opengl: add OpenGL adjust filter
This filter provides an OpenGL version of the adjust
filter. It has been developed by Vatsin Suchak (@vatsin1810) as part as his GSoC 2020, along with many other filters that will be rebased and submitted later.
Usage example:
# CPU filter
./vlc --dec-dev=none --video-filter=adjust --brightness=1.2 video.mp4
# OpenGL filter
./vlc --dec-dev=none --video-filter=gladjust --brightness=1.2 video.mp4
Note that even with the very same parameters, the result may not be exactly the same, because (AFAIU) the CPU filter operates on YUV planes while the OpenGL shader operates on RGB input, which it converts to HSL to properly adjust then converts back to RGB.
In this MR, the video filter is an alternate implementation of the adjust filter, with its own name: "gladjust"
.
However, from a user point of view, it could be reasonable to enable the adjust settings, whatever implementation is used. Also, the user should be able to force an implementation (either the CPU adjust or the OpenGL adjust).
How could we expose this?
If we just give the same name ("adjust"
) to the filter, and a higher priority to the OpenGL version, it will not be possible to force the CPU version.
We had a similar discussion for the OpenGL blend deinterlace filter. The solution consisted in:
- passing the generic algorithm
--deinterlace-mode=blend
; - (optionally) passing an ordered list of implementations, by order of priority:
--deinterlace-filter=glblend,deinterlace
.
But here, we directly select a video filter, there is no way to request a "generic" algorithm and optionally its implementation.
Should we add a global --prefer-opengl
option? It looks a bit ad-hoc and hacky. Also, it would prevent the (theoretical) usage of one CPU filter and another OpenGL filter.
What do you think?
Merge request reports
Activity
changed milestone to %4.0
added Component::Video: filters label
added MRStatus::Reviewable label
- Resolved by Alexandre Janniaux
Hi,
AFAIK, adjust filters are not like deinterlace, there is no multiple "adjust" method and thus no hardcoded list of method, so you can potentially always select any adjust filter by using the full name of the plugin instead of the shortcut.
added MRStatus::InReview label and removed MRStatus::Reviewable label
- Resolved by Alexandre Janniaux
The commit message seems to be lacking co-authorship assignment to Maxime Messon too, I need to check.
added MRStatus::Stale label and removed MRStatus::InReview label
added MRStatus::InReview label and removed MRStatus::Stale label
added MRStatus::Stale label and removed MRStatus::InReview label
added 4272 commits
-
26f37966...ff3d43b9 - 4271 commits from branch
videolan:master
- ee9e5dd1 - opengl: add OpenGL adjust filter
-
26f37966...ff3d43b9 - 4271 commits from branch
added MRStatus::InReview label and removed MRStatus::Stale label
- Resolved by Romain Vimont
added 162 commits
-
a5a34bda...b2daa832 - 161 commits from branch
videolan:master
- 4329f5a7 - opengl: add OpenGL adjust filter
-
a5a34bda...b2daa832 - 161 commits from branch
added MRStatus::Stale label and removed MRStatus::InReview label
added MRStatus::Acceptable label and removed MRStatus::Stale label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, and score >= 0 -
MergeRequest should have no activity (threads/votes) for (24h/24h)
-
added 12381 commits
-
4329f5a7...124a022f - 12380 commits from branch
videolan:master
- 1bd79887 - opengl: add OpenGL adjust filter
-
4329f5a7...124a022f - 12380 commits from branch