-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
obs-ffmpeg: Add quality preset for VA-API #7953
Conversation
|
Please test on a real release not a git package. |
Done. |
if (strncmp("Mesa Gallium", vendor_string, 12) != 0) | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but driver filters is a no-go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has to be like this, since the quality value has different meaning on other va drivers (intel).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not supported by any drivers, it is going to be an issue.
Edit: So no Mesa-only or Intel-only feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here appears to be that AMD decided to just ignore the defined meaning of this value and come up with their own new and exciting meaning for the parameter.
https://intel.github.io/libva/structVAEncMiscParameterBufferQualityLevel.html - A lower value means higher quality, and a value of 1 represents the highest quality. The quality level setting is used as a trade-off between quality and speed/power consumption, with higher quality corresponds to lower speed and higher power consumption.
https://gitlab.freedesktop.org/mesa/mesa/-/blob/a727ec83ba01776e9c6f61c912c4caac280e968e/src/gallium/frontends/va/config.c#L213 - AMD decided to use this to control a whole suite of encoder modes without regard to the API definition.
I'm not a fan of trying to divine the meaning of a parameter after AMD intentionally broke the api for their implementation, better to just ignore this if drivers want to use this as a special out of spec signal since they may change it any time on us.
Description
Added support for VA-API quality preset in Mesa >= 22.3.
https://gitlab.freedesktop.org/mesa/mesa/-/commit/a727ec83ba01776e9c6f61c912c4caac280e968e
Motivation and Context
Better encoding quality on AMD cards on Linux.
How Has This Been Tested?
On ArchLinux (mesa 22.3.1, ffmpeg 5.1.2).
Types of changes
Checklist:
Screenshot: