ffmpeg.git
2 months agoavformat: add demuxer for LEGO Racers' ALP format
Zane van Iperen [Sun, 8 Mar 2020 12:09:10 +0000 (12:09 +0000)]
avformat: add demuxer for LEGO Racers' ALP format

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavcodec: add decoder for High Voltage Software's ALP ADPCM
Zane van Iperen [Sun, 8 Mar 2020 12:09:02 +0000 (12:09 +0000)]
avcodec: add decoder for High Voltage Software's ALP ADPCM

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavformat/udp: support w32pthreads compat
phunkyfish [Mon, 2 Mar 2020 20:48:41 +0000 (20:48 +0000)]
avformat/udp: support w32pthreads compat

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agofftools/ffmpeg_opt: remove bogus warning of multiple -af and -vf usage
Marton Balint [Sat, 29 Feb 2020 21:51:33 +0000 (22:51 +0100)]
fftools/ffmpeg_opt: remove bogus warning of multiple -af and -vf usage

This is redundant after the last patch and also fixes ticket #7712.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agofftools/ffmpeg_opt: warn about overwritten parsed options
Marton Balint [Sat, 29 Feb 2020 21:44:28 +0000 (22:44 +0100)]
fftools/ffmpeg_opt: warn about overwritten parsed options

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agofftools/ffplay: fix possible memory leak in decoder
Marton Balint [Thu, 5 Mar 2020 22:28:12 +0000 (23:28 +0100)]
fftools/ffplay: fix possible memory leak in decoder

Fixes ticket #8549.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agoffmpeg: default hwaccel_output_format to cuda when hwaccel is cuvid
Timo Rothenpieler [Fri, 6 Mar 2020 13:35:13 +0000 (14:35 +0100)]
ffmpeg: default hwaccel_output_format to cuda when hwaccel is cuvid

This ensures old commandlines using -hwaccel cuvid don't break due to
the recent removal of the the cuvid-specific hwaccel bringup.

2 months agodoc/demuxers: update mov section
Gyan Doshi [Sun, 26 Jan 2020 15:02:18 +0000 (20:32 +0530)]
doc/demuxers: update mov section

Add details and all options for mov.c demuxer.

2 months agodump_extradata: Insert extradata even for small packets
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:26 +0000 (23:19 +0100)]
dump_extradata: Insert extradata even for small packets

3469cfab added a check for whether the extradata coincided with the
beginning of the packet's data in order not to add extradata to packets
that already have it. But the check used was buggy for packets whose
size is smaller than the extradata's size. This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Cosmetics
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:25 +0000 (23:19 +0100)]
h264_mp4toannexb: Cosmetics

Mainly reindentation, but some variables were also put into a smaller
scope.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Improve overread checks
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:24 +0000 (23:19 +0100)]
h264_mp4toannexb: Improve overread checks

1. Left shifts of signed values are undefined as soon as the result is
no longer representable in the target type. Therefore make nal_size
an uint32_t and drop the check for whether it is < 0.
2. The two checks for overreads (whether the length field is contained
in the packet and whether the actual unit is contained in the packet)
can be combined into one because the packet is padded, i.e. a potential
overread caused by reading the length field without checking whether
said length field is actually part of the packet's buffer is allowed
as one always stays within the padding. But one has to be aware of
a pitfall: The comparison must be performed in (at least) int64_t as
otherwise buf_end - buf might be promoted to uint32_t in which case
an already occured overread would appear as a very large number.
A comment explaining this has been added, too.
3. Units of size zero are now silently dropped; the earlier code would
instead read the first byte of the next length field (or the first byte
of padding) to infer the type of the current unit.
4. Futhermore, the earlier code returned the wrong error code. This has
been fixed, too.

Fixes #8290.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Stop reallocating the output buffer
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:23 +0000 (23:19 +0100)]
h264_mp4toannexb: Stop reallocating the output buffer

Up until now, h264_mp4toannexb would grow the output packet's buffer by
the desired amount every time another NAL unit of the input packet has
been read; this commit changes this: The input buffer is now essentially
parsed twice, once to determine the final size of the output packet and
once to write the output packet's data.

