]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agoavformat: deprecate unused MP4A_LATM flag
Gyan Doshi [Sun, 10 Jun 2018 14:48:10 +0000 (20:18 +0530)]
avformat: deprecate unused MP4A_LATM flag

A generic lavf flag for AAC LATM packetization for the RTP muxer was
added in ef409645f0 and then made inert 20 days later in 0832122880
when a private muxer option was added and the generic flag no longer
read.

5 years agoavdevice/decklink_dec: capture timecode to metadata when requested
Jon Morley [Thu, 31 May 2018 09:45:07 +0000 (02:45 -0700)]
avdevice/decklink_dec: capture timecode to metadata when requested

If the user provides a valid timecode_format look for timecode of that
format in the capture and if found store it on the video avstream's
metadata.

Slightly modified by Marton Balint to capture per-frame timecode as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavdevice/decklink_common: Move DECKLINK_* string functions into header
Jon Morley [Fri, 25 May 2018 18:41:06 +0000 (11:41 -0700)]
avdevice/decklink_common: Move DECKLINK_* string functions into header

This allows other decklink source access to these cross-platform
convenience functions.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavdevice/decklink_dec: use std::atomic for decklink_input_callback refcounting
Marton Balint [Mon, 4 Jun 2018 08:27:42 +0000 (10:27 +0200)]
avdevice/decklink_dec: use std::atomic for decklink_input_callback refcounting

Also remove the callback from the context, and add proper error handling.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavdevice/decklink_dec: use a custom memory allocator
Marton Balint [Mon, 4 Jun 2018 08:02:46 +0000 (10:02 +0200)]
avdevice/decklink_dec: use a custom memory allocator

The default memory allocator is limited in the max number of frames available,
and therefore caused frame drops if the frames were not freed fast enough.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agolavc/qsv: suppress code scan complain
Zhong Li [Wed, 9 May 2018 06:07:40 +0000 (14:07 +0800)]
lavc/qsv: suppress code scan complain

Suppress the complain "variables 'type' is used but maybe uninitialized".

5 years agopixdesc: Only check against valid entries when iterating over lists of enums
Derek Buitenhuis [Fri, 8 Jun 2018 15:40:29 +0000 (16:40 +0100)]
pixdesc: Only check against valid entries when iterating over lists of enums

Some of these enums have gaps in between their values, since they correspond
to the values in various specs, instead of being an incrementing list.

Fixes segfaults when, for example, using the valid API call:

   av_color_primaries_from_name("jecdec-p22");

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
5 years agoavcodec/h264_slice: Fix overflow in recovery_frame computation
Michael Niedermayer [Fri, 8 Jun 2018 17:07:22 +0000 (19:07 +0200)]
avcodec/h264_slice: Fix overflow in recovery_frame computation

Fixes: signed integer overflow: 15 + 2147483646 cannot be represented in type 'int'
Fixes: 8381/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6225533137321984
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/h264_ps: Move MAX_LOG2_MAX_FRAME_NUM to header so it can be used in h264_sei
Michael Niedermayer [Sun, 10 Jun 2018 15:02:47 +0000 (17:02 +0200)]
avcodec/h264_ps: Move MAX_LOG2_MAX_FRAME_NUM to header so it can be used in h264_sei

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/h264_mc_template: Only prefetch motion if the list is used.
Michael Niedermayer [Fri, 8 Jun 2018 16:25:14 +0000 (18:25 +0200)]
avcodec/h264_mc_template: Only prefetch motion if the list is used.

Fixes: index 59 out of bounds for type 'H264Ref [48]'
Fixes: 8232/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5703295145345024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/xwddec: Use ff_set_dimensions()
Michael Niedermayer [Thu, 7 Jun 2018 22:42:31 +0000 (00:42 +0200)]
avcodec/xwddec: Use ff_set_dimensions()

