ffmpeg.git
12 months agolavfi/atempo: fix tempo range limit inconsistency
Pavel Koshevoy [Thu, 4 Oct 2018 04:59:31 +0000 (22:59 -0600)]
lavfi/atempo: fix tempo range limit inconsistency

yae_set_tempo was overlooked when max tempo limit was raised to 100.

tested with:
./ffmpeg_g -i Delerium/SemanticSpaces/Gateway.mp3 \
-af asendcmd=f=asendcmd.cfg,atempo=1.0 -y /tmp/asendcmd-atempo.wav

where asendcmd.cfg was:
15.0-45.0 [enter] atempo tempo 2.0,
          [leave] atempo tempo 0.5;

60.0-300.0 [enter] atempo tempo 4.0,
           [leave] atempo tempo 1.0;

12 months agoavfilter/avf_showspectrum: fix scaling in zoom mode
Paul B Mahol [Thu, 4 Oct 2018 22:15:26 +0000 (00:15 +0200)]
avfilter/avf_showspectrum: fix scaling in zoom mode

12 months agoavfilter/avf_showspectrum: implement zoom mode
Paul B Mahol [Thu, 4 Oct 2018 21:40:02 +0000 (23:40 +0200)]
avfilter/avf_showspectrum: implement zoom mode

12 months agoavilter/af_afir: add irfmt option
Paul B Mahol [Thu, 4 Oct 2018 19:10:47 +0000 (21:10 +0200)]
avilter/af_afir: add irfmt option

12 months agoavcodec/libaomdec: remove bogus comment
James Almer [Thu, 4 Oct 2018 18:43:54 +0000 (15:43 -0300)]
avcodec/libaomdec: remove bogus comment

It's a remnant from libvpx that's not valid for libaom.

Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavfilter/af_afir: use internal lavfi queue
Paul B Mahol [Wed, 3 Oct 2018 10:49:44 +0000 (12:49 +0200)]
avfilter/af_afir: use internal lavfi queue

12 months agoavfilter/af_headphone: use lavfi internal queue instead
Paul B Mahol [Tue, 2 Oct 2018 20:08:45 +0000 (22:08 +0200)]
avfilter/af_headphone: use lavfi internal queue instead

Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 months agoavfilter/af_asetnsamples: use lavfi internal queue
Paul B Mahol [Wed, 3 Oct 2018 10:20:34 +0000 (12:20 +0200)]
avfilter/af_asetnsamples: use lavfi internal queue

12 months agoavfilter: add ff_inlink_queued_samples()
Paul B Mahol [Tue, 2 Oct 2018 19:57:00 +0000 (21:57 +0200)]
avfilter: add ff_inlink_queued_samples()

12 months agoavcodec: add an AV1 parser
James Almer [Sat, 14 Jul 2018 14:59:59 +0000 (11:59 -0300)]
avcodec: add an AV1 parser

Simple parser to set keyframes, frame type, structure, width, height, and pixel
format, plus stream profile and level.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavcodec/av1_metadata: add an option to insert and remove Temporal Delimiter OBUs
James Almer [Wed, 3 Oct 2018 00:05:51 +0000 (21:05 -0300)]
avcodec/av1_metadata: add an option to insert and remove Temporal Delimiter OBUs

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavfilter/f_cue: use inlink fifo for queueing frames
Marton Balint [Sun, 30 Sep 2018 10:52:44 +0000 (12:52 +0200)]
avfilter/f_cue: use inlink fifo for queueing frames

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavfilter/filters: add ff_inlink_peek_frame and ff_inlink_queued_frames to access...
Marton Balint [Sun, 30 Sep 2018 21:28:28 +0000 (23:28 +0200)]
avfilter/filters: add ff_inlink_peek_frame and ff_inlink_queued_frames to access frames in the inlink fifo

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agodoc/protocols: simplify and clarify UDP localaddr option
Marton Balint [Fri, 21 Sep 2018 22:19:17 +0000 (00:19 +0200)]
doc/protocols: simplify and clarify UDP localaddr option

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavformat/udp: always use IP_ADD_SOURCE_MEMBERSHIP for subscribing to an UDP multicast...
Marton Balint [Fri, 21 Sep 2018 21:34:50 +0000 (23:34 +0200)]
avformat/udp: always use IP_ADD_SOURCE_MEMBERSHIP for subscribing to an UDP multicast source group in IPv4

That alone supports specifying the interface based on its address. Getting the
interface index from the local address seems quite a bit of work in a platform
independent way...

Obviously for IPv6 we still always use MCAST_JOIN_SOURCE_GROUP.

As a side effect this also fixes ticket #7459.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavformat/udp: specify the local address for some source filtered multicast joins
Marton Balint [Fri, 21 Sep 2018 20:27:02 +0000 (22:27 +0200)]
avformat/udp: specify the local address for some source filtered multicast joins

We already use localaddr for the multicast joins without source filters, so we
should use them for source filters as well. This patch only fixes the
IP_ADD_SOURCE_MEMBERSHIP and the IP_BLOCK_SOURCE case.

Unless we do this, the kernel automatically selects an interface based on the
source address, and that interface might be different from the one set in
localaddr. For blocked sources this even casues EINVAL because we joined the
multicast group on a different interface.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavformat/udp: add support for generic source filtering
Marton Balint [Wed, 19 Sep 2018 23:23:58 +0000 (01:23 +0200)]
avformat/udp: add support for generic source filtering

This allows getting data only from a specific source IP. This is useful not
only for unicast but for multicast as well because multicast source
subscriptions do not act as source filters for the incoming packets.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavformat/rtpproto: use factorized ip functions
Marton Balint [Thu, 13 Sep 2018 23:33:32 +0000 (01:33 +0200)]
avformat/rtpproto: use factorized ip functions

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavformat/udp: use factorized ip functions
Marton Balint [Thu, 13 Sep 2018 23:17:35 +0000 (01:17 +0200)]
avformat/udp: use factorized ip functions

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavformat/ip: factorize some IP filtering and resolving functions to a new file
Marton Balint [Wed, 12 Sep 2018 22:46:09 +0000 (00:46 +0200)]
avformat/ip: factorize some IP filtering and resolving functions to a new file

These are based on the very similar UDP and RTP protocol functions.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavfilter/af_afir: make IR gain control more flexible
Paul B Mahol [Wed, 3 Oct 2018 19:43:40 +0000 (21:43 +0200)]
avfilter/af_afir: make IR gain control more flexible

For this reason introduce two more options.

12 months agoavfilter/avfilter: fix typos in comments
Paul B Mahol [Wed, 3 Oct 2018 17:11:52 +0000 (19:11 +0200)]
avfilter/avfilter: fix typos in comments

12 months agoavcodec/rasc: unref both frames on reinit
Michael Niedermayer [Tue, 2 Oct 2018 01:04:52 +0000 (03:04 +0200)]
avcodec/rasc: unref both frames on reinit

Fixes: integer overflow
Fixes: inconsistent frame dimensions
Fixes: 10454/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5656301162463232

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>
12 months agoavcodec/rasc: Fix off by 1 error in vertical coordinate
Michael Niedermayer [Tue, 2 Oct 2018 01:04:51 +0000 (03:04 +0200)]
avcodec/rasc: Fix off by 1 error in vertical coordinate

Fixes: out of array read
Fixes: 10311/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-4856330905452544

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>
12 months agoavcodec/tiff: check remaining packet size for strips
Michael Niedermayer [Tue, 2 Oct 2018 01:04:50 +0000 (03:04 +0200)]
avcodec/tiff: check remaining packet size for strips

Fixes: Timeout
Fixes: 10280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5676217211027456

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>
12 months agoavformat/matroskaenc: reserve free space for metadata on request
Sigga Regina [Wed, 12 Sep 2018 15:47:47 +0000 (11:47 -0400)]
avformat/matroskaenc: reserve free space for metadata on request

Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavcodec/scpr: Skip frames which change nothing
Michael Niedermayer [Tue, 25 Sep 2018 00:36:35 +0000 (02:36 +0200)]
avcodec/scpr: Skip frames which change nothing

