- 21 Nov, 2015 6 commits
-
-
Ganesh Ajjanagadde authored
This improves the mathematical behavior of hypotenuse computation. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
It is known that the naive sqrt(x*x + y*y) approach for computing the hypotenuse suffers from overflow and accuracy issues, see e.g http://www.johndcook.com/blog/2010/06/02/whats-so-hard-about-finding-a-hypotenuse/. This adds hypot support to FFmpeg, a C99 function. On platforms without hypot, this patch does a reaonable workaround, that although not as accurate as GNU libm, is readable and does not suffer from the overflow issue. Improvements can be made separately. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
isnan and isinf are actually macros as per the standard. In particular, the existing implementation has incorrect signature. Furthermore, this results in undefined behavior for e.g double values outside float range as per the standard. This patch corrects the undefined behavior for all usage within FFmpeg. Note that long double is not handled as it is not used in FFmpeg. Furthermore, even if at some point long double gets used, it is likely not needed to modify the macro in practice for usage in FFmpeg. See below for analysis. Getting long double to work strictly per the spec is significantly harder since a long double may be an IEEE 128 bit quad (very rare), 80 bit extended precision value (on GCC/Clang), or simply double (on recent Microsoft). On the other hand, any potential future usage of long double is likely for precision (when a platform offers extra precision) and not for range, since the range anyway varies and is not as portable as IEEE 754 single/double precision. In such cases, the implicit cast to a double is well defined and isinf and isnan should work as intended. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Daniil Cherednik authored
This also adds a new fate test Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Timothy Gu authored
-
- 20 Nov, 2015 18 commits
-
-
Andreas Cadhalpun authored
Doing that doesn't make sense, because the only purpose of sbr_dequant is to process the data from read_sbr_data. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-
Paul B Mahol authored
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-
Michael Niedermayer authored
This should fix a infinite loop Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
server_attached is newly added so the demuxer knows if there is an attached server that can update the write index. This is needed to fix a infinite loop Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Rodger Combs authored
Also rearranged the relevant check to reduce code duplication Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Maksym Veremeyenko authored
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Maksym Veremeyenko authored
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
-
Ganesh Ajjanagadde authored
The ad-hoc pi constant has a ludicrous number of digits that offer no value whatsoever. M_PI is more consistent and readable across the codebase. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
Ganesh Ajjanagadde authored
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-
wm4 authored
If videotoolbox_common_end_frame failed, then the AVFrame was returned to the API user with the dummy buffer (in AVFrame.buf[0]) still set, and the decode call indicating success. These "half-set" AVFrames with dummy buffer are a videotoolbox specific hack, because the decoder requires an allocated AVFrame for its internal logic. Videotoolbox on the other hand allocates its frame itself internally, and outputs it only on end_frame. At this point, the dummy buffer is replaced with the real frame (unless decoding fails).
-
Michael Niedermayer authored
The replaced check should have become redundant Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
- 19 Nov, 2015 13 commits
-
-
Andreas Cadhalpun authored
It is used as size argument of ff_canopus_parse_info_tag, which uses it as size argument to bytestream2_init, which only supports sizes up to INT_MAX. Changing it's type to unsigned simplifies the check. Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-
Paul B Mahol authored
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-
James Almer authored
Signed-off-by: James Almer <jamrial@gmail.com>
-
James Almer authored
Signed-off-by: James Almer <jamrial@gmail.com>
-
Derek Buitenhuis authored
* commit '1fc94724': xtea: Clarify that the current API works in big endian mode Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Derek Buitenhuis authored
These are all no-op merges. * commit '7b2211bf': dds: add missing newline to log messages dds: validate compressed source buffer size dds: validate source buffer size before copying Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Derek Buitenhuis authored
* commit 'b5f963bf': mov: Drop dref when unable to parse Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Derek Buitenhuis authored
* commit '303f9319': mov: Correctly store dref paths Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Derek Buitenhuis authored
* commit 'e25cac50': lavc: Add missing mem.h header to libxvid and screenpresso Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Derek Buitenhuis authored
* commit '73b03249': aiff: Support demuxing G.722 streams Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Michael Niedermayer authored
The replaced check should have become redundant Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
This allows removing a special case for the fixed point decoder and will make error checks simpler Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
- 18 Nov, 2015 3 commits
-
-
Michael Niedermayer authored
This should avoid some tsan warnings Found-by: Chris Cunningham <chcunningham@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
Andreas Cadhalpun authored
Previously only the edit_rate of material_track was checked. If it's negative, it causes assertion failures in av_rescale_rnd. Reviewed-by: Tim Nicholson <nichot20-at-yahoo.com@ffmpeg.org> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-
Michael Niedermayer authored
In case of bitstream errors the deblock filter and slices can access uninitialized top_borders from previous slices which did not fill them as they stoped halfway due to error or where entirely missing. This also makes code using these tables deterministic in case of missing or damaged slices Found-by: Tyson Smith Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-