-
Notifications
You must be signed in to change notification settings - Fork 77
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
ConvertBits::Create calls GetFrame #275
Comments
True, this will be mentioned later ("less ideal" part)
Yep, I'm not satisfied with the present concept, either. The following considerations are generic, and do not apply only on ConvertBits. There is no such object as 'clip properties'. I wish it existed. We could use only some bits for this purpose in the VideoInfo struct. Possible solutions:
Obviously, when a filter constructor contains a relatively long process, e.g. LUT calculation (I think such filters are Tweak, Levels, Expr in LUT mode), and it is based upon certain clip properties they must assume constant format. Or if not: the must use a much smarter way and create LUT only on their first GetFrame, and track changes whether the actual LUT is still valid or must be recreated. This means however that for non-constant properties the LUT may be recrated in each GetFrame (not even considering the possible multithreading situations). It would mean that such filter cannot be a MT_NICE_FILTER because it must keep tracked its internal state. |
This seems true. I don't see a way to add more members to
But from what I see, we don't need that behaviour in this case: there's little to no benefit in choosing between full/limited range on a per-frame basis. So the performance impact of implementing that outweights the usefulness of it, in my opinion. If that's the only alternative to being inconsistent (using frame properties for what should be clip properties), I prefer to stay inconsistent. |
In this case - ConvertBits - there is no performance penalty I think, one or two more ifs and switch-case put into GetFrame is still quick compared to the actual frame processing. |
ConvertBits
callsGetFrame
while being constructed:AviSynthPlus/avs_core/convert/convert_bits.cpp
Line 1105 in e613237
Depending on the source clip complexity and the number of
ConvertBits
instances, this can result in the script taking several minutes to load (which is my case).The call to
GetFrame
could be moved inside theif
statement. Then it could be avoided by specifying thefulls
parameter manually. However, ifGetFrame
is being called in order to get the frame properties, I ask myself: shouldn't this property be queried for every frame and not just the first one? If this frame property is meant to be constant across the whole clip, shouldn't it be a clip property instead? (I don't know whether such a concept exists, though)Thank you.
The text was updated successfully, but these errors were encountered: