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 > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th June 2018, 01:04   #4101  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,586
Here is a similar test on a 0-255, Y,U,V pattern (0-255 Y just copied to the U,V planes), and again 8x back and forth, and then to TV range

You end up with Y 16-235 , U,V 16-240 hard limits (so chroma=100 for smooth levels is probably correct value for typical usage scenarios), but the average is skewed with coloryuv , resulting in the colorization of greyscale values. Also see the line artifacts again with coloryuv (smoothlevels had dither disabled)
poisondeathray is offline   Reply With Quote
Old 10th June 2018, 06:59   #4102  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
I have noticed and commented a line in color.cpp, this is the final step in lut creation, so far calculation was done in double precision:

// Convert back to int
int iValue = int(value); // hmm P.F. 20180226 no rounding?
pinterf is offline   Reply With Quote
Old 10th June 2018, 19:53   #4103  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 158
Quote:
Originally Posted by pinterf View Post
I have noticed and commented a line in color.cpp
Ah, that might be it. Do you have a test build with rounding? Otherwise I'll probably monkey with it and build one myself.
__________________
My filters: DupStep | PointSize
`Orum is offline   Reply With Quote
Old 11th June 2018, 06:35   #4104  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
I'll build one then
pinterf is offline   Reply With Quote
Old 11th June 2018, 09:34   #4105  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
Quote:
Originally Posted by StainlessS View Post
EDIT:
Limiter dont work as required, mod to Levels
Are you sure?
pinterf is offline   Reply With Quote
Old 11th June 2018, 10:55   #4106  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
Avisynth+ r2710 test build: installer w/o C++ redistributables.
https://drive.google.com/open?id=1tM...W4v99uCUtwwemj

New things since last test:
Code:
- Fix: ColorYUV: round to avoid green cast on consecutive TV<>PC
- Enhanced: Limiter to work with 32 bit float clips. 'show' option still not supported
- Enhanced: Limiter new parameter bool 'autoscale' default false.
  If set, minimum/maximum luma/chroma values are treated as they were in 8 bit range (but non-integer values are allowed), limiter will autoscale it.
  Default: does not scale at all, parameters are used as-is. Parameters now are of float type to handle 32 bit float values.
- New: function bool VarExists(String variable_name)
  Checks if a variable exists
  Returns true if variable exists, false otherwise
pinterf is offline   Reply With Quote
Old 11th June 2018, 12:01   #4107  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,688
So AviSynth+ "VarExists" is comparable to PHP "isset"?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 11th June 2018, 14:28   #4108  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,535
Quote:
Originally Posted by LigH View Post
So AviSynth+ "VarExists" is comparable to PHP "isset"?
Hopefully it doesn't return "false" when the variable exists but is null, which is what isset does...
__________________
My AviSynth filters / I'm the Doctor
davidhorman is offline   Reply With Quote
Old 11th June 2018, 14:32   #4109  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,688
I believe AviSynth has no "null" value/type.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 11th June 2018, 15:00   #4110  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
They can hold an 'undefined' value. But in this case the variable still exists and the function returns true.
pinterf is offline   Reply With Quote
Old 11th June 2018, 15:08   #4111  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,088
Code:
BlankClip
#Fred=Undefined                     # Uncomment to show True
Ex=RT_VarExist("FRED")      # Edit or r2710 VarExists
Subtitle("VarExist for fred="+String(ex))
False unless assigned Undefined [EDIT: or some variable type]
Will show true in Script function where Fred is an un-supplied optional arg, ie UnDefined. (exists but not defined as anything in particular)
__________________
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 June 2018 at 15:36.
StainlessS is online now   Reply With Quote
Old 11th June 2018, 15:17   #4112  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,088
Quote:
Originally Posted by pinterf View Post
Are you sure?
Went all the way back to v2.57 and could not get Limiter to fail as posted, sorry, I have not explanation, other than senility.
__________________
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 ???
StainlessS is online now   Reply With Quote
Old 11th June 2018, 15:30   #4113  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,088
@P,
Note, the builtin file existing function is named Exist(), ie no ending 's', so I used RT_VarExist() and RT_FunctionExist() both without ending 's',
(I initially did RT_VarExists with ending s and changed to be compatible style with builtin Exist).

EDIT: I see that you have already implemented FunctionExists() with trailing 's', maybe too late to change

Code:
Function Fred() {return True}
BlankClip
Ex=FunctionExists("FRED")
Subtitle("FunctionExists for fred="+String(ex))
EDIT: To below,
Quote:
... because of senility
Yeh, sometimes I miss out the odd 's', and sometime I add way too many, hence the usernamesssss.
__________________
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 June 2018 at 15:41.
StainlessS is online now   Reply With Quote
Old 11th June 2018, 15:33   #4114  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
Good advice, thanks, unless 's' is missing from there because of senility
pinterf is offline   Reply With Quote
Old 11th June 2018, 16:45   #4115  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
Ok, VarExist name is fixed and 'show' is supported in 32bit float, here is r2713
Avisynth+ r2713 test build: installer w/o C++ redistributables.

EDIT: link refreshed (I have messed up the 32/64 bit files)
https://drive.google.com/open?id=1GC...wz-7LIerlDQYLn

New things for today:
Code:
- Fix: ColorYUV: round to avoid green cast on consecutive TV<>PC
- Enhanced: Limiter to work with 32 bit float clips.
- Enhanced: Limiter new parameter bool 'autoscale' default false.
  If set, minimum/maximum luma/chroma values are treated as they were in 8 bit range (but non-integer values are allowed), limiter will autoscale it.
  Default: does not scale at all, parameters are used as-is. Parameters now are of float type to handle 32 bit float values.
- New: function bool VarExist(String variable_name)
  Checks if a variable exists
  Returns true if variable exists even if it holds 'Undefined', false otherwise

Last edited by pinterf; 12th June 2018 at 09:19.
pinterf is offline   Reply With Quote
Old 11th June 2018, 17:12   #4116  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,088
P, so you decied to keep FunctionExists with the extra 's', no sweat either way

Sorry, but latest ver$, have included 64 bit dll's in 32 bit install.

EDIT: And just to mitigate doubts about senility,


EDIT: Above after total uninstall, reinstall. [WinXP32]
EDIT: Not just that dll, looks like maybe all of them.

EDIT: Double check on senility [better to be sure]

Code:
C:\Documents and Settings\root>avsmeter -avsinfo

AVSMeter 2.7.7 (x86) - Copyright (c) 2012-2018, Groucho2004

Cannot load a 64 bit DLL in 32 bit Avisynth: 'C:/Program Files/AviSynth+/plugins+/ConvertStacked.dll'.
__________________
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 June 2018 at 17:34.
StainlessS is online now   Reply With Quote
Old 11th June 2018, 18:12   #4117  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
Quote:
Originally Posted by StainlessS View Post
EDIT: Double check on senility [better to be sure]
Senility contest: I won.
I'll upload a proper version tomorrow, until then the ColorYUV rounding issue fix can be investigated in r2710, some posts before.
pinterf is offline   Reply With Quote
Old 12th June 2018, 09:20   #4118  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,045
r2713 reuploaded
pinterf is offline   Reply With Quote
Old 12th June 2018, 09:47   #4119  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,088
Installed, everything hunky dory here thanx
__________________
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 ???
StainlessS is online now   Reply With Quote
Old 12th June 2018, 15:43   #4120  |  Link
`Orum
Registered User
 
Join Date: Sep 2005
Posts: 158
r2713's ColorYUV(levels="TV->PC") still looks different from MPC-HC's conversion (MPC-HC's caucasian skin-tone colors become redder post-conversion than AviSynth+'s), but at least it no longer seems to have the green cast any more, and repeated conversions back and forth (in AviSynth+) work fine now. So, the difference may be that MPC-HC is doing it incorrectly, I'm not really sure and don't have the time to dig through their code right now. As far as I'm concerned, the issue is resolved for AviSynth+, unless someone can demonstrate otherwise.

Thanks!

Edit: I'm starting to suspect the difference now really is related to a conversion error in MPC-HC, as other colors, like orange/yellow, appear to be oversaturated after conversion.
__________________
My filters: DupStep | PointSize

Last edited by `Orum; 12th June 2018 at 15:49.
`Orum is offline   Reply With Quote
Reply

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 01:29.


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