Fixes: Timeout
Fixes: 10292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5687943864254464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/wcmv: Fix integer overflows
Michael Niedermayer [Tue, 25 Sep 2018 00:01:58 +0000 (02:01 +0200)]
avcodec/wcmv: Fix integer overflows

Fixes: signed integer overflow: 262140 * 65535 cannot be represented in type 'int'
Fixes: 10090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5691269368512512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Remove unused variable
Michael Niedermayer [Sun, 30 Sep 2018 19:50:30 +0000 (21:50 +0200)]
avcodec/gdv: Remove unused variable

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoffmpeg: break loop when dts_heuristic check done
xiaofeng [Sun, 30 Sep 2018 12:16:22 +0000 (20:16 +0800)]
ffmpeg: break loop when dts_heuristic check done

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavdevice/decklink_dec: add option to align capture start time
Karthick Jeyapal [Fri, 28 Sep 2018 07:25:54 +0000 (12:55 +0530)]
avdevice/decklink_dec: add option to align capture start time

This option is useful for maintaining input synchronization across N
different hardware devices deployed for 'N-way' redundancy.
The system time of different hardware devices should be synchronized
with protocols such as NTP or PTP, before using this option.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavcodec/hevc_parser: very minor simplification in hevc_parse()
Michael Niedermayer [Sun, 30 Sep 2018 00:29:44 +0000 (02:29 +0200)]
avcodec/hevc_parser: very minor simplification in hevc_parse()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agolavc/hevc: Don't parse NAL unit for a dummy buffer
Haihao Xiang [Fri, 30 Mar 2018 02:42:32 +0000 (10:42 +0800)]
lavc/hevc: Don't parse NAL unit for a dummy buffer

hevc parser mistakenly reports the following message if a dummy buffer
is padded for EOF

   [hevc @ 0x559b63848610] missing picture in access unit

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Reviewed-by: "Li, Zhong" <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/libzvbi-teletextdec: add formatted ass output
Marton Balint [Sun, 29 Apr 2018 01:08:12 +0000 (03:08 +0200)]
avcodec/libzvbi-teletextdec: add formatted ass output

Inspired by the VideoLAN text decoder and its port to FFmpeg made by Aman
Gupta.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavcodec/diracdec: check that GetBitContext has not ended in codeblock()
Michael Niedermayer [Thu, 13 Sep 2018 22:22:13 +0000 (00:22 +0200)]
avcodec/diracdec: check that GetBitContext has not ended in codeblock()

Fixes: Timeout (part 2 of 2)
Fixes: 9774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5748957085958144

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/diracdec: Propagate errors from codeblock()
Michael Niedermayer [Thu, 13 Sep 2018 22:22:13 +0000 (00:22 +0200)]
avcodec/diracdec: Propagate errors from codeblock()

Consider a component to be damaged if more than 50% of its subbands are damaged

Fixes: Timeout (part 1 of 2)
Fixes: 9774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5748957085958144

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/bintext: Use ff_get_buffer instead of ff_reget_buffer and simplify
Michael Niedermayer [Wed, 12 Sep 2018 00:14:47 +0000 (02:14 +0200)]
avcodec/bintext: Use ff_get_buffer instead of ff_reget_buffer and simplify

reget seems unneeded and it is slower

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/bintext: Check input size before allocating the input image
Michael Niedermayer [Wed, 12 Sep 2018 00:11:00 +0000 (02:11 +0200)]
avcodec/bintext: Check input size before allocating the input image

Fixes: Timeout
Fixes: 9795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XBIN_fuzzer-5768631928487936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Error out if we had insufficent input for the output frame in decompress_2()
Michael Niedermayer [Sun, 5 Aug 2018 15:22:23 +0000 (17:22 +0200)]
avcodec/gdv: Error out if we had insufficent input for the output frame in decompress_2()