Fixes: Timeout
Fixes: 19322/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_MP4TOANNEXB_fuzzer-5688407821123584

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Consistently use pointer comparisons
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:22 +0000 (23:19 +0100)]
h264_mp4toannexb: Consistently use pointer comparisons

h264_mp4toannexb_filter currently uses both indices/offsets as well as
direct pointers comparisons for the checks whether one has reached or
even surpassed the end. This commit removes the offsets.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Copy one NAL unit at a time
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:21 +0000 (23:19 +0100)]
h264_mp4toannexb: Copy one NAL unit at a time

If processing an input NAL unit triggers the insertion of data from
extradata in front of said NAL unit, the output packet is grown (i.e.
reallocated) once to accomodate both the new extradata as well as the
input NAL unit itself; this has been changed: In such a situation, the
packet is now grown twice. While this is bad for performance, it allows
to simplify the code and ultimately to stop reallocating the packet
altogether.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Try to avoid four byte startcodes
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:20 +0000 (23:19 +0100)]
h264_mp4toannexb: Try to avoid four byte startcodes

According to the H.264 specifications, the only NAL units that need to
have four byte startcodes in H.264 Annex B format are SPS/PPS units and
units that start a new access unit. Before af7e953a, the first of these
conditions wasn't upheld as already existing in-band parameter sets
would not automatically be written with a four byte startcode, but only
when they already were at the beginning of their input packets. But it
made four byte startcodes be used too often as every unit that is written
together with a parameter set that is inserted from extradata received a
four byte startcode although a three byte start code would suffice
unless the unit itself were a parameter set.

FATE has been updated to reflect the changes. Although the patch leaves
the extradata unchanged, the size of the extradata according to the FATE
reports changes. This is due to a quirk in ff_h2645_packet_split which
is used by extract_extradata: If the input is Annex B, the first zero of
a four byte startcode is considered a part of the last unit (if any).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Simplify extradata insertion
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:19 +0000 (23:19 +0100)]
h264_mp4toannexb: Simplify extradata insertion

Up until now, h264_mp4toannexb stored the offset of the first SPS and
the first PPS in the (output) extradata in its context and used these
two numbers together with the size of the extradata and the pointer to
the extradata to determine what to insert when inserting extradata. This
led to some very long lines like "s->pps_offset != -1 ? s->pps_offset :
ctx->par_out->extradata_size - s->sps_offset". Therefore now pointers to
SPS and PPS are stored along with their respective sizes, so that e.g.
the above line can be changed to "s->sps_size".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Don't forget numOfPictureParameterSets
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:18 +0000 (23:19 +0100)]
h264_mp4toannexb: Don't forget numOfPictureParameterSets

The format of an AVCDecoderConfigurationRecord, the out-of-band
extradata of H.264 in mp4, is as follows: First four bytes containing
version, profile and level, one byte for the length size and one byte
each for the number of SPS, followed by the SPS (each with its own size
field), followed by a byte containing the number of PPS followed by the
PPS with their size fields. While the number of SPS/PPS may be zero, the
bytes containing these numbers are mandatory. Yet the byte containing
the number of PPS has been ignored in two places:
1. In the initial check for whether the extradata can contain an
AVCDecoderConfigurationRecord. The minimum size is 7, not 6.
2. No check is made for whether the extradata ended right after the last
byte of the last SPS of the SPS array. Instead the first byte of the
padding is read as if it were part of the extradata and contained the
number of PPS (namely zero, given that the padding is zeroed). No error
or warning was ever raised.
This has been changed. Such truncated extradata is now considered
invalid; the check for 2. has been incorporated into the general size
check.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Add a comment about possible overread
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:17 +0000 (23:19 +0100)]
h264_mp4toannexb: Add a comment about possible overread

Before reading a 16bit size field during parsing of extradata, no check
is performed to make sure that said length field is actually contained
in the extradata. Given that this overread is not dangerous (the extradata
is supposed to be padded), only a comment for it has been added; the error
itself will be detected as part of the normal check for overreads.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Improve extradata overread checks
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:16 +0000 (23:19 +0100)]
h264_mp4toannexb: Improve extradata overread checks