Fixes: OOM
Fixes: 8178/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XWD_fuzzer-4844793342459904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/wavpack: Fix overflow in adding tail
Michael Niedermayer [Thu, 7 Jun 2018 22:07:04 +0000 (00:07 +0200)]
avcodec/wavpack: Fix overflow in adding tail

Fixes: signed integer overflow: 2146907204 + 26846088 cannot be represented in type 'int'
Fixes: 8105/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-6233036682166272
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/libzvbi-teletextdec: add support for selecting subtitle pages only
Marton Balint [Sat, 28 Apr 2018 19:42:34 +0000 (21:42 +0200)]
avcodec/libzvbi-teletextdec: add support for selecting subtitle pages only

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agolsws/rgb2rgb_template: Do not compile unneeded shuffle functions on big-endian.
Carl Eugen Hoyos [Sun, 10 Jun 2018 01:19:59 +0000 (03:19 +0200)]
lsws/rgb2rgb_template: Do not compile unneeded shuffle functions on big-endian.

Fixes the following warnings:
In file included from libswscale/rgb2rgb.c:128:0:
libswscale/rgb2rgb_template.c:346:13: warning: 'shuffle_bytes_3210_c' defined but not used
libswscale/rgb2rgb_template.c:346:13: warning: 'shuffle_bytes_3012_c' defined but not used
libswscale/rgb2rgb_template.c:346:13: warning: 'shuffle_bytes_1230_c' defined but not used

5 years agolavc/aacsbr: fix make checkheaders warning
Jun Zhao [Mon, 4 Jun 2018 13:42:18 +0000 (21:42 +0800)]
lavc/aacsbr: fix make checkheaders warning

move the the function aacsbr_tableinit definition from header file
to .c file to fix make checkheaders warning.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavc/dolby_e: fix make checkheaders warning
Jun Zhao [Mon, 4 Jun 2018 13:32:37 +0000 (21:32 +0800)]
lavc/dolby_e: fix make checkheaders warning

move the the function init_tables() definitions from header file
to .c file to fix make checkheaders warning.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoffmpeg: Fail if the user requested impossible subtitle encoding.
Carl Eugen Hoyos [Wed, 6 Jun 2018 19:09:38 +0000 (21:09 +0200)]
ffmpeg: Fail if the user requested impossible subtitle encoding.

Fixes ticket #7239.

5 years agoavformat/mov: Fix reading saio/saiz for clear content.
Jacob Trimble [Thu, 7 Jun 2018 17:29:33 +0000 (10:29 -0700)]
avformat/mov: Fix reading saio/saiz for clear content.

This validates that the common encryption saio/saiz atoms only appear
when the data is actually encrypted.  This also ignores those atoms
in clear content.

Found by Chrome's ClusterFuzz: http://crbug.com/850389

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/filters: change subtitles example to hint at correct color syntax
Gyan Doshi [Sat, 9 Jun 2018 07:06:24 +0000 (12:36 +0530)]
doc/filters: change subtitles example to hint at correct color syntax

libass changed their color syntax in 2015 to TBGR

5 years agoavformat/mxfdec: add support for recognizing timed text streams
Marton Balint [Sat, 19 May 2018 10:29:51 +0000 (12:29 +0200)]
avformat/mxfdec: add support for recognizing timed text streams

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/avcodec.h: add AV_CODEC_ID_TTML
Marton Balint [Sat, 19 May 2018 09:06:23 +0000 (11:06 +0200)]
avcodec/avcodec.h: add AV_CODEC_ID_TTML

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: remove check for NULL MXFTrack in mxf_set_pts
Marton Balint [Wed, 30 May 2018 23:32:29 +0000 (01:32 +0200)]
avformat/mxfdec: remove check for NULL MXFTrack in mxf_set_pts

