diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-24 14:19:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-26 18:31:53 +0200 |
commit | 1fb9b2a2832444935c4c2fd5679266b0629d1bfd (patch) | |
tree | 9baac009633492f6c6b4d2e587ee7a7723d5b3b4 /libavutil/rational.h | |
parent | 894d8cf418aafc5f6dd697f57e24f3e96b6af2f3 (diff) | |
download | ffmpeg-1fb9b2a2832444935c4c2fd5679266b0629d1bfd.tar.gz |
avutil: Add av_q2intfloat()
This function allows writing AVRationals as IEEE floats without the need
of platform dependant float operations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/rational.h')
-rw-r--r-- | libavutil/rational.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/rational.h b/libavutil/rational.h index 7439701db2..2897469680 100644 --- a/libavutil/rational.h +++ b/libavutil/rational.h @@ -160,6 +160,13 @@ int av_nearer_q(AVRational q, AVRational q1, AVRational q2); int av_find_nearest_q_idx(AVRational q, const AVRational* q_list); /** + * Converts a AVRational to a IEEE 32bit float. + * + * The float is returned in a uint32_t and its value is platform indepenant. + */ +uint32_t av_q2intfloat(AVRational q); + +/** * @} */ |