]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agolibavfilter/dnn: add layer maximum for native mode.
Guo, Yejun [Fri, 20 Sep 2019 03:55:48 +0000 (11:55 +0800)]
libavfilter/dnn: add layer maximum for native mode.

The reason to add this layer is that it is used by srcnn in vf_sr.
This layer is currently ignored in native mode. After this patch,
we can add multiple outputs support for native mode.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoDelete unused branch in libaomenc
elliottk [Sun, 15 Sep 2019 21:02:50 +0000 (14:02 -0700)]
Delete unused branch in libaomenc

this branch is leftover from libvpxenc+vp8

Signed-off-by: James Zern <jzern@google.com>
4 years agoavcodec/libvpxenc: add ROI-based encoding support for VP8/VP9
Guo, Yejun [Thu, 12 Sep 2019 10:25:21 +0000 (18:25 +0800)]
avcodec/libvpxenc: add ROI-based encoding support for VP8/VP9

example command line to verify it:
./ffmpeg -i input.stream -vf addroi=0:0:iw/3:ih/3:-0.8 -c:v libvpx -b:v 2M tmp.webm

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: James Zern <jzern@google.com>
4 years agoavformat/movenc: don't hardcode the colr box size
James Almer [Fri, 20 Sep 2019 00:32:40 +0000 (21:32 -0300)]
avformat/movenc: don't hardcode the colr box size

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agolavc/cook: Remove an incorrect comment.
Carl Eugen Hoyos [Thu, 19 Sep 2019 23:36:13 +0000 (01:36 +0200)]
lavc/cook: Remove an incorrect comment.

Multichannel cook was implemented in 67da3182.

4 years agoavformat/mpegts: add support for EPG extraction from mpegts
Anthony Delannoy [Wed, 21 Aug 2019 09:46:56 +0000 (11:46 +0200)]
avformat/mpegts: add support for EPG extraction from mpegts

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec: add EPG codec ID
Anthony Delannoy [Wed, 21 Aug 2019 09:36:15 +0000 (11:36 +0200)]
avcodec: add EPG codec ID

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/mpegts: add all well known PIDs and TIDs to mpegts.h
Anthony Delannoy [Fri, 26 Jul 2019 09:41:00 +0000 (11:41 +0200)]
avformat/mpegts: add all well known PIDs and TIDs to mpegts.h

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavfilter/dnn: fix inclusion guard in dnn/dnn_backend_native_layer_depth2space.h
Marton Balint [Thu, 19 Sep 2019 19:28:10 +0000 (21:28 +0200)]
avfilter/dnn: fix inclusion guard in dnn/dnn_backend_native_layer_depth2space.h

Fixes fate-source failure.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavfilter/vf_v360: add ball projection format
Paul B Mahol [Thu, 19 Sep 2019 16:36:19 +0000 (18:36 +0200)]
avfilter/vf_v360: add ball projection format

4 years agoFATE/dnn: add unit test for dnn depth_to_space layer
Guo, Yejun [Thu, 5 Sep 2019 06:00:54 +0000 (14:00 +0800)]
FATE/dnn: add unit test for dnn depth_to_space layer

'make fate-dnn-layer-depth2space' to run the test

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agolibavfilter/dnn: separate depth_to_space layer from dnn_backend_native.c to a new...
Guo, Yejun [Thu, 5 Sep 2019 06:00:46 +0000 (14:00 +0800)]
libavfilter/dnn: separate depth_to_space layer from dnn_backend_native.c to a new file

the logic is that one layer in one separated source file to make
the source files simple for maintaining.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoFATE/dnn: add unit test for dnn conv2d layer
Guo, Yejun [Thu, 5 Sep 2019 06:00:39 +0000 (14:00 +0800)]
FATE/dnn: add unit test for dnn conv2d layer

'make fate-dnn-layer-conv2d' to run the test

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agolibavfilter/dnn: separate conv2d layer from dnn_backend_native.c to a new file
Guo, Yejun [Thu, 5 Sep 2019 06:00:28 +0000 (14:00 +0800)]
libavfilter/dnn: separate conv2d layer from dnn_backend_native.c to a new file

the logic is that one layer in one separated source file to make
the source files simple for maintaining.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavcodec/v210enc: move v210_enc_8/10 function to template file
Limin Wang [Tue, 17 Sep 2019 03:42:28 +0000 (11:42 +0800)]
avcodec/v210enc: move v210_enc_8/10 function to template file

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/v210enc: make 8bit and 10bit process consistent
Limin Wang [Tue, 17 Sep 2019 03:42:27 +0000 (11:42 +0800)]
avcodec/v210enc: make 8bit and 10bit process consistent

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/v210enc: add depth parameter for WRITE_PIXELS and CLIP
Limin Wang [Tue, 17 Sep 2019 03:42:26 +0000 (11:42 +0800)]
avcodec/v210enc: add depth parameter for WRITE_PIXELS and CLIP

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/common: Fix undefined shift
Andreas Rheinhardt [Wed, 18 Sep 2019 03:26:07 +0000 (05:26 +0200)]
avutil/common: Fix undefined shift

av_mod_uintp2_c uses a bitwise AND with (1 << p) - 1 to clear the high
bits of an unsigned int. But this is undefined if p == 31, because 1 is
an int and 2^31 is not representable in an int. So make 1 unsigned.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/avpacket: Improve allocating packets
Andreas Rheinhardt [Wed, 18 Sep 2019 03:26:05 +0000 (05:26 +0200)]
avcodec/avpacket: Improve allocating packets

av_mallocz + av_init_packet leads to the same result as av_mallocz +
av_packet_unref, but faster.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mjpegdec: Unify switch statements
Andreas Rheinhardt [Wed, 18 Sep 2019 03:25:59 +0000 (05:25 +0200)]
avcodec/mjpegdec: Unify switch statements

This has been forgotten in d5a3a20d.

Found via PVS-Studio (see ticket #8156).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/utils: Preserve integrity of linked list
Andreas Rheinhardt [Mon, 19 Aug 2019 21:56:19 +0000 (23:56 +0200)]
avformat/utils: Preserve integrity of linked list

1. Instead of relying on ff_packet_list_get to get the oldest element in
an AVPacketList, ff_read_packet used its own ad-hoc code. Said code
forgot to set the end of the list to NULL if the last element of the
list has been removed, thereby leaving the list in an inconsistent state.
2. Furthermore, if the list was not empty, the oldest element of the
list would always be copied into another packet structure before it was
known whether the oldest entry of the list would be removed. This makes
the ownership confusing and potentially copies unnecessarily.

Both of these issues have been fixed. ff_packet_list_get is used now.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/internal: Improve documentation of ff_packet_list_get
Andreas Rheinhardt [Mon, 19 Aug 2019 21:56:18 +0000 (23:56 +0200)]
avformat/internal: Improve documentation of ff_packet_list_get

The documentation of ff_packet_list_get currently didn't match the
actual usage:
1. It said that the destination packet is supposed to be initialized.
But this makes no sense given that it will be overwritten completely and
flacenc, mp3enc and ttaenc ignored this.
2. ff_packet_list_get returns an int, although it can't fail in case the
packet list is not empty (for which there is an assert). Again, several
callers didn't check for any return value.
In both cases, the documentation has been adapted to match actual usage.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agocheckasm/opusdsp: declare opus_deemphasis as a function returning a float
James Almer [Wed, 18 Sep 2019 14:23:36 +0000 (11:23 -0300)]
checkasm/opusdsp: declare opus_deemphasis as a function returning a float

Fixes ticket #8175

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agodoc: various spelling, grammar and formatting fixes
Moritz Barsnick [Tue, 17 Sep 2019 08:21:02 +0000 (10:21 +0200)]
doc: various spelling, grammar and formatting fixes

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
4 years agolavf/mpegts: Support demuxing AVS2.
hwrenx [Wed, 18 Sep 2019 00:18:13 +0000 (02:18 +0200)]
lavf/mpegts: Support demuxing AVS2.

4 years agoavfilter/vf_v360: add mercator projection
Paul B Mahol [Tue, 17 Sep 2019 20:15:07 +0000 (22:15 +0200)]
avfilter/vf_v360: add mercator projection

4 years agotools/target_dec_fuzzer: Adjust threshold for binkvideo
Michael Niedermayer [Sat, 14 Sep 2019 21:39:49 +0000 (23:39 +0200)]
tools/target_dec_fuzzer: Adjust threshold for binkvideo

Fixes: Timeout (89sec -> 7sec)
Fixes: 17035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5737222422134784
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mov: Check for EOF in mov_read_meta()
Michael Niedermayer [Fri, 30 Aug 2019 23:25:03 +0000 (01:25 +0200)]
avformat/mov: Check for EOF in mov_read_meta()

Fixes: Timeout (195sec -> 2ms)
Fixes: 16735/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5090676403863552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofftools/ffmpeg_opt: Fix signed integer overflow
Andreas Rheinhardt [Mon, 16 Sep 2019 15:55:01 +0000 (17:55 +0200)]
fftools/ffmpeg_opt: Fix signed integer overflow

Fixes ticket #8154.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mov: Fix memleak
Andreas Rheinhardt [Mon, 16 Sep 2019 15:54:59 +0000 (17:54 +0200)]
avformat/mov: Fix memleak

When the mov/mp4 demuxer encounters an error during decrypting a packet,
it returns the error, yet doesn't free the packet, so that the packet
leaks. This has been fixed in this commit.

Fixes the memleaks from ticket #8150.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/hevcdec: Fix memleak of a53_caption
Michael Niedermayer [Sun, 30 Jun 2019 17:40:37 +0000 (19:40 +0200)]
avcodec/hevcdec: Fix memleak of a53_caption

Fixes: 15295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5675655187922944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/ttaenc: Fix undefined shift
Andreas Rheinhardt [Sun, 15 Sep 2019 20:01:20 +0000 (22:01 +0200)]
avcodec/ttaenc: Fix undefined shift

ttaenc contained (1 << unary) - 1 as an argument for a function
expecting an unsigned int. unary can be as big as 31 in this case.
The type of the shift and the whole expression is int, because 1 fits
into an integer, so that the behaviour is undefined if unary == 31
as the result of the shift can't be represented in an int §. Subtraction
by 1 (which makes the result of the whole expression representable in
an int) doesn't change that this is undefined (it usually leads to
signed integer overflow which is undefined, too).