It cannot happen for video streams.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: only disallow seek on metadata streams
Marton Balint [Wed, 30 May 2018 23:29:06 +0000 (01:29 +0200)]
avformat/mxfdec: only disallow seek on metadata streams

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: recognize SMPTE 436 VBI data
Marton Balint [Sat, 19 May 2018 09:17:20 +0000 (11:17 +0200)]
avformat/mxfdec: recognize SMPTE 436 VBI data

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: use MXFCodecUL struct to store essence description for data_essence_...
Marton Balint [Fri, 18 May 2018 19:06:17 +0000 (21:06 +0200)]
avformat/mxfdec: use MXFCodecUL struct to store essence description for data_essence_container_uls

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoffmpeg: mark sseof as an input-only option
Gyan Doshi [Thu, 7 Jun 2018 17:45:35 +0000 (23:15 +0530)]
ffmpeg: mark sseof as an input-only option

5 years agolibavfilter/dnn_interface.c: fix av_freep dnn_module.
Sergey Lavrushkin [Thu, 7 Jun 2018 15:22:22 +0000 (18:22 +0300)]
libavfilter/dnn_interface.c: fix av_freep dnn_module.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter/vf_srcnn.c: adds DNN module backend AVOption, changes AV_LOG_INFO message...
Sergey Lavrushkin [Tue, 5 Jun 2018 22:44:40 +0000 (01:44 +0300)]
libavfilter/vf_srcnn.c: adds DNN module backend AVOption, changes AV_LOG_INFO message to AV_LOG_VERBOSE.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agoMAINTAINERS: add myself to qsv section
Zhong Li [Mon, 4 Jun 2018 09:41:57 +0000 (17:41 +0800)]
MAINTAINERS: add myself to qsv section

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agoavcodec/shorten: Fix multiple integer overflows
Michael Niedermayer [Tue, 5 Jun 2018 11:19:35 +0000 (13:19 +0200)]
avcodec/shorten: Fix multiple integer overflows

Fixes: signed integer overflow: 3 * 1006632960 cannot be represented in type 'int'
Fixes: 8278/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5692857166856192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Fix undefined shift in fix_bitshift()
Michael Niedermayer [Tue, 5 Jun 2018 11:15:34 +0000 (13:15 +0200)]
avcodec/shorten: Fix undefined shift in fix_bitshift()

Fixes: left shift of negative value -9
Fixes: 8571/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5715966875926528
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Fix a negative left shift in shorten_decode_frame()
Michael Niedermayer [Tue, 5 Jun 2018 11:12:54 +0000 (13:12 +0200)]
avcodec/shorten: Fix a negative left shift in shorten_decode_frame()

Fixes: left shift of negative value -9057
Fixes: 8527/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5666853924896768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Sanity check nmeans
Michael Niedermayer [Tue, 5 Jun 2018 11:03:48 +0000 (13:03 +0200)]
avcodec/shorten: Sanity check nmeans

Fixes: OOM
Fixes: 8195/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5179785826271232
The reference software appears to use longs for 32bits and it uses int for nmeans
hinting that the intended maximum size was not 32bit.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: fix check for opencl
Jun Zhao [Sat, 2 Jun 2018 03:02:38 +0000 (11:02 +0800)]
configure: fix check for opencl

add pkg-config support for opencl check.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavfi/opencl: remove redundant header.
Jun Zhao [Wed, 30 May 2018 00:54:45 +0000 (08:54 +0800)]
lavfi/opencl: remove redundant header.

remove redundant header

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavu/hwcontext_opecl: fix the build warning
Jun Zhao [Wed, 30 May 2018 00:13:13 +0000 (08:13 +0800)]
lavu/hwcontext_opecl: fix the build warning

fix the build warning when use Portable Computing Language (pocl).

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agodoc/general.texi: clarify FDK-AAC licensing & usability
Gyan Doshi [Thu, 7 Jun 2018 11:34:56 +0000 (17:04 +0530)]
doc/general.texi: clarify FDK-AAC licensing & usability

Mnetion it can be used to decode as well.

