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. |
28th January 2018, 07:48 | #3921 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Image corruption - Regression?
@pinterf
Do you remember this topic about image corruption on pure white and regional settings that you solved? Well, it happened again. Yesterday night I was watching an encoded version of Hitman's bodyguard and it showed again, mostly on scene changes. I dunno if it still AviSynth+ fault. Let me grab it again from BD and will provide some raw material to work with and script.
__________________
@turment on Telegram |
28th January 2018, 09:17 | #3923 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
28th January 2018, 09:18 | #3924 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
OS: Windows 10 ent x64 rs4 17083 italian Environment: Code:
VersionString: AviSynth+ 0.1 (r2580, MT, x86_64) VersionNumber: 2.60 File / Product version: 0.1.0.0 / 0.1.0.0 Interface Version: 6 Multi-threading support: Yes Avisynth.dll location: C:\WINDOWS\SYSTEM32\avisynth.dll Avisynth.dll time stamp: 2017-12-27, 19:55:46 (UTC) PluginDir2_5 (HKLM, x64): D:\Programmi\Media\AviSynth+\plugins64 PluginDir+ (HKLM, x64): D:\Programmi\Media\AviSynth+\plugins64+ [CPP 2.5 Plugins (64 Bit)] D:\Programmi\Media\AviSynth+\plugins64\Dither-1.27.2.dll [2015-12-30] D:\Programmi\Media\AviSynth+\plugins64\f3kdb-2.020140721-SAPikachu.dll [2015-02-19] [CPP 2.6 Plugins (64 Bit)] D:\Programmi\Media\AviSynth+\plugins64+\AutoAdjust-2.60.dll [2.6.0.0] D:\Programmi\Media\AviSynth+\plugins64+\ConvertStacked.dll [2016-10-20] D:\Programmi\Media\AviSynth+\plugins64+\DCTFilter-0.5.0-chikuzen.dll [0.5.0.0] D:\Programmi\Media\AviSynth+\plugins64+\DirectShowSource.dll [2016-10-26] D:\Programmi\Media\AviSynth+\plugins64+\FFT3dFilter-2.4-pinterf.dll [2.4.0.0] D:\Programmi\Media\AviSynth+\plugins64+\ImageSeq.dll [2016-10-20] D:\Programmi\Media\AviSynth+\plugins64+\KNLMeansCL-1.1.0.dll [2017-05-04] D:\Programmi\Media\AviSynth+\plugins64+\MaskTools-2.2.12-pinterf.dll [2.2.12.0] D:\Programmi\Media\AviSynth+\plugins64+\MedianBlur2-0.94-tp7.dll [2014-02-10] D:\Programmi\Media\AviSynth+\plugins64+\MVTools-2.7.24-pinterf.dll [2.7.24.0] D:\Programmi\Media\AviSynth+\plugins64+\RgTools-0.96-pinterf.dll [0.96.0.0] D:\Programmi\Media\AviSynth+\plugins64+\Shibatch.dll [2016-10-20] D:\Programmi\Media\AviSynth+\plugins64+\TimeStretch.dll [2016-10-20] D:\Programmi\Media\AviSynth+\plugins64+\VDubFilter.dll [2016-10-20] [Scripts (AVSI)] D:\Programmi\Media\AviSynth+\plugins64+\colors_rgb.avsi [2015-03-21] D:\Programmi\Media\AviSynth+\plugins64\CompTest.avsi [2010-09-05] D:\Programmi\Media\AviSynth+\plugins64\DeHalo_alpha-realfinder.avsi [2017-02-26] D:\Programmi\Media\AviSynth+\plugins64\Dither-1.27.2.avsi [2015-12-30] D:\Programmi\Media\AviSynth+\plugins64\MT_xxpand_multi.avsi [2010-09-11] D:\Programmi\Media\AviSynth+\plugins64\SMDegrain-3.1.2ú94-realfinder.avsi [2017-11-15] D:\Programmi\Media\AviSynth+\plugins64\VHSHaloremover.avsi [2017-02-25] [Uncategorized files] D:\Programmi\Media\AviSynth+\plugins64+\AutoAdjust-2.60.txt [2015-11-15] D:\Programmi\Media\AviSynth+\plugins64+\AviSynth-new.css [2016-03-31] D:\Programmi\Media\AviSynth+\plugins64+\AviSynth.css [2016-03-31] D:\Programmi\Media\AviSynth+\plugins64+\colors_rgb.txt [2015-03-21] D:\Programmi\Media\AviSynth+\plugins64+\DCTFilter-0.5.0-chikuzen.md [2016-08-03] D:\Programmi\Media\AviSynth+\plugins64+\FFT3dFilter-2.4-pinterf.gif [2005-04-04] D:\Programmi\Media\AviSynth+\plugins64+\FFT3dFilter-2.4-pinterf.htm [2017-10-31] D:\Programmi\Media\AviSynth+\plugins64+\FFT3dFilter-2.4-pinterf.txt [2017-06-08] D:\Programmi\Media\AviSynth+\plugins64+\MaskTools-2.0a48.htm [2010-12-31] D:\Programmi\Media\AviSynth+\plugins64+\MaskTools-2.2.12-pinterf.md [2018-01-07] D:\Programmi\Media\AviSynth+\plugins64+\MedianBlur-0.84.txt [2004-12-07] D:\Programmi\Media\AviSynth+\plugins64+\MVTools-2.7.24-pinterf.htm [2017-12-05] D:\Programmi\Media\AviSynth+\plugins64+\MVTools-2.7.24-pinterf.md [2017-12-05] D:\Programmi\Media\AviSynth+\plugins64+\RgTools-0.96-pinterf.md [2017-06-09] D:\Programmi\Media\AviSynth+\plugins64\AviSynth-new.css [2016-03-31] D:\Programmi\Media\AviSynth+\plugins64\AviSynth.css [2016-03-31] D:\Programmi\Media\AviSynth+\plugins64\Dither-1.27.2.htm [2015-12-30] D:\Programmi\Media\AviSynth+\plugins64\f3kdb-2.020140721-SAPikachu.htm [2015-02-19] D:\Programmi\Media\AviSynth+\plugins64\SMDegrain-3.1.2ú93-realfinder_avsi [2017-05-05] D:\Programmi\Media\AviSynth+\plugins64\SMDegrain-3.1.2d.htm [2015-07-21] PHP Code:
Hitman's enc.7z Hitman's dgi.7z Hitman's dgi avs.7z Enjoy.
__________________
@turment on Telegram Last edited by tormento; 28th January 2018 at 09:22. |
|
28th January 2018, 09:29 | #3925 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
edit: after see the others, it's kinda like the old one, try with older masktools too, and then try with tv_range=false if even old masktools not work
__________________
See My Avisynth Stuff Last edited by real.finder; 28th January 2018 at 09:34. |
|
28th January 2018, 09:43 | #3926 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
Something wrong in avisynth again or SMDegrain? Strange 264 input? Tried also with up to 2 versions of AviSynth back, i.e. up to 2544.
__________________
@turment on Telegram Last edited by tormento; 28th January 2018 at 09:50. |
|
28th January 2018, 10:08 | #3927 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
if only tv_range=false solve it then yes the old bug is back, try with many avs+ versions until you get the one that work
__________________
See My Avisynth Stuff |
28th January 2018, 10:19 | #3928 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
We definitely need Pinterf help EDIT: I have tried every version back to 2420 and got same error. From 2294 and before, I get no ExtractU function and can't test.
__________________
@turment on Telegram Last edited by tormento; 28th January 2018 at 10:41. |
|
28th January 2018, 15:08 | #3929 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
In all RGB Planar modes, Subtitle colors appear with R and G swapped
Code:
Colorbars ConvertToPlanarRGBA tc = $ff00 ## green Subtitle(Hex(tc), text_color=tc, size=56, align=5) return ConvertToRGB32 ## for viewing purposes |
28th January 2018, 18:59 | #3931 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Thanks, almost as enjoyable as the 8th hour in an ultra running race
This one is different though. In the old (fixed) problem the String(1.04) yielded "1,04" instead of "1.04" in our windows input local. It was fixed to always using decimal _point_ for separator (input local = "C language"), because dither tools' lut interpreter could not recognize constants with commas as decimal separator. Now it's s different problem since I can see only decimal points in the expression. Since then I was also moving to Win10 and see the problem (I'm testing with another clip): greyish/burnt out parts in fast moving scenes. |
28th January 2018, 19:50 | #3932 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
It seems that under Win10 (?) configuration it understands only the decimal separator of the current input local. Just replace the decimal point to commas in yexpr parameter and it will work fine. (the used ReplaceStr is built-in in AVS+) Code:
function Dither_Luma_Rebuild (clip src, float "s0", float "c",int "uv", bool "lsb", bool "lsb_in", bool "lsb_out", int "mode", float "ampn", bool "slice"){ [...] src lsb ? (lsb_in ? Dither_lut16 (yexpr=ReplaceStr(e,".",","),expr="x 32768 - 32768 * 28672 / 32768 +",y=3, u=uv, v=uv) : \ Dither_lut8 (yexpr=ReplaceStr(e,".",","),expr="x 128 - 32768 * 112 / 32768 +" ,y=3, u=uv, v=uv)) : \ avs26 ? mt_lut(yexpr=e,expr="x range_half - range_half * 112 scaleb / range_half +",y=3, u=uv, v=uv) : \ mt_lut(yexpr=e,expr="x 128 - 128 * 112 / 128 +" ,y=3, u=uv, v=uv) [...] } |
|
29th January 2018, 00:06 | #3933 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
29th January 2018, 14:01 | #3934 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
I applied the fix proposed from Pinterf and things are working. Dunno if other mods are needed.
__________________
@turment on Telegram Last edited by tormento; 29th January 2018 at 14:07. |
|
29th January 2018, 14:09 | #3935 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
find and replace what Pinterf edit in his last post then
__________________
See My Avisynth Stuff |
2nd February 2018, 15:57 | #3936 | Link |
Registered User
Join Date: Feb 2002
Posts: 303
|
I find that these two return different Stack16 clips, am I missing something?
Code:
#YV16 Source 8-bit ConvertBits(bits=32) ConvertBits(bits=16) ConvertToStacked() Code:
#YV16 Source 8-bit ConvertBits(bits=16) ConvertBits(bits=32) ConvertBits(bits=16) ConvertToStacked() |
20th February 2018, 17:53 | #3937 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
This would be nice addition to +.
Code:
RT_BitSetCount(int) Return an int, the count of the number of set bits (1's) in arg int. NOTE, Previous Bit functions are similar to the v2.6 bit manipulation functions, however this one has no equivalent in v2.6 [perhaps it should, it is quite handy, as used in the ApparentFPS() script prototype)] EDIT: Here, S_ApparentFPS(), ApparentFPS prototype script function, would have been difficult/impossibly_slow without RT_BitSetCount. https://forum.doom9.org/showthread.p...88#post1698788 EDIT: This line, about 80% of the way through the script function. Code:
Unique = RT_BitSetCount(BITS0) + RT_BitSetCount(BITS1) + RT_BitSetCount(BITS2) + RT_BitSetCount(BITS3) + \ RT_BitSetCount(BITS4) + RT_BitSetCount(BITS5) + RT_BitSetCount(BITS6) + RT_BitSetCount(BITS7)
__________________
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; 20th February 2018 at 21:46. |
21st February 2018, 14:43 | #3938 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
https://stackoverflow.com/questions/...32-bit-integer RT_xxx collection have quite a few useful function, do you (or others) recommend to cherry-pick some of them, which are worth of integration and futureproof? Edit: Code:
- New script function: int BitSetCount(int[,int, int, ...]) Function accepts one or more integer parameters Returns the number of bits set to 1 in the number or the total number of '1' bits in the supplied integers. Last edited by pinterf; 21st February 2018 at 15:21. Reason: Implemented |
|
21st February 2018, 20:54 | #3939 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
since the topic now is runtime, pinterf can you have a look at https://forum.doom9.org/showthread.php?t=175212
and any news about fix the old mt problem with runtime?
__________________
See My Avisynth Stuff |
22nd February 2018, 13:42 | #3940 | Link | |||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Code:
int numberOfSetBits(int i) { // Java: use >>> instead of >> // C or C++: use uint32_t i = i - ((i >> 1) & 0x55555555); i = (i & 0x33333333) + ((i >> 2) & 0x33333333); return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; } Code:
env->AddFunction("RT_BitSetCount","i",RT_BitSetCount, 0); AVSValue __cdecl RT_BitSetCount(AVSValue args, void* user_data, IScriptEnvironment* env) { unsigned int n = (unsigned int)args[0].AsInt(); int cnt=0; for(int i=0;i<32;n>>=1,++i) if(n&0x01) ++cnt; return (int)cnt; } I dont think avs 2.6 implements Arithmetic Shift Left, just Logical Shift Left, probably not needed but I also implemented in RT_. Quote:
Quote:
From RT_File.cpp Code:
env->AddFunction("RT_FileDelete", "s",RT_FileDelete, 0); env->AddFunction("RT_WriteFile", "ss.*[Append]b",RT_WriteFile, 0); Code:
env->AddFunction("RT_Call", "s[Hide]b[Debug]b", RT_Call, 0); From RT_Debug.cpp [EDIT: In desparate need of this one, probably the singularly most useful function] Code:
env->AddFunction("RT_DebugF", "s.*[name]s[tabsz]i", RT_DebugF, 0); Code:
# Mod, add width arg. env->AddFunction("RT_Hex", "i[width]i",RT_Hex, 0); RT_Hex(int , int "width"=0) First arg is an integer to convert to a hexadecimal string. Width, (0, 0 -> 8) is the minimum width of the returned string. eg RT_Hex(255,4) returns "00FF". AVSValue __cdecl RT_Hex(AVSValue args, void* user_data, IScriptEnvironment* env) { int n = args[0].AsInt(); int wid = args[1].AsInt(0); wid=(wid<0) ? 0 : (wid > 8) ? 8 : wid; char buf[8+1]; sprintf(buf,"%0*X",wid,n); return env->SaveString(buf); // Get pointer to Avisynth saved string } # Mod, add pos arg. RT_HexValue(String,"pos"=1) Returns an int conversion of the supplied hexadecimal string. Conversion will cease at the first non legal number base digit, without producing an error Fixes HexValue bug in 2.58 & 2.6a3. eg "FFFFFFFF" returns 2147483647 (0x7FFFFFFF) instead of the correct -1 (As most/all calculators) Bug is fixed in Avisynth v2.6a4. v1.14, Added optional pos arg default=1, start position in string of the HexString, 1 denotes the string beginning. Will return 0 if error in 'pos' ie if pos is less than 1 or greater than string length. env->AddFunction("RT_HexValue", "s[pos]i",RT_HexValue, 0); AVSValue RT_HexValue(AVSValue args, void*, IScriptEnvironment* env) { const char *str = args[0].AsString(); int pos = args[1].AsInt(1) - 1; int sz=strlen(str); if(pos<0 || pos>=sz) return 0; str+=pos; char *stopstring; return (int)(strtoul(str,&stopstring,16)); } # Mod env->AddFunction("RT_NumberString", "i[base]i[width]i",RT_NumberString, 0); RT_NumberString(int ,int "base"=10, int "width"=0) First arg is an integer to convert to a number base/radix string. Base, (10, 2 -> 36), is the number base or radix, eg 2 == Binary, 8 == Octal, 10 == Denary/Decimal, 16 == Hexadecimal. The default of 10 (decimal) will just convert a number to its decimal string equivalent possibly with a '-' minus sign. All number bases with the exception of decimal, will be unsigned form, ie -1 to hexadecimal will produce "FFFFFFFF", (the sign is in the digits rather than as separate 'sign and magnitude' used in decimal representation). The digits used for the base are, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ". Binary uses first two; decimal, the first 10; Hexadecimal the first 16; base 36 all 36 digits. Width, (0, 0 -> 32) is the minimum width of the returned string. eg RT_NumberString(255,16,4) returns "00FF". To convert a Float to a decimal string use Avisynth native "String()" func. # Mod env->AddFunction("RT_NumberValue", "s[base]i[pos]i",RT_NumberValue, 0); RT_NumberValue(String,int "base"=10,int "pos"=1) Returns an int conversion of the supplied number base string. Base, (10, 2 -> 36) is the number base that the string uses. To convert a Decimal string to a Float, use Avisynth native "Value()" func. Conversion will cease at the first non legal number base digit, without producing an error. eg RT_NumberValue("1100",2) returns 12 from the binary string. v1.14, Added optional pos arg default=1, start position in string of the number string, 1 denotes the string beginning. Will return 0 if error in 'pos' ie if pos is less than 1 or greater than string length. from RT_Odds.cpp Code:
env->AddFunction("RT_VarExist", "s",RT_VarExist, 0); env->AddFunction("RT_VarType", ".",RT_VarType, 0); env->AddFunction("RT_Ord", "s[pos]i",RT_Ord, 0); env->AddFunction("RT_TimerHP", "",RT_TimerHP, 0); env->AddFunction("RT_GetSystemEnv", "s",RT_GetSystemEnv, 0); env->AddFunction("RT_GetFileTime", "si",RT_GetFileTime, 0); env->AddFunction("RT_LocalTimeString", "[file]b",RT_LocalTimeString, 0); Code:
env->AddFunction("RT_StrReplace", "sss[sig]b",RT_StrReplace, 0); # Replace multiple strings, not so often used but is very powerful, allows for a sort of macro language where # strings can replace substrings of already replaced strings. env->AddFunction("RT_StrReplaceMulti", "sss[sig]b",RT_StrReplaceMulti, 0); env->AddFunction("RT_StrPad", "si[c]s",RT_StrPad, 0); # Mod, env->AddFunction("RT_FindStr", "ss[sig]b[pos]i",RT_FindStr, 0); # Must have. Although take source from RT_Stats v2.0, with bug fix. Or from StrFmt() plugins, also suggest StrFmt as name. AVSValue __cdecl RT_String(AVSValue args, void* user_data, IScriptEnvironment* env); env->AddFunction("RT_String", "s.*[esc]i",RT_String, 0); EDIT: StrFmt does not support the Esc arg, probably best omitted as StrFmt does (Esc arg, very demanding on script developer). from RT_Sundry.cpp Code:
env->AddFunction("RT_ColorSpaceXMod", "c",RT_ColorSpaceXMod, 0); env->AddFunction("RT_ColorSpaceYMod", "c[Laced]b",RT_ColorSpaceYMod, 0); Code:
env->AddFunction("RT_TxtAddStr", "ss+",RT_TxtAddStr, 0); RT_TxtAddStr(String, String s1, ... , String sn) Non-clip function. Function to concatenate (join together) 2 or more strings with Chr(10) line separators. If the first string is an empty string ("") it will not have a newline [Chr(10)] appended. All other strings even empty strings will have a newline [Chr(10)] inserted after them (if they dont already have a trailing newline). Any source string containing carriage return Chr(13) will have them converted to Chr(10). X = RT_TxtAddStr("A","B","C") same as X = "A" + Chr(10) + "B" + Chr(10) +"C" + Chr(10) X = RT_TxtAddStr("","A","B","C") same as X = "" + "A" + Chr(10) + "B" + Chr(10) + "C" + Chr(10) env->AddFunction("RT_TxtQueryLines", "s",RT_TxtQueryLines, 0); RT_TxtQueryLines(String) Non-clip function. String, the multiline string that you require a line count from. Returns the number of Newline [Chr(10)] separated lines in a multiline string. The last line does not have to be Chr(10) terminated, it still counts. [EDIT: awkward/slow to do in script alone] env->AddFunction("RT_TxtGetLine", "s[Line]i",RT_TxtGetLine, 0); RT_TxtGetLine(String, Int "Line"=0) Non-clip function. Extract a single line from a multiline Newline[Chr(10)] separated string. Default=0 == first line. The Line index is Zero Relative like frame number versus FrameCount. The returned string has trailing Newlines and carriage returns stripped from it. Throws an error if your requested line is >= to the number of lines in the multiline string.
__________________
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; 22nd February 2018 at 14:51. |
|||
Thread Tools | Search this Thread |
Display Modes | |
|
|