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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th March 2017, 17:45   #221  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by WolframRhodium View Post
What's more, fmtconv contains various dithering mode and custom resample kernel, but what about zimg?
Dithering: Bayer pattern, random noise (magnitude 0.5) and Floyd-Steinberg are supported. Do you have any particularly convincing arguments as to why anything else is vastly superior? Having more options just for the sake of having more options is Avisynth mentality.

Custom convolution kernels: what is the actual practical use case for this? Is there any reason you can't just use a separate convolution filter?

I mean, yeah you can do a ton of interesting shit with a highly customizeable general-purpose FIR filter, but customization and flexibility is kinda hard to combine with ease of use, optimization and maintainability. If you want a filter that can do anything, it probably won't be very well suited to being a fast and reliable image resizer for real world inputs. The reason I'm trying to convince people to switch to zimg is that for 95% of the most common use cases it does what fmtconv does but is faster and easier to use. I know I told you to submit feature requests, but please keep them within the scope of what is reasonable to have in standard image resizer. For exotic stuff, write exotic filters.

Last edited by TheFluff; 18th March 2017 at 18:01.
TheFluff is offline   Reply With Quote
Old 18th March 2017, 17:56   #222  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Having more (not significantly worse, like x86 is worse than x64, xp is wore than win10, so I never compiled x86 binaries or obsolete xp binaries for my plugins) options is always better, simply because people could ignore opinions they don't need, and anyone gets to choose what's useful to him/her (which is also why I love c++ and dislike java )

Last edited by feisty2; 18th March 2017 at 18:04.
feisty2 is offline   Reply With Quote
Old 18th March 2017, 17:56   #223  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
Quote:
Originally Posted by TheFluff View Post
Dithering: Bayer pattern, random noise (magnitude 0.5) and Floyd-Steinberg are supported. Do you have any particularly convincing arguments as to why anything else is vastly superior? Having more options just for the sake of having more options is Avisynth mentality.

Custom convolution kernels: what is the actual practical use case for this? Is there any reason you can't just use a separate convolution filter?
dithering: “Filter Lite”. See madvr's thread for why someone love it

kernel: https://forum.doom9.org/showthread.php?t=166080
WolframRhodium is offline   Reply With Quote
Old 18th March 2017, 18:11   #224  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by feisty2 View Post
Having more (not significantly worse, like x86 is worse than x64, xp is wore than win10, so I never compiled x86 binaries or obsolete xp binaries for my plugins) options is always better, simply because people could ignore opinions they don't need, and anyone gets to choose what's useful to him/her (which is also why I love c++ and dislike java )
You're wrong, and very predictably so. You will probably understand this when you have more experience, and I'm probably telling you this completely in vain because I think it's hard to actually internalize this before you've actually experienced it. I was wrong in exactly the same way when I was younger and I don't think anyone could have convinced me to understand that, back then.

More code (and hence more combinations of possible code paths) isn't free, it's bought with the most expensive resource of all - developer attention. More code paths means more tests and more maintenance. More complex code with more paths through it becomes harder to reason about, understand and predict. With more code, it becomes harder to change your mind, refactor and redesign.

You and I - and all other programmers - are much dumber than we'd like to think we are. Things need to be kept simple in order for us to be able to reasonably keep working with them.
TheFluff is offline   Reply With Quote
Old 18th March 2017, 18:40   #225  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by WolframRhodium View Post
dithering: “Filter Lite”. See madvr's thread for why someone love it

kernel: https://forum.doom9.org/showthread.php?t=166080
I'm sure a lot of madvr users love a lot of things but I care exceedingly little about them. Adding more dithering options is a pain in the butt and has basically no visible effect on output bitdepths >= 8. I myself sure as heck can't see any meaningful difference between madvr's different error diffusion modes with 8-bit output, and I definitely can't say which one looks better. If you want dithering because you want things to look nice on your shitty 6-bit monitor, then perhaps you should in fact dither on playback instead of trying to encode it into your (probably lossily compressed) video? Especially when dither pattern preferences are so subjective. Filter lite is also supposed to be faster but zimg's Floyd-Steinberg implementation is already really optimized so who cares.

Custom kernels is in a similar spot. Yes you can get marginally improved results in some ways on certain (mostly small) images, but almost nobody uses it and there are tradeoffs with every kernel. If you care about this kind of custom tweaking a standard resizer probably isn't right for you.

If you want fmtconv for its customizeability, you can keep using it! It's fine! It's just that for the vast majority of common use cases (like most of the ones posted in this thread) zimg does the same thing faster and with a bit less effort. That's all I'm saying.
TheFluff is offline   Reply With Quote
Old 19th March 2017, 03:39   #226  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
I'll just leave this here:

Functionality is an ASSET.
Code is a LIABILITY.

(tldr so having the LEAST code that does the MOST stuff is desireable)
junh1024 is offline   Reply With Quote
Old 16th June 2017, 20:14   #227  |  Link
juhok
Registered User
 
juhok's Avatar
 
Join Date: Dec 2005
Posts: 110
Now on FreeBSD Ports! https://www.freshports.org/graphics/...synth-fmtconv/
juhok is offline   Reply With Quote
Old 14th November 2017, 20:42   #228  |  Link
MonoS
Registered User
 
Join Date: Aug 2012
Posts: 203
What is the correct way to downscale in linear light (gamma corrected) an HDR stream?
I tried to come up with a script, but i'm not so confident it is correct as i already screwed up multiple times in this regards
MonoS is offline   Reply With Quote
Old 17th January 2018, 15:40   #229  |  Link
fadedmaple
Registered User
 
fadedmaple's Avatar
 
Join Date: Dec 2017
Posts: 8
strange