5 years agolavu: add calling convention for OpenCL callback.
Ruiling Song [Wed, 6 Jun 2018 15:31:44 +0000 (23:31 +0800)]
lavu: add calling convention for OpenCL callback.

This fix a build error on Windows:
C2440: connot convert from 'void (__cdecl *) (...)' to 'void (__stdcall *)(...)'.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 years agolavc/profiles: Mention AAC-LC only once.
Carl Eugen Hoyos [Wed, 30 May 2018 23:45:26 +0000 (01:45 +0200)]
lavc/profiles: Mention AAC-LC only once.

5 years agoavcodec/shorten: Check non COMM chunk len before skip in decode_aiff_header()
Michael Niedermayer [Tue, 5 Jun 2018 00:33:43 +0000 (02:33 +0200)]
avcodec/shorten: Check non COMM chunk len before skip in decode_aiff_header()

Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 8024/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5109204648984576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegdec: Fix integer overflow in ljpeg_decode_rgb_scan()
Michael Niedermayer [Tue, 5 Jun 2018 00:17:24 +0000 (02:17 +0200)]
avcodec/mjpegdec: Fix integer overflow in ljpeg_decode_rgb_scan()

Fixes: signed integer overflow: 32768 + 2147450880 cannot be represented in type 'int'
Fixes: 7885/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5298834394578944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/truemotion2: Fix overflow in tm2_apply_deltas()
Michael Niedermayer [Tue, 5 Jun 2018 00:09:59 +0000 (02:09 +0200)]
avcodec/truemotion2: Fix overflow in tm2_apply_deltas()

Fixes: signed integer overflow: 1077952576 + 1077952576 cannot be represented in type 'int'
Fixes: 7712/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5056281753681920
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: fix arm inline asm checks
John Cox [Wed, 30 May 2018 16:30:31 +0000 (17:30 +0100)]
configure: fix arm inline asm checks

Commit 8c893aa3cd5 removed quotes that were required to detect
inline asm in clang:

check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }

The correct code is:

void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }

Commit message written by Frank Liberato <liberato@chromium.org>

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agofate: add Dolby E test
foo86 [Mon, 31 Jul 2017 20:33:05 +0000 (23:33 +0300)]
fate: add Dolby E test

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoUse the same name for stereo3d frame/packet side data
Vittorio Giovara [Mon, 4 Jun 2018 19:05:55 +0000 (15:05 -0400)]
Use the same name for stereo3d frame/packet side data

5 years agolavf/mov.c: Set st->start_time for video streams explicitly.
Sasi Inguva [Tue, 29 May 2018 22:36:07 +0000 (15:36 -0700)]
lavf/mov.c: Set st->start_time for video streams explicitly.

If start_time is not set, ffmpeg takes the duration from the global
movie instead of the per stream duration.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/mov.c: Fix timestamps to be strictly monotonic for video also.
Sasi Inguva [Thu, 29 Mar 2018 22:58:09 +0000 (15:58 -0700)]
lavf/mov.c: Fix timestamps to be strictly monotonic for video also.

We already do this for audio, but it should be done for video too.
If we don't, seeking back to the start of the file, for example, can
become quite broken, since the first N packets will have repeating
and nonmonotonic PTS, yet they need to be decoded even if they are
to be discarded.

Signed-off-by: Sasi Inguva <isasi@isasi.mtv.corp.google.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
5 years agoAdds TensorFlow backend for dnn inference module.
Sergey Lavrushkin [Sun, 3 Jun 2018 17:22:50 +0000 (20:22 +0300)]
Adds TensorFlow backend for dnn inference module.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agoavcodec/magicyuvenc: mark as not more experimental
Paul B Mahol [Tue, 5 Jun 2018 09:28:48 +0000 (11:28 +0200)]
avcodec/magicyuvenc: mark as not more experimental

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/magicyuvenc: write max huffman length and extradata too
Paul B Mahol [Thu, 25 Jan 2018 13:55:17 +0000 (14:55 +0100)]
avcodec/magicyuvenc: write max huffman length and extradata too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodoc/filters: mention required compile options for some filters
Lou Logan [Tue, 5 Jun 2018 00:38:20 +0000 (16:38 -0800)]
doc/filters: mention required compile options for some filters

