From c00167e2b0dfdb350dbdbc4fadfba335890572ee Mon Sep 17 00:00:00 2001 From: Dendraspis Date: Wed, 7 Apr 2021 11:05:30 +0200 Subject: [PATCH] Remove NVEnc encode modes cbrhq and vbrhq --- Changelog.md | 1 + Source/Encoding/NVEnc.vb | 30 ++++++++++-------------------- Source/My Project/AssemblyInfo.vb | 4 ++-- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/Changelog.md b/Changelog.md index 42a3a761..2e735d1d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -12,6 +12,7 @@ v2.4.0 (2021-04-??) - Remove '/vfw.h' from 'Err' (stax76) - Bring Command Line options from *Settings* sub-menu back to top level (Dendraspis) - Improve keyboard support in apps dialog (stax76) +- Remove NVEnc encode modes cbrhq and vbrhq (Dendraspis, [#652](/../../issues/652)) - Optimize, extend and add new AviSynth filters (44vince44) - Typo and consistency fixes (JKyle) - Fix AssumeBFF filter selection (JKyle) diff --git a/Source/Encoding/NVEnc.vb b/Source/Encoding/NVEnc.vb index 8fc61263..8e226c06 100644 --- a/Source/Encoding/NVEnc.vb +++ b/Source/Encoding/NVEnc.vb @@ -110,9 +110,7 @@ Public Class NVEnc Overrides Property QualityMode() As Boolean Get - Return Params.Mode.Value = 0 OrElse - ((Params.Mode.Value = 3 OrElse Params.Mode.Value = 4) AndAlso - Params.ConstantQualityMode.Value) + Return Params.Mode.Value = 0 OrElse Params.Mode.Value = 2 AndAlso Params.ConstantQualityMode.Value End Get Set(Value As Boolean) End Set @@ -139,7 +137,7 @@ Public Class NVEnc audio-disposition audio-metadata option-list sub-disposition sub-metadata process-codepage metadata attachment-copy chapter-no-trim video-metadata input-csp sub-source" - tester.UndocumentedSwitches = "cbrhq vbrhq" + tester.UndocumentedSwitches = "" tester.Package = Package.NVEnc tester.CodeFile = Folder.Startup.Parent + "Encoding\nvenc.vb" @@ -165,12 +163,10 @@ Public Class NVEnc Property Mode As New OptionParam With { .Text = "Mode", - .Switches = {"--cqp", "--cbr", "--cbrhq", "--vbr", "--vbrhq"}, + .Switches = {"--cqp", "--cbr", "--vbr"}, .Options = {"CQP: Constant QP", "CBR: Constant Bitrate", - "CBRHQ: Const. Bitrate HQ", - "VBR: Variable Bitrate", - "VBRHQ: Var. Bitrate HQ"}, + "VBR: Variable Bitrate"}, .VisibleFunc = Function() Not Lossless.Value, .ArgsFunc = AddressOf GetModeArgs, .ImportAction = Sub(param, arg) @@ -178,7 +174,7 @@ Public Class NVEnc Mode.Value = Array.IndexOf(Mode.Switches.ToArray, param) End If - If param = "--vbrhq" AndAlso arg = "0" Then + If param = "--vbr" AndAlso arg = "0" Then ConstantQualityMode.Value = True End If End Sub} @@ -209,14 +205,14 @@ Public Class NVEnc Property ConstantQualityMode As New BoolParam With { .Switches = {"--vbr-quality"}, .Text = "Constant Quality Mode", - .VisibleFunc = Function() Mode.Value = 3 OrElse Mode.Value = 4} + .VisibleFunc = Function() Mode.Value = 2} Property QPAdvanced As New BoolParam With { .Text = "Show advanced QP settings", .VisibleFunc = Function() Mode.Value = 0} Property Bitrate As New NumParam With { - .Switches = {"--cbr", "--cbrhq", "--vbr", "--vbrhq"}, + .Switches = {"--cbr", "--vbr"}, .Text = "Bitrate", .Init = 5000, .VisibleFunc = Function() Mode.Value > 0, @@ -254,11 +250,9 @@ Public Class NVEnc .Switch = "--vbr-quality", .Text = "VBR Quality", .Config = {0, 51, 1, 1}, - .VisibleFunc = Function() (Mode.Value = 3 OrElse Mode.Value = 4) AndAlso ConstantQualityMode.Value, + .VisibleFunc = Function() Mode.Value = 2 AndAlso ConstantQualityMode.Value, .ArgsFunc = Function() - If ConstantQualityMode.Value AndAlso - VbrQuality.Value <> VbrQuality.DefaultValue Then - + If ConstantQualityMode.Value AndAlso VbrQuality.Value <> VbrQuality.DefaultValue Then Return "--vbr-quality " & VbrQuality.Value.ToInvariantString End If End Function} @@ -449,7 +443,7 @@ Public Class NVEnc QPAdvanced, Bitrate, QP, QPI, QPP, QPB) Add("Rate Control", New StringParam With {.Switch = "--dynamic-rc", .Text = "Dynamic RC"}, - New OptionParam With {.Switch = "--multipass", .Text = "Multipass", .Options = {"None", "2Pass-Quarter", "2Pass-Full"}, .VisibleFunc = Function() Mode.Value = 1 OrElse Mode.Value = 3}, + New OptionParam With {.Switch = "--multipass", .Text = "Multipass", .Options = {"None", "2Pass-Quarter", "2Pass-Full"}, .VisibleFunc = Function() Mode.Value > 0}, New NumParam With {.Switch = "--qp-init", .Text = "Initial QP", .Config = {0, Integer.MaxValue, 1}}, New NumParam With {.Switch = "--qp-max", .Text = "Maximum QP", .Config = {0, Integer.MaxValue, 1}}, New NumParam With {.Switch = "--qp-min", .Text = "Minimum QP", .Config = {0, Integer.MaxValue, 1}}, @@ -940,11 +934,7 @@ Public Class NVEnc Case 1 Return "--cbr " & rate Case 2 - Return "--cbrhq " & rate - Case 3 Return "--vbr " & rate - Case 4 - Return "--vbrhq " & rate End Select End Function diff --git a/Source/My Project/AssemblyInfo.vb b/Source/My Project/AssemblyInfo.vb index f2f6745a..f9fe5f90 100644 --- a/Source/My Project/AssemblyInfo.vb +++ b/Source/My Project/AssemblyInfo.vb @@ -7,6 +7,6 @@ Imports System.Runtime.InteropServices - - + +