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 7th February 2020, 20:23   #3801  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 34
Thanks for answers.
Quote:
Originally Posted by _Al_ View Post
anyway, but do not cut some lines and resize back to the same number, that is nasty
You mean it's a hoax?
Some people think that the resolution of the image should necessarily be multiples of 8 or even 16.
There are also hardware players that do not understand the non-standard resolution, anamorph.
Jukus is offline   Reply With Quote
Old 7th February 2020, 21:39   #3802  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 90
There is copping scripts, tutorials, calculators included, etc., on web since era of digital video started, especially at the beginning everyone was cropping like they'd get candy each time they did that. And those scripts and advises are still out there.
About mod, take a major HD resolution dimension 1080 that does not even qualify for mod 16.
If there is a filter that needs mod 8 or 16 you go with it otherwise there is no reason to change video to get to that mod. What I meant with those 2 pixels black strips, just leave it there (if it is an top or bottom). Maybe the best advice is going with basics for DVD, you see black stripes on sides crop them , total 16 pixels left and right, then resize to 16:9 to 854x480. At this point if those black stripes bother you, you can crop them, but that I'd do only if having letterbox, not some 2 pixels.
_Al_ is offline   Reply With Quote
Old 7th February 2020, 22:00   #3803  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 34
@_AI_
Likely, people look at x264 log and see there "magic blocks of pixels"
...
[libx264 @ 0x55565ecbfd80] mb I I16..4: 10.1% 74.9% 14.9%
[libx264 @ 0x55565ecbfd80] mb P I16..4: 2.2% 9.2% 1.0% P16..4: 52.0% 17.5% 13.3% 0.5% 0.2% skip: 4.0%
[libx264 @ 0x55565ecbfd80] mb B I16..4: 0.1% 0.4% 0.0% B16..8: 42.9% 5.1% 1.0% direct: 2.7% skip:47.8% L0:36.5% L1:46.9% BI:16.6%
[libx264 @ 0x55565ecbfd80] 8x8 transform intra:73.7% inter:70.4%
...
[libx264 @ 0x55565ecbfd80] i16 v,h,dc,p: 11% 6% 3% 80%
[libx264 @ 0x55565ecbfd80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 8% 4% 9% 15% 14% 16% 13% 13%
[libx264 @ 0x55565ecbfd80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 7% 3% 8% 16% 15% 15% 12% 12%
[libx264 @ 0x55565ecbfd80] i8c dc,h,v,p: 30% 25% 19% 26%

Last edited by Jukus; 7th February 2020 at 22:14.
Jukus is offline   Reply With Quote
Old 7th February 2020, 22:53   #3804  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 34
How to write an analog of that code for VS?
Code:
interp = nnedi3(field=0, qual=2)
deint = YadifMod(order=0, edeint=interp)
TFM(order=0, mode=3, clip2=deint, slow=2).TDecimate(hybrid=1)
Jukus is offline   Reply With Quote
Old 8th February 2020, 01:20   #3805  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,054
Quote:
Originally Posted by Jukus View Post
How to write an analog of that code for VS?
Code:
interp = nnedi3(field=0, qual=2)
deint = YadifMod(order=0, edeint=interp)
TFM(order=0, mode=3, clip2=deint, slow=2).TDecimate(hybrid=1)
Code:
clip = your source
interp = core.nnedi3.nnedi3(clip, field=0, qual=2)
deint = core.yadifmod.Yadifmod(clip, order=0, edeint=interp)
clip = clip.vivtc.VFM(order=0, mode=3, clip2=deint).vivtc.VDecimate()
There's no hybrid=1 parameter in VDecimate().
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 10th February 2020, 16:51   #3806  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: 36 Chambers
Posts: 5,924
Hello Myrsloik, I've some questions...

Is there some documentation or sample code for DLL discovery and loading?

I've looked at the nvenc code and it is using Run-Time Dynamic Linking, I don't know if it relies on VS being in Path or if it searches the VS location in the registry and modifies the Path env var of the process.

vspipe appears to do Load-Time Dynamic Linking, discovery and manual loading is not necessary because the DLLs are located in the same directory.

Do all setup variants add VS to the Path env var and apps can rely on that?

Do all setup variants register the VS location in the registry? If so which key(s)?

I believe Load-Time Dynamic Linking is possible and preferred, I'm mostly unsure about path discovery.

Last edited by stax76; 10th February 2020 at 16:55.
stax76 is offline   Reply With Quote
Old 10th February 2020, 17:45   #3807  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,054
Quote:
Originally Posted by stax76 View Post

Do all setup variants add VS to the Path env var and apps can rely on that?

Do all setup variants register the VS location in the registry? If so which key(s)?
Yes, see https://github.com/vapoursynth/vapou...aller.iss#L142

Since VS was split in global and user installation variants we need to check 4 reg paths:
CurrentUser / LocalMachine => "SOFTWARE\VapourSynth-32" and "SOFTWARE\VapourSynth"
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository

Last edited by ChaosKing; 10th February 2020 at 17:52.
ChaosKing is offline   Reply With Quote
Old 10th February 2020, 18:28   #3808  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: 36 Chambers
Posts: 5,924
Thanks, might somebody have done this before with C++ and Win32? I'm very clumsy with that...
stax76 is offline   Reply With Quote
Old 10th February 2020, 19:01   #3809  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,079
Quote:
Originally Posted by stax76 View Post
Hello Myrsloik, I've some questions...

Is there some documentation or sample code for DLL discovery and loading?

Do all setup variants add VS to the Path env var and apps can rely on that?

Do all setup variants register the VS location in the registry? If so which key(s)?

I believe Load-Time Dynamic Linking is possible and preferred, I'm mostly unsure about path discovery.
Is there some documentation or sample code for DLL discovery and loading?
No. You read the location you need from the registry. HKLM/HKCU (depends on current user install mode) and then software\vapoursynth (or vapoursynth-32 for poor people) and the keys of interest are called VSScriptDLL and VapourSynthDLL. Simply use loadlibrary and call vsscript_getVSApi2() or getVapourSynthAPI() depending on which dll you use.

Do all setup variants add VS to the Path env var and apps can rely on that?
No. It's a user option and you can never depend on this.

Do all setup variants register the VS location in the registry? If so which key(s)?
Yes, see above. I guess portable doesn't but that's hardly a setup variant...
__________________
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 08:23.


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