Skip to content
Snippets Groups Projects

opengl: add OpenGL adjust filter

Open Romain Vimont requested to merge rom1v/vlc:gladjust into master

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

Members who can merge are allowed to add commits.

Merge request pipeline #568097 failed

Merge request pipeline failed for d556df74

Test coverage 17.86% from 1 job
Approval is optional
Merge blocked: 2 checks failed
Pipeline must succeed.
Merge request must be rebased, because a fast-forward merge is not possible.

Merge details

  • The source branch is 448 commits behind the target branch.
  • 1 commit will be added to master.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Romain Vimont added 162 commits

    added 162 commits

    Compare with previous version

  • added MRStatus::Stale label and removed MRStatus::InReview label

  • Alexandre Janniaux resolved all threads

    resolved all threads

  • MR Acceptance result

    :tada: This MergeRequest has been Accepted! Congratulations.

    MR acceptance checks details:

    • :white_check_mark: MR should be considered mergeable by Gitlab
    • :white_check_mark: Last pipeline should be successful
    • :white_check_mark: MergeRequest should have at least one external review and/or vote
    • :white_check_mark: All threads should be resolved, and score >= 0
    • :white_check_mark: MergeRequest should have no activity (threads/votes) for (24h/24h)

    This message was automatically generated by homer-bot.

  • Steve Lhomme added 12381 commits

    added 12381 commits

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading