@@ -187,7 +187,7 @@ def Overlay(base, overlay, x=0, y=0, mask=None, opacity=1.0, mode='normal', plan
187
187
Source: https://github.com/xyx98/my-vapoursynth-script/blob/master/xvs.py
188
188
"""
189
189
def InterFrame (Input , Preset = 'Medium' , Tuning = 'Film' , NewNum = None , NewDen = 1 , GPU = True , gpuid = 0 , OverrideAlgo = None , OverrideArea = None ,
190
- FrameDouble = False ):
190
+ FrameDouble = False , OverrideBlockSize = 'auto' ):
191
191
192
192
if not isinstance (Input , vs .VideoNode ):
193
193
raise TypeError ('InterFrame: This is not a video' )
@@ -218,12 +218,21 @@ def InterFrameProcess(clip,oclip):
218
218
SuperString += 'gpu:1}' if GPU else 'gpu:0}'
219
219
220
220
# Create VectorsString
221
- if Tuning == 'animation' or Preset == 'fastest' :
222
- VectorsString = '{block:{w:32,'
223
- elif Preset in ['fast' , 'faster' ] or not GPU :
224
- VectorsString = '{block:{w:16,'
221
+ if OverrideBlockSize not in [None , '' , 'auto' ]:
222
+ if 'x' in OverrideBlockSize : # contains a width, and height
223
+ width , height = OverrideBlockSize .split ('x' )
224
+ VectorsString = '{block:{w:' + width + ','
225
+ if height != '' :
226
+ VectorsString += 'h:' + height + ','
227
+ else : # only contains width
228
+ VectorsString = '{block:{w:' + OverrideBlockSize + ','
225
229
else :
226
- VectorsString = '{block:{w:8,'
230
+ if Tuning == 'animation' or Preset == 'fastest' :
231
+ VectorsString = '{block:{w:32,'
232
+ elif Preset in ['fast' , 'faster' ] or not GPU :
233
+ VectorsString = '{block:{w:16,'
234
+ else :
235
+ VectorsString = '{block:{w:8,'
227
236
228
237
if Tuning == 'animation' or Preset == 'fastest' :
229
238
VectorsString += 'overlap:0'
@@ -281,7 +290,7 @@ def InterFrameProcess(clip,oclip):
281
290
if Tuning == 'weak' :
282
291
SmoothString += ',area_sharp:1.2},scene:{blend:true,mode:0,limits:{blocks:50}}}'
283
292
else :
284
- SmoothString += ',area_sharp:1.2},scene:{blend:true ,mode:0}}'
293
+ SmoothString += ',area_sharp:1.2},scene:{blend:false ,mode:0}}'
285
294
286
295
# Make interpolation vector clip
287
296
Super = core .svp1 .Super (clip , SuperString )
0 commit comments