Skip to content

Commit

Permalink
fixed stupid bug 'hasattr(..' -> 'hasattr(core, ..'
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Pelz committed Apr 7, 2018
1 parent bbf7a3b commit 44fb025
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion edi_rpow2.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def eedi3_rpow2(clip,rfactor,correct_shift="fmtconv",alpha=None,beta=None,gamma=
core = vs.get_core()

def edi(clip,field,dh):
if hasattr('eedi3m'):
if hasattr(core, 'eedi3m'):
return core.eedi3m.EEDI3(clip=clip,field=field,dh=dh,alpha=alpha,beta=beta,gamma=gamma,nrad=nrad,mdis=mdis,hp=hp,ucubic=ucubic,cost3=cost3,vcheck=vcheck,vthresh0=vthresh0,vthresh1=vthresh1,vthresh2=vthresh2,sclip=sclip)
else:
return core.eedi3.eedi3(clip=clip,field=field,dh=dh,alpha=alpha,beta=beta,gamma=gamma,nrad=nrad,mdis=mdis,hp=hp,ucubic=ucubic,cost3=cost3,vcheck=vcheck,vthresh0=vthresh0,vthresh1=vthresh1,vthresh2=vthresh2,sclip=sclip)
Expand Down
10 changes: 5 additions & 5 deletions havsfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ def santiag_dir(c, strength, type, fw=None, fh=None):
def santiag_stronger(c, strength, type):
if opencl:
myNNEDI3 = core.nnedi3cl.NNEDI3CL
myEEDI3 = core.eedi3m.EEDI3CL if hasattr('eedi3m') else core.eedim.eedi3
myEEDI3 = core.eedi3m.EEDI3CL if hasattr(core, 'eedi3m') else core.eedim.eedi3
nnedi3_args = dict(nsize=nsize, nns=nns, qual=qual, pscrn=pscrn)
else:
myNNEDI3 = core.znedi3.nnedi3 if hasattr(core, 'znedi3') else core.nnedi3.nnedi3
myEEDI3 = core.eedi3m.EEDI3 if hasattr('eedi3m') else core.eedim.eedi3
myEEDI3 = core.eedi3m.EEDI3 if hasattr(core, 'eedi3m') else core.eedim.eedi3
nnedi3_args = dict(nsize=nsize, nns=nns, qual=qual, pscrn=pscrn, int16_prescreener=int16_prescreener, int16_predictor=int16_predictor, exp=exp)

strength = max(strength, 0)
Expand Down Expand Up @@ -1397,11 +1397,11 @@ def QTGMC_Interpolate(Input, InputType, EdiMode, NNSize, NNeurons, EdiQual, EdiM

if opencl:
myNNEDI3 = core.nnedi3cl.NNEDI3CL
myEEDI3 = core.eedi3m.EEDI3CL if hasattr('eedi3m') else core.eedim.eedi3
myEEDI3 = core.eedi3m.EEDI3CL if hasattr(core, 'eedi3m') else core.eedim.eedi3
nnedi3_args = dict(nsize=NNSize, nns=NNeurons, qual=EdiQual, pscrn=pscrn)
else:
myNNEDI3 = core.znedi3.nnedi3 if hasattr('znedi3') else core.nnedi3.nnedi3
myEEDI3 = core.eedi3m.EEDI3 if hasattr('eedi3m') else core.eedim.eedi3
myNNEDI3 = core.znedi3.nnedi3 if hasattr(core, 'znedi3') else core.nnedi3.nnedi3
myEEDI3 = core.eedi3m.EEDI3 if hasattr(core, 'eedi3m') else core.eedim.eedi3
nnedi3_args = dict(nsize=NNSize, nns=NNeurons, qual=EdiQual, pscrn=pscrn, int16_prescreener=int16_prescreener, int16_predictor=int16_predictor, exp=exp)
eedi3_args = dict(alpha=alpha, beta=beta, gamma=gamma, nrad=nrad, mdis=EdiMaxD, vcheck=vcheck)

Expand Down
2 changes: 1 addition & 1 deletion muvsfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def nnedi3aa(a):
raise TypeError(funcName + ': \"a\" must be a clip!')

bits = a.format.bits_per_sample
if hasattr('znedi3'):
if hasattr(core, 'znedi3'):
last = core.znedi3.nnedi3(a, field=1, dh=True).std.Transpose()
last = core.znedi3.nnedi3(last, field=1, dh=True).std.Transpose()
else:
Expand Down
2 changes: 1 addition & 1 deletion nnedi3_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def nnedi3_rpow2_vertical(input, eTimes=1, field=1, nsize=None, nns=None, qual=N

def nnedi3_dh(input, field=1, nsize=None, nns=None, qual=None, etype=None, pscrn=None, opt=None, int16_prescreener=None, int16_predictor=None, exp=None):
core = vs.get_core()
if hasattr('znedi3'):
if hasattr(core, 'znedi3'):
return core.znedi3.nnedi3(input, field=field, dh=True, nsize=nsize, nns=nns, qual=qual, etype=etype, pscrn=pscrn, opt=opt, int16_prescreener=int16_prescreener, int16_predictor=int16_predictor, exp=exp)
else:
return core.nnedi3.nnedi3(input, field=field, dh=True, nsize=nsize, nns=nns, qual=qual, etype=etype, pscrn=pscrn, opt=opt, int16_prescreener=int16_prescreener, int16_predictor=int16_predictor, exp=exp)
Expand Down

0 comments on commit 44fb025

Please sign in to comment.