The solution is simple: Make 1 unsigned to change the type of the
whole expression to unsigned int (as the function expects anyway).

Fixes ticket #8153.

§: This of course presupposes the common int range of -2^31..2^31-1

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>
4 years agolavc/g729dec: Support decoding Sipro ACELP.KELVIN.
Carl Eugen Hoyos [Mon, 16 Sep 2019 18:57:53 +0000 (20:57 +0200)]
lavc/g729dec: Support decoding Sipro ACELP.KELVIN.

Fixes ticket #4799.
Analyzed-by: Aleksandr Ustinov
4 years agoavcodec/allcodecs: make libdav1d the preferred AV1 decoder
James Almer [Sun, 15 Sep 2019 14:29:56 +0000 (11:29 -0300)]
avcodec/allcodecs: make libdav1d the preferred AV1 decoder

It's considerably faster than libaom in most systems.

Reviewed-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_v360: add slice threading to remap calculation
Paul B Mahol [Mon, 16 Sep 2019 16:41:51 +0000 (18:41 +0200)]
avfilter/vf_v360: add slice threading to remap calculation

4 years agoavfilter/vf_v360: refactor creation of remap data
Paul B Mahol [Mon, 16 Sep 2019 16:16:57 +0000 (18:16 +0200)]
avfilter/vf_v360: refactor creation of remap data

4 years agoavfilter/vf_v360: reverse order of remap for loops
Paul B Mahol [Mon, 16 Sep 2019 16:03:16 +0000 (18:03 +0200)]
avfilter/vf_v360: reverse order of remap for loops

4 years agoavfilter/vf_v360: simplify allocating remap data
Paul B Mahol [Mon, 16 Sep 2019 15:58:08 +0000 (17:58 +0200)]
avfilter/vf_v360: simplify allocating remap data

4 years agoavfilter/vf_v360: move some local variables to private filter context
Paul B Mahol [Mon, 16 Sep 2019 15:53:58 +0000 (17:53 +0200)]
avfilter/vf_v360: move some local variables to private filter context

4 years agoavfilter/vf_v360: rename r_tmp variables
Paul B Mahol [Mon, 16 Sep 2019 15:50:16 +0000 (17:50 +0200)]
avfilter/vf_v360: rename r_tmp variables

