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. |
29th January 2020, 23:02 | #3722 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Sure, you simply have to free all the different references you get to the frame.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
30th January 2020, 20:47 | #3723 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
I just finished wrapping the video access process, the "zero" mode for temporal padding is quiet a nuisance: https://github.com/IFeelBloated/vsFi...olicies.hxx#L8 since it requires creating a new frame, which then requires a "core".
the temporal padding functions are called here: https://github.com/IFeelBloated/vsFi...r/Clip.hxx#L72 and the global "Core<Filter>" is obtained from xxxCreate(), I've tested it and it seemed to work properly, but I'm not sure, is there a potential problem here with the core stuff for zero padding at the temporal dimension? Also can I store "frameCtx" in the video clip struct when requesting the frame so I can get rid of this useless parameter in GetFrame()? Do all frames share the same frameCtx or do I need a map to store the Ctx for each frame? Last edited by feisty2; 30th January 2020 at 20:57. |
7th February 2020, 19:20 | #3724 | Link |
Registered User
Join Date: Jul 2019
Location: Russia
Posts: 87
|
How can crop be an odd number? (but with resize to even numbers, ofс)
There is a technically interlaced DVD, but visually progressive, 2 pixels above are a black stripe, do crop top 2 and resize to 480, but a video doesn't encoded, what should I do? |
7th February 2020, 19:35 | #3725 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
7th February 2020, 19:39 | #3726 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
and you cant chop a chroma sample in half. If Interlaced YV12, then can only crop vertical in multiples of 4. [Otherwise Interlacing destroyed]
__________________
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; 7th February 2020 at 19:43. |
|
7th February 2020, 19:52 | #3727 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
in Vapoursynth you cannot crop "within" subsampling,
if you have YUV420P8 , it means you can crop only even numbers in x and y say you have YUV411P8, then you can crop only multiples of 4 in x but odd lines in y ..etc, you can get those multiples like this: import vapoursynth as vs clip = vs.core.std.BlankClip(clip, format=vs.YUV420P8) print(1 << clip.format.subsampling_h) print(1 << clip.format.subsampling_w) you'd get: >>>2 >>>2 for format=vs.YUV411P8 you'd get: >>>1 >>>4 anyway, but do not cut some lines and resize back to the same number, that is nasty Last edited by _Al_; 7th February 2020 at 20:04. |
7th February 2020, 20:23 | #3728 | Link | |
Registered User
Join Date: Jul 2019
Location: Russia
Posts: 87
|
Thanks for answers.
Quote:
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. |
|
7th February 2020, 21:39 | #3729 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
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. |
7th February 2020, 22:00 | #3730 | Link |
Registered User
Join Date: Jul 2019
Location: Russia
Posts: 87
|
@_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. |
8th February 2020, 01:20 | #3732 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Quote:
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()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
|
10th February 2020, 16:51 | #3733 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
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.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 10th February 2020 at 16:55. |
10th February 2020, 17:45 | #3734 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Quote:
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 Last edited by ChaosKing; 10th February 2020 at 17:52. |
|
10th February 2020, 18:28 | #3735 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Thanks, might somebody have done this before with C++ and Win32? I'm very clumsy with that...
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
10th February 2020, 19:01 | #3736 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
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 |
|
22nd February 2020, 17:19 | #3737 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Made some simple wrapper library for AviSynth and VapourSynth, it was necessary because AviSynth has no C or COM interface...
https://github.com/staxrip/staxrip/t...er/FrameServer https://github.com/staxrip/staxrip/b...FrameServer.vb https://github.com/staxrip/staxrip/b...deoRenderer.vb
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
23rd February 2020, 06:26 | #3739 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
I don't know, maybe I should try it, sample code would help. When I started the library I didn't know a lot about C/C++ (last project more than 10 years ago) and AviSynth, after completing it I know a little more. With the AviSynth part I had few issues, no problems with VapourSynth.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
Tags |
speed, vaporware, vapoursynth |
|
|