View Full Version : Is there something wrong with spline36resize?
wonkey_monkey
16th August 2015, 00:26
I've just done a test of the three spline resizers - spline16resize, spline36resize, and spline64resize - and wondered if the result was something that needed looking into.
I took a high contrast black and white image and subjected it to a repeated upsize/downsize (256 times in total) using each resizer. The result looks like this (pointresized to 2x for clarity):
http://horman.net/avisynth/splines.png
Original - spline16resize - spline36resize - spline64resize
Why does spline16resize a) look sharper than spline64resize and b) cause the interior of large white areas to be blackened (see arcs at top left and just above bottom right), which the other two don't do?
Also, that thin arc that begins at the halfway point on the left edge - why does it have that kink in it on the spline16resize version (making it look like a tick), but not on any of the others?
raffriff42
16th August 2015, 03:35
Hi doctor, I think most of the artifacts here are from downsizing.
I tried to re-create your tests:
https://www.dropbox.com/s/z93v6dawkqua2r3/resize-test-out-11.jpg?raw=1
Now here is the same test, but using Spline64 for downsizing:
https://www.dropbox.com/s/wxwiycdr0faduvl/resize-test-out-12.jpg?raw=1
(Huh, I don't think I'm gonna use Spline16 for downsizing no more)
wonkey_monkey
16th August 2015, 10:12
Hi doctor, I think most of the artifacts here are from downsizing.
I tried to re-create your tests:
Did you take my example image without pointresizing it down to half size first? (I pointresized it up to make the problems more obvious).
Also your example shows way less blurring than I'd expect from 36 and 64.
Can you post your script just to be on the safe side? :)
Groucho2004
16th August 2015, 10:33
Did you take my example image without pointresizing it down to half size first? (I pointresized it up to make the problems more obvious).
Also your example shows way less blurring than I'd expect from 36 and 64.
Can you post your script just to be on the safe side? :)
Neither of you told us what values you used for down-/upscaling so yes, a script would be helpful.
wonkey_monkey
16th August 2015, 11:17
This isn't my original script but it demonstrates the same issue without the need for a test image:
function downup(clip a, string r) {
w=a.width
h=a.height # corrected from a.width
return r=="16" ? a.spline16resize(w/2,h/2).spline16resize(w,h) :\
r=="36" ? a.spline36resize(w/2,h/2).spline36resize(w,h) :\
r=="64" ? a.spline64resize(w/2,h/2).spline64resize(w,h) : 0
}
function x(clip a, string r, int l) {
return l>0 ? a.x(r, l-1).x(r, l-1) : a.downup(r)
}
blankclip(100,32,32).invert
addborders(32,32,32,32)
stackhorizontal(\
last.subtitle("original"),\
x("16",8).subtitle("spline16"),\
x("36",8).subtitle("spline36"),\
x("64",8).subtitle("spline64")\
)
pointresize(width*2,height*2)
luquinhas0021
16th August 2015, 12:25
Can you make same test using spline 100 and spline 144? without downscaling, and comparing it with spline 36.
ndjamena
16th August 2015, 13:01
This isn't my original script but it demonstrates the same issue without the need for a test image:
function downup(clip a, string r) {
w=a.width
h=a.width
return r=="16" ? a.spline16resize(w/2,h/2).spline16resize(w,h) :\
r=="36" ? a.spline36resize(w/2,h/2).spline36resize(w,h) :\
r=="64" ? a.spline64resize(w/2,h/2).spline64resize(w,h) : 0
}
function x(clip a, string r, int l) {
return l>0 ? a.x(r, l-1).x(r, l-1) : a.downup(r)
}
blankclip(100,32,32).invert
addborders(32,32,32,32)
stackhorizontal(\
last.subtitle("original"),\
x("16",8).subtitle("spline16"),\
x("36",8).subtitle("spline36"),\
x("64",8).subtitle("spline64")\
)
pointresize(width*2,height*2)
depending on the aspect ratio it might not make any difference, but it should say h=a.height, no?
raffriff42
16th August 2015, 13:06
Can you post your script just to be on the safe side? :)FWIW, I did cycles of upsize-then-downsize. There's a Nnedi3 test as well but it's commented out.
##################################
function DownSize(clip C, int wid, int hgt)
{
return C.Spline64Resize(wid, hgt)
}
strHalfsize = "Spline64" ## DownSize resize method
#strHalfsize = "same as upsize" ## (gUseHalfSize = false)
global gUseHalfSize = true ## set to True to use DownSize for all downsizing
reps=256 ## DownSize+upsize repetitions
reps3=16 ## max nnedi3 reps (due to memory limits)
A = ImageSource("6.png", start=0, end=1)
\ .ConvertToYV12(matrix="Rec709", chromaresample="spline16")
X = BlankClip(A)
B = ImageSource("5.png", start=0, end=1)
\ .ConvertToYV12(matrix="Rec709", chromaresample="spline16")
C = ImageSource("1.png", start=0, end=1)
\ .ConvertToYV12(matrix="Rec709", chromaresample="spline16")
D = ImageSource("2.png", start=0, end=1)
\ .ConvertToYV12(matrix="Rec709", chromaresample="spline16")
## all images 160x128
A = StackHorizontal(
\ A
\ /*, A.ResizeNnedi3(Min(reps3, reps)) */
\ , A.ResizeS64(reps)
\ , A.ResizeS36(reps)
\ , A.ResizeS16(reps)
\ )
B = StackHorizontal(
\ B
\ /*, B.ResizeNnedi3(Min(reps3, reps)) */
\ , B.ResizeS64(reps)
\ , B.ResizeS36(reps)
\ , B.ResizeS16(reps)
\ )
C = StackHorizontal(
\ C
\ /*, C.ResizeNnedi3(Min(reps3, reps)) */
\ , C.ResizeS64(reps)
\ , C.ResizeS36(reps)
\ , C.ResizeS16(reps)
\ )
D = StackHorizontal(
\ D
\ /*, D.ResizeNnedi3(Min(reps3, reps)) */
\ , D.ResizeS64(reps)
\ , D.ResizeS36(reps)
\ , D.ResizeS16(reps)
\ )
Z = StackHorizontal(
\ X.Subtitle("original", align=5, size=C.Height/4)
\ /*, X.Subtitle("nnedi3\nx"+String(Min(reps3, reps)), align=5, lsp=0, size=C.Height/4) */
\ , X.Subtitle("S64\nx"+String(reps), align=5, lsp=0, size=C.Height/4)
\ , X.Subtitle("S36\nx"+String(reps), align=5, lsp=0, size=C.Height/4)
\ , X.Subtitle("S16\nx"+String(reps), align=5, lsp=0, size=C.Height/4)
\ )
return StackVertical(Z.Crop(0, 24, 0, -16), A, B, C, D)
\ .Subtitle("downsize mode = " + strHalfsize, align=2)
##################################
function ResizeS16(clip C, int count)
{
R = C.Spline16Resize(2*C.Width, 2*C.Height)
R = (gUseHalfSize)
\ ? R.DownSize(C.Width, C.Height)
\ : R.Spline16Resize(C.Width, C.Height)
return (count <= 0) ? C : R.ResizeS16(count - 1)
}
##################################
function ResizeS36(clip C, int count)
{
R = C.Spline36Resize(2*C.Width, 2*C.Height)
R = (gUseHalfSize)
\ ? R.DownSize(C.Width, C.Height)
\ : R.Spline36Resize(C.Width, C.Height)
return (count <= 0) ? C : R.ResizeS36(count - 1)
}
##################################
function ResizeS64(clip C, int count)
{
R = C.Spline64Resize(2*C.Width, 2*C.Height)
R = (gUseHalfSize)
\ ? R.DownSize(C.Width, C.Height)
\ : R.Spline64Resize(C.Width, C.Height)
return (count <= 0) ? C : R.ResizeS64(count - 1)
}
##################################
function ResizeNnedi3(clip C, int count)
{
R = C.UUNnedi3EnlargeYV12(2*C.Width, 2*C.Height, -1)
R = (gUseHalfSize)
\ ? R.DownSize(C.Width, C.Height)
\ : R.Spline64Resize(C.Width, C.Height)
return (count <= 0) ? C : R.ResizeNnedi3(count - 1)
}
##################################
### high quality enlarge (simplified version - YV12 only)
##
## @ wid, hgt - new width & height (no enlargement by default)
## @ speed - if > 0, tune for speed; if < 0, tune for quality;
## default = 0 (medium)
##
function UUNnedi3EnlargeYV12(clip C, int "wid", int "hgt", int "speed")
{
Assert(C.IsYV12,
\ "UUNnedi3Enlarge: source must be YV12")
wid = Max(16, Default(wid, C.Width))
hgt = Max(16, Default(hgt, C.Height))
speed = Default(speed, 0)
nns = (speed<0) ? 4 : ((speed>0) ? 2 : 3)
qual = (speed<0) ? 2 : 1
zfact = Max(Float(wid)/C.Width, Float(hgt)/C.Height)
rfact = (zfact >32.0001) ? 64
\ : (zfact >16.0001) ? 32
\ : (zfact > 8.0001) ? 16
\ : (zfact > 4.0001) ? 8
\ : (zfact > 2.0001) ? 4
\ : 2
xshift = -(0.5 * rfact - 0.5)
## avoid subtle color shift (only visible after many passes)
Y = C.nnedi3_rpow2(rfact, nns=nns, qual=qual, cshift="Spline64Resize",
\ fwidth=wid, fheight=hgt)
UV = C.Spline64Resize(wid, hgt, src_left=xshift, src_top=-0.5)
return YToUV(UV.UToY, UV.VToY, Y.ConvertToY8)
}
ndjamena
16th August 2015, 13:15
function SplineMangle(clip c, string spline1, string spline2, int count)
{
count > 0 ? SplineMangle(Eval("Spline" + spline1 + "resize(c, c.width/2, c.height/2).Spline" + spline2 + "resize(c.width, c.height)"), spline1, spline2, count - 1) : c
}
imagesource("C:\Users\ndjamena\Desktop\wallpaper.jpg", 0, 0)
SplineMangle(last, "64", "100", 255)
Both Splines 100 and 144 seem to mangle the picture in my tests. 36 and 64 are OK though.
wonkey_monkey
16th August 2015, 14:04
It seems there were some reported bugs with spline100resize and spline144resize which Wilbert may never have fixed:
http://forum.doom9.org/showthread.php?t=147117&page=4
wonkey_monkey
16th August 2015, 14:15
FWIW, I did cycles of upsize-then-downsize.
Ok, that's the difference in our scripts - I did downsize-then-upsize.
But I don't get the mangled spline16resize result you did when I run your script. Are you sure that the first image you posted doesn't show the result of a spline16 down-then-up, and all the rest were up-then-down?
Your test images do show that spline36resize seems to be sharper than spline64resize, which is odd... isn't it?
ndjamena
16th August 2015, 14:26
I'm getting sharper for 36 too. 64 seems kind of blurry.
raffriff42
16th August 2015, 15:05
Your test images do show that spline36resize seems to be sharper than spline64resize, which is odd... isn't it?S36 has more overshoot. S64 is more "correct" I think. In the real world, use whatever looks best.
Groucho2004
16th August 2015, 15:12
Results may also differ if you use fractional up-/downsize factors, for example down/up from 720p/1080p.
Wilbert
16th August 2015, 17:00
It seems there were some reported bugs with spline100resize and spline144resize which Wilbert may never have fixed:
http://forum.doom9.org/showthread.php?t=147117&page=4
Like what? As far as i know there are no bugs in these filters. Of course you are free to point out any bugs in the code. I have no idea where to look. Those coefficients are double checked, so these are correct.
wonkey_monkey
16th August 2015, 17:34
Well, I was only really going by your final quote in the thread:
I did some testing of various resizers and found that SplineResize() was shown with a left shift.
I've attached a picture and the data I used for testing.
But i haven't looked at that yet.
So maybe there was a bug, which was never fixed, or it was fixed, or there was never a bug.
In any case I've run spline100 and spline144 through my script above and got the following results for 16, 64 and 256 iterations respectively:
http://horman.net/avisynth/more_splines.png
Dammit. I'm supposed to be working on my own filter today, but instead I find myself trying to find a way to invoke spline144resize 10,000 times in the hope of finding a message hidden in the fabric of the universe...
wonkey_monkey
16th August 2015, 17:51
And here, the result of calling spline144resize down/up 8192 times on a 32x32 white box (image scaled down for forum friendliness):
http://horman.net/avisynth/maze.png
(for no reason other than it's pretty trippy. No message from God, though)
Groucho2004
16th August 2015, 18:01
And here, the result of calling spline144resize down/up 8192 times on a 32x32 white box
...
it's pretty trippy
Trippy indeed. I wonder what happens when you down-/upsize it 55798 times. Maybe it creates a similar effect as Monty Python's "Deadly Joke", just addressing a different sensory faculty...
wonkey_monkey
16th August 2015, 18:10
I wonder what happens when you down-/upsize it 55798 times.
Eh... I'm watching Hellraiser II right now, which makes me think I shouldn't risk it.
raffriff42
16th August 2015, 18:20
I'm wondering if doing so many iterations in 8-bit video is a good idea. Rounding errors may predominate in the final result.
(but yes, pretty trippy!)
Sparktank
16th August 2015, 23:02
What a fun way to start a Sunday! :D
I ran it on a remux of The Matrix Reloaded.
The WB logo in the front. I picked a frame that has simulated TV scanlines on it.
At first I was going to do the whole cropped frame, but it was way to wide to view, so I cropped a second time to isolate the WB shield.
Pretty much same script davidhorman posted in #5.
Except, instead of an image, it's YV12/8bit/VC-1 (indexed with DGdecNV).
All images are hyperlinked, click on image to get to original size.
And then click again to expand image on Imgur to get original/original size!
Original image:
http://i.imgur.com/zc8ozBct.png (http://imgur.com/zc8ozBc)
Spline test (commented out piontresize)
http://i.imgur.com/SdY2PjXt.png (http://imgur.com/SdY2PjX)
With pointresize to double.
http://i.imgur.com/g9sS013t.png (http://imgur.com/g9sS013)
S36 has quite a bit of ringing.
In that 16/64/256 iteration tets of white blocks (#16), I see some white triangles in the corners of all the S36 squares.
Almost looks like an optical illusion at first (or is!).
Got my first cup of coffee ready and now I want to play. :devil:
wonkey_monkey
16th August 2015, 23:45
In that 16/64/256 iteration tets of white blocks (#16), I see some white triangles in the corners of all the S36 squares.
Almost looks like an optical illusion at first (or is!).
I think that's to be expected, and can be see in the other splines. Some pixels near the corners will have more black neighbours (in both x and y directions) aligned with negative lobes of the spline, so they become brighter than other pixels on the same row/column.
You can see something similar when you sharpen a grey box. The edges will get brighter, and the corner pixels will get brighter still.
Sparktank
17th August 2015, 00:10
I have never really looked deeper into how Avisynth really, truly, remarkably works.
I just read a lot here and take what I can for everyday use (converting).
Things like these really help me understand more. :)
The avs wiki is also fun, too, but I wish I could print them all out: Avisnyth For Dummies.
I remember a few years ago, after reading up on the different splines, I ultimately decided to use Spline64 for most things.
Just the information that influenced me has been removed (to make room for more information; running on 256Mb brain memory).
ndjamena
17th August 2015, 03:26
Like what? As far as i know there are no bugs in these filters. Of course you are free to point out any bugs in the code. I have no idea where to look. Those coefficients are double checked, so these are correct.
From the dll I downloaded from avisynth.nl, the splineresize filter still shifts the image left with each iteration, after 255 iterations there wasn't an image left to look at.
If there's another updated version of the dll out there with that bug fixed I'm sure we'd all love to have it.
ndjamena
17th August 2015, 03:34
I just tried to build the code and ran into an error.
for (int j=0; j<(2*taps+1); ++j) {
y[j] = 0;
}
y[taps] = 1.0;
for (j=0; j<(2*taps-1); ++j) {
f[j] = 0;
}
??? How is that supposed to work? Is that even valid c coding?
The original "j" variable ceases to exist once it's parent "for" loop is terminated and then you fail to declare the new one...
Am I missing something?
-edit- I don't know enough about c to even get this damn thing to compile. There's unresolved external symbols galore and I have no idea what the hell I'm supposed to do about that.
foxyshadis
17th August 2015, 06:14
That's a VC6ism, VC6 was very fast and loose about scope. You can add the int identifier to fix that, or declare it before the fors.
The unresolved external is probably Softwire, a separate project you need to build Avisynth's resizers, which this is based on. You can download it with the rest of Avisynth from the (gag) CVS. (http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/distrib/include/SoftWire/) You'll have to build it into a lib, one of the project files in the CVS enabled that.
Avisynth+ removed all need for Softwire by converting to intrinsics, but this plugin predates that by ten years or so. I'm sure it could easily be reimplemented the Avs+ way instead. That'd be much faster to boot, since Softwire was great in VC6 days but sucks compared to current compilers.
foxyshadis
17th August 2015, 06:25
I've just done a test of the three spline resizers - spline16resize, spline36resize, and spline64resize - and wondered if the result was something that needed looking into.
I took a high contrast black and white image and subjected it to a repeated upsize/downsize (256 times in total) using each resizer. The result looks like this (pointresized to 2x for clarity):
http://horman.net/avisynth/splines.png
Original - spline16resize - spline36resize - spline64resize
Why does spline16resize a) look sharper than spline64resize and b) cause the interior of large white areas to be blackened (see arcs at top left and just above bottom right), which the other two don't do?
Also, that thin arc that begins at the halfway point on the left edge - why does it have that kink in it on the spline16resize version (making it look like a tick), but not on any of the others?
I don't see anything wrong with that. The spline36 artifacts simply look like a combination of spline16 artifacts (sharp distortion) and spline64 artifacts (blurry accuracy). Spline36 splits the difference between the two, a bit schizophrenic instead of a smooth middle ground, but obviously taking traits from one or the other in different areas.
Wilbert
17th August 2015, 21:16
From the dll I downloaded from avisynth.nl, the splineresize filter still shifts the image left with each iteration, after 255 iterations there wasn't an image left to look at.
If there's another updated version of the dll out there with that bug fixed I'm sure we'd all love to have it.
I will look at the shift when i have some time.
wonkey_monkey
17th August 2015, 22:29
Things are different again if you resize in yv12 instead of rgb32:
http://horman.net/avisynth/splinesyv12.png
spline36 has more pronounced darkening and a more pronounced "ring" around the square. Spline100 fairs better than it did in RGB, but still not as sharp as I'd expect, and spline144 is slightly less trippy, but with more spread.
Here's the uncropped spline144 (256x down/up from a 32x32 white square):
http://horman.net/avisynth/spline144x256,yv12.png
ndjamena
18th August 2015, 02:43
I will look at the shift when i have some time.
The effect gets worse the more taps you use, since taps have nothing to do with positioning, that would be a hint as to what's wrong.
SplineResize used with 6 taps doesn't have the same mangling problem as Spline144Resize (or even Spline100Resize) so the algorithms being used are obviously different.
Other than the left shift SplineResize is actually an improvement over the more specific resizers. However, it does seem to still screw with YV12 colours in a way that it really shouldn't.
[I can't manage to compile the filters, much less try to figure out how they work... it seems to be rejecting the SoftWire from the latest AVISynth source code or something plus I'm having problems with MSVCRTD.lib now... Is there something wrong with VS2012 or is absolute difficulty trying to compile anything downloaded from the internet normal?]
ndjamena
18th August 2015, 03:01
A cut of the original:
http://s3.postimg.org/npj6g7qfn/original.jpg
This is what it turned into after 100 iterations through SplineResize:
http://s10.postimg.org/jis9vewqx/after.jpg
I'm pretty sure it's not supposed to do that, and that's not what you get from 100 and 144.
(I had to StackHorizontal just to have a picture left after 100 iterations and then cropped afterwards.)
qyot27
18th August 2015, 04:36
[I can't manage to compile the filters, much less try to figure out how they work... it seems to be rejecting the SoftWire from the latest AVISynth source code or something plus I'm having problems with MSVCRTD.lib now... Is there something wrong with VS2012 or is absolute difficulty trying to compile anything downloaded from the internet normal?]
The issue is that classic AviSynth's source code still conforms to older compilers: VS2010 at most, if I remember the commit log correctly. And that's a recent change. The typical compilation environment was VC6 (from 1998), or VS2005. Trying to compile it on newer compilers may/will break, since in most cases, newer compilers are more compliant to the language than older ones are, and will reject code that older compilers played fast and loose with.
Like foxyshadis said, AviSynth+ dropped SoftWire support and ensured there were both plain C/C++ and intrinsics-optimized versions to replace them. More importantly, it also modernized the code a lot, and targets much newer versions of Visual Studio (2012 or higher, but preferably 2013 or higher). So the burden of actually compiling it is miniscule compared to classic; if you don't care about DirectShowSource, you can build avsplus in 5 commands at the most (http://forum.doom9.org/showthread.php?p=1643929#post1643929) without ever entering the VS201* IDE at all, save for the registration/login step that you'd have to do once in a while. It'll get even easier if/when the support for non-Windows is complete, since then it'll have proper install routines (https://github.com/AviSynth/AviSynthPlus/pull/45) and those weird directory moving instructions won't be necessary (on Linux and OSX, anyway).
In general, software compilation can be anywhere from simple to infuriating. Some use very very standard routines and options that might only give you problems if there's a bug that breaks compilation, others require more trial-and-error in order to get them configured right before they're built.
cretindesalpes
18th August 2015, 09:01
Numerical accuracy issues are really nice (https://ldesoras.fr/video/trippy.mp4) indeed.
ndjamena
18th August 2015, 09:52
OK, so this is the script:
function mangle(clip c, string spline1, string spline2, int count)
{
count > 0 ? mangle(Eval("Spline" + spline1 + "resize(c, c.width/2, c.height/2).Spline" + spline2 + "resize(c.width, c.height)"), spline1, spline2, count - 1) : c
}
imagesource("C:\Users\ndjamena\Desktop\wallpaper.jpg", 0, 0)
times = 100
interleave(mangle(last, "64", "64", times), mangle(last, "100", "100", times))
And this is the result of the Spline100 frame:
http://s15.postimg.org/6n0xnx52z/mangle.jpg
Given that I shank both the vertical and horizontal dimensions by the same amounts, shouldn't the artefacts on both axis be the same? Why are they all horizontal then?
Is there something wrong with my script or my AVISynth install maybe? Is everyone else getting the same output from these filters?
Sparktank
18th August 2015, 10:05
attached photo pending approval
You could upload the image to Imgur.com (https://imgur.com) to save on time for pending approval posts.
Free accounts don't have many limitations.
Except photos over 5MB.
I don't even think they offer paid/premium services any more.
Only caveat is that they sometimes get flooded and are down for an hour or so.
ndjamena
18th August 2015, 10:19
Attachments Pending Approval *sigh* I didn't noticed that. VideoHelp is a hell of a lot more efficient in that regard and the MakeMKV forum doesn't allow attachments at all any more.
Groucho2004
18th August 2015, 10:35
Attachments Pending Approval *sigh* I didn't noticed that.
I use http://postimage.org/, reliable and very simple to use.
Sparktank
18th August 2015, 11:18
MakeMKV forum doesn't allow attachments at all any more.
There used to be issues with severe spam. Why all the pendings.
And probably why MakeMKV doesn't allow them anymore.
It's too easy for anyone to make an account only to spam.
Plus forums usually have severe limitations and caveats.
You can check here from others who took a look into it recently:
Yup, that will do it. Looks like the board automatically converts anything over 200k (presumably including oversized jpegs). Something to keep in mind when uploading. This was a 1mb png.
Sparktank
18th August 2015, 11:22
I use http://postimage.org/, reliable and very simple to use.
I keep forgetting I got an account there.
Made one when Imgur had issues trying to fight overloads.
ndjamena
18th August 2015, 12:08
Does this work?
Original:
http://s3.postimg.org/npj6g7qfn/original.jpg
SplineResize with 6 taps (I THINK)
http://s10.postimg.org/jis9vewqx/after.jpg
Spline100Resize
http://s15.postimg.org/6n0xnx52z/mangle.jpg
So, SplineResize warps the colour planes in yv12 mode (as well as the left shift problem) and Spline100 seems to leave horizontal streaks without corresponding vertical ones. which suggests the vertical and horizontal calculations are different.
Right, and I just tried again with turnright and turnleft and I got a completely different outcome. So my version of Spline100 is definitely broken. Should I bother posting that picture?
-edit-
here we go, Spline100 rotated 90 degrees
http://s22.postimg.org/40joc61wh/Rotated.jpg
wonkey_monkey
18th August 2015, 12:18
Numerical accuracy issues are really nice (http://ldesoras.free.fr/video/trippy.mp4) indeed.
That. Was. Awesome. I hadn't seen those lone spikes before, nor had I seen how blocks of white could build up and then thin themselves back. Can accuracy really explain it, though? I would have thought it would be symmetrical, at the very least...
here we go, Spline100 rotated 90 degrees
Argh! Thanks, that's going to give me nightmares. It's like something you'd see on a TV screen if you were in one of the Saw movies.
ndjamena
18th August 2015, 12:33
I used spline144resize almost exclusively for months before I found NNEDI3_Resize16 and I had no idea the filters were this buggy.
I just tried a comparison between Spline64Resize and SplineResize with 4 taps and they're completely different images. Spline64 is almost perfect, yet SplineResize looks the same as the 6 taps version I've already posted.
Argh! Thanks, that's going to give me nightmares. It's like something you'd see on a TV screen if you were in one of the Saw movies.
I think it kind of looks like one of those creatures from the mirror universe in Doctor Who, the ones Romana ran off with. Maybe I'm just not remembering them properly.
Sparktank
18th August 2015, 13:19
Does this work?
here we go, Spline100 rotated 90 degrees
http://s22.postimg.org/40joc61wh/Rotated.jpg
Well... I was going to get some sleep...
Cool results!
I would love to perform this on some of my friends profile pics on facebook. :devil:
wonkey_monkey
18th August 2015, 14:04
I just tried a comparison between Spline64Resize and SplineResize with 4 taps
What are you referring to when you say "SplineResize" without a number? By "SplineResize with 4 taps" do you mean Spline16Resize, or is it some other plugin?
I think it kind of looks like one of those creatures from the mirror universe in Doctor Who, the ones Romana ran off with. Maybe I'm just not remembering them properly.
Tharils. I didn't have to look it up. :)
ndjamena
18th August 2015, 14:20
What are you referring to when you say "SplineResize" without a number? By "SplineResize with 4 taps" do you mean Spline16Resize, or is it some other plugin?
Tharils. I didn't have to look it up. :)
SplineResize is a filter in the same dll as 100 and 144. You just set a number of taps and it's the equivalent of (taps*2)^2
So:
2 = 2 * 2 = 4 : 4^2 = Spline16Resize
3 = 3 * 2 = 6 : 6^2 = Spline36Resize
4 = 4 * 2 = 8 : 8^2 = Spline64Resize
5 = 5 * 2 = 10 : 10^2 = Spline100Resize
6 = 6 * 2 = 12 : 12^2 = Spline144Resize
I think that's how it works anyway, at least that's how I read it, I suppose I should check now.
It looks as though I'll have to watch Warriors Gate again to see where that memory flash came from. Maybe there was a warped image in a mirror or something...
cretindesalpes
18th August 2015, 14:33
Can accuracy really explain it, though? I would have thought it would be symmetrical, at the very least...
It’s most likely a combination of numerical inaccuracy, clipping (RGB is full-range and has no headroom for the ripples that preserve all the information) and specific kernel properties.
ndjamena
18th August 2015, 15:01
here we go, Spline100 rotated 90 degrees
http://s22.postimg.org/40joc61wh/Rotated.jpg
http://img3.wikia.nocookie.net/__cb20100211065412/tardis/images/5/5f/Biroc.jpg
There is something there isn't there... The nose and the way some of it is formed... The red is in the wrong spot, but it's indistinct enough that it has a similar effect... hmmmm...
Sparktank
19th August 2015, 01:12
Numerical accuracy issues are really nice (http://ldesoras.free.fr/video/trippy.mp4) indeed.
Finally watched this.
Mesmerising!
Looks like it can be used in a poster for a Steven Spielberg spy movie. Or any thriller really.
I really want to convert that to a screensaver.
although the dimensions don't match my monitor.
I can really see this playing to some Philip Glass.
What's the script on that look like? :D
cretindesalpes
19th August 2015, 07:52
What's the script on that look like? :D
More complicated that it should have been because of the non-recursive structure of Avisynth.
trippy.avsi
# int "seg" must be defined at this point
speed = 2
len = 16
b = 16
w = 1920
h = 1080
ww = (w - b) / 2
hh = (h - b) / 2
(seg == 0) ? BlankClip (length=len, width=b*2, height=b*2, fps=30) : last
(seg == 0) ? Invert () : last
(seg == 0) ? AddBorders (ww*2, hh*2, ww*2, hh*2) : last
(seg == 0) ? Spline144Resize (w, h) : last
(seg == 0) ? ConvertToYV12 (matrix="PC.709") : last
(seg == 0) ? ScriptClip ("""updown (current_frame * speed)""") : last
(seg > 0) ? FFVideoSource ("trippy-seg-"+String(seg-1,"%04.0f")+".mkv") : last
(seg > 0) ? updown (len * speed) : last
Function updown (clip src, int count)
{
src
w = Width ()
h = Height ()
Spline144Resize (w * 2, h * 2)
Spline144Resize (w , h )
(count > 0) ? updown (count - 1) : last
}
trippy.bat
@set x264=C:\Program Files (x86)\x264\x264.exe
@set mkvmerge=C:\Program Files (x86)\MKVtoolnix\mkvmerge.exe
@set /a nbrseg=705
@set /a curseg=0
@set mkvopt=trippy-mkvmerge.txt
@if exist "%mkvopt%" del "%mkvopt%"
:loop
@set /a d0=curseg %% 10
@set /a d1=(curseg / 10) %% 10
@set /a d2=(curseg / 100) %% 10
@set /a d3=(curseg / 1000) %% 10
@set segstr=%d3%%d2%%d1%%d0%
@set avsfile=trippy-%segstr%.avs
@set mkvfile=trippy-seg-%segstr%.mkv
@echo seg = %curseg% > "%avsfile%"
@echo Import ("trippy.avsi") >> "%avsfile%"
call "%x264%" --stitchable --crf 0 --preset veryslow --input-range pc --output "%mkvfile%" "%avsfile%"
@if %curseg% NEQ 0 echo + >> %mkvopt%
@echo %mkvfile% >> %mkvopt%
@del "%avsfile%"
@set /a curseg=curseg+1
@if %curseg% NEQ %nbrseg% goto loop
call "%mkvmerge%" -o "trippy-lossless.mkv" "@%mkvopt%"
@del "%mkvopt%"
call "%x264%" --device ps3,xbox360,dxva --crf 16 --preset veryslow --tune animation --colormatrix bt709 --transfer bt709 --colorprim bt709 --output "trippy.h264" "encode.avs"
encode.avs
FFVideoSource ("trippy-lossless.mkv")
mt_lut ("x 255 / 219 * 16 +", u=-128, v=-128)
Sparktank
19th August 2015, 08:41
:goodpost::thanks:
Wow, I'll say!
Thanks for all the work.
Time to play. :devil:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.