4 years agoavcodec/videotoolboxenc: warn user when output will use a different profile/level...
Rick Kern [Mon, 16 Sep 2019 13:02:02 +0000 (09:02 -0400)]
avcodec/videotoolboxenc: warn user when output will use a different profile/level than requested.

Signed-off-by: Rick Kern <kernrj@gmail.com>
4 years agoavcodec/videotoolboxenc: add H264 Extended profile and level
Limin Wang [Tue, 20 Aug 2019 11:04:29 +0000 (19:04 +0800)]
avcodec/videotoolboxenc: add H264 Extended profile and level

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
4 years agoavcodec/videotoolboxenc: fix encoding frame crash on iOS 11
sharpbai [Tue, 13 Aug 2019 06:18:21 +0000 (14:18 +0800)]
avcodec/videotoolboxenc: fix encoding frame crash on iOS 11

On iOS 11, encoding a frame may return error with log
"Error encoding frame 0", which means vtenc_output_callback
is called with status=0 and sample_buffer=NULL. Then the
encoding session will be crashed on next callback wether or not
closing the codec context.

Let us look through the link below introducing VTCompressionOutputCallback,

https://developer.apple.com/documentation/videotoolbox/vtcompressionoutputcallback?language=objc

"status=0" (noErr) means compression was successful.
"sampleBuffer=NULL" means the frame was dropped when compression
was successful (status=0) or compression was not successful (status!=0).

So we should not set AVERROR_EXTERNAL on "status=0" and "sample_buffer=NULL"
as it is not a error.

The fix is that we only set AVERROR_EXTERNAL with status value non zero.
When sample_buffer is NULL and status value is zero, we simply return
with no other operation.

This crash often occurs on iOS 11 for example encoding 720p@25fps.

Signed-off-by: sharpbai <sharpbai@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
4 years agoavfilter/vf_stereo3d: assert that out variable is valid
Paul B Mahol [Mon, 16 Sep 2019 09:45:28 +0000 (11:45 +0200)]
avfilter/vf_stereo3d: assert that out variable is valid

4 years agoavfilter/vf_stereo3d: merge same code in case branches
Paul B Mahol [Mon, 16 Sep 2019 09:41:50 +0000 (11:41 +0200)]
avfilter/vf_stereo3d: merge same code in case branches

4 years agoavfilter/vf_shuffleplanes: remove not needed line
Paul B Mahol [Mon, 16 Sep 2019 09:28:03 +0000 (11:28 +0200)]
avfilter/vf_shuffleplanes: remove not needed line

4 years agoavfilter/vf_ciescope: remove dead assignments
Paul B Mahol [Mon, 16 Sep 2019 09:22:16 +0000 (11:22 +0200)]
avfilter/vf_ciescope: remove dead assignments

4 years agoavfilter/window_func: clarify intention in dolph window calculation
Paul B Mahol [Mon, 16 Sep 2019 08:57:09 +0000 (10:57 +0200)]
avfilter/window_func: clarify intention in dolph window calculation

4 years agoavfilter/vf_v360: add missing av_assert0()
Paul B Mahol [Mon, 16 Sep 2019 08:40:47 +0000 (10:40 +0200)]
avfilter/vf_v360: add missing av_assert0()

4 years agoavfilter/vf_avgblur: remove dupe assignment
Paul B Mahol [Mon, 16 Sep 2019 08:31:05 +0000 (10:31 +0200)]
avfilter/vf_avgblur: remove dupe assignment

4 years agoavfilter/af_headphone: return on error immediately
Paul B Mahol [Mon, 16 Sep 2019 08:27:42 +0000 (10:27 +0200)]
avfilter/af_headphone: return on error immediately

4 years agoavfilter/x86/vf_360: add most of >8 depth asm
Paul B Mahol [Sun, 15 Sep 2019 16:13:26 +0000 (18:13 +0200)]
avfilter/x86/vf_360: add most of >8 depth asm

4 years agoavformat/vividas: Remove align offset which is always masked off
Michael Niedermayer [Sat, 31 Aug 2019 20:33:56 +0000 (22:33 +0200)]
avformat/vividas: Remove align offset which is always masked off

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/vividas: remove dead assignment
Michael Niedermayer [Sat, 31 Aug 2019 20:32:32 +0000 (22:32 +0200)]
avformat/vividas: remove dead assignment

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/cdxl: Fix integer overflow in intermediate
Michael Niedermayer [Fri, 30 Aug 2019 22:20:39 +0000 (00:20 +0200)]
avformat/cdxl: Fix integer overflow in intermediate

Fixes: signed integer overflow: 65535 * 65312 cannot be represented in type 'int'
Fixes: 16704/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6294115603447808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/cfhd: Check that cropped size is smaller than full
Michael Niedermayer [Thu, 29 Aug 2019 16:59:10 +0000 (18:59 +0200)]
avcodec/cfhd: Check that cropped size is smaller than full

Fixes: signed integer overflow: 57342 * 120830 cannot be represented in type 'int'
Fixes: 16426/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5758744817827840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
4 years agotools/target_dec_fuzzer: increase snows threshold
Michael Niedermayer [Thu, 29 Aug 2019 19:08:42 +0000 (21:08 +0200)]
tools/target_dec_fuzzer: increase snows threshold

snow allows creating large output from tiny input, like other
wavelet codecs

Fixes: Timeout (82sec -> 1.5sec)
Fixes: 9520/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6286612576075776
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/hevcdec: repeat character in skiped
Michael Niedermayer [Wed, 28 Aug 2019 17:01:41 +0000 (19:01 +0200)]
avcodec/hevcdec: repeat character in skiped

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agorepeat an even number of characters in occured
Michael Niedermayer [Wed, 28 Aug 2019 17:04:42 +0000 (19:04 +0200)]
repeat an even number of characters in occured

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/hcom: Tell the compiler about set but not read variables
Michael Niedermayer [Wed, 28 Aug 2019 17:07:23 +0000 (19:07 +0200)]
avformat/hcom: Tell the compiler about set but not read variables

This avoids 3 warnings

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations and code"
Michael Niedermayer [Wed, 28 Aug 2019 17:09:46 +0000 (19:09 +0200)]
doc/examples/decode_audio: Fix "warning: ISO C90 forbids mixed declarations and code"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/gdv: Replace assert() checking bitstream by if()
Michael Niedermayer [Wed, 28 Aug 2019 19:53:05 +0000 (21:53 +0200)]
avcodec/gdv: Replace assert() checking bitstream by if()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibavcodec/utils: Free threads on init failure
Michael Niedermayer [Tue, 27 Aug 2019 15:21:00 +0000 (17:21 +0200)]
libavcodec/utils: Free threads on init failure

Fixes: Multiple memleaks
Fixes: ffmpeg-memory-leak
Found-by: Francis Provencher <francis@protekresearchlab.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agotools/target_dec_fuzzer: Adjust motionpixels threshold
Michael Niedermayer [Sun, 25 Aug 2019 15:24:41 +0000 (17:24 +0200)]
tools/target_dec_fuzzer: Adjust motionpixels threshold

Fixes: Timeout (151sec -> 173ms)
Fixes: 16053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5647069169057792
Fixes: 16053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5108957126852608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros.
gxw [Tue, 6 Aug 2019 11:11:16 +0000 (19:11 +0800)]
avutil/mips: refactor msa SLDI_Bn_0 and SLDI_Bn macros.

Changing details as following:
1. The previous order of parameters are irregular and difficult to
   understand. Adjust the order of the parameters according to the
   rule: (RTYPE, input registers, input mask/input index/..., output registers).
   Most of the existing msa macros follow the rule.
2. Remove the redundant macro SLDI_Bn_0 and use SLDI_Bn instead.

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavc/videotoolboxdec: fix crop handling when multithreaded
Rodger Combs [Sat, 7 Sep 2019 03:31:06 +0000 (22:31 -0500)]
lavc/videotoolboxdec: fix crop handling when multithreaded

This was partially fixed by 233cd89, but it made changes to AVFrame fields
from within end_frame, which doesn't work consistently when multithreading
is enabled. This is what the post_process function is for.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2: fix compile with older videodev2.h
Aman Gupta [Fri, 13 Sep 2019 23:30:13 +0000 (16:30 -0700)]
avcodec/v4l2: fix compile with older videodev2.h

