]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agoavcodec/hq_hqa: Check remaining input bits in hqa_decode_mb()
Michael Niedermayer [Mon, 20 Aug 2018 20:53:32 +0000 (22:53 +0200)]
avcodec/hq_hqa: Check remaining input bits in hqa_decode_mb()

Fixes: Timeout
Fixes: 9634/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6267852259590144
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/vb: Check for end of bytestream before reading blocktype
Michael Niedermayer [Mon, 20 Aug 2018 20:19:23 +0000 (22:19 +0200)]
avcodec/vb: Check for end of bytestream before reading blocktype

Fixes: Timeout
Fixes: 9601/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VB_fuzzer-4550228702134272
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/snowdec: Fix integer overflow with motion vector residual
Michael Niedermayer [Mon, 20 Aug 2018 18:15:19 +0000 (20:15 +0200)]
avcodec/snowdec: Fix integer overflow with motion vector residual

Fixes: signed integer overflow: -19818 + -2147483648 cannot be represented in type 'int'
Fixes: 9545/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-4928769537081344
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 agoallcodecs: reorder ff_bitpacked_decoder
Rostislav Pehlivanov [Sat, 25 Aug 2018 17:36:16 +0000 (18:36 +0100)]
allcodecs: reorder ff_bitpacked_decoder

Needs to be in alphabetical order.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavcodec/mpeg4videodec: Fix slice end detection in mpeg4_decode_studio_mb()
Michael Niedermayer [Sun, 19 Aug 2018 08:15:53 +0000 (10:15 +0200)]
avcodec/mpeg4videodec: Fix slice end detection in mpeg4_decode_studio_mb()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/utils: document allocation requirement of extradata
Timo Rothenpieler [Fri, 24 Aug 2018 17:57:42 +0000 (19:57 +0200)]
avcodec/utils: document allocation requirement of extradata

5 years agodoc/examples/vaapi_transcode: re-licensed to MIT-license.
Jun Zhao [Sat, 25 Aug 2018 14:06:39 +0000 (22:06 +0800)]
doc/examples/vaapi_transcode: re-licensed to MIT-license.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agodoc/examples/vaapi_encode: re-licensed to MIT-license.
Jun Zhao [Sat, 25 Aug 2018 14:05:36 +0000 (22:05 +0800)]
doc/examples/vaapi_encode: re-licensed to MIT-license.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agodoc/examples/hw_decode: re-licensed to MIT-license.
Jun Zhao [Sat, 25 Aug 2018 14:03:14 +0000 (22:03 +0800)]
doc/examples/hw_decode: re-licensed to MIT-license.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavcodec/prosumer: fix some minor issues
Paul B Mahol [Fri, 24 Aug 2018 19:33:01 +0000 (21:33 +0200)]
avcodec/prosumer: fix some minor issues

5 years agoavcodec: add Brooktree ProSumer Video decoder
Paul B Mahol [Thu, 16 Aug 2018 11:25:51 +0000 (13:25 +0200)]
avcodec: add Brooktree ProSumer Video decoder

5 years agoavformat/movenc: implicitly enable negative CTS offsets for ismv
Jan Ekström [Wed, 25 Jul 2018 23:51:38 +0000 (02:51 +0300)]
avformat/movenc: implicitly enable negative CTS offsets for ismv

ISMV lacks any sort of edit list support, as well as tfxd is
effectively the PTS of the fragment for most intents and purposes.

Thus, if b-frames are requested without negative CTS offsets you
end up with N frames' worth of delay (tfxd PTS plus the CTS offset
of the first sample). Negative CTS offsets enable the first sample
to have CTS=DTS, and thus a/v desync due to b-frame reorder delay
is avoided.

5 years agoavformat/flvdec: don't propagate empty extradata
James Almer [Fri, 24 Aug 2018 02:50:28 +0000 (23:50 -0300)]
avformat/flvdec: don't propagate empty extradata

