Commit Graph

89560 Commits

Author SHA1 Message Date
Michael Niedermayer 610dd74502 avcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED()
Fixes: runtime error: signed integer overflow: 2147483646 + 2048 cannot be represented in type 'int'
Fixes: 4479/clusterfuzz-testcase-minimized-6529894147162112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-06 22:09:25 +01:00
Michael Niedermayer 5e9a13a5a3 avcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97*
Fixes: 4478/clusterfuzz-testcase-minimized-4752113767809024
Fixes: runtime error: signed integer overflow: -2147483626 + -319489 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-06 22:09:25 +01:00
James Almer d6d605eb05 avformat/mux: stop delaying writing the header
Every bitstream filter behaves as intended now, so there's no need to
wait for the first packet of every stream.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-06 15:43:59 -03:00
Nikolas Bowe 5a412a5c3c avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-06 18:27:09 +01:00
Paul B Mahol 53855e3c04 avfilter: add setrange filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-06 15:42:23 +01:00
Michael Niedermayer c8bd2c7d09 tests/fate/mov: Fix fate-mov-invalid-elst-entry-count failure on ARM
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-06 01:04:35 +01:00
sfan5 d3a2100c67 fate/hevc: add skip_loop_filter test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-05 19:56:40 +01:00
Jim DeLaHunt d1266d9fa3
doc/developer: revise mailing list section
The Developer Documentation had instructions to
subscribe to the ffmpeg-cvslog email list. But that is
no longer accurate. For the purposes in this section --
review of patches, discussion of development issues --
ffmpeg_devel is the appropriate email list. Some developers
may want to monitor ffmpeg-cvslog, but it is not mandatory.

This is v3 of this doc, based on discussion in thread
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/220528.html>
and in response to docs Maintainer comments in
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-December/221596.html>.

1. In doc/developer.texi, add a new section about
ffmpeg-devel, based on existing text from ffmpeg-cvslog
section regarding discussion of patches and of
development issues. Reflect wording from discussion at
<https://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/221199.html>
but with copy-editing to make wording more concise.

2. In doc/developer.texi, rewrite the ffmpeg-cvslog section
to match the current usage of ffmpeg-cvslog. Some
developers choose to follow this list, but it is not
mandatory.

There are a lot of improvements possible to the
Developer Documentation page, beyond this refactoring.
However, making those improvements is a much bigger
and more difficult task.  This change is "low hanging
fruit".

