Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
31st July 2014, 07:28 | #41 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
NNEDI3 is quite great, IMHO. It does have disadvantages, too, though. E.g. in some image areas (trees, grass, leaves) it can produce fractal like artifacts. That doesn't happen with Jinc. Also NNEDI3 is a lot slower than Jinc, when using madVR. I'm not sure how speed compares in AviSynth, though. Finally, NNEDI3 can only upscale by exactly 2.0x, while Jinc can up and downscale with any factor you like. So although NNEDI3 is great, there's a place for Jinc, too, IMHO.
|
31st July 2014, 18:03 | #42 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Hmm, well guess i say the same, Lanczos looks similar, but has more artifacts.
Jic looks less detailed, so softer indeed. But i think it depends on content, some things looks better in a soft detailed scale, and harder need that sharp edge. |
31st July 2014, 18:33 | #43 | Link | |
Registered User
Join Date: Dec 2011
Posts: 77
|
Quote:
So yeah, right now performance is MUCH better. But tbh, because of current optimization I don't think it will be nearly as fast on CPU when anti-ringing filter is implemented due to branchy nature of the filter. I am looking into OpenCL right now, but no promise since I don't have much free time nowadays.
__________________
AviSynth+ |
|
1st August 2014, 14:13 | #44 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Hi innocenat,
Thanks for the update. I was wondering what's the purpose of the version parameter? When I set it to true it gives this message. Quote:
|
|
1st August 2014, 14:32 | #45 | Link |
Registered User
Join Date: Dec 2011
Posts: 77
|
It currently show Jinc's internal CPU flag (the [7]) and instruction support it compiles with. I was not sure if AVX2 will really be faster at first so I make this mechanism to tell which version of plugin you have. The Jinc's internal CPU flag is because Avisynth and Avisynth+ cannot currently detect FMA3 and AVX2. Granted, its name is misnomer.
__________________
AviSynth+ |
1st August 2014, 14:44 | #47 | Link |
Registered User
Join Date: Dec 2011
Posts: 77
|
Put it as Apache 2.0 I guess.
The Jinc function calculation (JincFilter.cpp) are Apache 2.0 since they are from ImageMagick. The main resampling code I wrote (EWAResizer.h, FilteredEWAResize.cpp, etc.) is also under MIT license. But the combination (i.e. the project itself) is under Apache 2.0. I guess should put a LICENSE file on the repository. On a side note, you might encounter line artefact with large upscaling factor. It can be fixed by increasing quant_(x|y) option, depending on what direction the line is. I am still not sure if this is bug in my code, or limitation of quantization. I think it's the former, but I still can't pinpoint it yet. The code on the GitHub actually now support downscaling, but I haven't thoroughly check/test it for correctness yet.
__________________
AviSynth+ |
1st August 2014, 23:16 | #48 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
I decided to play around with this a little which usually includes getting the code and compiling it myself. I used VC10/ICL13 with PGO to build the DLL.
Test script: Code:
SetMemoryMax(1700) LoadPlugin("JincResize.dll") w = 1280 h = 720 colorbars(width = w, height = h, pixel_type = "yv12").killaudio().assumefps(24000, 1001) trim(0,99) fadeio(49) trim(0,99) v = last a = v.Jinc36Resize(1920, 1080) b = v.Jinc64Resize(1920, 1080) c = v.Jinc144Resize(1920, 1080) d = v.Jinc256Resize(1920, 1080) return a++b++c++d Code:
Frames processed: 400 (0 - 399) FPS (min | max | average): 3.965 | 18.09 | 7.212 CPU usage (average): 25% Thread count: 1 Physical Memory usage (peak): 1328 MB Virtual Memory usage (peak): 1327 MB Time (elapsed): 000:00:55.463 Code:
Frames processed: 400 (0 - 399) FPS (min | max | average): 3.998 | 18.29 | 7.263 CPU usage (average): 25% Thread count: 1 Physical Memory usage (peak): 644 MB Virtual Memory usage (peak): 643 MB Time (elapsed): 000:00:55.075 The speed is more or less the same but the memory usage is less than half with the DLL I built, no idea why. FYI, Here is the makefile I used to build the DLL: Code:
CPP=@icl.exe CPP_FLAGS=/MT /EHa /W0 /O3 /Qipo /arch:IA32 /Qprof-use /D "NDEBUG" /nologo LINK=@xilink.exe LINK_FLAGS=/dll /nologo JincResize.dll: JincFilter.obj AvisynthEntry.obj cpuid.obj FilteredEWAResize.obj $(LINK) $(LINK_FLAGS) JincFilter.obj AvisynthEntry.obj cpuid.obj FilteredEWAResize.obj /out:JincResize.dll JincFilter.obj: JincFilter.cpp $(CPP) $(CPP_FLAGS) JincFilter.cpp -c AvisynthEntry.obj: AvisynthEntry.cpp $(CPP) $(CPP_FLAGS) AvisynthEntry.cpp -c cpuid.obj: cpuid.cpp $(CPP) $(CPP_FLAGS) cpuid.cpp -c FilteredEWAResize.obj: FilteredEWAResize.cpp $(CPP) $(CPP_FLAGS) FilteredEWAResize.cpp -c |
2nd August 2014, 01:22 | #49 | Link | |||
Registered User
Join Date: Dec 2011
Posts: 77
|
Quote:
Quote:
Quote:
EDIT: Also, FYI my official built are build with /arch:SSE btw, but important functions are #pragma to specific instruction set anyway (which is SSE minimum)
__________________
AviSynth+ Last edited by innocenat; 2nd August 2014 at 07:14. |
|||
2nd August 2014, 10:11 | #50 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Just checked the ICL13 documentation, "arch:IA32" is the same as "arch:SSE". Last edited by Groucho2004; 2nd August 2014 at 16:27. |
|
12th September 2014, 19:02 | #51 | Link |
Nicolas Robidoux
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
|
If you are looking for a method of minimizing haloing that does not rely on some sort of a limiter, you may want to check http://www.imagemagick.org/discourse...b4c5d6db824d9b and the linked discussions on the Luminous Landscape web site, possibly starting with the later posts.
|
2nd August 2020, 17:50 | #52 | Link | ||
Registered User
Join Date: Jul 2018
Posts: 1,036
|
Finally found that I call '2D' processing. Unfortunately current Jinc being Lanczos weighted is not ideal for most high quality work : it is bad for production/downsizing because do not produce 'conditioned' spectrum and not enough for reference display work because has too few sinc taps and additionally weighted with Lanczos window which is with too few taps do not open full potential of sinc kernel for correctly prepared input data. But it have implementated correct '2D/round' resampler engine as I see from quick testing. So we need to add more practical kernels for this resampler - same as used in SinPowResize for production work and same used in SincLin2Resize for reference displaying. And current Jinc is better to rename to some like JLanczosResize.
As for processing speed it is strange to see the runtime-calculated kernel samples. At least for pow2 resize can use static pre-computed kernel and just convolve in 2D matrices using SIMD that is faster. When I do not know what Jinc do I made simple C-based 2D convolution project for Sinc2D resize with static pre-computed kernel as an example. It is on github. https://github.com/DTL2020/Sinc2D-master Do developer of JincResize project still active ? Quote:
For 1pass 2D we have read taps*2 lines from mem for convolution and stream 1 line for writing. If taps*2*width is fits into cache the things must run fast. For typical taps around 20 and width up to 10000 we have 10000*40 bytes to cache for planar 8bit encoding. Quote:
In the 'perfect world' it is responsibility of image data producer to supply such (compressed to limited samples) video image data that not rings, not aliases and with controlled over/under shooting per producer's taste with 'decompressing' to analog image data with sinc (pure non-weighted sinc) filter. Practically it is upsizing to infinity number digital samples. With upcoming 8K displays we finally can see FullHD 1080 sampled video data with up to 4x restoration closer to analog form - that is usually good enough. It simulate 54 MHz DAC for DVD-player. Last edited by DTL; 2nd August 2020 at 20:21. |
||
4th December 2020, 07:40 | #53 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,036
|
Well - I see this thread is not updated but there was significant plugin update. It looks it finally re-written for much more stable 2D resampler core and capable for downsizing.
Now I think using the current 2D resampler core it is good to add all common family of resizers - at least downsizers suitable for production work (having properties for Gibbs-neutralisation) like Gauss kernel and SinPow kernel. So we at least will have a complementary family of 'true-2D' resizers for downsample and upsample work. Because current Jinc resizer as well as Sinc in 1D is not suitable for downsize (antializing/production) work (without additional pre-filtering). Which version of Visual Studio is required to build current version 1.1.0 ? (https://github.com/Asd-g/AviSynth-Ji...ases/tag/1.1.0) I tried VS2013 but it looks uses old std library and even can not found std::cyl_bessel_j(1, x) function. |
4th December 2020, 15:41 | #57 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
4th December 2020, 17:59 | #58 | Link | |
Registered User
Join Date: Jul 2018
Posts: 1,036
|
Quote:
|
|
4th December 2020, 18:16 | #59 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
4th December 2020, 18:30 | #60 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,297
|
Humm... Maybe i'll try to MT this one... Maybe... A quick look at the code, it seems not so hard at first glance, but there is allways tricky things possible...
How is it realy better to standard resizer, NNEDI3 ? Or just different ?
__________________
My github. |
Thread Tools | Search this Thread |
Display Modes | |
|
|