Fixes ticket #7379

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/movenc: support Opus packets with more than 60ms of audio when writing the...
James Almer [Thu, 23 Aug 2018 20:48:58 +0000 (17:48 -0300)]
avformat/movenc: support Opus packets with more than 60ms of audio when writing the Sample Group Description

Since libopus 1.2, packets of sizes 80ms, 100ms and 120ms are allowed.

Fixes assertion failures when trying to mux such streams.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/libopusenc: support encoding packets of sizes bigger than 60ms
James Almer [Thu, 23 Aug 2018 20:47:37 +0000 (17:47 -0300)]
avcodec/libopusenc: support encoding packets of sizes bigger than 60ms

Packets of sizes 80ms, 100ms and 120ms are allowed since libopus 1.2

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavf/Makefile: Fix standalone compilation of the matroska and webm muxers.
Carl Eugen Hoyos [Fri, 24 Aug 2018 10:59:41 +0000 (12:59 +0200)]
lavf/Makefile: Fix standalone compilation of the matroska and webm muxers.

Reported-by: irc user Kam_
5 years agoavdevice/decklink_enc: print preroll and buffer size
Gyan Doshi [Wed, 22 Aug 2018 10:53:58 +0000 (16:23 +0530)]
avdevice/decklink_enc: print preroll and buffer size

Helpful in diagnosing latency issues.

5 years agoRevert "avcodec/opus_parser: Handle complete frames flag."
James Almer [Thu, 23 Aug 2018 20:29:27 +0000 (17:29 -0300)]
Revert "avcodec/opus_parser: Handle complete frames flag."

This reverts commit 7e0df5910ec0f107cd0700d6b9359d29177f1933.

"complete frames" containers, even if they don't need to assemble
packets, still depended on this code for proper packet duration and
timestamp generation.

5 years agolavc/extract_extradata_bsf.c: add AVS2
hwren [Mon, 6 Aug 2018 13:42:51 +0000 (21:42 +0800)]
lavc/extract_extradata_bsf.c: add AVS2

Signed-off-by: hwren <hwrenx@126.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Correct opus-in-mp4 pre-skip to be uint16_t versus int16_t.
Dale Curtis [Tue, 21 Aug 2018 22:42:31 +0000 (15:42 -0700)]
avformat/mov: Correct opus-in-mp4 pre-skip to be uint16_t versus int16_t.

This field is a uint16_t, see docs:
http://opus-codec.org/docs/opus_in_isobmff.html#4.3.2

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: do not add fsanitize cflags with ossfuzz if coverage is tested
Michael Niedermayer [Sat, 18 Aug 2018 08:34:15 +0000 (10:34 +0200)]
configure: do not add fsanitize cflags with ossfuzz if coverage is tested

Found-by: Max Moroz
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavc/encode: remove redundant av_init_packet after av_packet_unref.
Jun Zhao [Thu, 16 Aug 2018 06:33:23 +0000 (14:33 +0800)]
lavc/encode: remove redundant av_init_packet after av_packet_unref.

remove redundant av_init_packet after av_packet_unref.
av_packet_unref have call av_init_packet and reset the packet size.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavc/hevc_ps: fix crop info for monochrome
Zhao Zhili [Wed, 22 Aug 2018 09:37:15 +0000 (17:37 +0800)]
lavc/hevc_ps: fix crop info for monochrome

The values of SubWidthC and SubHeightC are 1 in the ITU-T H.265. The
current code use the value of 2.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/utils: avoid undefined integer overflow behavior in update_stream_timings()
Fredrik Hubinette [Mon, 20 Aug 2018 19:59:32 +0000 (12:59 -0700)]
avformat/utils: avoid undefined integer overflow behavior in update_stream_timings()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Allow saio/saiz in clear content.
Jacob Trimble [Tue, 14 Aug 2018 17:18:55 +0000 (10:18 -0700)]
avformat/mov: Allow saio/saiz in clear content.

If there is a saio/saiz in clear content, we shouldn't create the
encryption index if we don't already have one.  Otherwise it will
confuse the cenc_filter.

