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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th January 2014, 21:06   #21  |  Link
NicolasRobidoux
Nicolas Robidoux
 
NicolasRobidoux's Avatar
 
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
Quote:
Originally Posted by Keiyakusha View Post
...
And judging from the feedback in madvr thread, Jinc downscale sux and sticking to something like spline36 is a better idea.
...
I don't know, specifically, how it performs with video content, but fully implemented (possibly slightly deblurred, as it is in madVR---where it only upsamples---and by the EWA LanczosSharp method of ImageMagick---where it can do everything) Jinc-windowed Jinc 3 lobe is an amazing downsampler with digital photographs, esp. if used through linear light.

Last edited by NicolasRobidoux; 9th January 2014 at 22:53.
NicolasRobidoux is offline   Reply With Quote
Old 9th January 2014, 21:12   #22  |  Link
NicolasRobidoux
Nicolas Robidoux
 
NicolasRobidoux's Avatar
 
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
I know I am preaching for my own church of one, but a cheaper EWA filter that works fairly well, at least for downsampling, is the Robidoux filter, which is the EWA default (chosen by Anthony Thyssen, the dev. responsible for resampling, not by me) in ImageMagick. Given that it uses a disk of radius 2 (instead of a bit more than 3 like most EWA Lanczos variants) and that the coefficients are computed with a Keys spline, it should run quite a bit faster.
Don't get me wrong: With good quality input content (and output not overly compressed destructively), EWA Lanczos and close relatives gives better results with the types of images I work with (not video). But EWA Robidoux may give good bang for the buck.

Last edited by NicolasRobidoux; 11th January 2014 at 15:52.
NicolasRobidoux is offline   Reply With Quote
Old 9th January 2014, 21:14   #23  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Jinc downscaling is just not (yet) implemented in madVR. It might be in the future. I have no specific opinion about how it performs yet. I'll cross that bridge when I come to it.
madshi is offline   Reply With Quote
Old 9th January 2014, 21:15   #24  |  Link
NicolasRobidoux
Nicolas Robidoux
 
NicolasRobidoux's Avatar
 
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
If you base your look up table on the square of the distance, you should be able to live with a 1D array.
NicolasRobidoux is offline   Reply With Quote
Old 9th January 2014, 21:21   #25  |  Link
NicolasRobidoux
Nicolas Robidoux
 
NicolasRobidoux's Avatar
 
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
It should be possible to base a pretty nice AR (applied to Jinc-windowed Jinc 3-lobe, deblurred or not) on the key components of the bicubic interpolator LBB (Locally Bounded Bicubic) built into the NoHalo method (found in the open source GEGL and VIPS libraries).

Last edited by NicolasRobidoux; 9th January 2014 at 22:42.
NicolasRobidoux is offline   Reply With Quote
Old 11th January 2014, 05:28   #26  |  Link
innocenat
Registered User
 
innocenat's Avatar
 
Join Date: Dec 2011
Posts: 77
You should really consider editing your post instead of adding new reply.

Downscale isn't implement because it requires dynamic disk size. The more downscale ratio, the larger the disk need to be. Compared to upscale, where disk size is constant, this poses more problem for optimization. The performance, at least for this filter, runs directly proportional to disk size, because the coefficient is calculate with LUT.

What I am currently working on:
- Integrating the quantized-table-lookup approach from cretindesalpes, without using STL container like he is using.
- Figuring out the the deringing algorithm.
- Figuring out what cause non-deterministic behaviour (sometimes it produces wrong result)

I will consider other EWA-based scaling too; the code is written in such way that it's easy to add other resizing kernel.

The reason I have been so slow on this is because real-life, and I have been spending free time optimizing Avisynth+ internal resizer.
innocenat is offline   Reply With Quote
Old 11th January 2014, 15:48   #27  |  Link
NicolasRobidoux
Nicolas Robidoux
 
NicolasRobidoux's Avatar
 
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
Quote:
Originally Posted by innocenat View Post
Downscale isn't implement because it requires dynamic disk size. The more downscale ratio, the larger the disk need to be. Compared to upscale, where disk size is constant, this poses more problem for optimization. The performance, at least for this filter, runs directly proportional to disk size, because the coefficient is calculate with LUT.
I am fully aware that the main bottleneck is memory traffic when downsampling. A reasonably elegant solution, based on power of 2 box filtered mipmaps, is built into the GEGL EWA components of the filters NoHalo and LoHalo. Whether this approach could pay off within Avisynth, I have no idea. It obviously depends on whether (local) mipmaps can be created and used efficiently.

Last edited by NicolasRobidoux; 11th January 2014 at 15:54.
NicolasRobidoux is offline   Reply With Quote
Old 11th January 2014, 16:02   #28  |  Link
NicolasRobidoux
Nicolas Robidoux
 
