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 22nd October 2019, 20:05   #3601  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Is there any way to use spline144 with Vapour?
Is it true that this is the best resizer for any situation?
Jukus is offline   Reply With Quote
Old 22nd October 2019, 21:35   #3602  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by Jukus View Post
Is there any way to use spline144 with Vapour?
With fmtconv kernel="spline", taps=6

Quote:
"spline"

Generic splines, number of sample points is twice the taps parameter, so you can use taps = 6 to get a Spline144Resize equivalent.


Quote:
Is it true that this is the best resizer for any situation?
Probably not. Likely some ringing artifacts, oversharpen halos
poisondeathray is offline   Reply With Quote
Old 22nd October 2019, 21:50   #3603  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Myrsloik View Post
R48-RC3

Fixes the aformentioned pink line at top and bottom (general expr bug) and another 32bit bug in expr as well. Keep testing it.
Keep testing it! So far the only discovered bug in RC3 is in Convolution with float input, everything else should work fine. I'll probably do daily builds from now on until every single regression is gone.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 22nd October 2019, 22:02   #3604  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
If you have RGBS and use Expr to add 1 to channel R , is it suppose to round the value ? Or is this the same thing as the Convolution with float input issue ?

clip2 = core.std.Expr(clip, ["x 1 +", "", ""])

e.g. in vsedit, the color picker shows R=0.921468 for clip, R=1.92147 for clip2

I would have expected 1.921468 (G, B remain unchanged at 0.921468)

core.std.SetMaxCPU("none") does not affect the result, R48-RC3 x64

Last edited by poisondeathray; 22nd October 2019 at 22:21.
poisondeathray is offline   Reply With Quote
Old 22nd October 2019, 22:26   #3605  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by poisondeathray View Post
If you have RGBS and use Expr to add 1 to channel R , is it suppose to round the value ? Or is this the same thing as the Convolution with float input issue ?

clip2 = core.std.Expr(clip, ["x 1 +", "", ""])

e.g. in vsedit, the color picker shows R=0.921468 for clip, R=1.92147 for clip2

I would have expected 1.921468 (G, B remain unchanged at 0.921468)

core.std.SetMaxCPU("none") does not affect the result, R48-RC3 x64
That's how floating point math works. It's not exact.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 22nd October 2019, 22:42   #3606  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
From VS2008 Float.h

Code:
#define FLT_DIG         6                       /* # of decimal digits of precision */
#define FLT_EPSILON     1.192092896e-07F        /* smallest such that 1.0+FLT_EPSILON != 1.0 */
#define FLT_GUARD       0
#define FLT_MANT_DIG    24                      /* # of bits in mantissa */
#define FLT_MAX         3.402823466e+38F        /* max value */
#define FLT_MAX_10_EXP  38                      /* max decimal exponent */
#define FLT_MAX_EXP     128                     /* max binary exponent */
#define FLT_MIN         1.175494351e-38F        /* min positive value */
#define FLT_MIN_10_EXP  (-37)                   /* min decimal exponent */
#define FLT_MIN_EXP     (-125)                  /* min binary exponent */
#define FLT_NORMALIZE   0
#define FLT_RADIX       2                       /* exponent radix */
#define FLT_ROUNDS      1                       /* addition rounding: near */
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 22nd October 2019, 22:50   #3607  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Thanks Myrsloik, StainlessS ; If it's using FLT_DIG 6 , shouldn't it round to 1.921468 ? Or does it count decimal digits differently ? Or was this covered in grade school math that I might have slept through?
poisondeathray is offline   Reply With Quote
Old 22nd October 2019, 22:52   #3608  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Its really the binary digits that count, and 10 is not a power of 2, so it works (rounds) a bit weird.

EDIT: If it were viewed in binary, it would make sense.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd October 2019 at 22:56.
StainlessS is offline   Reply With Quote
Old 22nd October 2019, 22:53   #3609  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by StainlessS View Post
Its really the binary digits that count, and 10 is not a power of 2, so it works (rounds) a bit weird.
Thanks
poisondeathray is offline   Reply With Quote
Old 22nd October 2019, 23:22   #3610  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
PDR, a bit more.

There are a fractional number of binary digits per decimal digit, and although float only precise to 6 [EDIT: significant] digits, there will likely be one or more decimal digits which are not quite correct.

EDIT: Note, below 6 significant digits
Code:
0.921468
  ^^^^^^

1.921468    # Adding 1.0, last digit is not within first 6 significant digits : Note that the extra digit is printed because of the default print format, rather than it being within first 6 significant digits.
^ ^^^^^
Code:
a = 0.921468  # This was probably not exact to begin with

b = a + 1.0

DIGS=32      # Digits to the right of decimal point

BlankClip

RT_DebugF("a=%.*f\nb=%.*f",DIGS,a,DIGS,b)
RT_subtitle("a=%.*f\nb=%.*f",DIGS,a,DIGS,b)

return last
Code:
00000057    0.29118466  [1068] RT_DebugF: a=0.92146801948547363000000000000000
00000058    0.29125640  [1068] RT_DebugF: b=1.92146801948547360000000000000000
EDIT:
Code:
RT_subtitle("a=%.*f\nb=%.*f",DIGS,a,DIGS,b)

Equiv

RT_subtitle("a=%.32f\nb=%.32f",a,b)
EDIT: No reply necessary.

EDIT:
Quote:
There are a fractional number of binary digits per decimal digit
Code:
Function Log2(float n) {
    return Log(n) / Log(2.0)
}