Signed-off-by: Jim DeLaHunt <from.ffmpeg-dev@jdlh.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2017-12-05 02:06:10 -08:00
Mark Thompson 71421f382f vaapi_h265: Add named options for setting profile and level
Also fixes the default, which previously contained a nonsense value.
2017-12-04 23:25:37 +00:00
Mark Thompson c490fc9536 vaapi_h264: Add named options for setting profile and level 2017-12-04 23:25:32 +00:00
Mark Thompson 9f7cc87baf rkmpp: Add hardware config information
This is not strictly required here because the rkmpp decoder does not
call ff_get_format(), but it may be helpful metadata for users.
2017-12-04 23:21:35 +00:00
Paul B Mahol 312b00de8f avfilter/vf_convolution: add 7x7 filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-04 21:32:29 +01:00
James Almer cc2ba526d4 x86/vf_threshold: make threshold8 functions work on x86_32
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-04 15:46:09 -03:00
James Almer bfd7f07b65 fate/checkasm: add missing target for vf_threshold test
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-04 15:46:09 -03:00
James Almer 1b324700e3 checkasm/vf_threshold: fix mixed code and declarations
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-04 15:46:09 -03:00
sfan5 942eafcf08 libavcodec/hevc_filter: support for all skip_loop_filter levels.
Continues where commit 52c75d486e left off.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-04 19:05:36 +01:00
Steven Liu d67c1dda40 avformat/hlsenc: fix compiling error when disable-network 2017-12-04 23:52:17 +08:00
Paul B Mahol 5ff0d2acae avfilter/x86/vf_hflip.asm: fix building on x32
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-04 15:08:43 +01:00
Rostislav Pehlivanov e836a0b3fd fate-opus: update tests to use new decoder outputs
Can't overwrite old ones.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-12-04 10:51:19 +00:00
Rostislav Pehlivanov 7b46add725 opus_pvq: do not compile encoding/decoding code if the encoder/decoder is disabled
This should save quite a bit of space if either has been disabled for size reasons.
Could just check if the encoding flag is set during runtime on every single location,
however the overhead of branch misses would somewhat decrease performance.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-12-04 10:51:19 +00:00
Rostislav Pehlivanov ce87e630fa opus_celt: deduplicate band quantization/dequantization function
No point in having the same code twice to do exactly the same thing.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-12-04 10:51:19 +00:00
Paul B Mahol 86fda8be3f avfilter: add hflip x86 SIMD
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-04 09:58:25 +01:00
Rostislav Pehlivanov d1d6f965d8 fate-opus: update to match the changes from RFC8251
Also change note to say that we compare against the officially decoded
samples rather than our own, this was changed long ago.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-12-04 07:28:45 +00:00
Rostislav Pehlivanov 1b8649c2ce opus: add an option to toggle intensity stereo phase inversion
Due to a somewhat high volume of complains, phase inversion has
been made optional with RFC8251. This allows for better bass
frequency response when partially downmixing to play on systems
with an LFE speaker.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-12-04 07:28:45 +00:00
Andrew D'Addesio fe05f93013 opus: Add Special Hybrid Folding (per RFC8251)
This decoder-side change, introduced in RFC 8251 (section 9), slightly
improves the decoded quality of 16kbps speech in Hybrid Mode.

Differences can be seen/heard in testvector05.bit, testvector06.bit,
and testvector12.bit in the RFC 6716/8251 testvectors found here:
https://people.xiph.org/~greg/opus_testvectors/

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2017-12-04 07:28:45 +00:00
Andrew D'Addesio de052ea454 opus_celt: Fix arithmetic overflow (per RFC8251)
As per Sec.8 of RFC8251:
    Cap on Band Energy
    NaN due to large log-energy value. Affects celt_denormalize().

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2017-12-04 07:28:45 +00:00
Andrew D'Addesio 511e6f17f4 opus_silk: Fix arithmetic overflow (per RFC8251)
As per Sec.6 of RFC8251:
    Integer Wrap-Around in Inverse Gain Computation
    32-bit integer overflow in Levinson recursion. Affects
    silk_is_lpc_stable().

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2017-12-04 07:28:45 +00:00
Andrew D'Addesio 9b45bcf713 libavutil: Add saturating subtraction functions
Add av_sat_sub32 and av_sat_dsub32 as the subtraction analogues to
av_sat_add32/av_sat_dadd32.

Also clarify the formulas for dadd32/dsub32.

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2017-12-04 07:28:45 +00:00
James Almer b73304f79e x86vf_threshold/: use the PBLENDVB macro
Fixes building with yasm

Tested-by: stevenliu
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-04 02:22:30 -03:00
Steven Liu 1cfde7abd0 avformat/dashenc: add avpriv_io_move return value check
fix cid: 1424883

Suggested-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:06:26 +08:00
Steven Liu ad6946b818 avformat/hlsplaylist: add return value check of strftime
fix CID: 1424884
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:05:04 +08:00
Steven Liu 071f47649c avformat/hlsplaylist: add int type of API ff_hls_write_file_entry
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:03:37 +08:00
Robert Nagy 31b351ea81 avformat/hlsenc: fix baseurl missing last char
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-04 12:00:13 +08:00
Carl Eugen Hoyos 894f1c399b lavf/mov: Fix missing newline. 2017-12-04 04:15:49 +01:00
Marton Balint 5a93a85fd0 avformat/mxfdec: fix last packet timestamps
The current edit unit cannot be reliably determined for the last packet of a
video stream, because we can't query the start offset of the next edit unit
from the index. This caused missing timestamps for the last video packet.

