georgmartius / vid.stab

Video stabilization library
http://public.hronopik.de/vid.stab/
Other
842 stars 108 forks source link

Work on performance #68

Closed jonno85uk closed 5 years ago

jonno85uk commented 5 years ago

I've had a look into the performance of the vidstabtransform filter. On my minimal testing I have discovered that the performance has increase ~135%. This was by using omp in the interpolation of frames.

In the vidstabdetect filter, the threads used by omp was only 80%. I didn't see in the code or observed in testing a reason for it so there is no limit anymore. This lead to a ~10% performance improvement.

I have also fiddled around with some code w.r.t readability mostly so to aid my understanding of the code.

The ORC code and files have been removed. I did get the code to work but there was a huge overhead in the infrastucture(?) whilst running. vidstabdetect became 50% speed and I can only presume it was the J.I.T compiler (orcexec.a was using most processor cycles in profiling). I did look for explanation as to what was happening but the documentation of ORC is very minimal and seemingly is not talked about much via google.

jonno85uk commented 5 years ago

Needs further work on vidstabtransform, closing. ffmpeg build I had used did not have x264 built, and omp changes made things worse for this codec.