The changed method is also used for senc atoms, but they should not
appear in clear content.

Found by Chromium's ClusterFuzz: https://crbug.com/873432

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mxfenc: automatically update descriptors klv size
Baptiste Coudurier [Wed, 21 Mar 2018 15:37:59 +0000 (08:37 -0700)]
avformat/mxfenc: automatically update descriptors klv size

5 years agoavformat/hls: support decryption AES128 fmp4 m3u8 list
Steven Liu [Mon, 13 Aug 2018 10:15:23 +0000 (18:15 +0800)]
avformat/hls: support decryption AES128 fmp4 m3u8 list

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agolavc/libkvazaar: fix incompatible pointer type.
Jun Zhao [Mon, 20 Aug 2018 06:39:32 +0000 (14:39 +0800)]
lavc/libkvazaar: fix incompatible pointer type.

fix the waring: libavcodec/libkvazaar.c:210:27: warning: passing argument 3 of ‘av_image_copy’ from incompatible pointer type [-Wincompatible-pointer-types]
                           frame->data, frame->linesize,
                           ^~~~~
In file included from libavcodec/libkvazaar.c:31:0:
./libavutil/imgutils.h:119:6: note: expected ‘const uint8_t ** {aka const unsigned char **}’ but argument is of type ‘uint8_t * const* {aka unsigned char * const*}’
 void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavf/hlsenc: fix mixed declarations and code warning.
Jun Zhao [Mon, 20 Aug 2018 06:36:20 +0000 (14:36 +0800)]
lavf/hlsenc: fix mixed declarations and code warning.

fix the build warning for "ISO C90 forbids mixed declarations and code"

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavcodec/psd : add support for gray float
Martin Vignali [Mon, 20 Aug 2018 13:26:07 +0000 (15:26 +0200)]
avcodec/psd : add support for gray float

5 years agoswscale/swscale : small cosmetic
Martin Vignali [Mon, 20 Aug 2018 13:31:01 +0000 (15:31 +0200)]
swscale/swscale : small cosmetic

5 years agoswscale : treat float input data as uint 16bpc
Martin Vignali [Mon, 20 Aug 2018 13:28:00 +0000 (15:28 +0200)]
swscale : treat float input data as uint 16bpc

Currently float are converted to 16b uint in input part
using src depth (32 bits) in hScale16To19 and hScale16to15,
make an invalid shift for the data

So shift the value when using float input
like 16 bpc uint.

5 years agolavc/qsvenc: add quality status to side_data
Zhong Li [Wed, 8 Aug 2018 14:42:47 +0000 (22:42 +0800)]
lavc/qsvenc: add quality status to side_data

Add fix a memory leak issue as James's comments.

V2: use a local pict_type since coded_frame is deprecated.

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agoavcodec/opus_parser: Handle complete frames flag.
Jacob Trimble [Mon, 20 Aug 2018 18:25:27 +0000 (11:25 -0700)]
avcodec/opus_parser: Handle complete frames flag.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/mxfenc: fix muxing when audio tracks are longer than video track
Baptiste Coudurier [Mon, 30 Apr 2018 01:44:59 +0000 (18:44 -0700)]
avformat/mxfenc: fix muxing when audio tracks are longer than video track

5 years agoavformat/audiointerleave: pad last audio frame
Baptiste Coudurier [Wed, 21 Mar 2018 21:14:36 +0000 (14:14 -0700)]
avformat/audiointerleave: pad last audio frame

5 years agoavcodec/codec_desc: mark Duck TrueMotion 2.0 Real Time as intra only
Paul B Mahol [Tue, 21 Aug 2018 15:11:43 +0000 (17:11 +0200)]
avcodec/codec_desc: mark Duck TrueMotion 2.0 Real Time as intra only

5 years agoavcodec/nvenc: add option to turn off a53 closed caption embedding
Timo Rothenpieler [Tue, 21 Aug 2018 12:28:15 +0000 (14:28 +0200)]
avcodec/nvenc: add option to turn off a53 closed caption embedding

