mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 13:11:06 +00:00
utils: Fix doc warnings in gst_utils_simplify_fraction
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4793>
This commit is contained in:
parent
9f70328b70
commit
56b9c4772f
2 changed files with 12 additions and 9 deletions
|
@ -53908,23 +53908,26 @@ if the conversion worked or not.</doc>
|
|||
</parameters>
|
||||
</function>
|
||||
<function name="util_simplify_fraction" c:identifier="gst_util_simplify_fraction" version="1.24">
|
||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstutils.c">Calculates the simpler representation of @a and @b.
|
||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstutils.c">Calculates the simpler representation of @numerator and @denominator and
|
||||
update both values with the resulting simplified fraction.
|
||||
|
||||
Simplify a fraction using a simple continued fraction decomposition.
|
||||
The idea here is to convert fractions such as 333333/10000000 to 1/30
|
||||
using 32 bit arithmetic only. The algorithm is not perfect and relies
|
||||
upon two arbitrary parameters to remove non-significative terms from
|
||||
the simple continued fraction decomposition. Using 8 and 333 for
|
||||
n_terms and threshold respectively seems to give nice results.</doc>
|
||||
@n_terms and @threshold respectively seems to give nice results.</doc>
|
||||
<source-position filename="../subprojects/gstreamer/gst/gstutils.h"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="numerator" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstutils.c">First value as #gint</doc>
|
||||
<type name="gint" c:type="gint*"/>
|
||||
</parameter>
|
||||
<parameter name="denominator" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstutils.c">Second value as #gint</doc>
|
||||
<type name="gint" c:type="gint*"/>
|
||||
</parameter>
|
||||
<parameter name="n_terms" transfer-ownership="none">
|
||||
|
@ -53932,6 +53935,7 @@ n_terms and threshold respectively seems to give nice results.</doc>
|
|||
<type name="guint" c:type="guint"/>
|
||||
</parameter>
|
||||
<parameter name="threshold" transfer-ownership="none">
|
||||
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstutils.c">threshold (typical value: 333)</doc>
|
||||
<type name="guint" c:type="guint"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
|
|
|
@ -3675,21 +3675,20 @@ gst_util_greatest_common_divisor_int64 (gint64 a, gint64 b)
|
|||
|
||||
/**
|
||||
* gst_util_simplify_fraction:
|
||||
* @a: First value as #gint
|
||||
* @b: Second value as #gint
|
||||
* @numerator: First value as #gint
|
||||
* @denominator: Second value as #gint
|
||||
* @n_terms: non-significative terms (typical value: 8)
|
||||
* @threashold: threshold (typical value: 333)
|
||||
* @threshold: threshold (typical value: 333)
|
||||
*
|
||||
* Calculates the simpler representation of @a and @b.
|
||||
* Calculates the simpler representation of @numerator and @denominator and
|
||||
* update both values with the resulting simplified fraction.
|
||||
*
|
||||
* Simplify a fraction using a simple continued fraction decomposition.
|
||||
* The idea here is to convert fractions such as 333333/10000000 to 1/30
|
||||
* using 32 bit arithmetic only. The algorithm is not perfect and relies
|
||||
* upon two arbitrary parameters to remove non-significative terms from
|
||||
* the simple continued fraction decomposition. Using 8 and 333 for
|
||||
* n_terms and threshold respectively seems to give nice results.
|
||||
*
|
||||
* Returns: simple representation of @a and @b
|
||||
* @n_terms and @threshold respectively seems to give nice results.
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue