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. |
21st December 2016, 20:33 | #2741 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
As Avisynth+ project is demanding modernized filters, my next port will be masktools2.
Meantime I had a look at tp7's masktools project. As it was mentioned, there is a 16 bit branch, which is in quite a good shape, a lot of filters are basically ready, supporting stacked and 'doublewidth' hacked formats. This latter is basically the normal 16 bit way, how Avisynth+ works. This branch is a little behind over the latest masktools b2 release. The extensions are 16 bit only, so the 10, 12, 14 bit support have to be inserted in. For practicing I have modded mt_binarize16 to have 10-14 bits, as the easiest part. After several hours it is still very hard for me to understand the framework, very general, very C++, macro magics, and those are somehow producing a working avisynth filter. My goal will also be to have one filter name that works for all video formats, so there will be no separate mt_binarize and mt_binarize16. |
21st December 2016, 22:47 | #2743 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Since GScriptClip is essentially a wrapper around the original function, its multithreading characteristics should be the same. However it does have some differences which may or may not be significant - current_frame is made a global variable, and the function may (depending on parameters) start a new scope level with env->PushContext(). How do variables work under mt? I don't see how functions like ScriptClip, which relies on 'current_frame', can ever be thread-safe (unless somehow each thread has its own set of variables?) |
|
22nd December 2016, 09:57 | #2744 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
Quote:
As for the variables, there is a TLS (thread-local storage) for each thread. They have their own context of local and global variables. When a thread-locale variable is not found in the there, it looks out for the core level variables. See here The problem that I don't understand, that why I have "end of file reached without matching }" in the debug log. EDIT: There was a bug when an avisynth exception came from the thread-local environment, the variadic sprintf-like formatting was not correct, and it would corrupt the stack or the exception rollback mechanism somehow. -- end of edit -- The error chain is thrown from this srestore.avsi line: Code:
Try { global Srestore_InstanceNumber = Srestore_InstanceNumber+1 } catch(err) { global Srestore_InstanceNumber = 1 } Then follows the "file end reached" error and this is what I don't understand. And the log: Code:
ERROR: I don't know what 'Srestore_InstanceNumber' means. --------------------------------------------------------------------- ERROR: I don't know what 'Srestore_InstanceNumber' means. (C:/Program Files (x86)/AviSynth/plugins/SRestore_27.avsi, line 80) --------------------------------------------------------------------- ERROR: Script error: end of file reached without matching } --------------------------------------------------------------------- ERROR: Script error: end of file reached without matching } ((null), line 50, column 0) --------------------------------------------------------------------- ERROR: Script error: end of file reached without matching } ((null), line 50, column 0) (C:/Program Files (x86)/AviSynth/plugins/SRestore_27.avsi, line 320) --------------------------------------------------------------------- ERROR: Script error: end of file reached without matching } ((null), line 50, column 0) (C:/Program Files (x86)/AviSynth/plugins/SRestore_27.avsi, line 320) (.\s1.AVS, line 8) Last edited by pinterf; 28th December 2016 at 13:41. |
|
22nd December 2016, 13:09 | #2745 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
New dev build
Download: Avisynth plus r2347 20161222 r2347dev
|
25th December 2016, 13:17 | #2746 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Scriptclip
I tried script clip and ran into problem.My input is colorbars. I was continuously getting some large line number on top of the input image. I found that prefetch is the cause of this. After commenting out this I could run script clip correctly.
|
26th December 2016, 10:40 | #2750 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
That will be difficult. Visible error message is only the first stage of a possible fix. Now my test is srestore. I made a modification (post 2347) that affects global variables in scriptclip runtime. Now it does not display the exception, finally goes on, but is turning into deadlock somewhere in the handling of the multithread guard mutexes. And I think this is the real problem to be solved.
Can you strip your script to a short one that is still showing the error? |
27th December 2016, 14:15 | #2751 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
I found that if any parameter other than clip is specified it is giving an error. The parameter need not be calculated in the script. I found that placing Reformer(last, last) was ok, but Reformer(last,last, qr = true) raises error.
|
27th December 2016, 16:41 | #2752 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
and it will be more easy if we have "HasAlpha()"
__________________
See My Avisynth Stuff Last edited by real.finder; 28th December 2016 at 08:47. |
|
28th December 2016, 00:09 | #2754 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
|
Found this weird problem...
http://ajpanton.se/avsbug/source.mkv (~4.2MB) Script: Code:
ffms2("source.mkv") vectors = msuper().manalyse(isb = false) mdata = mdepan(vectors, zoom=true, rot=true) depanstabilize(data=mdata, dxmax=100, dymax=100, rotmax=2.0, mirror=15) VirtualDub (FilterMod) handles this fine, the video is smooth. Laptop isn't fast enough for realtime playback, but I can encode it using VD into a smooth video. However, opening the .avs file in both x264 (cli) and avs2pipemod somehow result in really jerky video. |
28th December 2016, 13:35 | #2755 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
Quote:
So I created a HasAlpha, NumComponents and IsPackedRGB script functions (no build yet). |
|
30th December 2016, 15:36 | #2756 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
|
Feature requests:
1. Function "Info": Add a second clip as an optional argument. Write the info of the first clip onto the second clip (or vice versa, whichever is better/easier/more logical). 2. Function "Default": If the variable in the first argument is defined, don't try to evaluate the second argument. I have a function that has arguments for width, height and aspect ratio, but only two are needed. In Default(w,h*ar) I get an unnecessary error if either "h" or "ar" is the only one being left undefined. 3. The ability to add comments at the end of a line that continues on the next line using \. Last edited by ajp_anton; 31st December 2016 at 18:16. |
31st December 2016, 08:27 | #2757 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
EDIT: Also, (1) whats wrong with y=x.info() ? No problem with (3) [EDIT: I quite like the idea].
__________________
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; 31st December 2016 at 09:12. |
|
31st December 2016, 13:32 | #2758 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
|
1. is probably asking for a chance to overlay the Info() details over a blank clip, for better readability. Well ... BlankClip(reference_clip) could be a base with mostly identical attributes, to display Info text onto. Except for the case that the clip has too small dimensions for the Info text to render completely; in that case it may indeed need a larger area than the original clip.
|
31st December 2016, 13:50 | #2759 | Link |
Registered User
Join Date: Jul 2012
Posts: 94
|
Hi,
I'm looking for a script capable to change the color of a harcoded subtitle. Here is a sample: https://framadrop.org/r/znJhfsO4lW#R...TNXzdQlpmmqi8= I found something similar on videohelp: http://forum.videohelp.com/threads/3...Color-exchange So I tweaked a bit but I can't properly change the grey subtitles into white. And there is lot of artefact created on the picture and/or around the outline sub. My script: Code:
mask=MaskHS(30,30, 20,5).mt_expand().BilinearResize(last.width, last.height) overlay(last, GreyScale().ColorYUV(cont_y=100), 0, 0, mask) Last edited by Sm3n; 1st January 2017 at 16:11. |
31st December 2016, 18:16 | #2760 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
Quote:
(Although it was actually proposed because the default size made the output unreadable when dealing with 4K) Last edited by qyot27; 31st December 2016 at 18:22. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|