Signed-off-by: Lou Logan <lou@lrcd.com>
5 years agoavcodec/opus_silk: Change silk_lsf2lpc() slightly toward silk/NLSF2A.c
Michael Niedermayer [Sat, 2 Jun 2018 23:33:54 +0000 (01:33 +0200)]
avcodec/opus_silk: Change silk_lsf2lpc() slightly toward silk/NLSF2A.c

Fixes: runtime error: signed integer overflow: -1440457022 - 785819492 cannot be represented in type 'int'
Fixes: 7700/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OPUS_fuzzer-6595838684954624
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/amrwbdec: Fix division by 0 in find_hb_gain()
Michael Niedermayer [Sat, 2 Jun 2018 22:48:06 +0000 (00:48 +0200)]
avcodec/amrwbdec: Fix division by 0 in find_hb_gain()

This restructures the code slightly toward D_UTIL_dec_synthesis()

Fixes: 7420/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-6577305112543232
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agofftools/ffmpeg: fix for all forced key frames when 'copyts' is enabled
Vishwanath Dixit [Sun, 6 May 2018 17:08:59 +0000 (22:38 +0530)]
fftools/ffmpeg: fix for all forced key frames when 'copyts' is enabled

Forced key frames generation functionality was assuming the first PTS
value as zero, but, when 'copyts' is enabled, the first PTS can be any
big number. This was eventually forcing all the frames as key frames.
To resolve this issue, update has been made to use first input pts as
reference pts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/vc1: fix out-of-bounds reference pixel replication
Jerome Borsboom [Tue, 29 May 2018 12:26:17 +0000 (14:26 +0200)]
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>
5 years agoavfilter/drawtext: present 'hms' formatted 'pts' in 24h format
Vishwanath Dixit [Mon, 7 May 2018 13:16:42 +0000 (18:46 +0530)]
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.

5 years agov4l2_m2m: Mark V4L2 M2M decoders as unsuitable for probing
Mark Thompson [Sat, 26 May 2018 16:13:20 +0000 (17:13 +0100)]
v4l2_m2m: Mark V4L2 M2M decoders as unsuitable for probing

5 years agoavfilter/f_drawgraph: fix drawing of first point for non-first metadata key
Paul B Mahol [Sun, 3 Jun 2018 16:50:04 +0000 (18:50 +0200)]
avfilter/f_drawgraph: fix drawing of first point for non-first metadata key

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Paul B Mahol [Sun, 3 Jun 2018 12:49:57 +0000 (14:49 +0200)]
avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0

Fixes #7242.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/avf_showspectrum: also show sample rate and channel layout
Paul B Mahol [Sun, 3 Jun 2018 10:43:43 +0000 (12:43 +0200)]
avfilter/avf_showspectrum: also show sample rate and channel layout

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/avf_showspectrum: avoid overwritting text
Paul B Mahol [Sun, 3 Jun 2018 10:26:43 +0000 (12:26 +0200)]
avfilter/avf_showspectrum: avoid overwritting text

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/avf_showspectrum: improve axes drawing
Paul B Mahol [Sun, 3 Jun 2018 10:06:35 +0000 (12:06 +0200)]
avfilter/avf_showspectrum: improve axes drawing

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/vp3: Fix end of bitstream check in unpack_superblocks()
Michael Niedermayer [Wed, 30 May 2018 20:51:33 +0000 (22:51 +0200)]
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>
5 years agoavfilter/vf_lut3d: unbreak haldclut with planar rgb formats
Paul B Mahol [Sat, 2 Jun 2018 17:14:26 +0000 (19:14 +0200)]
avfilter/vf_lut3d: unbreak haldclut with planar rgb formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agolavfi/Makefile: move dnn_*.o under vf_srcnn
Jan Ekström [Sat, 2 Jun 2018 15:07:22 +0000 (18:07 +0300)]
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.

5 years agodoc/ffmpeg: rewrite Stream Selection chapter
Gyan Doshi [Thu, 24 May 2018 13:41:00 +0000 (19:11 +0530)]
doc/ffmpeg: rewrite Stream Selection chapter

Flesh out with details and examples to show quirks and limitations.

5 years agoavfilter: add adeclick and adeclip audio filters
Paul B Mahol [Mon, 8 Jan 2018 14:02:59 +0000 (15:02 +0100)]
avfilter: add adeclick and adeclip audio filters

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agolibavformat/mov: Fix heap buffer overflow.
Jacob Trimble [Thu, 31 May 2018 17:41:29 +0000 (10:41 -0700)]
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>
5 years agolavc/libx265: allow users to set closed GOP via generic lavc flag
Gyan Doshi [Fri, 1 Jun 2018 10:44:02 +0000 (16:14 +0530)]
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>
5 years agoavcodec/dpx: Support for RGBA 12-bit packed decoding
Jérôme Martinez [Fri, 1 Jun 2018 08:09:01 +0000 (10:09 +0200)]
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

5 years agoavcodec/dnxhdenc: do not free nonexistent slice threads data when frame threading...
Paul B Mahol [Fri, 1 Jun 2018 08:54:39 +0000 (10:54 +0200)]
avcodec/dnxhdenc: do not free nonexistent slice threads data when frame threading is used

Forgotten in 28e9ba951d1a0b0aca53b242aa64f484ca75e874.
Fixes #7241.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodoc/ffmpeg: remove non-existent vdt option
Gyan Doshi [Thu, 31 May 2018 19:53:12 +0000 (01:23 +0530)]
doc/ffmpeg: remove non-existent vdt option

5 years agoavfilter: use av_clip_uintp2_c where clip is variable
John Cox [Thu, 31 May 2018 14:22:59 +0000 (16:22 +0200)]
avfilter: use av_clip_uintp2_c where clip is variable

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavformat/mxfdec: add some missing picture_essence_container_uls
Marton Balint [Sun, 20 May 2018 16:32:11 +0000 (18:32 +0200)]
avformat/mxfdec: add some missing picture_essence_container_uls

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: use int math for sample count calculation
Marton Balint [Sat, 26 May 2018 08:51:16 +0000 (10:51 +0200)]
avformat/mxfdec: use int math for sample count calculation

This also changes the rounding to nearest.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: fix klv_decode_ber_length return value usage
Marton Balint [Sun, 27 May 2018 18:39:09 +0000 (20:39 +0200)]
avformat/mxfdec: fix klv_decode_ber_length return value usage

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agotools/crypto_bench: add missing RC4 implementation from tomcrypt
James Almer [Wed, 30 May 2018 17:34:57 +0000 (14:34 -0300)]
tools/crypto_bench: add missing RC4 implementation from tomcrypt

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agotools/crypto_bench: add missing RC4 implementation from gcrypt
James Almer [Wed, 30 May 2018 16:52:28 +0000 (13:52 -0300)]
tools/crypto_bench: add missing RC4 implementation from gcrypt

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agotools/crypto_bench: add support for mbedcrypto
James Almer [Sun, 27 May 2018 21:17:54 +0000 (18:17 -0300)]
tools/crypto_bench: add support for mbedcrypto

