summaryrefslogtreecommitdiff
path: root/libavutil/rational.c
Commit message (Collapse)AuthorAge
* avutil/rational: Test av_rescale_rnd() with combinations of "special" valuesMichael Niedermayer2015-12-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/rational: use frexp rather than ad-hoc log to get floating point exponentGanesh Ajjanagadde2015-10-30
| | | | | | | | This simplifies and cleans up the code. Furthermore, it is much faster due to absence of the slow log computation. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil: Add av_q2intfloat()Michael Niedermayer2015-05-26
| | | | | | | This function allows writing AVRationals as IEEE floats without the need of platform dependant float operations Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/rational: Check that av_reduce() returns values within the requested maxMichael Niedermayer2014-12-29
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/rational: av_add_stable() test codeMichael Niedermayer2014-01-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/rational: avoid llrint() and rint()Michael Niedermayer2013-07-04
| | | | | | | | This should workaround issues with these functions on ia64 and sparc64 Fixes Ticket2713 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* av_d2q: Add a special case for |value| > MAX and |value| < 1/MAXMichael Niedermayer2013-05-31
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* av_d2q: Avoid llrint(), its not correctly implemented in old netbsdMichael Niedermayer2013-05-26
| | | | | | This should fix some fate failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* av_d2q: fix rounding for negative valuesMichael Niedermayer2013-05-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* av_d2q: Fix infinity checkMichael Niedermayer2013-05-25
| | | | | | | | The old check would fail on huge but not infinite values and the later code could then fail to handle them correctly in some cases. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d'Michael Niedermayer2013-05-16
|\ | | | | | | | | | | | | | | | | | | | | | | * commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d': Remove commented-out #includes h263dec: Remove broken and disabled debug cruft vc1: Reindent INIT_LUT(), align backslashes Conflicts: libavcodec/vc1.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove commented-out #includesDiego Biurrun2013-05-15
| |
| * libavutil: Remove pointless rational test program.Diego Biurrun2012-03-26
| |
* | replace av_log(0, by av_log(NULL,Michael Niedermayer2012-11-23
| | | | | | | | | | | | The first parameter is a pointer and NULL is more correct Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | rational: test add/sub tooMichael Niedermayer2012-11-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: adpcmenc: cosmetics: pretty-printing ac3dec: cosmetics: pretty-printing yuv4mpeg: cosmetics: pretty-printing shorten: remove dead initialization roqvideodec: set AVFrame reference before reget_buffer. bmp: fix some 1bit samples. latmdec: add fate test for audio config change oma: PCM support oma: better format detection with small probe buffer oma: clearify ambiguous if condition wavpack: Properly clip samples during lossy decode Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c. Cleaned pixdesc.c file in libavutil zmbv.c: coding style clean-up. xan.c: coding style clean-up. mpegvideo.c: code cleanup - first 500 lines. Conflicts: Changelog libavcodec/adpcmenc.c libavcodec/bmp.c libavcodec/zmbv.c libavutil/log.c libavutil/pixdesc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.Yordan Makariev2011-12-03
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rational-test: Add proper main() declaration to fix gcc warnings. configure: Add vdpau and dxva2 to configure results output. Remove unused, never built libavutil/pca.[ch] matroskadec: forward parsing errors to caller. av_find_stream_info: simplify EAGAIN handling. aacenc: Fix determination of Mid/Side Mode. psymodel: Remove the single channel analysis function aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel. psymodel: Add channels and channel groups to the psymodel. ARM: remove check for PLD instruction fate: move amr[nw]b test rules into separate files ogg: fix double free when finding length of small chained oggs. swscale: implement >8bit scaling support. build: fix creation of tools dir with make 3.81 build: Mark all-yes Makefile target as phony. pixfmt: fix YUV422/444 wrong endian comment build: create output directories as needed Add new yuv444 pixfmts to avcodec_align_dimensions2 Conflicts: Makefile configure libavutil/pca.c libavutil/pca.h libavutil/pixfmt.h libswscale/swscale.c libswscale/utils.c libswscale/x86/swscale_template.c tests/ref/lavfi/pixdesc tests/ref/lavfi/pixfmts_copy tests/ref/lavfi/pixfmts_null tests/ref/lavfi/pixfmts_scale tests/ref/lavfi/pixfmts_vflip Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rational-test: Add proper main() declaration to fix gcc warnings.Diego Biurrun2011-06-30
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add selftest code for av_cmp_q().Michael Niedermayer2010-10-05
| | | | Originally committed as revision 25339 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make av_d2q() manage the case in which the value to convert is inf.Stefano Sabatini2010-10-04
| | | | Originally committed as revision 25332 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Avoid cast of double nan to int.Stefano Sabatini2010-10-02
| | | | | | It may cause exceptions on some platform. Originally committed as revision 25311 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename libavutil/assert.h to avassert.hMåns Rullgård2010-10-01
| | | | | | This avoids conflicts with the system assert.h. Originally committed as revision 25284 to svn://svn.ffmpeg.org/ffmpeg/trunk
* av_assert() system.Michael Niedermayer2010-09-30
| | | | | | | With this the developer can now choose if he wants an assert always enabled or at which compile time assert level. This can thus replace the #define NDEBUG hacks Originally committed as revision 25278 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Convert NaN to 0/0 in av_d2qDavid Conrad2010-05-24
| | | | | | | This fixes aspect ratio calculation for encoding from files with 0/0 stored, common with ogg/theora Originally committed as revision 23280 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-01
| | | | | | | Otherwise doxygen complains about ambiguous filenames when files exist under the same name in different subdirectories. Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Use 'num' instead of 'nom' as abbreviation for numerator.Diego Biurrun2009-02-01
| | | | Originally committed as revision 16910 to svn://svn.ffmpeg.org/ffmpeg/trunk
* spelling/grammar/consistency review part IDiego Biurrun2009-01-28
| | | | Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Directly #include a bunch of indirectly #included headers.Diego Biurrun2009-01-24
| | | | Originally committed as revision 16748 to svn://svn.ffmpeg.org/ffmpeg/trunk
* export gcd function as av_gcd()Aurelien Jacobs2009-01-17
| | | | Originally committed as revision 16653 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Implement av_nearer_q() and av_find_nearest_q_idx() functions.Stefano Sabatini2008-09-25
| | | | Originally committed as revision 15415 to svn://svn.ffmpeg.org/ffmpeg/trunk
* license header consistency cosmeticsDiego Biurrun2007-07-05
| | | | Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move doxy comments from rational.c to rational.h and add some new commentsDujardin Bernard2007-02-26
| | | | | | patch by Dujardin Bernard %dujardin P iut A numericable P fr% Originally committed as revision 8132 to svn://svn.ffmpeg.org/ffmpeg/trunk
* fix av_reduce() with things like 1/0 and 0/0Michael Niedermayer2007-01-09
| | | | Originally committed as revision 7431 to svn://svn.ffmpeg.org/ffmpeg/trunk
* fix overflow and remove wrong commentMichael Niedermayer2006-11-30
| | | | Originally committed as revision 7187 to svn://svn.ffmpeg.org/ffmpeg/trunk
* return optimal fractionMichael Niedermayer2006-11-30
| | | | | | based on a patch by Uoti Urpala Originally committed as revision 7186 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ABS macro to FFABS.Diego Biurrun2006-10-11
| | | | Originally committed as revision 6666 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-07
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* simplifyMichael Niedermayer2006-07-20
| | | | Originally committed as revision 5802 to svn://svn.ffmpeg.org/ffmpeg/trunk
* for floats fabs is better & smaller then ABSMichael Niedermayer2006-07-20
| | | | Originally committed as revision 5801 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Update licensing information: The FSF changed postal address.Diego Biurrun2006-01-12
| | | | Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-17
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* libavutil: Utility code from libavcodec moved to a separate library.Alexander Strasser2005-08-01
Originally committed as revision 4489 to svn://svn.ffmpeg.org/ffmpeg/trunk