From 5f215b9405a8994c6e4d8dad29403d084f958e57 Mon Sep 17 00:00:00 2001 From: OKA Motofumi Date: Tue, 5 Jul 2016 14:19:15 +0900 Subject: [PATCH] update avisynth.h to Avisynth+MT r2005. also, some cosmetics. --- avisynth/README.txt | 19 +++++++++++++------ avisynth/src/TCannyMod.vcxproj | 4 ++-- avisynth/src/edge_detection.cpp | 10 +++++++--- avisynth/src/tcannymod.cpp | 2 +- avisynth/src/tcannymod.h | 8 ++++---- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/avisynth/README.txt b/avisynth/README.txt index 02d46f9..7def23d 100644 --- a/avisynth/README.txt +++ b/avisynth/README.txt @@ -15,7 +15,7 @@ Syntax: parameters: - clip - planar formats only. + clip - planar 8bit formats only. mode - sets output format (default = 0) @@ -118,16 +118,14 @@ Note: - Probabry, this filter is able to work on Avisynth+'s "MT_NICE_FILTER" mode.(from v1.0.0) - - TCannyMod_avx.dll is compiled with /arch:AVX. + - TCannyMod_avx2.dll is compiled with /arch:AVX2. Requirements: - Avisynth2.6.0/Avisynth+r1576 or greater. + Avisynth2.6.0/Avisynth+r2005 or greater. Microsoft Visual C++ 2015 Redistributable Package - WindowsVistaSP2 or later - Avisynth2.60 or Avisynth+ - WindowsVistasp2/7sp1/8.1/10 + Windows Vista sp2 / 7 sp1 / 8.1 / 10 SSE2 capable CPU @@ -148,6 +146,15 @@ Changelog: 1.1.1 (20160330): - Add AVX2 support for 32bit. + 1.2.0 (2016): + - Set filter mode as MT_NICE_FILTER on Avisynth+ MT. + - Use buffer pool on Avisynth+ MT. + - Disable AVX2/FMA3/AVX code when /arch:AVX2 is not set. + - Disable AVX2/FMA3/AVX code on Avisynth2.6. + + 1.3.0 (20160705) + - Update avisynth.h to Avisynth+MT r2005. + Source code: diff --git a/avisynth/src/TCannyMod.vcxproj b/avisynth/src/TCannyMod.vcxproj index f80c6a7..a409b5f 100644 --- a/avisynth/src/TCannyMod.vcxproj +++ b/avisynth/src/TCannyMod.vcxproj @@ -21,7 +21,7 @@ {B08754A8-23B9-4CCE-BE82-1EDB823CBC26} Win32Proj - 8.1 + 10.0.10586.0 @@ -102,7 +102,7 @@ true Speed true - AdvancedVectorExtensions2 + StreamingSIMDExtensions2 Fast AnySuitable true diff --git a/avisynth/src/edge_detection.cpp b/avisynth/src/edge_detection.cpp index d43deff..35ddb87 100644 --- a/avisynth/src/edge_detection.cpp +++ b/avisynth/src/edge_detection.cpp @@ -131,9 +131,13 @@ standard(float* blurp, const size_t blur_pitch, float* emaskp, /* sobel operator(3x3) - | p0 | p1 | p2 | - H = [-1, 0, 1, -2, 0, 2, -1, 0, 1] - V = [ 1, 2, 1, 0, 0, 0, -1, -2, -1] + + H = [-1, 0, 1, -> p0 + -2, 0, 2, -> p1 + -1, 0, 1] -> p2 + V = [ 1, 2, 1, -> p0 + 0, 0, 0, -> p1 + -1, -2, -1] -> p2 */ template static void __stdcall diff --git a/avisynth/src/tcannymod.cpp b/avisynth/src/tcannymod.cpp index 5c96402..124b8b4 100644 --- a/avisynth/src/tcannymod.cpp +++ b/avisynth/src/tcannymod.cpp @@ -304,7 +304,7 @@ create_tcannymod(AVSValue args, void* user_data, ise_t* env) bool is_plus = user_data != nullptr; arch_t arch = get_arch(args[8].AsInt(HAS_AVX2), is_plus); - + return new TCannyM(args[0].AsClip(), mode, sigma, tmin, tmax, chroma, args[5].AsBool(false), scale, arch, "TCannyMod", is_plus); diff --git a/avisynth/src/tcannymod.h b/avisynth/src/tcannymod.h index 9dc488b..5d7f870 100644 --- a/avisynth/src/tcannymod.h +++ b/avisynth/src/tcannymod.h @@ -27,10 +27,10 @@ #define TCANNY_MOD_H #include -#ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #define NOMINMAX -#endif +#define WIN32_LEAN_AND_MEAN +#define VC_EXTRALEAN +#define NOMINMAX +#define NOGDI #include #include