Hi,I find a problem.When i use fmtc like this ,it will tell me "transfer: unsupported color family."

Quote:
src16 = core.fmtc.bitdepth(src,bits=16)
UV = core.fmtc.resample(src16,1920, 1080, kernel="Spline36")
gray = core.std.ShufflePlanes(src16, 0, colorfamily=vs.YUV)
gray = core.fmtc.transfer(gray, transs="2020", transd="linear")
gray = core.fmtc.resample(gray, 1920, 1080, kernel="Spline36")
gray = core.fmtc.transfer(gray, transs="linear",transd="2020")
src = core.std.ShufflePlanes([gray,UV], [0,1,2],vs.YUV)

It works only when the colorfamily specified it with GARY 。
I am a noob in this , can explain why?THX

Quote:
gray = core.std.ShufflePlanes(src16, 0, colorfamily=vs.GRAY)
fadedmaple is offline   Reply With Quote
Old 17th January 2018, 15:53   #230  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
See fmtconv doc.
Quote:
As input, the function accepts only RGB and grayscale colorspaces.
sneaker_ger is offline   Reply With Quote
Old 17th January 2018, 16:35   #231  |  Link
fadedmaple
Registered User
 
fadedmaple's Avatar
 
Join Date: Dec 2017
Posts: 8
thanks

Quote:
Originally Posted by sneaker_ger View Post
See fmtconv doc.
Thanks for you repley.
Maybe my expression is wrong,What is the difference between Y plane and GRAY?
fadedmaple is offline   Reply With Quote
Old 8th December 2018, 05:49   #232  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Speaking of resizing, if I want to downsize an UHD Blu-ray, would this be the best way to go about it?

Code:
core.std.LoadPlugin("DGDecodeNV.dll")
video = core.dgdecodenv.DGSource("i:/jobs/test.dgi", fulldepth=False)
vid = core.fmtc.resample (clip=vid, w=1920, h=1080)
Or does core.fmtc.resample need a special parameter, optimized for reduction?
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 8th December 2018, 06:39   #233  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
The default kernel of fmtconv is bicubic with b=c=1/3 a.k.a. "Mitchell-Netravali" which should be enough for normal use.

If you are using the dll from the official release, I will recommend to use the one from ChaosKing's FATPACK or the one in my signature as it is compiled with a newer compiler and might save you from random crashes.

Try muvsfunc's SSIM_downsample if you are not satisfied with the results of plain bicubic.
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 8th December 2018, 07:00   #234  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Wolfberry View Post
The default kernel of fmtconv is bicubic with b=c=1/3 a.k.a. "Mitchell-Netravali" which should be enough for normal use.

If you are using the dll from the official release, I will recommend to use the one from ChaosKing's FATPACK or the one in my signature as it is compiled with a newer compiler and might save you from random crashes.

Try muvsfunc's SSIM_downsample if you are not satisfied with the results of plain bicubic.

Cool. Thx.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 8th December 2018, 19:08   #235  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Wolfberry View Post
The default kernel of fmtconv is bicubic with b=c=1/3 a.k.a. "Mitchell-Netravali" which should be enough for normal use.

If you are using the dll from the official release, I will recommend to use the one from ChaosKing's FATPACK or the one in my signature as it is compiled with a newer compiler and might save you from random crashes.

Seems my fmtconv.dll is dated March 2016. So, thx for the new binary. N.B. Is it safe to replace all my old binaries (.dll's) with yours? (For VS R45).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 9th December 2018, 01:17   #236  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Hmm, someone please explain this to me. I'm using:

import muvsfunc as muf
...
vid = muf.SSIM_downsample (clip=vid, w=1920, h=1080, use_fmtc=False)

It throws the following error, though:


encoded 1 frames, 12.82 fps, 238.61 kb/s
Error: fwrite() call failed when writing frame: 0, plane: 0, errno: 32
Output 9 frames in 2.06 seconds (4.38 fps)
Core freed but 24883200 bytes still allocated in framebuffers
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 9th December 2018, 02:34   #237  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
It should be safe if you want and can use my dlls (may require AVX2 and additional dependencies), if not, there are always official ones.
For you second question, errno 32 means broken pipe. Try using only source filters and see if the error persists. (Post your full script might help as well)
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 9th December 2018, 09:10   #238  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Wolfberry View Post
It should be safe if you want and can use my dlls (may require AVX2 and additional dependencies), if not, there are always official ones.
For you second question, errno 32 means broken pipe. Try using only source filters and see if the error persists. (Post your full script might help as well)

Pretty much happens with just this single input line:

vid = muf.SSIM_downsample (clip=vid, w=1920, h=1080, use_fmtc=False)


Couldn't really tell whether it's "clip=vid" or just "vid", or that w and h are to be set with an appended '=x' or that they are just the values. But I tried all combinations, to no avail.

Also, I didn't see any dependency missing. Putting 'import muvsfunc as muf' should suffice, right?
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 10th December 2018, 05:26   #239  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Ok, can anyone show me a script snippet of a working muf.SSIM_downsample then, please? Really love to try out this new and smooth reduction method. Thx.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 10th December 2018, 07:29   #240  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by asarian View Post
Ok, can anyone show me a script snippet of a working muf.SSIM_downsample then, please? Really love to try out this new and smooth reduction method. Thx.
Did you get an error message ?

I got an error messge complaining that didn't have nnedi3_resample.py , so I needed to download it and put it into site-packages , then it worked

Code:
import muvsfunc as muvs
clip = whateversource
clip = muvs.SSIM_downsample(clip, w=1920, h=1080)
clip.set_output()
use_fmtc=False by default if you look at muvsfunc
poisondeathray is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:29.


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