diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-06-09 17:27:42 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-06-09 17:27:42 +0000 |
commit | 65db0587a8f3233afa67e870aac38c494314ebeb (patch) | |
tree | 937511ddce80d73e8c31b6cf91a0bf35255abcbb /libavutil/mathematics.h | |
parent | 130b096aea6e91cff4b608f9ef61e9c96e3166d1 (diff) | |
download | ffmpeg-65db0587a8f3233afa67e870aac38c494314ebeb.tar.gz |
Add av_compare_mod()
Originally committed as revision 23551 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/mathematics.h')
-rw-r--r-- | libavutil/mathematics.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/mathematics.h b/libavutil/mathematics.h index e198aef8cb..889ce959fd 100644 --- a/libavutil/mathematics.h +++ b/libavutil/mathematics.h @@ -94,5 +94,14 @@ int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const; */ int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); +/** + * Compare 2 integers modulo mod. + * That is we compare integers a and b for which only the least significant log2(mod) bits are known + * @param mod must be a power of 2 + * @returns a negative value if a is smaller than b + * a positiv value if a is greater than b + * 0 if a equals b + */ +int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod); #endif /* AVUTIL_MATHEMATICS_H */ |