Skip to content

Instantly share code, notes, and snippets.

@noizuy
Last active October 19, 2022 16:55
Show Gist options
  • Save noizuy/7639872f3eab7d6014178081be430d6d to your computer and use it in GitHub Desktop.
Save noizuy/7639872f3eab7d6014178081be430d6d to your computer and use it in GitHub Desktop.
Idk if this still works, but this was a patch to add one of the madVR debander checks to neo_f3kdb, which this renames to mad_neo_f3kdb for testing. Make sure to disable CPU optimizations, since it's only added to the C++ code.
diff --git a/src/flash3kyuu_deband_impl_c.cpp b/src/flash3kyuu_deband_impl_c.cpp
index f1e800b..31cd792 100644
--- a/src/flash3kyuu_deband_impl_c.cpp
+++ b/src/flash3kyuu_deband_impl_c.cpp
@@ -167,6 +167,14 @@ static __forceinline void __cdecl process_plane_plainc_mode12_high(const process
int diff4 = ref_4_up - src_px_up;
use_org_px_as_base = is_above_threshold(threshold, diff1, diff2, diff3, diff4);
}
+
+ int ref_pixel_sum = abs(ref_1_up - src_px_up);
+ ref_pixel_sum += abs(ref_2_up - src_px_up);
+ ref_pixel_sum += abs(ref_3_up - src_px_up);
+ ref_pixel_sum += abs(ref_4_up - src_px_up);
+
+ use_org_px_as_base = is_above_threshold(threshold * 3.25, ref_pixel_sum) + use_org_px_as_base;
+
new_pixel = use_org_px_as_base ? src_px_up : avg;
}
diff --git a/src/neo_f3kdb.hpp b/src/neo_f3kdb.hpp
index 99207f9..097270e 100644
--- a/src/neo_f3kdb.hpp
+++ b/src/neo_f3kdb.hpp
@@ -11,8 +11,8 @@
#include "f3kdb.hpp"
namespace Plugin {
- const char* Identifier = "in.7086.neo_f3kdb";
- const char* Namespace = "neo_f3kdb";
+ const char* Identifier = "in.7086.mad_neo_f3kdb";
+ const char* Namespace = "mad_neo_f3kdb";
const char* Description = "Neo F3KDB Deband Filter " PLUGIN_VERSION;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment