Commit Graph

91370 Commits

Author SHA1 Message Date
Jerome Borsboom
f56a0b02cd avcodec/vc1: fix out-of-bounds reference pixel replication
Out-of-bounds reference pixel replication should take into account the frame
coding mode of the reference frame(s), not the frame coding mode of the
current frame.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-04 16:32:57 +02:00
Vishwanath Dixit
37abfe8c2d avfilter/drawtext: present 'hms' formatted 'pts' in 24h format
HMS is formatted as HH:MM:SS.mmm, but, HH part is not limited to
24 hours. For example, the the drawn text may look like this:
243029:20:30.342. To present the timestamp in more readable and
user friendly format, this patch provides an additional option
to limit the hour part in the range 0-23.

Note: Actually the above required format can be obtained with
format options 'localtime' and 'gmtime', but,  milliseconds part
is not supported in those formats.
2018-06-04 10:57:45 +05:30
Mark Thompson
2bd24d4a37 v4l2_m2m: Mark V4L2 M2M decoders as unsuitable for probing 2018-06-03 18:40:26 +01:00
Paul B Mahol
29e0879b29 avfilter/f_drawgraph: fix drawing of first point for non-first metadata key
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 18:50:04 +02:00
Paul B Mahol
9832885386 avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Fixes #7242.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 14:57:25 +02:00
Paul B Mahol
49eda27c6e avfilter/avf_showspectrum: also show sample rate and channel layout
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:43:43 +02:00
Paul B Mahol
9add1786ad avfilter/avf_showspectrum: avoid overwritting text
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:26:43 +02:00
Paul B Mahol
d0bf1aa3c5 avfilter/avf_showspectrum: improve axes drawing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:06:35 +02:00
Michael Niedermayer
5ee203076f avcodec/vp3: Fix end of bitstream check in unpack_superblocks()
Fixes: regression

Found-by: Frank Liberato <liberato@google.com>
Tested-by: Frank Liberato <liberato@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-02 21:46:40 +02:00
Paul B Mahol
af31084399 avfilter/vf_lut3d: unbreak haldclut with planar rgb formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-02 19:16:22 +02:00
Jan Ekström
76daf4529b lavfi/Makefile: move dnn_*.o under vf_srcnn
These files depend on libavformat, and the vf_srcnn filter
currently is the only thing utilizing these dnn_* files and
already happens to have a dependency on libavformat.

This fixes compilation in cases where libavformat is not a
dependency for libavfilter.

Reported by Kam_ on IRC.
2018-06-02 19:00:57 +03:00
Gyan Doshi
e50a5c9c4e doc/ffmpeg: rewrite Stream Selection chapter
Flesh out with details and examples to show quirks and limitations.
2018-06-02 20:16:12 +05:30
Paul B Mahol
e28b1fa6e9 avfilter: add adeclick and adeclip audio filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-02 13:09:06 +02:00
Jacob Trimble
9827bb88e7 libavformat/mov: Fix heap buffer overflow.
Found by Chrome's ClusterFuzz: https://crbug.com/847060

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-02 01:55:12 +02:00
Gyan Doshi
841c1efc78 lavc/libx265: allow users to set closed GOP via generic lavc flag
lavc flag 'cgop' can be used to set closed GOP.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-06-02 00:41:44 +05:30
Jérôme Martinez
5205b3289e avcodec/dpx: Support for RGBA 12-bit packed decoding
Limited to widths multiple of 2 due to lack of test files for such corner case