blankclip
DIGS=32      # Digits to the right of decimal point

BitsPerDecDigit = Log2(10.0)
Test10=Pow(2.0,BitsPerDecDigit)
RT_debugF  ("BitsPerDecDigit=%.*f\nTest10         =%.*f",DIGS,BitsPerDecDigit,DIGS,Test10)
RT_Subtitle("BitsPerDecDigit=%.*f\nTest10         =%.*f",DIGS,BitsPerDecDigit,DIGS,Test10)
return last
Code:
00000231    0.29308608  [4064] RT_DebugF: BitsPerDecDigit=3.32192802429199220000000000000000
00000232    0.29313752  [4064] RT_DebugF: Test10         =9.99999904632568360000000000000000
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 28th October 2019 at 01:55.
StainlessS is offline   Reply With Quote
Old 23rd October 2019, 01:35   #3611  |  Link
ifb
Registered User
 
Join Date: Dec 2009
Posts: 72
Quote:
Originally Posted by Myrsloik View Post
Speed comparisons with R46 also welcome.
Threadripper 1920X w/64GB ECC and Windows 10 x64
Local build of VS with the latest AVX2 fix (ac74e9b)
Three runs on a script that's all float and 16-bit (CinemaDNG sequence):
Code:
time vspipe -e 1000 script.vpy .

                 1      2      3        avg      stddev  relative
R48-RC3+1  avx2  432.83 434.95 435.22   434.33   1.309   1.0080x
           sse2  431.05 433.80 436.28   433.71   2.616   1.0095x
           none  467.84 465.92 463.87   465.88   1.985   0.9398x
R46        sse2  434.29 440.49 438.68   437.82   3.188   1.0000x
~1% faster vs R46 even though AVX2 doesn't help poor Zen1.
ifb is offline   Reply With Quote
Old 23rd October 2019, 09:48   #3612  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by ifb View Post
Threadripper 1920X w/64GB ECC and Windows 10 x64
Local build of VS with the latest AVX2 fix (ac74e9b)
Three runs on a script that's all float and 16-bit (CinemaDNG sequence):
Code:
time vspipe -e 1000 script.vpy .

                 1      2      3        avg      stddev  relative
R48-RC3+1  avx2  432.83 434.95 435.22   434.33   1.309   1.0080x
           sse2  431.05 433.80 436.28   433.71   2.616   1.0095x
           none  467.84 465.92 463.87   465.88   1.985   0.9398x
R46        sse2  434.29 440.49 438.68   437.82   3.188   1.0000x
~1% faster vs R46 even though AVX2 doesn't help poor Zen1.
You've most likely hit the ram bandwidth limit. Run it with a single/few threads and the difference should be obvious.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 23rd October 2019, 13:41   #3613  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
R48-RC4

Fixes the floating point edge handling of RC3.

Test harder!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 23rd October 2019, 14:26   #3614  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by HolyWu View Post
It seems that the PATH is always added even though I have unchecked the option.
Congratulations! You've won a free RC5 build which you can redeem tomorrow! That was a really stupid typo. At least there are no known image corruption problems. (test the unprivileged installs too just to be sure)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 24th October 2019, 10:24   #3615  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
R48-RC5

The only change from RC4 is that the installer now correctly respects the add to PATH options.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 24th October 2019, 14:31   #3616  |  Link
l00t
Where's my loot?
 
Join Date: May 2019
Posts: 63
another bug

I've found another bug. When I try to use nyuszika7h's FFInfo the result is a pile of garbage with R48-RC4, while it was perfectly fine with R47.2. The picture is also okay without the script.

nyuszika7h's FFInfo script:
https://gist.github.com/nyuszika7h/3...0b35a464ef9a91

with FFInfo:


without FFInfo:


Code:
import vapoursynth as vs
from vapoursynth import core
clip = core.ffms2.Source(source=r'some_hd_footage.mkv')
clip = vs_ffinfo.FFInfo(clip, text='some text', frame_num=True, frame_type=True, frame_time=True)
clip.set_output()
FFMS2 is the latest version from 10/07/2019 from StvG

Video parameters:
Resolution: 1920x1038
Format: YUV420P8
FPS: 24000/1001

Thanks in advance

Last edited by l00t; 24th October 2019 at 14:33.
l00t is offline   Reply With Quote
Old 24th October 2019, 15:37   #3617  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
The problem is in: clip.sub.Subtitle("this is art")
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 24th October 2019, 20:05   #3618  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
R48-RC6

Fixes premultiplied maskedmerge and a few expr problems that most likely were never encountered by anyone.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 24th October 2019, 21:29   #3619  |  Link
l00t
Where's my loot?
 
Join Date: May 2019
Posts: 63
Thanks, now it's perfect.

BTW: If someone's interested in FFInfo, I've pumped up a bit nyuszika's version: https://gist.github.com/l00tzOMG/404...d96b57b08f32ce
l00t is offline   Reply With Quote
Old 24th October 2019, 23:55   #3620  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 321
Quote:
I've pumped up a bit nyuszika's version: https://gist.github.com/l00tzOMG/404...d96b57b08f32ce
To get string equivalents for those numerical frame property values, you can use dictionaries/ tables and then just get value you need.
With if , elif approach you can end up having hundreds of them is database is large. Look in that example:
https://forum.doom9.org/showthread.p...59#post1885759
_Al_ is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

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 19:21.


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