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 August 2019, 07:55 | #4861 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
|
Another bug?
ConditionalReader: Code:
TYPE string DEFAULT this_is_the_default 1 test 2 string 5 8 testing Note that setting the default string to empty *does* in fact work (with just the one space after "DEFAULT"), but the exact same thing *does not* work for the individual frames. edit: This example script goes with the above "test.txt" text file, for testing purposes: Code:
ColorBars Trim(0,500) ScriptClip("Subtitle(String(myvar))") ConditionalReader("test.txt", "myvar", false) Last edited by ajp_anton; 29th August 2019 at 07:58. |
29th August 2019, 08:47 | #4863 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
29th August 2019, 12:50 | #4864 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Test build again, files only.
Avisynth+ r2915 Changes since last r2900 test in July (for all changes since r2772 see readmes): Code:
- Changed: Trim, FreezeFrame, DeleteFrame, DuplicateFrame, Reverse and Loop are using frame cache again (similar to classic Avs 2.6) - Enhanced: Expr: faster exp, log, pow for AVX2 (sekrit-twc) - ConditionalReader: allow empty value in text file when TYPE string - Fix: Expr: fix non-mod-8 issues for forced RGB output and YUV inputs - New: AviSource support v308 and v408 format (packed 8 bit 444 and 4444) - Fix: AviSource v410 source garbage (YUV444P10) - Fix: Expr: when using parameter "scale_inputs" and the source bit depth conversion occured, predefined constants (ymin/max, cmin/max, range_min/max/half) would not follow the new bit depth |
29th August 2019, 13:21 | #4865 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
OOOoooh lovely
__________________
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 ??? |
31st August 2019, 22:48 | #4867 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
After confirming speed issues when using FFVideoSource or LWLibavVideoSource under AVS+ 32-bit in MT mode:
https://forum.doom9.org/showthread.p...64#post1883664 I just want to know if it is feasible to add some kind of workaround to AVS+ to ensure linear frame requests to these source filters. Cheers manolito |
8th September 2019, 22:20 | #4868 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
More evidence of the ConvertToXX (chromaresample="point") bug with shifting chroma, as pointed out in post 4287
avsresize does not exhibit the bug (nor does vapoursynth) https://forum.doom9.org/showthread.p...51#post1884351 |
9th September 2019, 12:28 | #4869 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
9th September 2019, 12:28 | #4870 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
9th September 2019, 14:07 | #4871 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Yes
I forgot that Gavino explained this a long time ago https://forum.doom9.org/showthread.p...15#post1571315 |
9th September 2019, 17:39 | #4872 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
I just made this image to compare chroma resampling in converttoXXX:
https://i.imgur.com/xxQu7KV.png It shows the result of repeat conversions between YV12 and RGB24. Does it indicate a problem with "sinc"? If nothing else, it shows a downward shift which none of the others (except "point", for reasons already discussed) exhibits. Last edited by wonkey_monkey; 9th September 2019 at 17:42. |
9th September 2019, 19:56 | #4873 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
avsresize shows expected result with sinc https://i.postimg.cc/kg7MjBk4/sinc.png |
|
9th September 2019, 22:38 | #4874 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Just curious, what is the purpose of
Code:
Null "c[copy]s" # Function Null(clip c,String "Copy") Code:
colorbars(pixel_type="YV12") #NULL("YV24") NULL() info Quote:
Code:
Colorbars x=GetPlaneWidthSubSampling return last perhaps that is part reason I gave up s_ExLogo modding, is pretty fundamental function and easily added, can next issue of avs+ have it (GetPlaneWidthSubSampling) and also GetPlaneHeigthSubSampling too please. I can use RT_ColorSpaceXMod(clip) and RT_ColorSpaceYMod(clip,Laced) but not for avs+ colorspaces. https://forum.doom9.org/showthread.p...02#post1864802 EDIT: Below maybe handy for Wiki/Docs (where ColorSpaceXMod and ColorSpaceYMod cropping granularity of colorspace due to U and V) where ColorSpaceYMod would be as BitLShift(1,Last.GetPlaneHeightSubSampling) OR Last.RT_ColorSpaceYMod() in Avs Std. Code:
H=5 # Test height CS="YV24" ColorSpaceYMod = 1 # ColorSpaceYMod = 1 : Can crop vertically in multiples of 1 for YV24 : ColorSpaceYMod = BitLShift(1,Last.GetPlaneHeightSubSampling) # ColorSpaceYMod = 1 : if eg Y8, GetPlaneHeightSubSampling() would produce error if no chroma. Colorbars(Pixel_type=CS) O=Last crop(0,0,0,H*ColorSpaceYMod) # MINIMUM CROPPED INPUT SIZE PER RESIZER # Resizer Name # Minimum (cropped) input size that succeeds (eg ColorSpaceYMod=2 for YV12, 1 for YV24 : ColorSpaceXMod for horizontal same sort of thing for width) #PointResize(O.Width,O.Height) # 1*ColorSpaceYMod #BilinearResize(O.Width,O.Height) # 2*ColorSpaceYMod #BiCubicResize(O.Width,O.Height) # 3*ColorSpaceYMod #Spline16Resize(O.Width,O.Height) # 3*ColorSpaceYMod #Spline36Resize(O.Width,O.Height) # 4*ColorSpaceYMod #Spline64Resize(O.Width,O.Height) # 5*ColorSpaceYMod #GaussResize(O.Width,O.Height,p=30.0) # 5*ColorSpaceYMod #Lanczos4Resize(O.Width,O.Height) # 5*ColorSpaceYMod (taps=4) #LanczosResize(O.Width,O.Height,taps=3) # (taps+1)*ColorSpaceYMod #BlackmanResize(O.Width,O.Height,taps=4) # (taps+1)*ColorSpaceYMod #SincResize(O.Width,O.Height,taps=4) # (taps+1)*ColorSpaceYMod # Uncomment one of above return Info
__________________
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; 10th September 2019 at 02:36. |
|
10th September 2019, 09:34 | #4876 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
While "sinc" in Avisynth+ has different core from Lanczos. Which can be a bug or not. Lanczos and Sinc are different in avisynth+ because "sinc" does not have the extra calculation of sinc(value) * sinc(value/taps) like Lanczos has. avs+ Lanczos: Code:
double LanczosFilter::sinc(double value) { if (value > 0.000001) { value *= M_PI; return sin(value) / value; } else { return 1.0; } } double LanczosFilter::f(double value) { value = fabs(value); if (value < taps) { return (sinc(value) * sinc(value / taps)); } else { return 0.0; } } Code:
/*********************** *** Sinc filter *** ***********************/ double SincFilter::f(double value) { value = fabs(value); if (value > 0.000001) { value *= M_PI; return sin(value)/value; } else { return 1.0; } } |
|
10th September 2019, 12:44 | #4877 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Also present in v2.58, seen the function lists for v2.58, v2.60, v2.61, avs+ many times and never noticed it before. EDIT: Ideal for April Fool jokes, make AVS+/Plugin coders think they have serious bug in avs+ or plugs.
__________________
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; 10th September 2019 at 13:31. |
|
11th September 2019, 07:31 | #4878 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
|
I believe a Null() transform filter is useful for the ternary conditional statement (if ? then : else) when one alternative is not supposed to change the clip. But there was also a NOP statement, IIRC?
Last edited by LigH; 11th September 2019 at 07:33. |
11th September 2019, 10:04 | #4879 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Null() not useful to replace NOP.
Null(clip c, string "Copy"="none"), is not intended to be used from script. from v2.60 std source, debug.h Code:
class Null : public GenericVideoFilter /** * Class for debugging Avisynth internals. **/ debug.cpp Code:
/******************************* ******* Null Filter ******* ******* for debugging ******* ******************************/ Null::Null(PClip _child, const char * _copy, IScriptEnvironment* env) : GenericVideoFilter(_child), copy(_copy) { } Null::~Null() { } PVideoFrame __stdcall Null::GetFrame(int n, IScriptEnvironment* env) { PVideoFrame src = child->GetFrame(n, env); BYTE * foo = new BYTE[256]; BYTE * bar = new BYTE[256]; MemDebug md; md.randomFill(foo, 8, 8, 8); env->BitBlt(bar, 8, foo, 8, 8, 8); md.reset(); int i = md.randomCheck(bar, 9, 8, 8); // ssS: Looks like always forces error (9 instead of 8) if (i) env->ThrowError("bug found"); // ssS: OUR SHOWN ERROR "Error reading source frame 0: Avisynth read error: bug found" delete [] foo; delete [] bar; if (!lstrcmpi(copy, "makewritable")) { env->MakeWritable(&src); return src; } // TODO: no support for planar formats! if (!lstrcmpi(copy, "memcopy")) { PVideoFrame dst = env->NewVideoFrame(child->GetVideoInfo(), 16); if (dst->IsWritable() == false) env->ThrowError("new frame not writable"); // honestly don't know whether to expect this condition memcpy( dst->GetWritePtr(), src->GetReadPtr(), src->GetPitch() * src->GetHeight() ); return dst; } if (!lstrcmpi(copy, "bitblt")) { PVideoFrame dst = env->NewVideoFrame(child->GetVideoInfo(), 16); if (dst->IsWritable() == false) env->ThrowError("new frame not writable"); // honestly don't know whether to expect this condition env->BitBlt( dst->GetWritePtr(), src->GetPitch(), src->GetReadPtr(), src->GetPitch(), src->GetRowSize(), src->GetHeight() ); return dst; } //if (!lstrcmpi(copy, "none")) // do nothing return src; } AVSValue __cdecl Null::Create(AVSValue args, void*, IScriptEnvironment* env) { return new Null(args[0].AsClip(), args[1].AsString("none"), env); } EDIT: Dont know where this bit is coming from "Error reading source frame 0: Avisynth read error". EDIT: Although this dont throw error (As no GetFrame called, only Null() constructor called) Code:
# this just returns the info whatsit, no error thrown colorbars(pixel_type="YV12") O=Last Last.Null(Copy="What the hell ! ") # always do the Null thingy return O.Info
__________________
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; 11th September 2019 at 10:41. |
16th September 2019, 17:19 | #4880 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
I'm writing a C++ program which creates an IScriptEnvironment2 for the purposes of displaying clips. It also lets the user modify the filter chain by changing conversion matrix, interlacing settings, bobbing, etc. If I invoke a filter, is there any way to absolutely forbid the environment from ever caching frames from that filter? And would this/could this propagate to downstream filters, so that every single request for an output frame (even if it was the same frame that had just been requested) would go back up the chain to the uncached filter?
|
|
|