Quote:
Originally Posted by davidhorman
what is it about info() that seems to make it really slow? Showframenumber seems similarly slow, but subtitle isn't. Is that because subtitle renders the text once and only has to composite it onto each frame? Is text rendering really that slow?
Info's speed also seems to depend greatly on video size. Is it possibly missing some optimisations to do with compositing extent?
|
Subtitle fixed text, requires prepping one time only (prior to frame serving, ie in constructor), ShowFrameNumber() or Info() (frame number and time) require prepping at each GetFrame [EDIT:
Calling Subtitle Constructor in each and every frame, with big overhead].
Prepp'ing, calls some system function (probably via ApplyMessage) to find size of Subtitle for font etc, (together with eg kerning of each character), and that part is slow. Also, depending upon size of subtitle string, and size of clip, so subtitle may also have to be resized to fit clip (for eg alert error box).
For any kind of plugin metrics output, Subtitle is a slow option and best avoided, see Info.h, or perhaps even DDigit, although neither of them will work in non 8 bit colorspaces.
EDIT: Current Info.h was refactored by IanB most recently about May 2013, (may require a couple of simple warnings fixes for x64 compile).
Info.h available in ClipClop source[with any required x64 warning fixed], if you cannot find it elsewhere. [pre IanB refactored versions have several bugs]
EDIT: More bout it here:-
https://forum.doom9.org/showthread.php?t=175443
Info.h and DDigit are
lots faster than Subtitle [Fixed monospace font, 10x20 pixels, DDigit also uses Info.h font].
EDIT: IanB refactored Info.h is both font and code, DDigit uses Info.h font only[renamed], the code part being removed.