5 years agoavformat/avidec: fix demuxing of all keyframes of sample 200707170736151.avi
Paul B Mahol [Tue, 14 Aug 2018 18:06:32 +0000 (20:06 +0200)]
avformat/avidec: fix demuxing of all keyframes of sample 200707170736151.avi

5 years agodoc/general: add some missed codecs
Paul B Mahol [Tue, 21 Aug 2018 09:54:45 +0000 (11:54 +0200)]
doc/general: add some missed codecs

5 years agoavcodec: add IMM4 decoder
Paul B Mahol [Fri, 3 Aug 2018 17:43:20 +0000 (19:43 +0200)]
avcodec: add IMM4 decoder

This work is sponsored by VideoLAN.

5 years agoavfilter/buffersrc.h: fix typo of the comment
Steven Liu [Tue, 21 Aug 2018 07:44:33 +0000 (15:44 +0800)]
avfilter/buffersrc.h: fix typo of the comment

5 years agoavformat/nsvdec: Do not parse multiple NSVf
Michael Niedermayer [Thu, 16 Aug 2018 10:23:20 +0000 (12:23 +0200)]
avformat/nsvdec: Do not parse multiple NSVf

The specification states "NSV files may contain a single file header. "
Fixes: out of array access
Fixes: nsv-asan-002f473f726a0dcbd3bd53e422c4fc40b3cf3421
Found-by: Paul Ch <paulcher@icloud.com>
Tested-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/cfhd: Use the actual count instead of the expected in peak_table()
Michael Niedermayer [Sun, 12 Aug 2018 22:58:32 +0000 (00:58 +0200)]
avcodec/cfhd: Use the actual count instead of the expected in peak_table()

Fixes: out of array access (no testcase)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/cfhd: Move peak_table() and difference_coding() calls after the existing...
Michael Niedermayer [Sun, 12 Aug 2018 22:44:48 +0000 (00:44 +0200)]
avcodec/cfhd: Move peak_table() and difference_coding() calls after the existing coefficient count check

Fixes: out of array access
Fixes: 9509/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5283250636324864
Fixes: 9572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4920757409808384
Fixes: 9596/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5114917580439552
Fixes: 9640/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6247840698335232
Fixes: 9659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6079554987753472
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/lagarith: Optimize FRAME_SOLID_RGBA
Michael Niedermayer [Sun, 12 Aug 2018 22:19:55 +0000 (00:19 +0200)]
avcodec/lagarith: Optimize FRAME_SOLID_RGBA

Changes 5466110 decicycles to 1798072 decicycles (tested with fate-suite/lagarith/lag-rgb32.avi)

Fixes: Timeout
Fixes: 9484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-5707859156271104
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 agoavformat/matroskaenc: handle AV1 extradata in packet side data
James Almer [Sat, 11 Aug 2018 02:25:32 +0000 (23:25 -0300)]
avformat/matroskaenc: handle AV1 extradata in packet side data

This is a temporary workaround for transcoding scenarious using libaom-av1
encoder, which currently can't propagate extradata during initialization.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoImprove hls VOD mode hls performance problem.
Ronak Patel [Sun, 19 Aug 2018 01:57:44 +0000 (09:57 +0800)]
Improve hls VOD mode hls performance problem.

This fixes the creation of the hls manifest in hlsenc.c by writing the
entire manifest at the end for VOD playlists. Live & Event Playlists are unaffected.
This also fixes the behavior with HLS_TEMP_FILE to work correctly when
-hlsflags temp_file is specified, instead of always relying on use_rename, which caused these problems.

Files that would previously take over a week to fragment now take
1 minute on the same hardware. This was a 153 hour audio file (2.2GB of audio).

Signed-off-by: Ronak Patel <ronak2121@yahoo.com>
5 years agoavformat/dashdec: Fix strlen(rep_id_val) with it being NULL
Michael Niedermayer [Sat, 18 Aug 2018 00:19:51 +0000 (02:19 +0200)]
avformat/dashdec: Fix strlen(rep_id_val) with it being NULL