Requires mbed TLS 2.7.0 or newer

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/h263dec: Reinitialize idct context if it has not been setup for the active...
Michael Niedermayer [Mon, 28 May 2018 20:29:58 +0000 (22:29 +0200)]
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>
5 years agoavcodec/idctdsp: Clear idct/idct_add for studio profile
Michael Niedermayer [Mon, 28 May 2018 20:29:57 +0000 (22:29 +0200)]
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>
5 years agoavcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext...
Michael Niedermayer [Mon, 28 May 2018 19:19:08 +0000 (21:19 +0200)]
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>
5 years agoavfilter/af_aiir: draw IR frequency response
Paul B Mahol [Wed, 30 May 2018 10:43:09 +0000 (12:43 +0200)]
avfilter/af_aiir: draw IR frequency response

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/af_afir: fix picking of IR channel
Paul B Mahol [Wed, 30 May 2018 10:30:24 +0000 (12:30 +0200)]
avfilter/af_afir: fix picking of IR channel

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoflvenc: Fix sequence header update timestamps
Alex Converse [Thu, 26 Apr 2018 20:46:28 +0000 (13:46 -0700)]
flvenc: Fix sequence header update timestamps

5 years agoflvenc: Factorize timestamp writing
Alex Converse [Fri, 11 May 2018 01:08:01 +0000 (18:08 -0700)]
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.

5 years agolavfi/tests: Fix 16-bit vf_blend test to avoid memory not aligned to 2 bytes
Andrey Semashev [Wed, 23 May 2018 21:07:36 +0000 (00:07 +0300)]
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>
5 years agoqt-faststart - stricter input validations
erankor [Tue, 29 May 2018 13:18:05 +0000 (16:18 +0300)]
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>
5 years agoavcodec/qtrle: Do not output duplicated frames on insufficient input
Michael Niedermayer [Sun, 27 May 2018 19:59:58 +0000 (21:59 +0200)]
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>
5 years agoffplay: Print codec_name if decoder for codec_id could not be found.
Carl Eugen Hoyos [Tue, 29 May 2018 23:09:49 +0000 (01:09 +0200)]
ffplay: Print codec_name if decoder for codec_id could not be found.

Reviewed-by: Marton Balint
5 years agoavfilter/af_afir: draw IR frequency response
Paul B Mahol [Tue, 29 May 2018 16:24:22 +0000 (18:24 +0200)]
avfilter/af_afir: draw IR frequency response

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoAdds dnn inference module for simple convolutional networks. Reimplements srcnn filte...
Sergey Lavrushkin [Fri, 25 May 2018 17:31:04 +0000 (20:31 +0300)]
Adds dnn inference module for simple convolutional networks. Reimplements srcnn filter based on it.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agodoc/ffmpeg: update disposition values
Gyan Doshi [Tue, 29 May 2018 06:27:58 +0000 (11:57 +0530)]
doc/ffmpeg: update disposition values

Thumbnail example added. Avoid transcoding in older examples.

5 years agoavformat/movenc: creating producer reference time (PRFT) box
Vishwanath Dixit [Mon, 7 May 2018 09:57:51 +0000 (15:27 +0530)]
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.

5 years agoavformat/utils: function to get the formatted ntp time
Vishwanath Dixit [Mon, 7 May 2018 09:57:36 +0000 (15:27 +0530)]
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

5 years agoavcodec/vc1: store zero MVs for all blocks in a MB
Jerome Borsboom [Mon, 28 May 2018 21:50:28 +0000 (23:50 +0200)]
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>
5 years agoavcodec/vc1: fix mquant calculation for interlace field pictures
Jerome Borsboom [Fri, 18 May 2018 15:06:23 +0000 (17:06 +0200)]
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>
5 years agoavcodec/allcodecs: Provide empty codec_list in allcodecs when ossfuzz is used
Michael Niedermayer [Mon, 28 May 2018 00:37:48 +0000 (02:37 +0200)]
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>
5 years agolavf/libssh: translate a read of 0 to EOF
Jan Ekström [Mon, 28 May 2018 00:21:35 +0000 (03:21 +0300)]
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.

5 years agocmdutils: dump supported hardware devices in print_codec()
Jun Zhao [Sat, 26 May 2018 12:57:45 +0000 (20:57 +0800)]
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>