Fixes: Timeout (with the previous commits to gdv.c)
Fixes: 9422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5143490001371136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()
Michael Niedermayer [Sun, 5 Aug 2018 15:12:33 +0000 (17:12 +0200)]
avcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()
Michael Niedermayer [Sun, 5 Aug 2018 15:10:22 +0000 (17:10 +0200)]
avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Eliminate 50% of the reads in the first inner loop in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 15:06:44 +0000 (17:06 +0200)]
avcodec/gdv: Eliminate 50% of the reads in the first inner loop in rescale()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Simplify first inner loop in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:58:35 +0000 (16:58 +0200)]
avcodec/gdv: Simplify first inner loop in rescale()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Combine first and 3rd case in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:55:38 +0000 (16:55 +0200)]
avcodec/gdv: Combine first and 3rd case in rescale()

Simplifies code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Factor terms out of inner loops in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:29:13 +0000 (16:29 +0200)]
avcodec/gdv: Factor terms out of inner loops in rescale()

This also replaces some loops by memcpy()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/gdv: Replace divisions by shifts in rescale()
Michael Niedermayer [Sun, 5 Aug 2018 14:13:24 +0000 (16:13 +0200)]
avcodec/gdv: Replace divisions by shifts in rescale()

Divisions tend to be slower than shifts unless the compiler optimizes them out.
And some of these are in inner loops.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agolavf/mpeg: Support demuxing HEVC in mpeg-ps.
Carl Eugen Hoyos [Wed, 26 Sep 2018 20:39:18 +0000 (22:39 +0200)]
lavf/mpeg: Support demuxing HEVC in mpeg-ps.

12 months agolavc: Add AV1 metadata bitstream filter
Mark Thompson [Sun, 9 Sep 2018 22:08:12 +0000 (23:08 +0100)]
lavc: Add AV1 metadata bitstream filter

Can adjust colour and timing information.

12 months agolavc: Add coded bitstream read/write support for AV1
Mark Thompson [Sun, 9 Sep 2018 22:08:11 +0000 (23:08 +0100)]
lavc: Add coded bitstream read/write support for AV1

12 months agoavfilter/af_afftdn: add missing break
Paul B Mahol [Wed, 26 Sep 2018 20:23:28 +0000 (22:23 +0200)]
avfilter/af_afftdn: add missing break

12 months agoavformat/matroskaenc: reindent after the previous commit
James Almer [Fri, 21 Sep 2018 19:18:36 +0000 (16:18 -0300)]
avformat/matroskaenc: reindent after the previous commit

Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavformat/matroskaenc: refactor checks for allowed codecs in WebM
James Almer [Fri, 21 Sep 2018 19:18:15 +0000 (16:18 -0300)]
avformat/matroskaenc: refactor checks for allowed codecs in WebM

Use the new ff_webm_codec_tags[] array for this purpose.

Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavformat/matroskaenc: implement AVOutputFormat.query_codec for webm
James Almer [Fri, 21 Sep 2018 15:52:13 +0000 (12:52 -0300)]
avformat/matroskaenc: implement AVOutputFormat.query_codec for webm

Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavformat/matroskaenc: remove unnecessary additional codec tags
James Almer [Fri, 21 Sep 2018 15:47:02 +0000 (12:47 -0300)]
avformat/matroskaenc: remove unnecessary additional codec tags

They are listed in riff.c already.

Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavfilter: add audio denoising (afftdn) filter
Paul B Mahol [Mon, 17 Sep 2018 15:41:56 +0000 (17:41 +0200)]
avfilter: add audio denoising (afftdn) filter

12 months agoRELEASE: update for git after 4.0 branchpoint
Matthieu Bouron [Tue, 25 Sep 2018 09:30:50 +0000 (11:30 +0200)]
RELEASE: update for git after 4.0 branchpoint

12 months agoavfilter/vf_curves: add planar rgb support
Paul B Mahol [Mon, 24 Sep 2018 14:57:10 +0000 (16:57 +0200)]
avfilter/vf_curves: add planar rgb support