Therefore from now on, we allow setting the PTS even if we are not sure of the
current edit unit if mxf_set_current_edit_unit returned a specific failure, and
the assumed current edit unit is the last.

Fixes last packet timestamp of:
ffprobe -fflags nofillin -show_packets tests/data/lavf/lavf.mxf -select_streams v

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-03 21:06:47 +01:00
Martin Vignali 6e3e696591 avfilter/x86/vf_threshold : cosmetic indent 2017-12-03 19:17:28 +01:00
Martin Vignali 9719d57b34 avfilter/x86/vf_threshold : add avx2 version for threshold 8 2017-12-03 19:17:23 +01:00
Martin Vignali 51345cb1d5 avfilter/x86/vf_threshold : make macro for threshold8 in order to add avx2 version 2017-12-03 19:17:19 +01:00
Martin Vignali cfce442750 checkasm/vf_threshold : add checkasm test for threshold8 2017-12-03 19:17:15 +01:00
Martin Vignali fa470384ea avfilter/vf_threshold : move context func init in ff_threshold_init 2017-12-03 19:17:11 +01:00
Jim DeLaHunt 42a22d01d1
doc: reorganize developer.texi chapter hierarchy
Previously, the Developer Documentation <ffmpeg.org/developer.html>
contained a single chapter, "1. Developer Guide," with all content under
that single chapter. Thus the document structure was one level deeper
and more complicated than it needed to be.  It differed from similar
documents such as /faq.html, which have multiple chapters.

Eliminate the single chapter, and promote each section underneath to
chapter, and each subsection to section. Thus content and relative
structure remains the same, but the overall structure is simpler.
Anchors within the page remain the same.

Signed-off-by: Jim DeLaHunt <from.ffmpeg-dev@jdlh.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2017-12-02 21:07:48 -08:00
Michael Niedermayer 4bb7d72bcf avcodec/h264_parse: Treat escaped and unescaped decoding error equal in decode_extradata_ps_mp4()
Fixes: lorex.mp4
Fixes: ticket6762

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-03 02:23:35 +01:00
Paul B Mahol 225341b20d avfilter/vf_stack: always copy SAR from first input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-02 23:29:49 +01:00
John Stebbins 00d454ed2c lavf/movenc: add sdtp (sample dependency) box
The sdtp is required by the AppleTV 4K in order to play 2160p60 video.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-02 19:14:34 +01:00
Dale Curtis 09494d0984 avformat/oggdec: Respect AVERROR codes returned by ogg parsers.
Fixes ticket #6804. All of the ogg header and packet parsers may
return standard AVERROR codes; these return values should not be
treated as success.

Additionally changes oggparsevorbis, to not give up too early
with certain types of poorly muxed files.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-02 19:14:23 +01:00
Thomas Köppe 53c492640c avutil/mem: Add DECLARE_ASM_ALIGNED macro for DJGPP architecture.
The macro was added in 43171a2a73, but I forgot to add it to the DJGPP architecture in that change.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-02 19:14:09 +01:00
Martin Vignali be6d1f9632 avcodec/x86/bswapdsp : use macro for 128 bits constants loading in xmm or ymm 2017-12-02 18:25:25 +01:00
Martin Vignali b37196adff avutil/x86util : add macro for loading a 128 bits constants in an xmm or in each part of an ymm in order to simplify avx2 asm func 2017-12-02 18:25:15 +01:00
Mark Thompson e171022c24 vaapi: Make the decode profile matching more explicit
Also fixes a bug where it could attempt to decode with an unsupported
codec if allow-profile-mismatch was set.
2017-12-02 15:21:31 +00:00
Jun Zhao 4b57f06447 vaapi_h264: Fix VUI max_dec_frame_buffering
This should refer to the existing SPS structure, not the VAAPI sequence
parameter buffer (which is not yet initialised).

From ffmpeg commit f31478ba14.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-12-02 15:21:31 +00:00