#72 FrameRate Numerator & Denominator script functions

AviSynth 2.5
closed
nobody
5
2004-06-28
2004-06-26
Ian Brabham
No

Given the FrameRate() function returns quite limited
precision, less then 32 bit float, can functions for
FrameRateNumerator() and FrameRateDenominator() be
include in the scripting interface.

Attached are updated script.cpp and script.h files
that implement these 2 extra functions. In addition
in order to maximise the restricted precision the code
for FrameRate() has been modified to perform the
division of numerator by denominator using double
precision which finally in turn is reduced to a float.

Also included is an alternate version of
AudioLength(), called AudioLengthF(), which returns a
float. Although of limited precicion, it does not
become negative when more than 2^31 samples are
present and gives the correct order of magnitude.
(Devious scripting using both functions and modulo
arithmetic can represent the exact audio sample count
if required).

IanB

Discussion

  • Ian Brabham

    Ian Brabham - 2004-06-26

    Updated script.cpp & .h

     
  • Klaus Post

    Klaus Post - 2004-06-28

    Logged In: YES
    user_id=578300

    Thanks, added!

     
  • Klaus Post

    Klaus Post - 2004-06-28
    • status: open --> closed
     

Log in to post a comment.