12 months agoavformat/utils: move mkdir_p to utils
Steven Liu [Sat, 22 Sep 2018 14:10:09 +0000 (22:10 +0800)]
avformat/utils: move mkdir_p to utils

Because it will be used by avformat/segment.c or other module which
need to automatically create sub-directories operation.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
12 months agoavfilter/buffersink.h: fix comment typo of av_buffersink_get_samples
Steven Liu [Tue, 25 Sep 2018 03:11:37 +0000 (11:11 +0800)]
avfilter/buffersink.h: fix comment typo of av_buffersink_get_samples

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
12 months agovaapi_encode_h265: Add missing error return
Mark Thompson [Mon, 24 Sep 2018 22:02:10 +0000 (23:02 +0100)]
vaapi_encode_h265: Add missing error return

Fixes CID #1439657.

12 months agolavc/h265_profile_level: Fix level guessing with no PTL structure
Mark Thompson [Mon, 24 Sep 2018 21:55:35 +0000 (22:55 +0100)]
lavc/h265_profile_level: Fix level guessing with no PTL structure

Fixes CID #1439661.

12 months agolavc/h265_profile_level: Avoid integer overflow in bitrate
Mark Thompson [Mon, 24 Sep 2018 22:00:43 +0000 (23:00 +0100)]
lavc/h265_profile_level: Avoid integer overflow in bitrate

Fixes CIDs #1439659 and #1439660.

12 months agoh264_metadata: Avoid integer overflow in bitrate
Mark Thompson [Mon, 24 Sep 2018 21:45:50 +0000 (22:45 +0100)]
h264_metadata: Avoid integer overflow in bitrate

Fixes CID #1439664.

12 months agolavc/h264_levels: Avoid integer overflow in bitrate
Mark Thompson [Mon, 24 Sep 2018 22:03:32 +0000 (23:03 +0100)]
lavc/h264_levels: Avoid integer overflow in bitrate

Fixes CID #1439656.

12 months agoavformat/utils: set AV_PKT_FLAG_KEY for data packets
Baptiste Coudurier [Mon, 30 Jul 2018 18:10:38 +0000 (11:10 -0700)]
avformat/utils: set AV_PKT_FLAG_KEY for data packets

12 months agoavformat/ivfenc: fix writing codec tag
James Almer [Mon, 24 Sep 2018 00:54:24 +0000 (21:54 -0300)]
avformat/ivfenc: fix writing codec tag

The value in AVCodecParameters->codec_tag may not be correct for IVF,
as it's the case when remuxing AV1 streams from mp4, so ignore it and
write the correct value based on codec ID instead.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
12 months agoavfilter/vf_threshold: add slice threading
Paul B Mahol [Mon, 24 Sep 2018 18:21:17 +0000 (20:21 +0200)]
avfilter/vf_threshold: add slice threading

12 months agoavfilter/sr: process and output message when load_model is NULL
Steven Liu [Mon, 24 Sep 2018 14:02:54 +0000 (22:02 +0800)]
avfilter/sr: process and output message when load_model is NULL

fix ticket: 7455

Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
12 months agoavcodec/ilbcdec: fix typo, fixes CID 1439653
Paul B Mahol [Mon, 24 Sep 2018 07:20:31 +0000 (09:20 +0200)]
avcodec/ilbcdec: fix typo, fixes CID 1439653

12 months agoavcodec/prosumer: Check remaining space in put byte context
Michael Niedermayer [Sat, 22 Sep 2018 16:14:07 +0000 (18:14 +0200)]
avcodec/prosumer: Check remaining space in put byte context

Fixes: Timeout
Fixes: 10053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5636993883570176

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>
12 months agoavcodec/prosumer: Remove unused table element
Michael Niedermayer [Sat, 22 Sep 2018 16:14:06 +0000 (18:14 +0200)]
avcodec/prosumer: Remove unused table element

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: remove unneeded variable from vertical_predict
Michael Niedermayer [Sat, 22 Sep 2018 16:14:05 +0000 (18:14 +0200)]
avcodec/prosumer: remove unneeded variable from vertical_predict

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: Rename do_shift() to vertical_predict()
Michael Niedermayer [Sat, 22 Sep 2018 16:14:04 +0000 (18:14 +0200)]
avcodec/prosumer: Rename do_shift() to vertical_predict()

