View Single Post
Old 8th July 2019, 16:41   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Here v0.011Beta (Beta really as two new args that may or may not survive as is to next update).
See MediaFire in sig below this post, HOSTED folder.


Code:
// 01-09-2010   Ver. 0.6     + added support for the "coring" flag
// Jim Battle                + revised/improved the readme document
//
// StainlessS
// 31/05/2019   Ver  0.7     + Convert for avs v2.6/+ x86 and x64. revised a bit.
// 06/05/2019   Ver  0.9     + Switch off debugging in v0.8, oops.
// 11/06/2019   Ver  0.10    + Oops, limited gamma max in adjust to 1.0 instead of 10.0 (so only ever reduced gamma, never increased).
//                             Mods to debug output, shows output Y frame average.
// 08/07/2019   Ver  0.11Beta1    + Basic scene change detect also now takes into account diffLumaMean((n,n-1))>=(sceneChgThresh*0.5), as well as min and max luma diff.
//                           + Added sc2Th=8, and sc2Perc=33.33, a check and possible override to sceneChgThresh detected scene change.
//                           + Changed default filterRadius from 5 to 7.
Only avialable doc for diffs is this

Code:
AviSource(".\ALTEST.AVI").Trim(74,11154).crop(0,46,0,-46)
######################
ORG=Last
AUTOGAMMA=True
DEBUG=true
# DEFAULT
SCENECHGTHRESH=20    # SC if diff of min or max Y to prev frame is more than this : NEW additional SC if DiffMeanY(n,n-1) is more than 1/2 this. [If either, recheck for override to non SC via SC2 stuff]
# NON DEFAULT
MIDPOINT=0.42        # Default stays 0.5
# NEW, If Scene change detected via SceneChgThresh, then re-check and override to NOT SC if not at least SC2PERC(33.33%) of luma pixels differ by more than SC2TH(8) when compared with prev frame.
SC2TH=8
SC2PERC=33.33
######################
A=AutoLevels(autogamma=AUTOGAMMA,midpoint=MIDPOINT,debug=true, sceneChgThresh=sceneChgThresh,FilterRadius=5,sc2Th=256)                        # Nearly same as 0.7. sc2Th=256 switch off new sc overrides [still does 1/2 mean SC chk]
B=AutoLevels(autogamma=AUTOGAMMA,midpoint=MIDPOINT,debug=DEBUG,sceneChgThresh=sceneChgThresh,FilterRadius=7,sc2Th=SC2TH,sc2Perc=SC2PERC)      # New Settings
LFT=StackVertical(ORG,A)
RGT=StackVertical(ORG,B)
StackHorizontal(LFT,RGT)
EDIT: Ignore debug info on bottom of frame when DEBUG, is really just debug and of no use to you.

EDIT:
From above source docs
Code:
// 11/06/2019   Ver  0.10    + Oops, limited gamma max in adjust to 1.0 instead of 10.0 (so only ever reduced gamma, never increased).
Maybe upwards, or downwards gamma limiting might be a pretty good user arg to add. [it worked pretty good when above bug existed, bug prevented upwards 'overkill']
__________________
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; 8th July 2019 at 16:48.
StainlessS is offline   Reply With Quote