Commit Graph

95133 Commits

Author SHA1 Message Date
elliottk ea673a0edb Delete unused branch in libaomenc
this branch is leftover from libvpxenc+vp8

Signed-off-by: James Zern <jzern@google.com>
2019-09-19 23:56:03 -07:00
Guo, Yejun ecd026a48d 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>
2019-09-19 23:49:28 -07:00
James Almer 179e15dc97 avformat/movenc: don't hardcode the colr box size
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-19 21:32:50 -03:00
Carl Eugen Hoyos f9f9d5943f lavc/cook: Remove an incorrect comment.
Multichannel cook was implemented in 67da3182.
2019-09-20 01:36:13 +02:00
Anthony Delannoy a221af1f5e avformat/mpegts: add support for EPG extraction from mpegts
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-19 21:30:54 +02:00
Anthony Delannoy 81bb71761a avcodec: add EPG codec ID
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-19 21:30:54 +02:00
Anthony Delannoy 5e51c1aeb5 avformat/mpegts: add all well known PIDs and TIDs to mpegts.h
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-19 21:30:54 +02:00
Marton Balint 862e020f93 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>
2019-09-19 21:30:54 +02:00
Paul B Mahol b632ad81c5 avfilter/vf_v360: add ball projection format 2019-09-19 18:38:06 +02:00
Guo, Yejun b766a13dba 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>
2019-09-19 11:29:57 -03:00
Guo, Yejun 48133fad05 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>
2019-09-19 11:25:15 -03:00
Guo, Yejun 24f507301b 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>
2019-09-19 11:21:38 -03:00
Guo, Yejun 5f058dd693 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>
2019-09-19 11:09:25 -03:00
Limin Wang c2ab998ff3 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>
2019-09-18 22:53:00 +02:00
Limin Wang 5c0f80d26d 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>
2019-09-18 22:53:00 +02:00
Limin Wang 216dd9fd5c 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>
2019-09-18 22:53:00 +02:00
Andreas Rheinhardt ebd25a5ba5 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>
2019-09-18 22:53:00 +02:00
Andreas Rheinhardt e12a2a2d73 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>
2019-09-18 22:53:00 +02:00
Andreas Rheinhardt 9442b0de1b 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>
2019-09-18 22:53:00 +02:00
Andreas Rheinhardt 90f647c29b 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>
2019-09-18 22:53:00 +02:00
Andreas Rheinhardt 8b1be6e5eb 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>
2019-09-18 22:53:00 +02:00
James Almer 1d86e4b3eb checkasm/opusdsp: declare opus_deemphasis as a function returning a float
Fixes ticket #8175

Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-18 11:42:06 -03:00
Moritz Barsnick 53d31e91c5 doc: various spelling, grammar and formatting fixes
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2019-09-18 10:39:18 +05:30
hwrenx 96f1d34d0c lavf/mpegts: Support demuxing AVS2. 2019-09-18 02:18:13 +02:00
Paul B Mahol 251284e44a avfilter/vf_v360: add mercator projection 2019-09-17 22:18:30 +02:00
Michael Niedermayer 65589ad553 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>
2019-09-17 14:45:08 +02:00
Michael Niedermayer 093d1f4250 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>
2019-09-17 14:41:07 +02:00
Andreas Rheinhardt 2b1fcba8dd 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>
2019-09-17 14:41:07 +02:00
Andreas Rheinhardt 34bd293b01 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>
2019-09-17 14:41:07 +02:00
Michael Niedermayer ef50cf7b32 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>
2019-09-16 22:51:26 +02:00
Andreas Rheinhardt 3ab488a540 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>
2019-09-16 21:30:19 +02:00
Carl Eugen Hoyos 551fcbbccb lavc/g729dec: Support decoding Sipro ACELP.KELVIN.
Fixes ticket #4799.
Analyzed-by: Aleksandr Ustinov
2019-09-16 20:57:53 +02:00
James Almer dc0806dd25 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>
2019-09-16 15:26:46 -03:00
Paul B Mahol 6f4ec4d909 avfilter/vf_v360: add slice threading to remap calculation 2019-09-16 18:43:11 +02:00
Paul B Mahol 05ffaa252e avfilter/vf_v360: refactor creation of remap data 2019-09-16 18:43:11 +02:00
Paul B Mahol a09213da23 avfilter/vf_v360: reverse order of remap for loops 2019-09-16 18:03:16 +02:00
Paul B Mahol cf62110a83 avfilter/vf_v360: simplify allocating remap data 2019-09-16 17:58:08 +02:00
Paul B Mahol c271d88257 avfilter/vf_v360: move some local variables to private filter context 2019-09-16 17:53:58 +02:00
Paul B Mahol d87db83e1c avfilter/vf_v360: rename r_tmp variables 2019-09-16 17:50:16 +02:00
Rick Kern 1db6e47e85 avcodec/videotoolboxenc: warn user when output will use a different profile/level than requested.
Signed-off-by: Rick Kern <kernrj@gmail.com>
2019-09-16 09:02:59 -04:00
Limin Wang 57951f3019 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>
2019-09-16 09:00:39 -04:00
sharpbai 6966548c1b 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>
2019-09-16 08:58:10 -04:00
Paul B Mahol 94f187d382 avfilter/vf_stereo3d: assert that out variable is valid 2019-09-16 11:45:28 +02:00
Paul B Mahol 34a12b9978 avfilter/vf_stereo3d: merge same code in case branches 2019-09-16 11:41:50 +02:00
Paul B Mahol ea8391e519 avfilter/vf_shuffleplanes: remove not needed line 2019-09-16 11:28:03 +02:00
Paul B Mahol f70690e8ec avfilter/vf_ciescope: remove dead assignments 2019-09-16 11:22:16 +02:00
Paul B Mahol fa045c3ce2 avfilter/window_func: clarify intention in dolph window calculation 2019-09-16 10:57:09 +02:00
Paul B Mahol 654601dd1d avfilter/vf_v360: add missing av_assert0() 2019-09-16 10:40:47 +02:00
Paul B Mahol 7a7aa4f79e avfilter/vf_avgblur: remove dupe assignment 2019-09-16 10:31:05 +02:00
Paul B Mahol dc33250765 avfilter/af_headphone: return on error immediately 2019-09-16 10:27:42 +02:00