aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/lib/ffmpeg/rational.pas
diff options
context:
space:
mode:
Diffstat (limited to 'Lua/src/lib/ffmpeg/rational.pas')
-rw-r--r--Lua/src/lib/ffmpeg/rational.pas66
1 files changed, 35 insertions, 31 deletions
diff --git a/Lua/src/lib/ffmpeg/rational.pas b/Lua/src/lib/ffmpeg/rational.pas
index 02d594ff..4b8a2dc8 100644
--- a/Lua/src/lib/ffmpeg/rational.pas
+++ b/Lua/src/lib/ffmpeg/rational.pas
@@ -1,5 +1,5 @@
(*
- * Rational numbers
+ * rational numbers
* Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
*
* This library is free software; you can redistribute it and/or
@@ -27,7 +27,13 @@
(*
* Conversion of libavutil/rational.h
- * revision 15415, Thu Sep 25 19:23:13 2008 UTC
+ * revision 16912, Sun Feb 1 02:00:19 2009 UTC
+ *
+ * update, MiSchi, no code change
+ * Fri Jun 12 2009 22:20:00 UTC
+ *
+ * update, MiSchi, no code change needed
+ * Sun Dec 6 2009 22:20:00 UTC
*)
unit rational;
@@ -49,9 +55,9 @@ uses
UConfig;
type
-(*
- * Rational number num/den.
- *)
+ (*
+ * rational number numerator/denominator
+ *)
PAVRational = ^TAVRational;
TAVRational = record
num: cint; ///< numerator
@@ -62,65 +68,65 @@ type
PAVRationalArray = ^TAVRationalArray;
(**
- * Compare two rationals.
+ * Compares two rationals.
* @param a first rational
* @param b second rational
- * @return 0 if a==b, 1 if a>b and -1 if a<b.
+ * @return 0 if a==b, 1 if a>b and -1 if a<b
*)
function av_cmp_q(a: TAVRational; b: TAVRational): cint; {$IFDEF HasInline}inline;{$ENDIF}
(**
- * Rational to double conversion.
+ * Converts rational to double.
* @param a rational to convert
* @return (double) a
*)
function av_q2d(a: TAVRational): cdouble; {$IFDEF HasInline}inline;{$ENDIF}
(**
- * Reduce a fraction.
+ * Reduces a fraction.
* This is useful for framerate calculations.
- * @param dst_nom destination numerator
+ * @param dst_num destination numerator
* @param dst_den destination denominator
- * @param nom source numerator
+ * @param num source numerator
* @param den source denominator
- * @param max the maximum allowed for dst_nom & dst_den
+ * @param max the maximum allowed for dst_num & dst_den
* @return 1 if exact, 0 otherwise
*)
-function av_reduce(dst_nom: PCint; dst_den: PCint; nom: cint64; den: cint64; max: cint64): cint;
+function av_reduce(dst_num: PCint; dst_den: PCint; num: cint64; den: cint64; max: cint64): cint;
cdecl; external av__util;
(**
* Multiplies two rationals.
- * @param b first rational.
- * @param c second rational.
- * @return b*c.
+ * @param b first rational
+ * @param c second rational
+ * @return b*c
*)
function av_mul_q(b: TAVRational; c: TAVRational): TAVRational;
cdecl; external av__util; {av_const}
(**
* Divides one rational by another.
- * @param b first rational.
- * @param c second rational.
- * @return b/c.
+ * @param b first rational
+ * @param c second rational
+ * @return b/c
*)
function av_div_q(b: TAVRational; c: TAVRational): TAVRational;
cdecl; external av__util; {av_const}
(**
* Adds two rationals.
- * @param b first rational.
- * @param c second rational.
- * @return b+c.
+ * @param b first rational
+ * @param c second rational
+ * @return b+c
*)
function av_add_q(b: TAVRational; c: TAVRational): TAVRational;
cdecl; external av__util; {av_const}
(**
* Subtracts one rational from another.
- * @param b first rational.
- * @param c second rational.
- * @return b-c.
+ * @param b first rational
+ * @param c second rational
+ * @return b-c
*)
function av_sub_q(b: TAVRational; c: TAVRational): TAVRational;
cdecl; external av__util; {av_const}
@@ -129,28 +135,26 @@ function av_sub_q(b: TAVRational; c: TAVRational): TAVRational;
* Converts a double precision floating point number to a rational.
* @param d double to convert
* @param max the maximum allowed numerator and denominator
- * @return (AVRational) d.
+ * @return (AVRational) d
*)
function av_d2q(d: cdouble; max: cint): TAVRational;
cdecl; external av__util; {av_const}
{$IF LIBAVUTIL_VERSION >= 49011000} // 49.11.0
-
(**
- * @return 1 if \q1 is nearer to \p q than \p q2, -1 if \p q2 is nearer
- * than \p q1, 0 if they have the same distance.
+ * @return 1 if q1 is nearer to q than q2, -1 if q2 is nearer
+ * than q1, 0 if they have the same distance.
*)
function av_nearer_q(q, q1, q2: TAVRational): cint;
cdecl; external av__util;
(**
- * Finds the nearest value in \p q_list to \p q.
+ * Finds the nearest value in q_list to q.
* @param q_list an array of rationals terminated by {0, 0}
* @return the index of the nearest value found in the array
*)
function av_find_nearest_q_idx(q: TAVRational; q_list: {const} PAVRationalArray): cint;
cdecl; external av__util;
-
{$IFEND}
implementation