summaryrefslogtreecommitdiff
path: root/libavutil/mathematics.h
Commit message (Collapse)AuthorAge
* mathematics: Extend and edit DoxygenTimothy Gu2016-08-02
|
* mathematics: Make function prototypes identical to definitionsTimothy Gu2016-08-02
| | | | Doxygen gets confused by this.
* avutil/mathematics: correct documentation for av_gcdGanesh Ajjanagadde2015-10-30
| | | | | | | | | | | | | | | | av_gcd is now always defined regardless of input. This documents this change in the "documented API". Two benefits (closely related): 1. The function is robust, and there is no need to worry about INT64_MIN, etc. 2. Clients of av_gcd, like av_reduce, can now be made fully correct. Currently, av_reduce can trigger undefined behavior if e.g num is INT64_MIN due to integer overflow in the FFABS. Furthermore, this undefined behavior is completely undocumented, and could be a fuzzer's paradise. The FFABS was needed in the past as av_gcd was undefined for negative inputs. In order to make av_reduce robust, it is essential to guarantee that av_gcd works for all int64_t. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* fix various typosLou Logan2014-06-03
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Fix compilation with msvc/icl due to missing header and define.Matt Oliver2014-02-03
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/mathematics: add av_add_stable()Michael Niedermayer2014-01-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avutil/mathematics: fix 2 typos in the doxyMichael Niedermayer2014-01-03
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavu/math: fix than/then typo, and add a comma.Clément Bœsch2013-01-03
|
* av_rescale: support passing MIN/MAX throughMichael Niedermayer2013-01-03
| | | | | Reviewed-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavu: add more doxy to av_rescale_deltaMichael Niedermayer2012-10-27
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavu: add av_rescale_delta()Michael Niedermayer2012-10-27
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mathemathics: update copyright yearsMichael Niedermayer2012-10-27
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: opt/eval: Include mathematics.h for NAN/INFINITY mathematics: Don't use division by zero in NAN/INFINITY macros wma: Lower the maximum number of channels to 2 x86: cpu: clean up check for cpuid instruction support ARM: generate position independent code to access data symbols Conflicts: libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mathematics: Don't use division by zero in NAN/INFINITY macrosRonald S. Bultje2012-07-01
| | | | | | | | | | | | | | | | | | | | Some compilers, MSVC among them, don't recognize the divisions by zero as meaning infinity/nan. These macros should, according to the standard, expand to constant expressions, but this shouldn't matter for our usage. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Revert "mathematics.h: remove a couple of math defines"Carl Eugen Hoyos2012-06-22
| | | | | | | | | | | | | | | | This reverts commit a2b186a188c126dd0402414d9e8198ec4df63ebe. The defines were present for several years, removing them without a version bump may break API. (Fixes MPlayer compilation.)
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: MS Screen 1 decoder aacdec: Fix popping channel layouts. av_gettime: support Win32 without gettimeofday() Use av_gettime() in various places Move av_gettime() to libavutil dct-test: use emms_c() from libavutil instead of duplicating it mov: fix operator precedence bug mathematics.h: remove a couple of math defines Remove unnecessary inclusions of [sys/]time.h lavf: remove unnecessary inclusions of unistd.h bfin: libswscale: add const where appropriate to fix warnings bfin: libswscale: remove unnecessary #includes udp: Properly check for invalid sockets tcp: Check the return value from getsockopt network: Use av_strerror for getting error messages udp: Properly print error from getnameinfo mmst: Use AVUNERROR() to convert error codes to the right range for strerror network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows rtmp: Reduce the number of idle posts sent by sleeping 50ms Conflicts: Changelog configure libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dct-test.c libavcodec/version.h libavformat/riff.c libavformat/udp.c libavutil/Makefile libswscale/bfin/yuv2rgb_bfin.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mathematics.h: remove a couple of math definesJanne Grunau2012-06-20
| | | | | | | | | | | | | | | | While these defines are not defined by the C standard they are standardized as X/Open System Interfaces Extension. We use the appropiate _XOPEN_SOURCE define to make them available. They seem to be available on all FATE configs since the constants are used in files where mathematics.h is not included.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (36 commits) adpcmenc: Use correct frame_size for Yamaha ADPCM. avcodec: add ff_samples_to_time_base() convenience function to internal.h adx parser: set duration mlp parser: set duration instead of frame_size gsm parser: set duration mpegaudio parser: set duration instead of frame_size (e)ac3 parser: set duration instead of frame_size flac parser: set duration instead of frame_size avcodec: add duration field to AVCodecParserContext avutil: add av_rescale_q_rnd() to allow different rounding pnmdec: remove useless .pix_fmts libmp3lame: support float and s32 sample formats libmp3lame: renaming, rearrangement, alignment, and comments libmp3lame: use the LAME default bit rate libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing libmp3lame: cosmetics: remove some pointless comments libmp3lame: convert some debugging code to av_dlog() libmp3lame: remove outdated comment. libmp3lame: do not set coded_frame->key_frame. libmp3lame: improve error handling in MP3lame_encode_init() ... Conflicts: doc/APIchanges libavcodec/libmp3lame.c libavcodec/pcxenc.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/sgienc.c libavcodec/utils.c libavformat/hls.c libavutil/avutil.h libswscale/x86/swscale_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil: add av_rescale_q_rnd() to allow different roundingJustin Ruggles2012-02-20
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) aacdec: Fix PS in ADTS. avconv: Consistently use PIX_FMT_NONE. dsputil: use cpuflags in x86 emu_edge_core dsputil: use movups instead of movdqu in ff_emu_edge_core_sse() wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits. mov: Remove some redundant and obsolete comments. Add libavutil/mathematics.h #includes for INFINITY doxy: structure libavformat groups doxy: introduce an empty structure in libavcodec doxy: provide a start page and document libavutil doxy: cleanup pixfmt.h regtest: split video encode/decode tests into individual targets ARM: add explicit .arch and .fpu directives to asm.S pthread: do not touch has_b_frames avconv: cleanup the transcoding loop in output_packet(). avconv: split subtitle transcoding out of output_packet(). avconv: split video transcoding out of output_packet(). avconv: split audio transcoding out of output_packet(). avconv: reindent. avconv: move streamcopy-only code out of decoding loop. ... Conflicts: avconv.c libavcodec/aaccoder.c libavcodec/pthread.c libavcodec/version.h libavutil/audioconvert.h libavutil/avutil.h libavutil/mem.h tests/ref/vsynth1/dv tests/ref/vsynth1/mpeg2thread tests/ref/vsynth2/dv tests/ref/vsynth2/mpeg2thread Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * doxy: provide a start page and document libavutilLuca Barbato2011-11-22
| | | | | | | | | | | | Introduce a basic layout, the subpages are currently left empty. Split libavutil in multiple groups as example of the structure
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add the M_PHI constant, contains an approximation of the golden ratioStefano Sabatini2010-07-22
| | | | | | irrational number. Originally committed as revision 24439 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix grammar errors in documentationMåns Rullgård2010-06-30
| | | | Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix av_compare_mod() doxy.Stefano Sabatini2010-06-13
| | | | Originally committed as revision 23593 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add av_compare_mod()Michael Niedermayer2010-06-09
| | | | Originally committed as revision 23551 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add M_SQRT2 to the constants in mathematics.h.Alex Converse2010-04-09
| | | | Originally committed as revision 22825 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace @returns by @return.Benoit Fouet2010-03-30
| | | | Originally committed as revision 22729 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace many includes of libavutil/common.h with what is actually neededMåns Rullgård2010-03-09
| | | | | | | This reduces the number of false dependencies on header files and speeds up compilation. Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
* More accurate value for log2(10)Måns Rullgård2010-02-21
| | | | Originally committed as revision 21946 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace log2f(10) with a constantMåns Rullgård2010-02-20
| | | | Originally committed as revision 21924 to svn://svn.ffmpeg.org/ffmpeg/trunk
* av_compare_ts()Michael Niedermayer2010-02-07
| | | | Originally committed as revision 21671 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 2nd try on documenting av_gcd().Michael Niedermayer2009-12-27
| | | | Originally committed as revision 20939 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Document av_gcd().Michael Niedermayer2009-12-27
| | | | Originally committed as revision 20935 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define INFINITIY and NAN in mathematics.h if missingMåns Rullgård2009-08-10
| | | | Originally committed as revision 19611 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add common.h #include, necessary for av_const.Diego Biurrun2009-01-28
| | | | Originally committed as revision 16844 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
* export gcd function as av_gcd()Aurelien Jacobs2009-01-17
| | | | Originally committed as revision 16653 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Globally rename the header inclusion guard names.Stefano Sabatini2008-08-31
| | | | | | | | | Consistently apply this rule: the guard name is obtained from the filename by stripping the leading "lib", converting '/' and '.' to '_' and uppercasing the resulting name. Guard names in the root directory have to be prefixed by "FFMPEG_". Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move M_PI definition along with other math definitionsAurelien Jacobs2008-08-13
| | | | Originally committed as revision 14727 to svn://svn.ffmpeg.org/ffmpeg/trunk
* define some math constants so as not to depend on _XOPEN_SOURCEAurelien Jacobs2008-08-13
| | | | Originally committed as revision 14725 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reapply r12489: Add pure, const and malloc attributes to proper functionsZuxy Meng2008-03-19
| | | | | | | in libavutil. Fix a compilation failure in r12489. Originally committed as revision 12498 to svn://svn.ffmpeg.org/ffmpeg/trunk
* revert r12489.Benoit Fouet2008-03-18
| | | | Originally committed as revision 12490 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Pure, const and malloc attributes to libavutil.Zuxy Meng2008-03-18
| | | | | | | | | Patch by Zuxy Meng: zuxy meng gmail com Original thread: [FFmpeg-devel] [PATCH] Pure, const and malloc attributes to libavutil Date: 03/18/2008 6:09 AM Originally committed as revision 12489 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add missing stdint.h #include to headers that use it.Diego Biurrun2008-03-13
| | | | Originally committed as revision 12429 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add FFMPEG_ prefix to all multiple inclusion guards.Diego Biurrun2007-10-17
| | | | Originally committed as revision 10765 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
* Add official LGPL license headers to the files that were missing them.Diego Biurrun2006-09-10
| | | | Originally committed as revision 6219 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