Mercurial > libavcodec.hg
changeset 1625:c910ff78ef80 libavcodec
av_d2q() documentation
author | michael |
---|---|
date | Sun, 16 Nov 2003 19:23:39 +0000 |
parents | 46dee16488ae |
children | f74ae637ffa9 |
files | rational.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rational.c Fri Nov 14 05:42:14 2003 +0000 +++ b/rational.c Sun Nov 16 19:23:39 2003 +0000 @@ -51,6 +51,10 @@ return b; } +/** + * Converts a double precission floating point number to a AVRational. + * @param max the maximum allowed numerator and denominator + */ AVRational av_d2q(double d, int max){ AVRational a; int exponent= FFMAX( (int)(log(ABS(d) + 1e-20)/log(2)), 0);