Some of these symbols are only defined in newer kernel releases.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/libdav1d: use the library default for the filmgrain option
James Almer [Sun, 15 Sep 2019 14:09:39 +0000 (11:09 -0300)]
avcodec/libdav1d: use the library default for the filmgrain option

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/rmdec.c: fix brackets around arguments
James Almer [Sun, 15 Sep 2019 14:04:33 +0000 (11:04 -0300)]
avformat/rmdec.c: fix brackets around arguments

Regression since 78f52b4fe3

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/rmdec.c: fix left shift of negative value in rm_sync()
James Almer [Sun, 15 Sep 2019 03:06:34 +0000 (00:06 -0300)]
avformat/rmdec.c: fix left shift of negative value in rm_sync()

Fixes ticket 8143.

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_stereo3d: add tb (top-bottom) aliases
Paul B Mahol [Sun, 15 Sep 2019 08:50:12 +0000 (10:50 +0200)]
avfilter/vf_stereo3d: add tb (top-bottom) aliases

4 years agoavfilter/vf_v360: refactor dimensions and offsets calculations
Paul B Mahol [Sun, 15 Sep 2019 08:37:42 +0000 (10:37 +0200)]
avfilter/vf_v360: refactor dimensions and offsets calculations

4 years agodoc/filters: add another v360 example
Paul B Mahol [Sat, 14 Sep 2019 17:50:47 +0000 (19:50 +0200)]
doc/filters: add another v360 example

4 years agoavfilter/vf_v360: implement stereo 3D support
Paul B Mahol [Sat, 14 Sep 2019 16:16:02 +0000 (18:16 +0200)]
avfilter/vf_v360: implement stereo 3D support

4 years agoavfilter/vf_v360: reduce by one cosf call less
Paul B Mahol [Sat, 14 Sep 2019 15:40:46 +0000 (17:40 +0200)]
avfilter/vf_v360: reduce by one cosf call less

4 years agoavfilter/vf_v360: define variables in for loops consistently
Paul B Mahol [Sat, 14 Sep 2019 15:31:58 +0000 (17:31 +0200)]
avfilter/vf_v360: define variables in for loops consistently

4 years agoavfilter/vf_v360: call tanf() once
Paul B Mahol [Sat, 14 Sep 2019 11:33:24 +0000 (13:33 +0200)]
avfilter/vf_v360: call tanf() once

4 years agoavfilter/vf_v360: implement diagonal field of view
Paul B Mahol [Sat, 14 Sep 2019 08:47:01 +0000 (10:47 +0200)]
avfilter/vf_v360: implement diagonal field of view

4 years agoavformat/hlsenc: make fix code style of hls_write_trailer
Steven Liu [Sat, 14 Sep 2019 05:09:16 +0000 (13:09 +0800)]
avformat/hlsenc: make fix code style of hls_write_trailer

change vs->avf to oc

4 years agoavformat/dashdec: reindent code at parse_manifest
Steven Liu [Sat, 14 Sep 2019 04:54:21 +0000 (12:54 +0800)]
avformat/dashdec: reindent code at parse_manifest

4 years agolavf/hls: fix memory leak in error handling path for option tmp
Jun Zhao [Fri, 13 Sep 2019 11:53:37 +0000 (19:53 +0800)]
lavf/hls: fix memory leak in error handling path for option tmp

fix memory leak in error handling path for option tmp.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agolavf/hls: remove redundancy seekable setting
Jun Zhao [Fri, 13 Sep 2019 11:53:36 +0000 (19:53 +0800)]
lavf/hls: remove redundancy seekable setting

ffio_init_context with NULL seek callback will setting seekable with 0, so
remove the redundancy seekable setting.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agolavf/hls: drop unnecessary check before ff_format_io_close
Jun Zhao [Fri, 13 Sep 2019 11:53:35 +0000 (19:53 +0800)]
lavf/hls: drop unnecessary check before ff_format_io_close

ff_format_io_close will check the AVIOContext pointer pb, so drop
the unnecessary check before ff_format_io_close.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agolavf/hls: refine the log message
Jun Zhao [Fri, 13 Sep 2019 11:53:34 +0000 (19:53 +0800)]
lavf/hls: refine the log message

refine the log message, it's will help the debugging

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoavformat/hlsenc: Fix memleak when using single_file
Andreas Rheinhardt [Wed, 11 Sep 2019 12:36:36 +0000 (14:36 +0200)]
avformat/hlsenc: Fix memleak when using single_file