It seems what this function does is a vertical prediction filter, thus
the new name should improve understanding.

rename the related table_b too

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: mark src as const
Michael Niedermayer [Sat, 22 Sep 2018 16:14:03 +0000 (18:14 +0200)]
avcodec/prosumer: mark src as const

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: Only scan as many elements as matter in fill_elements()
Michael Niedermayer [Sat, 22 Sep 2018 16:14:02 +0000 (18:14 +0200)]
avcodec/prosumer: Only scan as many elements as matter in fill_elements()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: factorize e0 setting out
Michael Niedermayer [Sat, 22 Sep 2018 16:14:01 +0000 (18:14 +0200)]
avcodec/prosumer: factorize e0 setting out

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: Use 16bit instead of 32 for table
Michael Niedermayer [Sat, 22 Sep 2018 16:14:00 +0000 (18:14 +0200)]
avcodec/prosumer: Use 16bit instead of 32 for table

Simplifies code and reduces needed memory

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: Factorize the 2 loops in fill_elements()
Michael Niedermayer [Sat, 22 Sep 2018 16:13:59 +0000 (18:13 +0200)]
avcodec/prosumer: Factorize the 2 loops in fill_elements()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: clean up loop end code in fill_elements()
Michael Niedermayer [Sat, 22 Sep 2018 16:13:58 +0000 (18:13 +0200)]
avcodec/prosumer: clean up loop end code in fill_elements()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavcodec/prosumer: Remove dead code
Michael Niedermayer [Sat, 22 Sep 2018 16:13:57 +0000 (18:13 +0200)]
avcodec/prosumer: Remove dead code

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
12 months agoavfilter: document mono option of silencedetect filter
Paul B Mahol [Sun, 23 Sep 2018 21:10:51 +0000 (23:10 +0200)]
avfilter: document mono option of silencedetect filter

Also provide shorter option, and reorder options in documentation.

12 months agoavdevice/decklink: add support for selecting devices based on their unique ID
Marton Balint [Thu, 20 Sep 2018 21:56:00 +0000 (23:56 +0200)]
avdevice/decklink: add support for selecting devices based on their unique ID

Also bump the API version requirement to 10.9.5, because on olders versions
there were some reports of crashes using the undocumented, yet available
BMDDeckLinkDeviceHandle.

Signed-off-by: Marton Balint <cus@passwd.hu>
12 months agoavcodec/vaapi: free slice_buffers when decoding failed
Linjie Fu [Wed, 19 Sep 2018 02:01:23 +0000 (10:01 +0800)]
avcodec/vaapi: free slice_buffers when decoding failed

If vaEndPicture() failed in ff_vaapi_decode_issue(), free
the pic->slice_buffers.

Fixes the memory leak issue in ticket #7385

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
12 months agodoc/encoders: Document -sei option to hevc_vaapi
Mark Thompson [Tue, 18 Sep 2018 22:31:06 +0000 (23:31 +0100)]
doc/encoders: Document -sei option to hevc_vaapi

12 months agovaapi_encode_h265: Set level based on stream if not set by user
Mark Thompson [Tue, 18 Sep 2018 22:31:05 +0000 (23:31 +0100)]
vaapi_encode_h265: Set level based on stream if not set by user

Sets the level based on the stream properties if it is not explicitly
set by the user.  Also add a tier option to set general_tier_flag, since
that affects the level choice.

12 months agolavc/h265: Add some common code for profile/tier/level handling
Mark Thompson [Tue, 18 Sep 2018 22:31:04 +0000 (23:31 +0100)]
lavc/h265: Add some common code for profile/tier/level handling

Adds support for determining for level limits, including mapping PTL
blocks to profiles to check profile-dependent level limits.