Fixes: dash-crash-da39a3ee5e6b4b0d3255bfef95601890afd80709.xml
Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/tls_schannel: Fix use of uninitialized variable
Paweł Wegner [Thu, 2 Aug 2018 19:08:12 +0000 (21:08 +0200)]
avformat/tls_schannel: Fix use of uninitialized variable

Fixes: runtime error: passing uninitialized value to FreeContextBuffer
causes a crash

Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
5 years agolavf/udp: use ff_log_net_error to replace log_net_error
Jun Zhao [Sat, 4 Aug 2018 09:49:57 +0000 (17:49 +0800)]
lavf/udp: use ff_log_net_error to replace log_net_error

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavf/tcp: check return value of setsockopt.
Jun Zhao [Sat, 4 Aug 2018 09:52:16 +0000 (17:52 +0800)]
lavf/tcp: check return value of setsockopt.

when setsockopt fail, use ff_log_net_error to dump the string
describing for error number.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavf/network: check return value of setsockopt.
Jun Zhao [Sun, 5 Aug 2018 12:19:28 +0000 (20:19 +0800)]
lavf/network: check return value of setsockopt.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavf/network: add a ff_log_net_error function.
Jun Zhao [Sat, 4 Aug 2018 09:48:15 +0000 (17:48 +0800)]
lavf/network: add a ff_log_net_error function.

add a ff_log_net_error function for error log.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavformat/rmdec: Fix EOF check in the stream loop in ivr_read_header()
Michael Niedermayer [Thu, 16 Aug 2018 13:36:29 +0000 (15:36 +0200)]
avformat/rmdec: Fix EOF check in the stream loop in ivr_read_header()

Fixes: long running loop
Fixes: ivr-timeout-42468cb797f52f025fb329394702f5d4d64322d6
Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mlvdec: read_string() received unsigned size, make the argument unsigned
Michael Niedermayer [Thu, 16 Aug 2018 13:36:28 +0000 (15:36 +0200)]
avformat/mlvdec: read_string() received unsigned size, make the argument unsigned

Fixes: infinite loop
Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04
Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/av1: filter out tile list OBUs from samples
James Almer [Fri, 17 Aug 2018 18:26:05 +0000 (15:26 -0300)]
avformat/av1: filter out tile list OBUs from samples

As per the updated spec.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat: bump micro version after previous changes
James Almer [Fri, 17 Aug 2018 18:22:28 +0000 (15:22 -0300)]
avformat: bump micro version after previous changes

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoRevert "avcodec/libaomdec: auto insert dump_extra bitstream filter"
James Almer [Fri, 17 Aug 2018 18:17:59 +0000 (15:17 -0300)]
Revert "avcodec/libaomdec: auto insert dump_extra bitstream filter"

This reverts commit e45ed15594a2553056a577177591fbe55694af44.

The Matroska spec was updated to not remove Sequence Header OBUs from key
frames, so this is no longer needed.

5 years agoavformat/av1: update ff_isom_write_av1c() to the latest revision of the spec
James Almer [Thu, 16 Aug 2018 21:01:44 +0000 (18:01 -0300)]
avformat/av1: update ff_isom_write_av1c() to the latest revision of the spec

This will get ISOBMFF and Matroska up to date with the revised AV1 Codec
Configuration Box spec.
For now keep propagating raw OBUs as extradata until all libavcodec modules
are adapted to handle AV1CodecConfigurationRecord formatted extradata.

Tested-by: Thomas Daede <bztdlinux@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/av1_parse: take trailing bits into account when initializing the GetBitContext
James Almer [Thu, 16 Aug 2018 02:31:04 +0000 (23:31 -0300)]
avcodec/av1_parse: take trailing bits into account when initializing the GetBitContext