This commit fixes a memleak in the hls muxer when one uses a single file
as output. It has been forgotten to free the temporary buffers used to write
the packets so that the size of the leaks basically amounts to the size
of the output file. This commit adds the necessary free.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years agohlsenc: flush segments to guarantuee atomic single file hls
Daniel Oberhoff [Sat, 14 Sep 2019 01:53:22 +0000 (09:53 +0800)]
hlsenc: flush segments to guarantuee atomic single file hls

4 years agoavcodec/mjpegdec: Restore non bayer checks in ljpeg_decode_rgb_scan()
Michael Niedermayer [Thu, 12 Sep 2019 19:13:11 +0000 (21:13 +0200)]
avcodec/mjpegdec: Restore non bayer checks in ljpeg_decode_rgb_scan()

Fixes: out of array write
Fixes: 17088/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5654877765632000
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>
4 years agoavcodec/mjpegdec: Only allow 0x11110000 pix_fmt_id for bayer mode
Michael Niedermayer [Thu, 12 Sep 2019 19:02:17 +0000 (21:02 +0200)]
avcodec/mjpegdec: Only allow 0x11110000 pix_fmt_id for bayer mode

Fixes: NULL pointer dereference
Fixes: assertion failure
Fixes: 17003/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5696929253556224
Fixes: 17039/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5651008134316032
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>
4 years agoavformat/sccdec: remove not needed code
Paul B Mahol [Fri, 13 Sep 2019 17:47:03 +0000 (19:47 +0200)]
avformat/sccdec: remove not needed code

4 years agoavfilter/vf_v360: use always float version instead of double floating-point function
Paul B Mahol [Fri, 13 Sep 2019 10:32:35 +0000 (12:32 +0200)]
avfilter/vf_v360: use always float version instead of double floating-point function

4 years agoavfilter/vf_v360: fix flat projection field of view calculation
Paul B Mahol [Fri, 13 Sep 2019 09:31:11 +0000 (11:31 +0200)]
avfilter/vf_v360: fix flat projection field of view calculation

4 years agocmdutils: promote report level if loglevel is higher
Gyan Doshi [Mon, 9 Sep 2019 18:07:08 +0000 (23:37 +0530)]
cmdutils: promote report level if loglevel is higher

4 years agoavfilter/vf_v360: add dfisheye output
Paul B Mahol [Thu, 12 Sep 2019 15:54:59 +0000 (17:54 +0200)]
avfilter/vf_v360: add dfisheye output

4 years agoavfilter/vf_v360: fix setting default height for stereographic
Paul B Mahol [Thu, 12 Sep 2019 16:36:10 +0000 (18:36 +0200)]
avfilter/vf_v360: fix setting default height for stereographic

4 years agoavfilter/vf_v360: fix errors is comments
Paul B Mahol [Thu, 12 Sep 2019 16:19:59 +0000 (18:19 +0200)]
avfilter/vf_v360: fix errors is comments

4 years agoavfilter/vf_v360: fix M_PI_4 usage consistency
Paul B Mahol [Thu, 12 Sep 2019 16:16:13 +0000 (18:16 +0200)]
avfilter/vf_v360: fix M_PI_4 usage consistency

4 years agoavformat/dashdec: add startNumber parser for segmentlist
Steven Liu [Tue, 10 Sep 2019 02:31:32 +0000 (10:31 +0800)]
avformat/dashdec: add startNumber parser for segmentlist

and get start_number for compute current segment number.

fix ticket: 7976

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hlsenc: fix memleak at hls_write_trailer
Steven Liu [Mon, 9 Sep 2019 06:15:21 +0000 (14:15 +0800)]
avformat/hlsenc: fix memleak at hls_write_trailer

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hlsenc: print warning at the end when upload the last segment failed
Steven Liu [Sat, 7 Sep 2019 12:39:28 +0000 (20:39 +0800)]
avformat/hlsenc: print warning at the end when upload the last segment failed

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hlsenc: merge fmp4 and mpegts segment type m3u8 list AVIOConext
Steven Liu [Fri, 6 Sep 2019 07:39:02 +0000 (15:39 +0800)]
avformat/hlsenc: merge fmp4 and mpegts segment type m3u8 list AVIOConext

hlsenc has been merge fmp4 and mpegts workflow before
so it can merge m3u8 list AVIOContext now.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>