FFmpeg git repo
Go to file
Ganesh Ajjanagadde b7fb7c4542 avutil/mathematics: make av_gcd more robust
This ensures that no undefined behavior is invoked, while retaining
identical return values in all cases and at no loss of performance
(identical asm on clang and gcc).
Essentially, this patch exchanges undefined behavior with implementation
defined behavior, a strict improvement.

Rationale:
1. The ideal solution is to have the return type a uint64_t. This
unfortunately requires an API change.
2. The only pathological behavior happens if both arguments are
INT64_MIN, to the best of my knowledge. In such a case, the
implementation defined behavior is invoked in the sense that UINT64_MAX
is interpreted as INT64_MIN, which any reasonable implementation will
do. In any case, any usage where both arguments are INT64_MIN is a
fuzzer anyway.
3. Alternatives of checking, etc require branching and lose performance
for no concrete gain - no client cares about av_gcd's actual value when
both args are INT64_MIN. Even if it did, on sane platforms (e.g all the
ones FFmpeg cares about), it produces a correct gcd, namely INT64_MIN.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:13:55 -04:00
compat
doc doc/general.texi: fix SDX2 description 2015-10-29 21:29:47 +01:00
libavcodec avcodec/zmbvenc: use log2 instead of log()/M_LN2 2015-10-29 18:46:00 -04:00
libavdevice Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
libavfilter avfilter/avf_showvolume: use log10 instead of log()/M_LN10 2015-10-29 19:10:49 -04:00
libavformat avformat: stop exporting ffurl_read_complete, ffurl_seek and ffurl_size 2015-10-29 23:48:13 +01:00
libavresample
libavutil avutil/mathematics: make av_gcd more robust 2015-10-29 19:13:55 -04:00
libpostproc
libswresample swr: do not reject channel layouts that use channel 63 2015-10-28 19:25:49 +01:00
libswscale swscale: rename sws_rgb2rgb_init to ff_sws_rgb2rgb_init 2015-10-29 23:49:46 +01:00
presets
tests vp9: update timestamps in ref files using multiple invisible frames. 2015-10-29 07:55:12 -04:00
tools Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
.gitattributes
.gitignore
.travis.yml
arch.mak
Changelog avformat: add DC STR demuxer 2015-10-29 21:26:43 +01:00
cmdutils_common_opts.h
cmdutils_opencl.c
cmdutils.c Merge commit 'fe66671bd5f446f8d0a9c70968ba8fe891efe028' 2015-10-27 14:06:30 +01:00
cmdutils.h
common.mak
configure avfilter/showcqt: fix compilation with libswscale disabled 2015-10-29 02:11:58 -03:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
ffmpeg_dxva2.c
ffmpeg_filter.c
ffmpeg_opt.c
ffmpeg_qsv.c
ffmpeg_vdpau.c
ffmpeg_videotoolbox.c
ffmpeg.c ffmpeg: use log10 instead of log()/log(10) 2015-10-29 19:05:29 -04:00
ffmpeg.h
ffplay.c Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
ffprobe.c ffprobe: Remove abort() 2015-10-28 10:12:15 +01:00
ffserver_config.c
ffserver_config.h
ffserver.c Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
INSTALL.md
library.mak
LICENSE.md
MAINTAINERS
Makefile
README.md
RELEASE
version.sh

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • ffserver is a multimedia streaming server for live broadcasts.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process. Few developers follow pull requests so they will likely be ignored.