Also only initialize it in ff_av1_packet_split() and not ff_av1_extract_obu(),
same as h2645_parse, so GetBitContext specific failures may not affect the
latter.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoh264: Support multi-field closed captions by using AVBufferRef and not resetting...
Kieran Kunhya [Fri, 17 Aug 2018 14:12:14 +0000 (15:12 +0100)]
h264: Support multi-field closed captions by using AVBufferRef and not resetting per field

Signed-off-by: Josh de Kock <joshdk@obe.tv>
5 years agoavcodec/decode: copy the output parameters from the last bsf in the chain back to...
James Almer [Thu, 26 Jul 2018 23:43:19 +0000 (20:43 -0300)]
avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext

Certain AVCodecParameters, like the contents of the extradata, may be changed
by the init() function of any of the bitstream filters in the chain.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/decode: flush the internal bsfs instead of constantly reinitalizing them
James Almer [Thu, 26 Jul 2018 23:42:27 +0000 (20:42 -0300)]
avcodec/decode: flush the internal bsfs instead of constantly reinitalizing them

Initialize the bsfs once when opening the codec and uninitialize them once when
closing it, instead of at every codec flush/seek.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/h264_redundant_pps_bsf: implement a AVBSFContext.flush() callback
James Almer [Fri, 27 Jul 2018 01:32:15 +0000 (22:32 -0300)]
avcodec/h264_redundant_pps_bsf: implement a AVBSFContext.flush() callback

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/mpeg4_unpack_bframes_bsf: implement a AVBSFContext.flush() callback
James Almer [Fri, 27 Jul 2018 01:26:01 +0000 (22:26 -0300)]
avcodec/mpeg4_unpack_bframes_bsf: implement a AVBSFContext.flush() callback

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/vp9_superframe_bsf: implement a AVBSFContext.flush() callback
James Almer [Fri, 27 Jul 2018 01:24:47 +0000 (22:24 -0300)]
avcodec/vp9_superframe_bsf: implement a AVBSFContext.flush() callback

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/vp9_superframe_split_bsf: implement a AVBSFContext.flush() callback
James Almer [Thu, 26 Jul 2018 23:35:16 +0000 (20:35 -0300)]
avcodec/vp9_superframe_split_bsf: implement a AVBSFContext.flush() callback

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/h264_mp4toannexb_bsf: implement a AVBSFContext.flush() callback
James Almer [Thu, 26 Jul 2018 23:34:52 +0000 (20:34 -0300)]
avcodec/h264_mp4toannexb_bsf: implement a AVBSFContext.flush() callback

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/bsf: add a flushing mechanism to AVBSFContext
James Almer [Thu, 26 Jul 2018 23:32:13 +0000 (20:32 -0300)]
avcodec/bsf: add a flushing mechanism to AVBSFContext

Meant to reset the internal bsf state without the need to reinitialize it.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavfi: fix can't dispaly "slice" sub-option in "ffmpeg -h full"
Jun Zhao [Mon, 13 Aug 2018 01:30:27 +0000 (09:30 +0800)]
lavfi: fix can't dispaly "slice" sub-option in "ffmpeg -h full"

 fix can't dispaly "slice" sub-option in "ffmpeg -h full" for
 AVFilter options.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavcodec/frame_thread_encoder: fix memory leak that occurs when close encoder without...
lee ju [Sat, 4 Aug 2018 10:19:45 +0000 (10:19 +0000)]
avcodec/frame_thread_encoder: fix memory leak that  occurs when close encoder without sending eof and receiving to end

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/scpr: Check for min > max in decompress_p()
Michael Niedermayer [Sat, 4 Aug 2018 21:45:52 +0000 (23:45 +0200)]
avcodec/scpr: Check for min > max in decompress_p()