NicolasRobidoux's Avatar
 
Join Date: Mar 2011
Location: Montreal Canada
Posts: 269
Quote:
Originally Posted by innocenat View Post
...
- Figuring out the the deringing algorithm.
...
It is my hunch that anti-ringing is much less useful when downsampling. At least, much less useful than going through linear light.
NicolasRobidoux is offline   Reply With Quote
Old 12th January 2014, 13:53   #29  |  Link
Seedmanc
Registered User
 
Join Date: Sep 2010
Location: Russia
Posts: 85
Is it better than spline144resize?
Seedmanc is offline   Reply With Quote
Old 15th January 2014, 05:50   #30  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Depends of course. I would say yes but you need to say what you mean by "better". Jinc is not sharper but it has lower aliasing and ringing.
Asmodian is offline   Reply With Quote
Old 15th January 2014, 05:53   #31  |  Link
innocenat
Registered User
 
innocenat's Avatar
 
Join Date: Dec 2011
Posts: 77
Quote:
Originally Posted by Asmodian View Post
Jinc is not sharper but it has lower aliasing and ringing.
lolno. Jinc (and all lanczos-based resizer) has hallelujah ringing. But less aliasing, yes.
innocenat is offline   Reply With Quote
Old 15th January 2014, 19:45   #32  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Ah it must have been madshi's anti-ringing filter which came out at a similar time that gave me the impression Jinc had less ringing.
Asmodian is offline   Reply With Quote
Old 27th July 2014, 16:43   #33  |  Link
innocenat
Registered User
 
innocenat's Avatar
 
Join Date: Dec 2011
Posts: 77
Long time no update. I presented v0.2. Thanks to cretindesalpes idea, now it runs much faster.

I have rewritten the core to be only quantized, table-lookup coefficient only. Even though this is very slightly less accurate, it's not noticeable at all and it runs MUCH faster, on my Haswell laptop the 360p->720p upscale with Jinc36Resize runs at near 40fps. It now has acceleration for SSE2, SSE3, AVX2 and FMA3. While FMA3 offer very slight to unnoticeable advantage over AVX2, AVX2 is huge leap over SSE3, which is also huge leap over SSE2. Non-deterministic behaviour should have also disappeared.

Sorry, anti-ringing filter is not yet implemented.

I have also add Jinc144Resize which is 6-tap filter. You can control quantization option by quant_x and quant_y option. Default is 256 for both value.
__________________
AviSynth+
innocenat is offline   Reply With Quote
Old 30th July 2014, 20:26   #34  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
What's the main difference between this and Lanczos / Spline?

I haven't used MadVR much so haven't got any experience with the options there.
zerowalker is offline   Reply With Quote
Old 30th July 2014, 20:59   #35  |  Link
DarkSpace
Registered User
 
Join Date: Oct 2011
Posts: 204
I think the answer you're looking for is "Lanczos / Spline scale width and height separately, while Jinc uses some sort of elliptical weight averaging, which means it scales both width and height in one step" (it's also called EWA Lanczos with certain parameters).
DarkSpace is offline   Reply With Quote
Old 30th July 2014, 23:13   #36  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
And, how does that change the result?
I mean, what is the point of this?
zerowalker is offline   Reply With Quote
Old 31st July 2014, 01:42   #37  |  Link
innocenat
Registered User
 
innocenat's Avatar
 
Join Date: Dec 2011
Posts: 77
Quote:
Originally Posted by zerowalker View Post
And, how does that change the result?
I mean, what is the point of this?
Please read the thread. It has already been answered.
__________________
AviSynth+
innocenat is offline   Reply With Quote
Old 31st July 2014, 02:34   #38  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
Guess i am blind or assuming a different kind of answer, as i can't actually find anything.
I just see the differences in how it calculates, but not the actual difference in the results qualitywise.

If perhaps, not this is the answer.
Quote:
lolno. Jinc (and all lanczos-based resizer) has hallelujah ringing. But less aliasing, yes
zerowalker is offline   Reply With Quote
Old 31st July 2014, 07:05   #39  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Jinc is a bit softer than Lanczos, has a bit less ringing than Lanczos (but still some), but has noticeably less aliasing. Jinc has a more "analog" look to it. Even the ringing looks more natural compared to Lanczos. But some people prefer Lanczos because it's a bit sharper. Also Jinc is much slower than Lanczos because Jinc can't separate X and Y scaling operations.

Here's a comparison image from madVR, upscaling Monsters AG to 4K:

madshi is offline   Reply With Quote
Old 31st July 2014, 07:09   #40  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,316
After, it's a matter of personnel choice, but mine goes to NNEDI3.
jpsdr is online now   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.