-
Notifications
You must be signed in to change notification settings - Fork 111
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
Improve serialization performance by creating a simple binary format for transform files. #97
Conversation
…%+ (depending on input size)
Wonderful! |
Does this also affect |
|
Add file format guessing logic for reading local motions files
As far as I can tell, global_motions.trf is not impacted by my change. It's populated in vsLocalmotions2Transforms/vsMotionsToTransform and doesn't appear to use any of the serialization methods. |
I've implemented your feedback. |
Dear Ernest, |
There are a few that come to mind -- FlatBuffers, ProtoBuf, and Cereal. Cereal is probably the easiest to integrate because it's just a header. The other immediate alternatives require defining a schema and then generating code. I don't mind implementing Cereal if you are OK with mixing C and C++11. I avoided adding dependencies in order to keep this PR simple. I'd look to you for a strong suggestion in this area as this is your project. |
You are right, let's keep it simple and do not create more dependencies than necessary. |
Apparently, it causes problems on windows, see issue 104 |
Please change the default to the ASCII transform files - ffmpeg v6.0.1 on Mac M2 can't stabilize video as well because of this. Second pass always output error "Cannot parse localmotion"
|
Improve serialization performance by creating a simple binary format for transform files. Binary serialization results in faster load/store times and files that are 40%+ smaller in size. Use of this binary serialization is controlled by using the argument "fileformat".
Also change Field and Vec to represent coordinate and size fields as 16-bit integers. This reduces the runtime memory usage of these data structures by ~50%.