Fixes: Timeout
Fixes: 9342/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4795990841229312
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 signed 32bit overflow in shift in shorten_decode_frame()
Michael Niedermayer [Sun, 12 Aug 2018 21:06:55 +0000 (23:06 +0200)]
avcodec/shorten: Fix signed 32bit overflow in shift in shorten_decode_frame()

Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 9480/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-6647324284551168 -rss_limit_mb=2000
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 integer overflow in residual/LPC combination
Michael Niedermayer [Sun, 12 Aug 2018 20:55:59 +0000 (22:55 +0200)]
avcodec/shorten: Fix integer overflow in residual/LPC combination

Fixes: signed integer overflow: -540538872 + -2012739576 cannot be represented in type 'int'
Fixes: 9255/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5758630052757504
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: Check verbatim length
Michael Niedermayer [Sun, 12 Aug 2018 20:43:33 +0000 (22:43 +0200)]
avcodec/shorten: Check verbatim length

Fixes: Timeout
Fixes: 9252/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5780720709533696
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 agoavfilter/vf_hue: 10bit support
Michael Niedermayer [Wed, 1 Aug 2018 17:48:08 +0000 (19:48 +0200)]
avfilter/vf_hue: 10bit support

Tested-by: Tobias Rapp <t.rapp@noa-archive.com>
Tested-by: Reto Kromer <lists@reto.ch>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/filters: Add entry for sr filter.
Sergey Lavrushkin [Wed, 15 Aug 2018 16:35:09 +0000 (19:35 +0300)]
doc/filters: Add entry for sr filter.

Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agoavutil/encryption_info: Fix size calculation.
Jacob Trimble [Mon, 13 Aug 2018 22:17:11 +0000 (15:17 -0700)]
avutil/encryption_info: Fix size calculation.

Found by Chrome's ClusterFuzz: https://crbug.com/873693

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/vf_colorconstancy: cosmetic update
Mina [Tue, 14 Aug 2018 18:56:51 +0000 (20:56 +0200)]
lavfi/vf_colorconstancy: cosmetic update

5 years agolavfi/vf_colorconstancy: change option ranges
Mina [Tue, 14 Aug 2018 18:55:08 +0000 (20:55 +0200)]
lavfi/vf_colorconstancy: change option ranges

5 years agolibavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.
Sergey Lavrushkin [Thu, 2 Aug 2018 16:56:23 +0000 (19:56 +0300)]
libavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.
Sergey Lavrushkin [Tue, 31 Jul 2018 15:58:28 +0000 (18:58 +0300)]
libavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.
Sergey Lavrushkin [Tue, 31 Jul 2018 15:40:24 +0000 (18:40 +0300)]
libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolavc/videotoolboxenc: Fix compilation on osx 10.10.5 Yosemite
Thilo Borgmann [Thu, 9 Aug 2018 10:47:35 +0000 (12:47 +0200)]
lavc/videotoolboxenc: Fix compilation on osx 10.10.5 Yosemite

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agoavformat: correct fdebug loglevel
Gyan Doshi [Mon, 13 Aug 2018 07:02:41 +0000 (12:32 +0530)]
avformat: correct fdebug loglevel

fftools/cmdutils sets loglevel for fdebug to DEBUG but all fdebug output
except for two were emitted at TRACE.

5 years agolibswscale: Adds conversions from/to float gray format.
Sergey Lavrushkin [Fri, 3 Aug 2018 15:06:50 +0000 (18:06 +0300)]
libswscale: Adds conversions from/to float gray format.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibavformat/dashdec: Support negative value of the @r attrbute of S in SegmentTimelin...
sanil [Mon, 13 Aug 2018 08:53:59 +0000 (16:53 +0800)]
libavformat/dashdec: Support negative value of the @r attrbute of S in SegmentTimeline element.

The following patch supports parsing negative value of the @r attribute of S in SegmentTimeline element.

Example streams:
1. http://dash.edgesuite.net/dash264/TestCases/1c/qualcomm/1/MultiRate.mpd
2. http://dash.edgesuite.net/dash264/TestCases/1c/qualcomm/2/MultiRate.mpd

5 years agolavfi: add erosion_opencl, dilation_opencl filters
Danil Iashchenko [Sun, 12 Aug 2018 20:12:08 +0000 (23:12 +0300)]
lavfi: add erosion_opencl, dilation_opencl filters

