Commit Graph

93290 Commits

Author SHA1 Message Date
Martin Vignali 3278ea67c8 avcodec/qtrle : 32bpp dec copy two raw argb value at the same time
benchmark on x86_64 :
38 fps -> 40 fps
2019-03-04 13:03:42 +01:00
Martin Vignali 5496a73488 avcodec/qtrle : avoid swap in 32bpp decoding on little endian
improve speed on little endian

benchmark on x86_64 :
mainly raw : 33fps -> 38fps
mainly rle : 128fps -> 153 fps
2019-03-04 13:03:39 +01:00
Martin Vignali 9cb576fc1e fate/qtrle : change 32b test to output bgra instead of rgb24 2019-03-04 13:03:34 +01:00
Jan Ekström 4635f64953 lavc/libx265: signal CPB properties through side data
This way values such as maxrate/bufsize can be utilized
further down the chain.
2019-03-03 23:42:27 +02:00
Paul B Mahol 17008a0107 avcodec/hcom: check that index into array is valid 2019-03-03 20:21:20 +01:00
Paul B Mahol a367a932d3 avcodec/utils: remove commented out obsolete code 2019-03-03 18:43:22 +01:00
Michael Niedermayer b819472995 avcodec/qpeg: Limit copy in qpeg_decode_intra() to the available bytes
Fixes: Timeout (27 sec -> 39 milli sec)
Fixes: 13151/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-5717536023248896

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-03 13:17:02 +01:00
Michael Niedermayer 951bb7632f avcodec/aic: Check remaining bits in aic_decode_coeffs()
Fixes: Timeout (78 seconds -> 2 seconds)
Fixes: 13186/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AIC_fuzzer-5639516533030912

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-03 13:17:02 +01:00
Michael Niedermayer 5cf42f65b6 avcodec/gdv: Check for truncated tags in decompress_5()
Testcase: 13169/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5666354038833152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-03 13:17:02 +01:00
Michael Niedermayer b8ecadec05 avcodec/bethsoftvideo: Check block_type
Fixes: Timeout (17 seconds -> 1 second)
Fixes: 13184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BETHSOFTVID_fuzzer-5711446296494080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-03 13:17:02 +01:00
Michael Niedermayer 1eb35eb50e avcodec/diracdec: Correct max pixels check
Dirac internally allocates 5 images per plane and frame currently. One being the actual
image the other 4 being filtered for motion compensation.

Fixes: Out of memory
Fixes: 12870/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5684825871089664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-03 13:17:02 +01:00
Gyan Doshi 73b62f3026 doc/protocols: move option follow entry to correct section
The entry for file protocol option 'follow' was inserted under ftp options
during merge of a Libav commit - 90eb249969. Corrected.
2019-03-03 10:59:00 +05:30
Gyan Doshi fda793f6fa configure: select rotation filters for ffmpeg
autorotate is enabled by default in ffmpeg so the rotation filters
are required and will be attempted for insertion without the user's
knowledge if an input stream has rotation side-data.
2019-03-02 20:49:12 +05:30
Michael Niedermayer 3b23eb283a tools/target_dec_fate.list: Add testcases for #2000 to #4000
Testcases which return 403 currently are commented out

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-01 23:25:08 +01:00
Michael Niedermayer b7140a4db5 tools/target_dec_fate.sh: Add support for lines that are comments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-01 23:25:08 +01:00
Michael Niedermayer 4801eea0d4 avcodec/jpeg2000dwt: Fix integer overflow in dwt_decode97_int()
Fixes: runtime error: signed integer overflow: 2147483598 + 128 cannot be represented in type 'int'
Fixes: 12926/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5705100733972480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-01 23:25:08 +01:00
Marton Balint 694d9d5368 avcodec/get_bits: add assertion to limit ouptut value of get_bits
Should fix the following Coverity false positives:

Coverity CID #1415651.
Coverity CID #1420392.
Coverity CID #1420473.
Coverity CID #1433770.
Coverity CID #1435320.
Coverity CID #1439573.
Coverity CID #1439580.
Coverity CID #1439588.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:33:58 +01:00
Marton Balint 902e9334aa avcodec/get_bits: use unsigned integers in show_bits and get_bits
The return value is also unsigned.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:33:55 +01:00
Marton Balint 9f8854cb5a avcodec/avpacket: add some assertions to ensure pkt->data is not null if pkt->size > 0
This should fix the following Coverity false positives:

Coverity CID #1405450.
Coverity CID #1430930.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:32:32 +01:00
Marton Balint 57580e2ab6 avformat/utils: fix indentation
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:31:00 +01:00
Marton Balint d4ae28e494 avformat/utils: be even more strict about stream specifiers
After this change we always parse the full specifier even if we know the result
in the middle of the parsing. Sligtly slower, but this is needed to
consistently reject incorrect specifiers in both matching and non-matching
cases.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:31:00 +01:00
Marton Balint 24e0e149ad avformat/utils: be more strict about stream specifiers
This reworks the code to be more strict about accepting stream specifiers. From
now on we strictly enforce the syntax in the documentation up until the
decisive part of the stream specifier. Therefore matching stream specifiers
always need to be correct, non matching specifiers only need to be correct
until the decisive part.

Also recursion is changed to a simple loop.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:31:00 +01:00
Marton Balint 837f2c9798 avformat/mpegtsenc: write format_identifier HEVC for HEVC streams
This improves compatibility with some consumer (LG WebOS) TVs which apparently
search a HEVC descriptor (which our mpegts muxer can't generate) or a format
identifier.

Since the HEVC format identifier is not registered (but used in the wild), it is
not written if strict_std_compliance is higher than normal.

This fixes the issue in ticket #7744.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:30:13 +01:00
Marton Balint fe36dcbff2 avformat/mpegtsenc: factorize writing registration_descriptor
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-01 22:30:13 +01:00
Paul B Mahol 007c13e51e avfilter/af_anlmdn: add output mode option 2019-03-01 16:38:59 +01:00
Timo Rothenpieler 85051febc6 configure: update minimum required ffnvcodec versions
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Timo Rothenpieler c775410f31 configure: pass windows-path to nvcc whenever cygpath is available
It might be using cl.exe on Windows, which does not understand Unix-Paths.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Philip Langdale 114ead9735 configure: deprecate cuda_sdk dependency option
With all of our existing users of cuda_sdk switched over to ffnvcodec,
we could remove cuda_sdk completely and say that we should no longer
add code that requires the full sdk, and rather insist that such code
only use ffnvcodec.

As discussed previously, the use of nvcc from the sdk is still
supported with a distinct option.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Philip Langdale b4c9c09915 avfilter/vf_thumbnail_cuda: Switch to using ffnvcodec
This change switches the vf_thumbnail_cuda filter from using the
full cuda sdk to using the ffnvcodec headers and loader.

Most of the change is a direct mapping, but I also switched from
using texture references to using texture objects. This is supposed
to be the preferred way of using textures, and the texture object API
is the one I added to ffnvcodec.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Philip Langdale 2544c7ea67 avfilter/vf_scale_cuda: Switch to using ffnvcodec
This change switches the vf_scale_cuda filter from using the
full cuda sdk to using the ffnvcodec headers and loader.

Most of the change is a direct mapping, but I also switched from
using texture references to using texture objects. This is supposed
to be the preferred way of using textures, and the texture object API
is the one I added to ffnvcodec.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Philip Langdale 7debf4277c avfilter/vf_yadif_cuda: Switch to using ffnvcodec
This change switches the vf_thumbnail_cuda filter from using the
full cuda sdk to using the ffnvcodec headers and loader.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Philip Langdale 5f47bfd50a configure: Add an explicit check and option for nvcc
The use of nvcc to compile cuda kernels is distinct from the use of
cuda sdk libraries and linking against those libraries. We have
previously not bothered to distinguish these two cases because all
the filters that used cuda kernels also used the sdk. In the following
changes, I'm going to remove the sdk dependency from those filters,
but we need a way to ensure that nvcc is present and functioning, and
also a way to explicitly disable its use so that the filters are not
built.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-02-27 18:03:17 +01:00
Martin Vignali b38dd2d219 fate/proresenc_aw : add test for interlace and 444 encoding 2019-02-27 17:59:53 +01:00
Martin Vignali a3f65f5e9f avcodec/proresenc_aw : fix sub_image_with_fill for interlaced encoding
used when width and/or height, not multiple of sclice dim
2019-02-27 17:59:48 +01:00
gxw 4571c7c05d avcodec/mips: [loongson] mmi optimizations for VP9 put and avg functions
VP9 decoding speed improved about 60.5%(from 38fps to 61fps, tested on loongson 3A3000).

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-27 01:51:40 +01:00
Justin Ruggles 97f47fd601 mov: Fix start_time for streams with empty edits in the middle
Empty edits can occur at any position within the edit list except for at
the end. Empty edits in the middle should not impact the reported stream
start_time or the video PTS adjustment, so only include empty edits at
the start of the list in empty_edits_sum_duration.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2019-02-26 14:48:27 -05:00
Justin Ruggles 69fcc093c1 http: Do not try to make a new request when seeking past the end of the file
This avoids making invalid HTTP Range requests for a byte range past the
known end of the file during a seek. Those requests generally return a HTTP
response of 416 Range Not Satisfiable, which causes an error response.

Reference: https://tools.ietf.org/html/rfc7233

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2019-02-26 14:48:27 -05:00
Mark Thompson f948082e5f vaapi_encode_mpeg2: Add missing marker bit in time_code
We don't have anything useful to put in this field, but there is still
meant to be a marker bit in the middle of it.
2019-02-25 23:34:14 +00:00
Mark Thompson fda6dcd0b0 vaapi_encode_mjpeg: Use common quality option
Doesn't change anything, but makes the behaviour better match that of the
other codecs (the CONSTANT_QUALITY_ONLY flag already ensures that CQP is
the only RC mode selectable for MJPEG).
2019-02-25 23:34:14 +00:00
Mark Thompson c4c2c4df76 vaapi_encode_vp9: Fix whitespace after previous patch 2019-02-25 23:34:14 +00:00
Mark Thompson 28e619e268 vaapi_encode_vp9: Enable support for more RC modes 2019-02-25 23:34:14 +00:00
Mark Thompson 2efd63a315 vaapi_encode_vp8: Enable support for more RC modes 2019-02-25 23:34:14 +00:00
Mark Thompson 1e0fac7663 vaapi_encode_mpeg2: Enable support for more RC modes
Fixes #7650.
2019-02-25 23:33:59 +00:00
Mark Thompson d237b6b549 vaapi_encode_h265: Enable support for more RC modes
Also fixes QP going out of range when modified by the quant factor/offset
values, and clarifies the QP behaviour for >8-bit modes.
2019-02-25 23:32:23 +00:00
Mark Thompson f5eb08937e vaapi_encode_h264: Enable support for more RC modes
Also fixes QP going out of range when modified by the quant factor/offset
values.
2019-02-25 23:32:23 +00:00
Mark Thompson f4d7bd6cdb vaapi_encode: Support more RC modes
Allow setting the mode explicitly, and try to make a sensible choice
given the available parameters if not.
2019-02-25 23:32:23 +00:00
Mark Thompson 9d5ca71ec2 vaapi_encode: Do not zero access unit structures
Following b8c45bbcbc they contain allocated
unit arrays which will get leaked.  These operations were inconsistently
applied and never actually needed (the old uninit left them in the correct
state), so just drop them entirely.
2019-02-25 23:27:11 +00:00
Andreas Rheinhardt b8c45bbcbc libavcodec/cbs: Stop needlessly reallocating the units array
Currently, a fragment's unit array is constantly reallocated during
splitting of a packet. This commit changes this: One can keep the units
array by distinguishing between the number of allocated and the number
of valid units in the units array.

The more units a packet is split into, the bigger the benefit.
So MPEG-2 benefits the most; for a video coming from an NTSC-DVD
(usually 32 units per frame) the average cost of cbs_insert_unit (for a
single unit) went down from 6717 decicycles to 450 decicycles (based
upon 10 runs with 4194304 runs each); if each packet consists of only
one unit, it went down from 2425 to 448; for a H.264 video where most
packets contain nine units, it went from 4431 to 450.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-02-25 21:40:13 +00:00
Andreas Rheinhardt c5b452ed2f filter_units, trace_headers: Always use fragment from context
This is in preparation for another patch that will stop needless
reallocations of the unit array.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-02-25 20:38:57 +00:00
Michael Niedermayer 976dae8b32 avcodec/wcmv: Avoid copying frames if they are unchanged
Improves speed of the testcase by about a factor of 10

Fixes: Timeout
Fixes: 13132/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5664190616829952

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-25 18:03:24 +01:00