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, 23:53   #3681  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,047
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 23rd October 2019, 00:22   #3682  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,392
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, 02:35   #3683  |  Link
ifb
Registered User
 
Join Date: Dec 2009
Posts: 66
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, 10:48   #3684  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
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 offline   Reply With Quote
Old 23rd October 2019, 14:41   #3685  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
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 offline   Reply With Quote
Old 23rd October 2019, 15:04   #3686  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 687
Quote:
Originally Posted by Myrsloik View Post
Code:
r48:
added an option to add vspipe, avfs and vsrepo to path in the installer
It seems that the PATH is always added even though I have unchecked the option.
HolyWu is offline   Reply With Quote
Old 23rd October 2019, 15:26   #3687  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
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 offline   Reply With Quote
Old 24th October 2019, 11:24   #3688  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
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 offline   Reply With Quote
Old 24th October 2019, 15:31   #3689  |  Link
l00t
Where's my loot?
 
Join Date: May 2019
Posts: 20
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 15:33.
l00t is offline   Reply With Quote
Old 24th October 2019, 16:37   #3690  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,050
The problem is in: clip.sub.Subtitle("this is art")
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 24th October 2019, 21:05   #3691  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
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 offline   Reply With Quote
Old 24th October 2019, 22:29   #3692  |  Link
l00t
Where's my loot?
 
Join Date: May 2019
Posts: 20
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 25th October 2019, 00:55   #3693  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 87
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
Old 25th October 2019, 01:41   #3694  |  Link
ifb
Registered User
 
Join Date: Dec 2009
Posts: 66
Quote:
Originally Posted by Myrsloik View Post
You've most likely hit the ram bandwidth limit. Run it with a single/few threads and the difference should be obvious.
Code:
core.num_threads = 1
R48 RC4   avx2  5975.40  1.0062
          sse2  5938.56  1.0125
R46       sse2  6012.63  1.0000
I only did 1 run each, but still ~1% faster.
ifb is offline   Reply With Quote
Old 25th October 2019, 01:41   #3695  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 87
@l00t
Code:
MATRIX =  {
                     0:'rgb',
                    1:'709',
                     .
                     .
                     .
                }   
PRIMARIES = { .....}
TRANSFER = {....}

try:
    lines.append(f'Matrix: {MATRIX[f.props["_Matrix"]]}')
except Exception as e:
    lines.append(f'Matrix: {str(e)}')

try:
    lines.append(f'Primaries: {PRIMARIES[f.props["_Primaries"]]}')
except Exception as e:
    lines.append(f'Primaries: {str(e)}')
_Al_ is offline   Reply With Quote
Old 25th October 2019, 09:13   #3696  |  Link
l00t
Where's my loot?
 
Join Date: May 2019
Posts: 20
Thanks for the idea, modified the script accordingly

Quote:
Originally Posted by _Al_ View Post
...
l00t is offline   Reply With Quote
Old 27th October 2019, 20:08   #3697  |  Link
MonoS
Registered User
 
Join Date: Aug 2012
Posts: 183
Since version R46 i get the error "Failed to initialize VapourSynth environment" even execuiting a simple vspipe -v
I've tried R46, R47 and R48-RC6, all giving me the same error, this on two different machine, one Win 10 the other Win Server 2019 even after reboot

Installing R45 it works without problem.

What could be the issue? what can i do to help you diagnose the problem?
MonoS is offline   Reply With Quote
Old 27th October 2019, 20:54   #3698  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
Quote:
Originally Posted by MonoS View Post
Since version R46 i get the error "Failed to initialize VapourSynth environment" even execuiting a simple vspipe -v
I've tried R46, R47 and R48-RC6, all giving me the same error, this on two different machine, one Win 10 the other Win Server 2019 even after reboot

Installing R45 it works without problem.

What could be the issue? what can i do to help you diagnose the problem?
Which install type? Did you really install the vs2019 runtimes? You can simply run vspipe in a debugger if you still can't figure it out since I've even included pdbs for the main dlls.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th October 2019, 09:02   #3699  |  Link
MonoS
Registered User
 
Join Date: Aug 2012
Posts: 183
Quote:
Originally Posted by Myrsloik View Post
Which install type? Did you really install the vs2019 runtimes? You can simply run vspipe in a debugger if you still can't figure it out since I've even included pdbs for the main dlls.
64bit non portable version, installed vs2019 runtimes the first time, then in subsequent install skipped that.

For setting up the debugger what should i do? Download the source and put a breakpoint inside real_init and see what fail?
MonoS is offline   Reply With Quote
Old 28th October 2019, 11:13   #3700  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,067
Quote:
Originally Posted by MonoS View Post
64bit non portable version, installed vs2019 runtimes the first time, then in subsequent install skipped that.

For setting up the debugger what should i do? Download the source and put a breakpoint inside real_init and see what fail?
Yes, that should work and give you the best information.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik 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 04:09.


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