Add erosion_opencl, dilation_opencl filters. Behave like existing erosion and dilation filters.

5 years agoavcodec/mpegaudio_parser: Initialize poutbuf*
Michael Niedermayer [Sun, 5 Aug 2018 12:51:36 +0000 (14:51 +0200)]
avcodec/mpegaudio_parser: Initialize poutbuf*

Possibly fixes: null pointer dereference
Possibly fixes: 9352/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5146068961460224
Fixes: Heap-use-after-free
Fixes: 9453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5137954375729152
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/ivi: Factor width dereference out of the loops in ivi_output_plane()
Michael Niedermayer [Sat, 4 Aug 2018 00:34:11 +0000 (02:34 +0200)]
avcodec/ivi: Factor width dereference out of the loops in ivi_output_plane()

396078 -> 268468 dezicycles

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ivi: Only clip samples when needed in ivi_output_plane()
Michael Niedermayer [Sat, 4 Aug 2018 00:31:58 +0000 (02:31 +0200)]
avcodec/ivi: Only clip samples when needed in ivi_output_plane()

435740 -> 396078 dezicycles

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/indeo5: require initial valid intra/gop headers not just later
Michael Niedermayer [Sat, 4 Aug 2018 00:19:15 +0000 (02:19 +0200)]
avcodec/indeo5: require initial valid intra/gop headers not just later

Fixes: Timeout
Fixes: 9308/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5284853581873152
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/microdvddec: limit style characters in parsing
Michael Niedermayer [Sat, 4 Aug 2018 00:56:56 +0000 (02:56 +0200)]
avcodec/microdvddec: limit style characters in parsing

Fixes: Timeout
Fixes: 9293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MICRODVD_fuzzer-5643972541153280
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 agolibavutil: Adds gray floating-point pixel formats.
Sergey Lavrushkin [Fri, 3 Aug 2018 15:02:49 +0000 (18:02 +0300)]
libavutil: Adds gray floating-point pixel formats.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/mov.c: Set start_time for all streams (in case of edit lists).
Sasi Inguva [Mon, 6 Aug 2018 23:28:50 +0000 (16:28 -0700)]
lavf/mov.c: Set start_time for all streams (in case of edit lists).

Fixes vorbis mp4 audio files, with edit list specified. Since
st->skip_samples is not set in case of vorbis , ffmpeg computes the
start_time as negative.

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/vf_libvmaf: update to use libvmaf v1.3.9
Kyle Swanson [Tue, 7 Aug 2018 22:05:16 +0000 (15:05 -0700)]
lavfi/vf_libvmaf: update to use libvmaf v1.3.9

Signed-off-by: Kyle Swanson <kswanson@netflix.com>
5 years agolavc/hevcdec: add ONLY_IF_THREADS_ENABLED where it is missing.
Jun Zhao [Wed, 8 Aug 2018 06:31:27 +0000 (14:31 +0800)]
lavc/hevcdec: add ONLY_IF_THREADS_ENABLED where it is missing.

add ONLY_IF_THREADS_ENABLED where it is missing.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
5 years agolavfi/selectivecolor: fix neutral color filtering
Clément Bœsch [Thu, 9 Aug 2018 17:22:02 +0000 (19:22 +0200)]
lavfi/selectivecolor: fix neutral color filtering

Neutrals are supposed to be anything not black (0,0,0) and not white
(N,N,N).

Previous neutral filtering code was too strict by excluding colors with
any of its RGB component maxed instead of just the white color.

Reported-by: Royi Avital <royiavital@yahoo.com>
5 years agolavfi/xbr: update filter url
Mina [Wed, 8 Aug 2018 19:49:02 +0000 (21:49 +0200)]
lavfi/xbr: update filter url

Existing link is broken.
This patch updates the existing url with a working one.

Signed-off-by: Mina <minasamy_@hotmail.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>