This partially fixes ticket #5639
2018-06-01 11:25:23 +02:00
Paul B Mahol
0d35413e5d avcodec/dnxhdenc: do not free nonexistent slice threads data when frame threading is used
Forgotten in 28e9ba951d.
Fixes #7241.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-01 10:54:39 +02:00
Gyan Doshi
04b570817b doc/ffmpeg: remove non-existent vdt option 2018-06-01 01:23:12 +05:30
John Cox
8d4fc2ea06 avfilter: use av_clip_uintp2_c where clip is variable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-31 16:22:59 +02:00
Marton Balint
1616b1be5a avformat/mxfdec: add some missing picture_essence_container_uls
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-30 23:02:59 +02:00
Marton Balint
e7498792b6 avformat/mxfdec: use int math for sample count calculation
This also changes the rounding to nearest.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-30 23:02:59 +02:00
Marton Balint
f932e49aab avformat/mxfdec: fix klv_decode_ber_length return value usage
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-30 23:02:59 +02:00
James Almer
e3734aa6a3 tools/crypto_bench: add missing RC4 implementation from tomcrypt
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-30 14:45:26 -03:00
James Almer
5420c8f76e tools/crypto_bench: add missing RC4 implementation from gcrypt
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-30 14:08:44 -03:00
James Almer
cd62f9d557 tools/crypto_bench: add support for mbedcrypto
Requires mbed TLS 2.7.0 or newer

Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-30 14:08:35 -03:00
Michael Niedermayer
44a2415a6d avcodec/h263dec: Reinitialize idct context if it has not been setup for the active profile
The profile after reading headers can be different from when the context was initialized

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 17:58:08 +02:00
Michael Niedermayer
8c50d0cccf avcodec/idctdsp: Clear idct/idct_add for studio profile
This does not leave them "as before" which may be a value from a previous profile

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 17:58:08 +02:00
Michael Niedermayer
b3332a182f avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile
These 2 fields are not always the same, it is simpler to always use the same field
for detecting studio profile

Fixes: null pointer dereference
Fixes: ffmpeg_crash_3.avi

Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böhme, Andrew Santosa and Alexandru RazvanCaciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 17:58:08 +02:00
Paul B Mahol
1aa5192451 avfilter/af_aiir: draw IR frequency response
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-30 17:26:08 +02:00
Paul B Mahol
d0e740b8fb avfilter/af_afir: fix picking of IR channel
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-30 12:30:24 +02:00
Alex Converse
ea0010bf9c flvenc: Fix sequence header update timestamps 2018-05-29 22:14:13 -07:00
Alex Converse
4d3dd167df flvenc: Factorize timestamp writing
The code is trivial but the semantics in the spec are ambiguous. This
should help keep parts of the muxer interpreting them consistently.
2018-05-29 22:14:12 -07:00
Andrey Semashev
d7eb8d8475 lavfi/tests: Fix 16-bit vf_blend test to avoid memory not aligned to 2 bytes
Generic C implementation of vf_blend performs reads and writes of 16-bit
elements, which requires the buffers to be aligned to at least 2-byte
boundary.

Also, the change fixes source buffer overrun caused by src_offset being
added to to test handling of misaligned buffers.

Fixes: #7226

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 02:42:10 +02:00
erankor
500e638711 qt-faststart - stricter input validations
1. validate the moov size before checking for cmov atom
2. avoid performing arithmetic operations on unvalidated numbers
3. verify the stco/co64 offset count does not overflow the stco/co64
atom (not only the moov atom)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 02:42:10 +02:00
Michael Niedermayer
a9dacdeea6 avcodec/qtrle: Do not output duplicated frames on insufficient input
This improves performance and makes qtrle behave more similar to other decoders.
Libavcodec does generally not output known duplicated frames, instead the calling Application
can insert them as it needs.

