Skip to content

Commit

Permalink
⚡ Compiling by g++ instead of VS
Browse files Browse the repository at this point in the history
Speed up significantly
  • Loading branch information
Kiyamou committed Nov 25, 2019
1 parent 8ae4d45 commit 7c75aff
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,10 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Generic header file
VapourSynth.h
VSHelper.h

# Dynamic link library after compiling
*.dll
8 changes: 4 additions & 4 deletions JincResize/JincResize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include <memory>

#include <VapourSynth.h>
#include <VSHelper.h>
#include "VapourSynth.h"
#include "VSHelper.h"

#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
Expand Down Expand Up @@ -126,8 +126,8 @@ static const VSFrameRef* VS_CC filterGetFrame(int n, int activationReason, void*
static void VS_CC filterFree(void* instanceData, VSCore* core, const VSAPI* vsapi) {
FilterData* d = static_cast<FilterData*>(instanceData);
vsapi->freeNode(d->node);
free(d->lut); // I don't konw it's necessary or not. lut is created by malloc, so using free?
delete d; // I don't know the difference between delete and free
delete d->lut; // I don't konw it's necessary or not.
delete d;
}

static void VS_CC filterCreate(const VSMap* in, VSMap* out, void* userData, VSCore* core, const VSAPI* vsapi) {
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ JincResize works by Jinc algorithms (EWA Lanczos).

Modified from EWA-Resampling-VS: https://github.com/Lypheo/EWA-Resampling-VS . Added the 8bit support.

I'm a beginner for C++. The plugin is very slow now (slower than the original version). I will try to modify in the future.
I'm a beginner for C++. The plugin needs improvement. I will try to modify in the future.

# Usage

Expand All @@ -14,6 +14,14 @@ core.ewa.Lanczos(clip clip, int width, int height, float radius, float blur)

* clip: Clip to process, integer sample type of 8-16 bit depth is supported.

# Compilation

The currently released dynamic link library is compiled in the following way.

```
x86_64-w64-mingw32-g++ -shared -o JincResize.dll -O2 -static JincResize.cpp
```

# Acknowledgement

Thanks to [Lypheo]( https://github.com/Lypheo ), the original developer of EWA-Resampling-VS. I know nothing of algorithm implementation, only make a little modification in the grammar. If you think the plugin is useful, make a star for his original [repositories]( https://github.com/Lypheo/EWA-Resampling-VS ).
Thanks to [Lypheo]( https://github.com/Lypheo ), the original developer of EWA-Resampling-VS. I know nothing of algorithm implementation, only make a little modification in the grammar. If you think the plugin is useful, make a star for his original [repositories]( https://github.com/Lypheo/EWA-Resampling-VS ).

0 comments on commit 7c75aff

Please sign in to comment.