Skip to content

Commit

Permalink
update avisynth.h to Avisynth+MT r2005.
Browse files Browse the repository at this point in the history
also, some cosmetics.
  • Loading branch information
chikuzen committed Jul 5, 2016
1 parent cf6a326 commit 5f215b9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
19 changes: 13 additions & 6 deletions avisynth/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Syntax:

parameters:

clip - planar formats only.
clip - planar 8bit formats only.

mode - sets output format (default = 0)

Expand Down Expand Up @@ -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


Expand All @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions avisynth/src/TCannyMod.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{B08754A8-23B9-4CCE-BE82-1EDB823CBC26}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -102,7 +102,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<StringPooling>true</StringPooling>
Expand Down
10 changes: 7 additions & 3 deletions avisynth/src/edge_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename Vf, typename Vi, bool CALC_DIR>
static void __stdcall
Expand Down
2 changes: 1 addition & 1 deletion avisynth/src/tcannymod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions avisynth/src/tcannymod.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#define TCANNY_MOD_H

#include <cstdint>
#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 <windows.h>
#include <avisynth.h>

Expand Down

0 comments on commit 5f215b9

Please sign in to comment.