Fixes: Timeout
Fixes: 6383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-6199846902956032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 02:42:10 +02:00
Carl Eugen Hoyos
53d6d4f266 ffplay: Print codec_name if decoder for codec_id could not be found.
Reviewed-by: Marton Balint
2018-05-30 01:09:49 +02:00
Paul B Mahol
73438dbbbc avfilter/af_afir: draw IR frequency response
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-29 21:57:42 +02:00
Sergey Lavrushkin
bdf1bbdbb4 Adds dnn inference module for simple convolutional networks. Reimplements srcnn filter based on it.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-05-29 10:02:30 -03:00
Gyan Doshi
cba167934b doc/ffmpeg: update disposition values
Thumbnail example added. Avoid transcoding in older examples.
2018-05-29 11:57:58 +05:30
Vishwanath Dixit
5717cd80dc avformat/movenc: creating producer reference time (PRFT) box
The producer reference time box supplies relative wall-clock times
at which movie fragments, or files containing movie fragments
(such as segments) were produced.
The box is mainly useful in live streaming use cases. A media player
can parse the box and utilize the time fields to measure and improve
the latency during real time playout.
2018-05-29 09:32:11 +05:30
Vishwanath Dixit
f09635f2a2 avformat/utils: function to get the formatted ntp time
This utility function creates 64-bit NTP time format as per the RFC
5905.
A simple explaination of 64-bit NTP time format is here
http://www.beaglesoft.com/Manual/page53.htm
2018-05-29 09:31:29 +05:30
Jerome Borsboom
8a4dbd3e9f avcodec/vc1: store zero MVs for all blocks in a MB
Direct prediction for interlace frame B pictures references the mv in the
second block in an MB in the backward reference frame for the twomv case.
When the backward reference frame is an I frame, this value may be unset.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-05-28 23:50:28 +02:00
Jerome Borsboom
c0402e1e30 avcodec/vc1: fix mquant calculation for interlace field pictures
For interlace field pictures s->mb_height indicates the height of the full
picture in MBs, i.e. the two fields combined. A single field is half this
size. When calculating mquant for interlace field pictures, the bottom edge
is the last MB row of the field.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-05-28 23:38:49 +02:00
Michael Niedermayer
42f40d36b7 avcodec/allcodecs: Provide empty codec_list in allcodecs when ossfuzz is used
The last workaround is not sufficient to make oss fuzz work with the iterate API
as it did not provide a FFmpeg that external libs can be linked to.

This patch does not fully restore the pre iterate functionality. My attempts to
do this have so far failed.

The problem with this solution is that it renders the fuzzers virtual system
ffmpeg (libs) non functional. Which differs from a real system compared to the
virtual system tested by the fuzzer.
It should theoretically not matter as the system ffmpeg wouldnt be used.
But with more cases being fuzzed we likely will hit a case where a external
lib is involved and it does matter ...

Working around this may be possible with weak symbols but so far my attempts
failed

Alternatively multiple ffmpeg could be built, this becomes messy though
quickly as they need to be all linked together. That is we need a FFmpeg
that has the iterate API modified so it can work with the resources
available to ossfuzz. And at the same time we need a ffmpeg that has
its full functionality for any external libs which use ffmpeg and are
used by ffmpeg.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-28 23:17:32 +02:00
Jan Ekström
26892c7615 lavf/libssh: translate a read of 0 to EOF
Yet another case of forgotten 0 =! EOF translation.

While the documentation for this specific synchronous read
function does not mention it, the documentation for
`sftp_async_read` documents it, as well as looking at the
implementation of this function leads one to find
`if (handle->eof) { return 0; }`.

Reported by stnutt on IRC.
2018-05-28 20:33:50 +03:00
Jun Zhao
81b77e7bf1 cmdutils: dump supported hardware devices in print_codec()
dump the supported hardware devices for codec when use the command
like ./ffmpeg -h decoder=h264.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-28 18:21:48 +08:00
Jun Zhao
90acf168a6 cmdutils: print missing caps in print_codec().
print full caps type in print_codec().

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-28 18:21:35 +08:00
Karthick Jeyapal
ebf85d3190 avformat/dashenc: Added a warning for incorrect segment name extension
Applicable only to webm output format.
By default all the segment filenames end with .m4s extension.
When someone chooses webm output format, we recommend they also override the relevant segment name options to end with .webm extension. This patch will issue a warning for he same
2018-05-28 10:52:07 +05:30
Karthick Jeyapal
2efdbf7367 avformat/dashenc: Added option for Segment file format
Right now segment file format is chosen to be either mp4 or webm based on the codec format.
This patch makes that choice configurable by the user, instead of being decided by the muxer.

Also with this change per-stream choice segment file format(based on codec type) is not possible.
All the output audio and video streams should be in the same file format.
2018-05-28 10:52:01 +05:30
Michael Niedermayer
e3275f937d avcodec/ac3dec: Check that the number of channels with dependant streams is valid
Fixes: left shift of 1 by 63 places cannot be represented in type 'long long'
Fixes: out of array access
Fixes: 7284/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_fuzzer-5767914968842240

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-27 23:10:12 +02:00