-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pass more clips in Expr #17
Comments
Couldn't you divide the weights into multiple Expr's? Expr([Expr([x, y], f"{w0} x * {w1} y * +"), z], f"x {w2} y * +")) If you have a large number of clips, an expression like this will be bounded by memory bandwidth, so splitting it into multiple passes won't hurt much. Just remember to balance the size of expressions. For example, this function implements arbitrary frame averaging: def Weighted(clips, weights):
names = ''.join(map(lambda x: chr(x+ord('a')), range(26)))
names = names[-3:] + names[:-3] # 'xyzabc...w'
limit = 26
if len(clips) <= limit:
return core.akarin.Expr(clips, ' '.join(map(lambda cw: f'{cw[0]} {cw[1]} *', zip(names[:len(clips)], weights))) + ' +' * (len(clips)-1))
else:
return Weighted([Weighted(clips[:limit], weights[:limit])] + clips[limit:], [1.0] + weights[limit:]) (The generated data flow graph is not very efficient, but I doubt it will matter much in practice. And if you want, you can rewrite it to generate a proper balanced tree structure.) |
Implemented. Use |
Could it be possible to allow for more letters (currently supports A-Z, new characters or letters could be european stuff like éöâîï, should be plenty with all combinations) and thus also allow for more clips to be provided ?
My use case for this is having more seamless motion blur (remember my script and sample in VS-Classic's #7, I currently use vs-frameblender as a backup in case user provides more than 25 weights
The text was updated successfully, but these errors were encountered: