View Full Version : "Defishing" VR Videos
Revan654
24th August 2018, 22:37
Not sure if this is possible or not. I know some professional grade editors have DeFishing ability.
I was wondering if there any way to "Defish" a VR video which have curved frame? Using Avisynth (64Bit) or maybe something in VS.
Everything I've found is 32Bit and doesn't really work.
- Thanks
wonkey_monkey
24th August 2018, 23:27
Have you tried Defish (https://forum.doom9.org/showthread.php?t=152860) in 32 bit to see if it does what you want? I can try to compile it for 64 bit, although it may be slower because I haven't written any optimal interpolation code in x64 yet.
Edit: there's also xyremap (https://forum.doom9.org/showthread.php?t=166087) (also only x86 at the moment, no hope of compiling it to x64 for some time yet) which can do arbitrary remappings of images, if you know the maths.
Revan654
24th August 2018, 23:32
Have you tried Defish (https://forum.doom9.org/showthread.php?t=152860) in 32 bit to see if it does what you want? I can try to compile it for 64 bit, although it may be slower because I haven't written any optimal interpolation code in x64 yet.
I could never get it to load correctly under 32Bit AVS. This was awhile back I could try again and see if it loads. 99% of my filters are 64Bit.
Groucho2004
25th August 2018, 00:35
I can try to compile it for 64 bit, although it may be slower because I haven't written any optimal interpolation code in x64 yet.Since the source is included I can build it with the 64 bit Intel compiler. Should be at least as fast as the 32 bit version.
wonkey_monkey
25th August 2018, 00:37
Efenstor wrote a multi-threaded version (http://www.efenstor.net/defish_mt.zip) which you may prefer to use.
The released version didn't use my x86 assembler code, as I thought it did, which is why I thought it might be slower. I've got an x86 optimised version myself, but it's not the one in the released zip file.
Revan654
25th August 2018, 00:38
Since the source is included I can build it with the 64 bit Intel compiler. Should be at least as fast as the 32 bit version.
That would be helpful. Instead of searching for 32Bit version of each filter I use.
Thanks.
Groucho2004
25th August 2018, 00:57
That would be helpful. Instead of searching for 32Bit version of each filter I use.
Thanks.
Here (https://www.dropbox.com/s/or9471ao0rm7t8c/defish64.7z?dl=1) it is.
Some benchmarking (Intel i5 2500K):
Script:
colorbars(width = 1920, height = 1080, pixel_type = "RGB32").killaudio().assumefps(50, 1).trim(0, 299)
defish()
David's 32 bit version:
[Runtime info]
Frames processed: 300 (0 - 299)
FPS (min | max | average): 9.553 | 9.748 | 9.722
Process memory usage (max): 47 MiB
Thread count: 9
CPU usage (average): 24.6%
Time (elapsed): 00:00:30.858
64 bit version:
[Runtime info]
Frames processed: 300 (0 - 299)
FPS (min | max | average): 15.46 | 15.81 | 15.77
Process memory usage (max): 36 MiB
Thread count: 9
CPU usage (average): 24.4%
Time (elapsed): 00:00:19.027
johnmeyer
25th August 2018, 01:01
I use Emillano Ferrari's VD Barrel Distortion Filter (http://emiliano.deepabyss.org/).
It worked great for my AS100 (Sony "Action Camera", similar to GoPro). I have not compared it to Defish, nor do I know whether a 64-bit version is available.
Groucho2004
25th August 2018, 09:26
Small update:
I built 32 bit and 64 bit versions of defish using Efenstor's multi-threaded code.
Here's the package (https://www.dropbox.com/s/nnlif9t9p9k1pu4/defish_mt.7z?dl=1) with plugins and slightly modified code using AVS+ headers and 2.6 interface.
Benchmark with the same script as above and multi-threaded (i5-2500K, 4 cores):
32 bit:
FPS (min | max | average): 29.80 | 57.96 | 57.23
Process memory usage (max): 46 MiB
Thread count: 9
CPU usage (average): 94.9%
64 bit:
FPS (min | max | average): 38.61 | 66.17 | 65.34
Process memory usage (max): 36 MiB
Thread count: 9
CPU usage (average): 95.4%
StainlessS
25th August 2018, 09:56
Oooh, nice speedup :) thanx.
Groucho2004
25th August 2018, 10:59
Oooh, nice speedup :) thanx.Well, it's multi-threaded. Still, the threading scales perfectly with the number of cores (at least for my measly 4 cores).
wonkey_monkey
25th August 2018, 12:44
Out of curiosity, have you tried limiting it to two threads? It may run faster (though I suspect not in this case).
Groucho2004
25th August 2018, 13:12
Out of curiosity, have you tried limiting it to two threads? It may run faster (though I suspect not in this case).
This is with the 32 bit version:
1 thread: 14.66 fps
2 threads: 29.18 fps
3 threads: 43.53 fps
4 threads: 57.36 fps
More or less linear scaling.
Revan654
25th August 2018, 19:00
Maybe I'm using wrong Syntax, But I'm having no luck DeFishing the video. Any tips on How to properly use the dll file? Some of the description for the filter is a bit vague and unclear.
poisondeathray
25th August 2018, 19:22
thx grouchy for the update!
@Revan654 - There are slightly different types of "VR" projections . People use the term rather loosely too - it can mean anything from long/lat , 360, spherical, cubic equirectangular, equiangular, stereoscopic (over/under) , monoscopic, to just about anything. "curved frame" is a vague description. If you have any of the true VR projections, it's unlikely that defish can do anything as is. It's more for pincushion and barrel distortions
Revan654
27th August 2018, 05:45
thx grouchy for the update!
@Revan654 - There are slightly different types of "VR" projections . People use the term rather loosely too - it can mean anything from long/lat , 360, spherical, cubic equirectangular, equiangular, stereoscopic (over/under) , monoscopic, to just about anything. "curved frame" is a vague description. If you have any of the true VR projections, it's unlikely that defish can do anything as is. It's more for pincushion and barrel distortions
It's video produced for Oculus or GearVR.
wonkey_monkey
27th August 2018, 07:47
Can you post a sample?
Can someone please repost the defish_mt 64-bit build? the dropbox link no longer works
wonkey_monkey
9th June 2019, 14:53
I don't have it but defish is on my list to rebuild - it'll be faster and will support all 8-bit colourspaces.
Groucho2004
9th June 2019, 17:56
Can someone please repost the defish_mt 64-bit build? the dropbox link no longer worksHere (https://www.dropbox.com/s/x19w62kjzjqgomo/defish_mt.7z?dl=1) it is, I deleted it by mistake, sorry.
ChaosKing
9th June 2019, 19:07
Now also on github https://github.com/avisynth-repository/Defish
(open for everyone, pm me if you want to be added aka write permissions)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.