ui/nvenc: Improve and fix some options and logging

Some of the options shown to the user were never actually being applied, which resulted in encoding that looked worse than it could have. With this these options are now applied and users may experience a sudden increase or decrease in quality if they had these options changed.

In addition to that, some options now use a triple state field, which allows them to also have a default/middle state instead of being On or Off.

Furthermore, log output is now read from the actual AVCodecContext, which contains the actual values used in the encoding, instead of relying on the OBS settings to be the actual values.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-11-16 21:44:03 +01:00
parent 2a75d5fabd
commit e4474c29c4
5 changed files with 174 additions and 229 deletions
+6
View File
@@ -48,6 +48,8 @@ namespace obsffmpeg {
LOW_LATENCY_HIGH_QUALITY,
LOSSLESS,
LOSSLESS_HIGH_PERFORMANCE,
// Append things before this.
INVALID = -1,
};
enum class ratecontrolmode : int64_t {
@@ -57,12 +59,16 @@ namespace obsffmpeg {
CBR,
CBR_HQ,
CBR_LD_HQ,
// Append things before this.
INVALID = -1,
};
enum class b_ref_mode : int64_t {
DISABLED,
EACH,
MIDDLE,
// Append things before this.
INVALID = -1,
};
extern std::map<preset, std::string> presets;