Currently during parsing the extradata, h264_mp4toannexb checks for
overreads by adding the size of the current unit to the current position
pointer and comparing this to the end position of the extradata. But
pointer comparisons and pointer arithmetic are only defined if it does not
exceed the object it is used on (one past the last element of an array
is allowed, too). In practice, this might lead to overflows. Therefore
the check has been changed to use bytestream2_get_bytes_left() which
means that the pointers get subtracted and the result gets compared to
the available size.

Furthermore, the error code has been fixed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoh264_mp4toannexb: Switch to GetByteContext to read extradata
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:15 +0000 (23:19 +0100)]
h264_mp4toannexb: Switch to GetByteContext to read extradata

This is done in order to improve readability. No functional change is
intended with this commit at all; in particular, the unsafe read
functions are used throughout as h264_extradata_to_annexb already
performs its own checks. (These checks will nevertheless be improved
in further commits.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agobytestream: Make get_bytes_left compatible with overread
Andreas Rheinhardt [Sat, 14 Dec 2019 22:19:14 +0000 (23:19 +0100)]
bytestream: Make get_bytes_left compatible with overread

bytestream2_get_bytes_left returns an unsigned int; as a result,
it returns big positive numbers if an overread already happened,
making it unsuitable for scenarios where one wants to allow this
in a controlled way (because the buffer is actually padded so that
no segfaults can happen). So change it to return an ordinary int.

Also, bytestream2_get_bytes_left_p has been modified in the same way.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavcodec/cbs_av1_syntax_template: Set seen_frame_header only after successfull uncompr...
Michael Niedermayer [Sat, 14 Dec 2019 17:43:24 +0000 (18:43 +0100)]
avcodec/cbs_av1_syntax_template: Set seen_frame_header only after successfull uncompressed_header()

Fixes: assertion failure
Fixes: 19301/clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_FRAME_MERGE_fuzzer-5743212006473728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agolavf/dashdec: add 3GPP TS26.247 probe in dash demuxer
Jun Zhao [Wed, 19 Feb 2020 03:51:20 +0000 (11:51 +0800)]
lavf/dashdec: add 3GPP TS26.247 probe in dash demuxer

Enabled the 3GP-DASH Release-10/Relase-11(3GPP TS26.247) profile
to dash demuxer probe.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2 months agolavf/dashdec: Add ts to the list of allowed extensions.
Jun Zhao [Wed, 19 Feb 2020 05:20:45 +0000 (13:20 +0800)]
lavf/dashdec: Add ts to the list of allowed extensions.

Dashdec can able to handle MPEG-2 TS streams by default as well,
used MP4Box to create the segmented MPEG-2 TS files for
verification.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2 months agodoc/filters: add missed framesync part in filter docs
Jun Zhao [Sun, 1 Mar 2020 12:06:31 +0000 (20:06 +0800)]
doc/filters: add missed framesync part in filter docs

Add missed framesync part in filter docs.

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2 months agoavcodec/siren: Check several indexes
Michael Niedermayer [Sat, 29 Feb 2020 23:00:25 +0000 (00:00 +0100)]
avcodec/siren: Check several indexes

Fixes: Multiple out of array accesses
Fixes: 20817/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5754041227542528.fuzz

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>
2 months agoffmpeg: remove superfluous custom cuvid hwaccel
James Almer [Tue, 3 Mar 2020 16:16:55 +0000 (13:16 -0300)]
ffmpeg: remove superfluous custom cuvid hwaccel

It's a duplicate of the properly implemented nvdec libavcodec hwaccel

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2 months agoavfilter/f_sendcmd: implement expr flag
Paul B Mahol [Fri, 28 Feb 2020 22:11:32 +0000 (23:11 +0100)]
avfilter/f_sendcmd: implement expr flag

Make possible to parse expressions and store results as arguments
for target filters.

2 months agoavcodec/cuviddec: use AVCodec.bsfs to filter packets
James Almer [Sun, 1 Mar 2020 02:57:48 +0000 (23:57 -0300)]
avcodec/cuviddec: use AVCodec.bsfs to filter packets

Simplifies code considerably.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2 months agoavfilter/vf_v360: simplify some unnecessary indirections
Paul B Mahol [Tue, 3 Mar 2020 11:41:30 +0000 (12:41 +0100)]
avfilter/vf_v360: simplify some unnecessary indirections

2 months agoavfilter/vf_v360: add half equirectangular input format
Paul B Mahol [Tue, 3 Mar 2020 11:21:16 +0000 (12:21 +0100)]
avfilter/vf_v360: add half equirectangular input format

2 months agoavfilter/vf_v360: add half equirectangular output format
Paul B Mahol [Tue, 3 Mar 2020 11:03:42 +0000 (12:03 +0100)]
avfilter/vf_v360: add half equirectangular output format

2 months agoavfilter/vf_sr.c: refine code to use AVPixFmtDescriptor.log2_chroma_h/w
Guo, Yejun [Fri, 21 Feb 2020 11:29:12 +0000 (19:29 +0800)]
avfilter/vf_sr.c: refine code to use AVPixFmtDescriptor.log2_chroma_h/w

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
2 months agoavcodec/adpcm: Clip step index for ADPCM_IMA_APM
Michael Niedermayer [Sun, 1 Mar 2020 21:30:00 +0000 (22:30 +0100)]
avcodec/adpcm: Clip step index for ADPCM_IMA_APM

Fixes: out of array access
Fixes: 20828/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_APM_fuzzer-5712770106654720

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>
2 months agoavformat/segment: Don't set extradata size twice
Andreas Rheinhardt [Mon, 2 Mar 2020 04:35:20 +0000 (05:35 +0100)]
avformat/segment: Don't set extradata size twice

ff_alloc_extradata() already sets the size of the extradata so doing it
again is unnecessary.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavformat/mxfenc: use a zero based continuity counter
Marton Balint [Sat, 29 Feb 2020 00:25:56 +0000 (01:25 +0100)]
avformat/mxfenc: use a zero based continuity counter

The standard does not seem to require the counter to be zero based, but some
checker tools (MyriadBits MXFInspect, Interra Baton) have validations against 0
start...

Fixes ticket #6781.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 months agoavfilter/vf_v360: add truncated square pyramid input format
Paul B Mahol [Mon, 2 Mar 2020 18:05:13 +0000 (19:05 +0100)]
avfilter/vf_v360: add truncated square pyramid input format

2 months agoavfilter/vf_v360: add truncated square pyramid output format
Paul B Mahol [Mon, 2 Mar 2020 16:40:21 +0000 (17:40 +0100)]
avfilter/vf_v360: add truncated square pyramid output format

2 months agoavfilter/vf_v360: fix cylindrical input format
Paul B Mahol [Sun, 1 Mar 2020 10:24:31 +0000 (11:24 +0100)]
avfilter/vf_v360: fix cylindrical input format

2 months agoavfilter/vf_v360: cleanup some code
Paul B Mahol [Sun, 1 Mar 2020 09:33:36 +0000 (10:33 +0100)]
avfilter/vf_v360: cleanup some code

2 months agoavfilter/vf_v360: improve interpolation for equirect input at poles
Paul B Mahol [Sat, 29 Feb 2020 21:27:11 +0000 (22:27 +0100)]
avfilter/vf_v360: improve interpolation for equirect input at poles

2 months agoavfilter/vf_cas: Remove superfluous ;
Andreas Rheinhardt [Fri, 28 Feb 2020 21:06:30 +0000 (22:06 +0100)]
avfilter/vf_cas: Remove superfluous ;

The second ; in a double ;; is actually a null statement. It triggers
the typical declaration-after-statement compiler-warnings if it occurs
in the middle of several declarations (like here).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agofftools/ffmpeg_opt: Fix leak of options when parsing options fails
Andreas Rheinhardt [Fri, 28 Feb 2020 21:06:29 +0000 (22:06 +0100)]
fftools/ffmpeg_opt: Fix leak of options when parsing options fails

Fixes #8094.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavfilter/vf_v360: add partial size setup for flat
Paul B Mahol [Sat, 29 Feb 2020 19:22:37 +0000 (20:22 +0100)]
avfilter/vf_v360: add partial size setup for flat

Other part of size is calculated from both available horizontal
and vertical FOV and given one size component.

2 months agoavfilter/vf_v360: speed up fisheye input calculation
Paul B Mahol [Sat, 29 Feb 2020 15:39:35 +0000 (16:39 +0100)]
avfilter/vf_v360: speed up fisheye input calculation

2 months agoavfilter/vf_v360: improve tetrahedron input format at frame borders
Paul B Mahol [Sat, 29 Feb 2020 13:22:51 +0000 (14:22 +0100)]
avfilter/vf_v360: improve tetrahedron input format at frame borders

2 months agoavfilter/vf_v360: simplify tetrahedron input calculation
Paul B Mahol [Sat, 29 Feb 2020 12:00:25 +0000 (13:00 +0100)]
avfilter/vf_v360: simplify tetrahedron input calculation

2 months agoavfilter/vf_v360: improve precision of some output formats
Paul B Mahol [Sat, 29 Feb 2020 11:59:23 +0000 (12:59 +0100)]
avfilter/vf_v360: improve precision of some output formats

2 months agoavcodec/cdtoons: Remove superfluous ;
Andreas Rheinhardt [Thu, 27 Feb 2020 05:33:51 +0000 (06:33 +0100)]
avcodec/cdtoons: Remove superfluous ;

The second ; in a double ;; is actually a null statement. It triggers
the typical declaration-after-statement compiler-warnings if it occurs
in the middle of several declarations (like here).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavformat/mp3dec: Count last partial frame in probe.
Michael Niedermayer [Wed, 26 Feb 2020 17:38:33 +0000 (18:38 +0100)]
avformat/mp3dec: Count last partial frame in probe.

Fixes: regression
Fixes: Ticket8511

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agolavc/v4l2_context: fix compile warning for incompatible pointer type
Linjie Fu [Thu, 27 Feb 2020 16:14:32 +0000 (00:14 +0800)]
lavc/v4l2_context: fix compile warning for incompatible pointer type

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agolavc/avcodec.h: fix missing line breaks in API documentation
Linjie Fu [Thu, 27 Feb 2020 16:13:28 +0000 (00:13 +0800)]
lavc/avcodec.h: fix missing line breaks in API documentation

"In both cases.." and "Repeat this call until.." would be better to
be in a separate line.

http://ffmpeg.org/doxygen/trunk/group__lavc__encdec.html

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavformat/ivfenc: Don't use size_t for size of file
Andreas Rheinhardt [Thu, 27 Feb 2020 05:33:50 +0000 (06:33 +0100)]
avformat/ivfenc: Don't use size_t for size of file

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 months agoavfilter/vf_v360: simplify code which handles interpolation points
Paul B Mahol [Fri, 28 Feb 2020 15:53:19 +0000 (16:53 +0100)]
avfilter/vf_v360: simplify code which handles interpolation points

3 months agoavfilter/vf_v360: add initial barrel split format input support
Paul B Mahol [Wed, 26 Feb 2020 20:23:59 +0000 (21:23 +0100)]
avfilter/vf_v360: add initial barrel split format input support

3 months agoavcodec/mpegaudioenc_template: fix invalid shift of sample
Michael Niedermayer [Thu, 23 Jan 2020 11:41:41 +0000 (12:41 +0100)]
avcodec/mpegaudioenc_template: fix invalid shift of sample

Fixes: Ticket8010

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/motion_est_template: Fix invalid shifts in no_sub_motion_search()
Michael Niedermayer [Thu, 23 Jan 2020 11:50:30 +0000 (12:50 +0100)]
avcodec/motion_est_template: Fix invalid shifts in no_sub_motion_search()

Fixes: Ticket8167

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolibavformat/avienc: Check bits per sample for PAL8
Michael Niedermayer [Sun, 26 Jan 2020 21:19:48 +0000 (22:19 +0100)]
libavformat/avienc: Check bits per sample for PAL8

Fixes: assertion failure
Fixes: Ticket 8172

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mpegts: Improve the position determination for avpriv_mpegts_parse_packet()
Michael Niedermayer [Mon, 27 Jan 2020 18:07:00 +0000 (19:07 +0100)]
avformat/mpegts: Improve the position determination for avpriv_mpegts_parse_packet()

Fixes: assertion failure
Fixes: Ticket 8005

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agomailmap: Add another old mail address I used.
Carl Eugen Hoyos [Thu, 27 Feb 2020 12:02:06 +0000 (13:02 +0100)]
mailmap: Add another old mail address I used.

3 months agomailmap: add entry for myself
Thilo Borgmann [Thu, 27 Feb 2020 11:24:20 +0000 (12:24 +0100)]
mailmap: add entry for myself

3 months agomailmap: add entry for myself
rcombs [Thu, 27 Feb 2020 07:22:17 +0000 (01:22 -0600)]
mailmap: add entry for myself

3 months agoAdd .mailmap
Josh de Kock [Sat, 22 Feb 2020 21:11:31 +0000 (21:11 +0000)]
Add .mailmap

This allows for easy shortlog/log parsing, useful in determining
eligible members of the general assembly for the new FFmpeg voting
system.

Signed-off-by: Josh de Kock <josh@itanimul.li>
3 months agoavdevice/decklink: add support for SDK version 11.5
Marton Balint [Fri, 21 Feb 2020 21:30:16 +0000 (22:30 +0100)]
avdevice/decklink: add support for SDK version 11.5

Fixes ticket #8534.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavdevice/decklink_dec: fix stopping streams in read_close
Marton Balint [Fri, 21 Feb 2020 19:39:31 +0000 (20:39 +0100)]
avdevice/decklink_dec: fix stopping streams in read_close

The capture_started variable was never set, it is simpler to call the stop
functions unconditionally if the interface is available.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agodoc/muxers: describe the default behavior of the write_prft dash muxer option
James Almer [Wed, 26 Feb 2020 14:03:45 +0000 (11:03 -0300)]
doc/muxers: describe the default behavior of the write_prft dash muxer option

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavformat/dashenc: use a quieter log lever when informing prft was automatically enabled
James Almer [Wed, 26 Feb 2020 13:50:16 +0000 (10:50 -0300)]
avformat/dashenc: use a quieter log lever when informing prft was automatically enabled

Suggested-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavfilter/vf_v360: add barrel split format output support
Paul B Mahol [Wed, 26 Feb 2020 13:37:39 +0000 (14:37 +0100)]
avfilter/vf_v360: add barrel split format output support

3 months agolibswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data
Ting Fu [Wed, 26 Feb 2020 02:54:29 +0000 (10:54 +0800)]
libswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data

Fixes ticket #8532

Signed-off-by: Ting Fu <ting.fu@intel.com>
3 months agoconfigure: Enable section_data_rel_ro for OpenBSD aarch64 / arm
Brad Smith [Sun, 23 Feb 2020 21:15:35 +0000 (16:15 -0500)]
configure: Enable section_data_rel_ro for OpenBSD aarch64 / arm

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/magicyuv: Check that there are enough lines for interlacing to be possible
Michael Niedermayer [Fri, 21 Feb 2020 23:42:30 +0000 (00:42 +0100)]
avcodec/magicyuv: Check that there are enough lines for interlacing to be possible

Fixes: out of array access
Fixes: 20763/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5759562508664832

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>
3 months agoavformat/mvdec: Check stream numbers
Michael Niedermayer [Sun, 23 Feb 2020 08:27:27 +0000 (09:27 +0100)]
avformat/mvdec: Check stream numbers

Fixes: null pointer dereference
Fixes: 20768/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5638648978735104.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mux: Cosmetics
Andreas Rheinhardt [Tue, 13 Aug 2019 02:47:17 +0000 (04:47 +0200)]
avformat/mux: Cosmetics

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/segafilmenc: Add deinit function
Andreas Rheinhardt [Tue, 14 Jan 2020 03:13:36 +0000 (04:13 +0100)]
avformat/segafilmenc: Add deinit function

Prevents memleaks when the trailer is never written or when shifting the
data fails when writing the trailer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/segafilmenc: Combine several checks
Andreas Rheinhardt [Tue, 14 Jan 2020 03:13:35 +0000 (04:13 +0100)]
avformat/segafilmenc: Combine several checks

by moving them around.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_zscale: fix crash on unaligned input
Jacob Ruiz [Fri, 14 Feb 2020 06:50:38 +0000 (22:50 -0800)]
avfilter/vf_zscale: fix crash on unaligned input

3 months agoavfilter/vf_convolve: reset fft/ifft pointers after free
Paul B Mahol [Tue, 25 Feb 2020 16:35:09 +0000 (17:35 +0100)]
avfilter/vf_convolve: reset fft/ifft pointers after free

3 months agodoc/filters: split tblend from blend
Paul B Mahol [Tue, 25 Feb 2020 12:23:14 +0000 (13:23 +0100)]
doc/filters: split tblend from blend

3 months agodoc/filters: mention commands for v360 filter
Paul B Mahol [Tue, 25 Feb 2020 12:17:32 +0000 (13:17 +0100)]
doc/filters: mention commands for v360 filter

3 months agoavcodec/utvideodec: add support for UQY0
Paul B Mahol [Tue, 25 Feb 2020 12:09:20 +0000 (13:09 +0100)]
avcodec/utvideodec: add support for UQY0

3 months agoavfilter/vf_v360: add basic commands support
Paul B Mahol [Tue, 25 Feb 2020 10:33:06 +0000 (11:33 +0100)]
avfilter/vf_v360: add basic commands support

3 months agoavfilter/vf_v360: handle gracefully invalid values for rorder option
Paul B Mahol [Tue, 25 Feb 2020 10:12:02 +0000 (11:12 +0100)]
avfilter/vf_v360: handle gracefully invalid values for rorder option

3 months agoavcodec/Makefile: remove bogus/duplicate PNG parser entry
Anamitra Ghorui [Mon, 24 Feb 2020 15:02:52 +0000 (20:32 +0530)]
avcodec/Makefile: remove bogus/duplicate PNG parser entry

3 months agoavfilter: add Contrast Adaptive Sharpen video filter
Paul B Mahol [Mon, 10 Feb 2020 17:10:55 +0000 (18:10 +0100)]
avfilter: add Contrast Adaptive Sharpen video filter

3 months agodoc: add adpcm_ima_{ssi,apm}
Zane van Iperen [Sun, 23 Feb 2020 04:28:00 +0000 (04:28 +0000)]
doc: add adpcm_ima_{ssi,apm}

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 months agochangelog: add adpcm_ima_ssi decoder and kvag demuxer
Zane van Iperen [Sun, 23 Feb 2020 04:27:55 +0000 (04:27 +0000)]
changelog: add adpcm_ima_ssi decoder and kvag demuxer

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 months agohwcontext_vaapi: Only accept a render node when deriving from DRM device
Mark Thompson [Sun, 16 Feb 2020 20:59:54 +0000 (20:59 +0000)]
hwcontext_vaapi: Only accept a render node when deriving from DRM device

If we are given a non-render node, try to find the matching render node and
fail if that isn't possible.

libva will not accept a non-render device which is not DRM master, because
it requires legacy DRM authentication to succeed in that case:
<https://github.com/intel/libva/blob/master/va/drm/va_drm.c#L68-L75>.  This
is annoying for kmsgrab because in most recording situations DRM master is
already held by something else (such as a windowing system), leading to
device derivation not working and forcing the user to create the target
VAAPI device separately.

3 months agolavc/vaapi_decode: add decode support for HEVC_MAIN_STILL_PICTURE
Linjie Fu [Wed, 15 Jan 2020 07:02:40 +0000 (15:02 +0800)]
lavc/vaapi_decode: add decode support for HEVC_MAIN_STILL_PICTURE

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavc/hevcdec: add 4:2:2 8-bit/10-bit VAAPI decode support
Linjie Fu [Wed, 15 Jan 2020 07:02:21 +0000 (15:02 +0800)]
lavc/hevcdec: add 4:2:2 8-bit/10-bit VAAPI decode support

Add decode support for 4:2:2 8-bt and 10-bit HEVC Range Extension clips.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavc/vaapi_decode: add profile_parser and format map support for HEVC REXT
Linjie Fu [Wed, 15 Jan 2020 07:02:02 +0000 (15:02 +0800)]
lavc/vaapi_decode: add profile_parser and format map support for HEVC REXT

Add function pointer field in vaapi_profile_map[], set profile_parser
for HEVC_REXT to find the exact va_profile.

Also add format map support.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavc/vaapi_hevc: add function to find exact va_profile for REXT
Linjie Fu [Wed, 15 Jan 2020 07:01:42 +0000 (15:01 +0800)]
lavc/vaapi_hevc: add function to find exact va_profile for REXT

Add vaapi_parse_rext_profile and use profile constraint flags to
determine the exact va_profile for HEVC_REXT.

If profile mismatch is allowed, select Main profile by default.

Add build object in Makefile for h265_profile_level dependency.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavc/hevc_ps: parse constraint flags for HEVC REXT
Linjie Fu [Wed, 15 Jan 2020 07:01:28 +0000 (15:01 +0800)]
lavc/hevc_ps: parse constraint flags for HEVC REXT

Parse all the constraint flags according to ITU-T Rec. H.265 (02/2018).

They have to be passed to hw decoders to determine the exact profile for Range
Extension HEVC.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavc/vaapi_hevc: extend parameter buffer to ParameterBufferHEVCExtension
Linjie Fu [Wed, 15 Jan 2020 07:01:05 +0000 (15:01 +0800)]
lavc/vaapi_hevc: extend parameter buffer to ParameterBufferHEVCExtension

Extend ParameterBufferHEVC to ParameterBufferHEVCExtension for both
VAPicture and VASlice.

Pass Range Extension flags to support the decode for HEVC REXT.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavu/hwcontext_vaapi: add vaapi_format_map support for Y210
Linjie Fu [Wed, 15 Jan 2020 07:00:12 +0000 (15:00 +0800)]
lavu/hwcontext_vaapi: add vaapi_format_map support for Y210

VA_RT_FORMAT describes the desired sampling format for surface.

When creating surface, VA_RT_FORMAT will be used firstly to choose
the expected fourcc/media_format for the surface. And the fourcc
will be revised by the value of VASurfaceAttribPixelFormat.

Add vaapi_format_map support for new pixel_format Y210.
This is fundamental for both VA-API and QSV.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agoswscale: Add swscale input support for Y210LE
Linjie Fu [Wed, 15 Jan 2020 06:59:34 +0000 (14:59 +0800)]
swscale: Add swscale input support for Y210LE

Add swscale input support for Y210LE, output support and fate
test could be added later if there is requirement for software
CSC to this packed format.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agolavu/pix_fmt: add new pixel format y210
Linjie Fu [Wed, 15 Jan 2020 06:58:38 +0000 (14:58 +0800)]
lavu/pix_fmt: add new pixel format y210

Add some packed 4:2:2 10-bit pixel formats for hardware decode support
in VAAPI and QSV.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
3 months agoavcodec/libzvbi-teletextdec: add option to set default G0 character set
Kirill Savkov [Wed, 19 Feb 2020 06:44:00 +0000 (09:44 +0300)]
avcodec/libzvbi-teletextdec: add option to set default G0 character set

Signed-off-by: Kirill Savkov <k.savkov@inventos.ru>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agodoc/protocols: clarify SRT timeout options docs
Marton Balint [Sat, 15 Feb 2020 10:29:28 +0000 (11:29 +0100)]
doc/protocols: clarify SRT timeout options docs

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/libsrt: make avformat connect timeout 0 by default
Marton Balint [Sat, 15 Feb 2020 10:30:16 +0000 (11:30 +0100)]
avformat/libsrt: make avformat connect timeout 0 by default

Otherwise the user is not able to override the SRT API connect timeout above 5
sec without also setting the timeout option.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 months agoavformat/libsrt: use listen_timeout for listening
Marton Balint [Fri, 14 Feb 2020 23:30:29 +0000 (00:30 +0100)]
avformat/libsrt: use listen_timeout for listening

Signed-off-by: Marton Balint <cus@passwd.hu>