View Single Post
Old 29th October 2017, 16:22   #236  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Code:
# How it is
S=	"
	\ coloryuv(combined,
	\    gain_y = LumaDifference(c,clean),
	\    chroma ? gain_u=ChromaUDifference(c,filt_chroma) : 0, # EDIT: kind of surprised these 2 lines work at all
	\    chroma ? gain_v=ChromaVDifference(c,filt_chroma) : 0  # EDIT: Assuming that they do
	\ )"

# more like how it should be,
# but, when not @ main script level, combined, c, clean. chroma, filt_chroma, are not in scope (unless globals).

# Maybe below more as intended (but args still not in scope)
S=	"
	\ coloryuv(combined,
	\    gain_y = LumaDifference(c,clean),
	\    gain_u = (chroma) ? ChromaUDifference(c,filt_chroma) : 0,
	\    gain_v = (chroma) ? ChromaVDifference(c,filt_chroma) : 0
	\ )"

combined = deband ? ScriptClip(S) : nop	# This is horrible, [EDIT: perhaps nop should be combined]

# TEST
Colorbars.killaudio # Assign to Last
a=invert    		# inverted Last
a=false ? blankclip : NOP
return a            # If true then returns blankclip else Error, "The script return value was not a clip (is an int, 0)"
EDIT: Grunt would let you import args using eg args="combined, c, clean. chroma, filt_chroma" as args to scriptclip.

EDIT: Also, take care with ScriptClip, requires a source arg, if not supplied then is implied to be Last (should it be c or combined or what, inside Scriptclip that source arg will become Last).
__________________
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; 29th October 2017 at 17:30.
StainlessS is offline   Reply With Quote