12 months agovaapi_encode_h265: Improve profile support
Mark Thompson [Tue, 18 Sep 2018 22:31:03 +0000 (23:31 +0100)]
vaapi_encode_h265: Improve profile support

Set profile compatibility/constraint flags properly (including the
constraint flags used for RExt profiles, as all streams we can currently
generate are RExt-compatible), and use that to add support for the "Main
Intra" and "Main 10 Intra" RExt subprofiles (for which we can re-use the
existing Main and Main10 VAAPI profiles).

12 months agocbs_h264: Infer default VUI values if VUI parameters are not present
Mark Thompson [Tue, 18 Sep 2018 22:31:02 +0000 (23:31 +0100)]
cbs_h264: Infer default VUI values if VUI parameters are not present

12 months agocbs_h264: Fix profile typo
Mark Thompson [Tue, 18 Sep 2018 22:31:01 +0000 (23:31 +0100)]
cbs_h264: Fix profile typo

12 months agocbs_h264: Fix default value for max mv lengths
Mark Thompson [Tue, 18 Sep 2018 22:31:00 +0000 (23:31 +0100)]
cbs_h264: Fix default value for max mv lengths

A recent version of the standard changed the max and default to 15, from
16 in older versions.  This updates the default to 15 to match, but the
max stays as 16 so that we don't reject older streams.

12 months agoh264_metadata: Add option to set the level of the stream
Mark Thompson [Tue, 18 Sep 2018 22:30:59 +0000 (23:30 +0100)]
h264_metadata: Add option to set the level of the stream

12 months agovaapi_encode_h264: Set level based on stream if not set by user
Mark Thompson [Tue, 18 Sep 2018 22:30:58 +0000 (23:30 +0100)]
vaapi_encode_h264: Set level based on stream if not set by user

12 months agolavc/h264: Add common code for level handling
Mark Thompson [Tue, 18 Sep 2018 22:30:57 +0000 (23:30 +0100)]
lavc/h264: Add common code for level handling

Including a unit test.

12 months agohwcontext_vaapi: Improve format mapping
Mark Thompson [Tue, 18 Sep 2018 22:30:56 +0000 (23:30 +0100)]
hwcontext_vaapi: Improve format mapping

Give the entries in the VAAPI format map table an explicit type and add
functions to do the necessary lookups.  Add another field to this table
indicating whether the chroma planes are swapped (as in YV12), and use
that rather than explicit comparisons where swapping is needed.

12 months agovaapi_encode_mjpeg: Mark as intra-only
Mark Thompson [Tue, 18 Sep 2018 22:30:55 +0000 (23:30 +0100)]
vaapi_encode_mjpeg: Mark as intra-only

12 months agovaapi_encode_mjpeg: Use CBS to store parameters and write headers
Mark Thompson [Tue, 18 Sep 2018 22:30:54 +0000 (23:30 +0100)]
vaapi_encode_mjpeg: Use CBS to store parameters and write headers

Also adds greyscale, 4:2:2, 4:4:4 and RGB support.

12 months agolavc/cbs: Add JPEG support
Mark Thompson [Tue, 18 Sep 2018 22:30:53 +0000 (23:30 +0100)]
lavc/cbs: Add JPEG support

12 months agohwcontext_vaapi: Improve logging around quirk detection
Mark Thompson [Tue, 18 Sep 2018 22:30:52 +0000 (23:30 +0100)]
hwcontext_vaapi: Improve logging around quirk detection

Clarify that the list is the naughty list, and therefore being on it is
not desirable.  The i965 driver does not need to be on the list after
version 2.0 (when the standard parameter buffer rendering behaviour was
changed).

12 months agodoc/encoders: Add missing options to VAAPI encoders
Mark Thompson [Tue, 18 Sep 2018 22:30:51 +0000 (23:30 +0100)]
doc/encoders: Add missing options to VAAPI encoders

12 months agovaapi_encode_h26[45]: Make the AUD option a boolean
Mark Thompson [Tue, 18 Sep 2018 22:30:50 +0000 (23:30 +0100)]
vaapi_encode_h26[45]: Make the AUD option a boolean