]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agoavcodec: add decoder for Simon & Schuster Interactive's ADPCM variant
Zane van Iperen [Thu, 6 Feb 2020 06:58:10 +0000 (06:58 +0000)]
avcodec: add decoder for Simon & Schuster Interactive's ADPCM variant

Adds support for the ADPCM variant used by some Simon & Schuster
Interactive games such as Real War, and Real War: Rogue States.

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>
4 years agoavcodec/hevc: add support for Frame Duplication (Doubling/Tripling)
Praveen Karadugattu [Thu, 23 Jan 2020 13:24:17 +0000 (18:54 +0530)]
avcodec/hevc: add support for Frame Duplication (Doubling/Tripling)

Parse picture_struct SEI value.

4 years agoavfilter/af_acrossover: improve filter output
Paul B Mahol [Sun, 14 Apr 2019 17:03:39 +0000 (19:03 +0200)]
avfilter/af_acrossover: improve filter output

Makes sum always flat. Also faster.

4 years agoavfilter/Makefile: add vulkan.h to the list of skipped headers
James Almer [Thu, 6 Feb 2020 13:26:31 +0000 (10:26 -0300)]
avfilter/Makefile: add vulkan.h to the list of skipped headers

Should fix make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/aptx: split decoder and encoder into separate files
James Almer [Sun, 8 Dec 2019 14:58:18 +0000 (11:58 -0300)]
avcodec/aptx: split decoder and encoder into separate files

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/hlsenc: allow a custom SDT and PAT period
Marton Balint [Mon, 23 Dec 2019 00:36:41 +0000 (01:36 +0100)]
avformat/hlsenc: allow a custom SDT and PAT period

The default is not to write SDT and PAT periodically, only in the beginning of
every segment. After this patch the user might override this if needed.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/matroskaenc: Check functions that can fail
Andreas Rheinhardt [Wed, 1 Jan 2020 00:58:23 +0000 (01:58 +0100)]
avformat/matroskaenc: Check functions that can fail

Sometimes it has not been checked whether opening the dynamic buffer for
writing Tags fails; this might have led to segfaults.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibswscale/x86/yuv2rgb: Change inline assembly into nasm code
Ting Fu [Sun, 19 Jan 2020 03:51:03 +0000 (11:51 +0800)]
libswscale/x86/yuv2rgb: Change inline assembly into nasm code

The original inline assembly and nasm code have the same fps when called by command.
NASM code almost has no impact on the perfromance.

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_xfade: add horzopen/close transition
Paul B Mahol [Wed, 5 Feb 2020 15:52:30 +0000 (16:52 +0100)]
avfilter/vf_xfade: add horzopen/close transition

4 years agoavfilter/vf_xfade: add vertopen/close transition
Paul B Mahol [Wed, 5 Feb 2020 15:44:50 +0000 (16:44 +0100)]
avfilter/vf_xfade: add vertopen/close transition

4 years agoavcodec/av1_parse: don't look for trailing bits in Tile List OBUs
James Almer [Wed, 5 Feb 2020 14:50:20 +0000 (11:50 -0300)]
avcodec/av1_parse: don't look for trailing bits in Tile List OBUs

The spec states there aren't any.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agovf_ssim: Fix loading doubles to float registers on i386
Martin Storsjö [Wed, 5 Feb 2020 11:29:32 +0000 (13:29 +0200)]
vf_ssim: Fix loading doubles to float registers on i386

This fixes the tests filter-refcmp-ssim-yuv and filter-refcmp-ssim-rgb
on i386 after breaking in fcc0424c933742c8fc852371e985d16b6eb4bfe9.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavcodec/Makefile: combine dvdsub dependencies into one entry per module
James Almer [Wed, 5 Feb 2020 03:01:59 +0000 (00:01 -0300)]
avcodec/Makefile: combine dvdsub dependencies into one entry per module

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoconfigure: don't enable $ARCH_external if $ARCH is disabled
James Almer [Sun, 26 Jan 2020 15:08:26 +0000 (12:08 -0300)]
configure: don't enable $ARCH_external if $ARCH is disabled

The check_x86asm() checks would force enable these variables on success,
bypassing any --disable-* command line option.
This is important in the case of AVX512, where the relevant define is used
to choose between different values for memory alignment and strides in
some allocations.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agolavfi: bump minor version for the Vulkan filters
Lynne [Tue, 4 Feb 2020 23:52:29 +0000 (23:52 +0000)]
lavfi: bump minor version for the Vulkan filters

4 years agodoc/APIchanges: update with Vulkan commit info
Lynne [Tue, 4 Feb 2020 23:51:55 +0000 (23:51 +0000)]
doc/APIchanges: update with Vulkan commit info

4 years agolavu: bump minor version for the Vulkan patchset
Lynne [Tue, 4 Feb 2020 23:49:56 +0000 (23:49 +0000)]
lavu: bump minor version for the Vulkan patchset

4 years agolavu/hwcontext_cuda: refactor context initialisation
Philip Langdale [Tue, 31 Dec 2019 17:41:57 +0000 (09:41 -0800)]
lavu/hwcontext_cuda: refactor context initialisation

There's enough going on here now that it should not be duplicated
between cuda_device_create and cuda_device_derive.

4 years agolavfi: add an chromaber_vulkan filter
Lynne [Sun, 27 Oct 2019 14:48:16 +0000 (14:48 +0000)]
lavfi: add an chromaber_vulkan filter

This commit adds a chromatic aberration filter for Vulkan that attempts to
emulate a lens chromatic aberration effect.
For a YUV frame it will instead shift the chroma channels, providing a
simple approximation.

4 years agolavfi: add an avgblur_vulkan filter
Lynne [Sun, 27 Oct 2019 14:47:18 +0000 (14:47 +0000)]
lavfi: add an avgblur_vulkan filter

This commit adds a fast avgblur Vulkan filter.
This will reset Intel GPUs on Linux due to a known, two-year-old driver bug
(!834 on mesa's gitlab).

4 years agolavfi: add an overlay_vulkan filter
Lynne [Sun, 27 Oct 2019 14:46:16 +0000 (14:46 +0000)]
lavfi: add an overlay_vulkan filter

This commit adds a basic, non-converting overlay filter for Vulkan.

4 years agolavfi: add an scale_vulkan filter
Lynne [Sun, 27 Oct 2019 14:45:36 +0000 (14:45 +0000)]
lavfi: add an scale_vulkan filter

This commit adds a basic, non-converting Vulkan scaling filter.

4 years agolavfi: add Vulkan filtering framework
Lynne [Sun, 27 Oct 2019 14:44:00 +0000 (14:44 +0000)]
lavfi: add Vulkan filtering framework

This commit adds a Vulkan filtering infrastructure for libavfilter.
It attempts to abstract as much as possible of the Vulkan API from filters.

The way the hwcontext and the framework are designed permits for parallel,
non-CPU-blocking filtering throughout, with the exception of up/downloading
and mapping.

4 years agolavfi/vf_hwupload: Add support for HW -> HW transfers
Philip Langdale [Thu, 24 Oct 2019 01:11:37 +0000 (18:11 -0700)]
lavfi/vf_hwupload: Add support for HW -> HW transfers

As we find ourselves wanting a way to transfer frames between
HW devices (or more realistically, between APIs on the same device),
it's desirable to have a way to describe the relationship. While
we could imagine introducing a `hwtransfer` filter, there is
almost no difference from `hwupload`. The main new feature we need
is a way to specify the target device. Having a single device
for the filter chain is obviously insufficient if we're dealing
with two devices.

So let's add a way to specify the upload target device, and if none
is specified, continue with the existing behaviour.

We must also correctly preserve the sw_format on such a transfer.

4 years agolavu: add Vulkan hwcontext code
Lynne [Wed, 28 Aug 2019 20:58:10 +0000 (21:58 +0100)]
lavu: add Vulkan hwcontext code

This commit adds the necessary code to initialize and use a Vulkan device
within the hwcontext libavutil framework.
Currently direct mapping to VAAPI and DRM frames is functional, and
transfers to CUDA and native frames are supported.

Lets hope the future Vulkan video decode extension fits well within this
framework.

4 years agolavu/hwcontext: Add support for HW -> HW transfers
Philip Langdale [Thu, 24 Oct 2019 01:01:52 +0000 (18:01 -0700)]
lavu/hwcontext: Add support for HW -> HW transfers

We are beginning to consider scenarios where a given HW Context
may be able to transfer frames to another HW Context without
passing via system memory - this would usually be when two
contexts represent different APIs on the same device (eg: Vulkan
and CUDA).

This is modelled as a transfer, as we have today, but where both
the src and the dst are hardware frames with hw contexts. We need
to be careful to ensure the contexts are compatible - particularly,
we cannot do transfers where one of the frames has been mapped via
a derived frames context - we can only do transfers for frames that
were directly allocated by the specified context.

Additionally, as we have two hardware contexts, the transfer function
could be implemented by either (or indeed both). To handle this
uncertainty, we explicitly look for ENOSYS as an indicator to try
the transfer in the other direction before giving up.

4 years agofate/adpcm: add adpcm_argo tests
Zane van Iperen [Tue, 4 Feb 2020 02:01:23 +0000 (02:01 +0000)]
fate/adpcm: add adpcm_argo tests

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavc/dvdsubenc: accept palette from options
Michael Kuron [Mon, 3 Feb 2020 19:42:31 +0000 (20:42 +0100)]
lavc/dvdsubenc: accept palette from options

Previously, the default palette would always be used.
Now, we can accept a custom palette, just like dvdsubdec does.

Signed-off-by: Michael Kuron <michael.kuron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavc/dvdsubdec: Move palette parsing to new function
Michael Kuron [Mon, 3 Feb 2020 19:42:30 +0000 (20:42 +0100)]
lavc/dvdsubdec: Move palette parsing to new function

Signed-off-by: Michael Kuron <michael.kuron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/sccdec: use av_sscanf() instead
Paul B Mahol [Tue, 4 Feb 2020 19:37:26 +0000 (20:37 +0100)]
avformat/sccdec: use av_sscanf() instead

4 years agoavfilter/vf_ssim: improve precision
Paul B Mahol [Thu, 30 Jan 2020 21:01:23 +0000 (22:01 +0100)]
avfilter/vf_ssim: improve precision

Use doubles for accumulating floats.

4 years agoavcodec/mlpenc: fix small memory leak
Paul B Mahol [Tue, 4 Feb 2020 10:35:02 +0000 (11:35 +0100)]
avcodec/mlpenc: fix small memory leak

4 years agomlp: check huff_lsbs only when codebook is used
Jai Luthra [Sun, 2 Feb 2020 19:03:00 +0000 (00:33 +0530)]
mlp: check huff_lsbs only when codebook is used

When no codebook is used, huff_lsbs can be more than 24 and still decode to
original values once filters are applied.

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agomlpenc: fix some -fsanitize=integer errors
Jai Luthra [Sun, 2 Feb 2020 19:02:59 +0000 (00:32 +0530)]
mlpenc: fix some -fsanitize=integer errors

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agomlpenc: clean up
Jai Luthra [Fri, 24 Jan 2020 10:33:34 +0000 (16:03 +0530)]
mlpenc: clean up

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agomlpenc: improve lpc filtering
Jai Luthra [Fri, 24 Jan 2020 10:33:33 +0000 (16:03 +0530)]
mlpenc: improve lpc filtering

* fix a possible memory leak (apply_filter returned before freeing)
* use apply_filters in process_major_frame
* revert back to checking bounds with 24 bitdepth, as huff offset takes
care of it

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agomlpenc: prevent negative lsb_bits lshift
Jai Luthra [Fri, 24 Jan 2020 10:33:32 +0000 (16:03 +0530)]
mlpenc: prevent negative lsb_bits lshift

Fixes Coverity CID 1396239.

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agomlpenc: fix huff offset calculation
Jai Luthra [Fri, 24 Jan 2020 10:33:31 +0000 (16:03 +0530)]
mlpenc: fix huff offset calculation

huff offset wasn't always within the bounds before, which lead to
corrupt encoding that didn't always trigger lossless check failures

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agomlpenc: fix lossless check error in number_sbits
Jai Luthra [Fri, 24 Jan 2020 10:33:30 +0000 (16:03 +0530)]
mlpenc: fix lossless check error in number_sbits

we need two bits instead of one bit to represent -1 in bitstream

Signed-off-by: Jai Luthra <me@jailuthra.in>
4 years agoavfilter/vf_xfade: add circleopen & circleclose transition
Paul B Mahol [Tue, 4 Feb 2020 09:27:57 +0000 (10:27 +0100)]
avfilter/vf_xfade: add circleopen & circleclose transition

4 years agoavcodec/lagarith: Sanity check scale
Michael Niedermayer [Tue, 28 Jan 2020 19:12:25 +0000 (20:12 +0100)]
avcodec/lagarith: Sanity check scale

A value of 24 and above can collaps the range to 0 which would not work.

Fixes: Timeout (75sec -> 21sec)
Fixes: 18707/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-5708950892969984
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/pngdec: Check amount decoded
Michael Niedermayer [Sat, 17 Aug 2019 21:55:34 +0000 (23:55 +0200)]
avcodec/pngdec: Check amount decoded

Fixes: Timeout (70sec -> 243ms)
Fixes: 16097/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5664690889293824
Fixes: 16927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5170612070252544
Fixes: 16927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5706325622784000
Fixes: 18705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5650989302677504
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/apedec: Fix integer overflows in predictor_decode_mono_3950()
Michael Niedermayer [Tue, 28 Jan 2020 17:35:43 +0000 (18:35 +0100)]
avcodec/apedec: Fix integer overflows in predictor_decode_mono_3950()

Fixes: signed integer overflow: -2147407150 + -1871606 cannot be represented in type 'int'
Fixes: 18702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5679095417667584
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 agodoc: Fix typo for dvdsubdec
Michael Kuron [Mon, 3 Feb 2020 19:42:29 +0000 (20:42 +0100)]
doc: Fix typo for dvdsubdec

Signed-off-by: Michael Kuron <michael.kuron@gmail.com>
4 years agoavformat/dashenc: use AV_OPT_TYPE_DICT for http_opts
Marton Balint [Sun, 2 Feb 2020 21:58:08 +0000 (22:58 +0100)]
avformat/dashenc: use AV_OPT_TYPE_DICT for http_opts

This changes the separator character from comma to colon, but since this option
was only added recently I think it should be done for consistency with other
similar options.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/libvpxenc: add VP9 temporal scalability encoding option
Wonkap Jang [Mon, 3 Feb 2020 18:02:01 +0000 (10:02 -0800)]
avcodec/libvpxenc: add VP9 temporal scalability encoding option

This commit reuses the configuration options for VP8 that enables
temporal scalability for VP9. It also adds a way to enable three
preset temporal structures (refer to the documentation for more
detail) that can be used in offline encoding.

Signed-off-by: James Zern <jzern@google.com>
4 years agoavfilter/vf_xfade_opencl: move passthrough code before eof check
Paul B Mahol [Mon, 3 Feb 2020 08:40:46 +0000 (09:40 +0100)]
avfilter/vf_xfade_opencl: move passthrough code before eof check

4 years agoavfilter/vf_xfade: move passthrough code before eof check
Paul B Mahol [Mon, 3 Feb 2020 08:36:52 +0000 (09:36 +0100)]
avfilter/vf_xfade: move passthrough code before eof check

4 years agoMAINTAINERS: Add myself as mxf* maintainer
Tomas Härdin [Sat, 1 Feb 2020 15:15:53 +0000 (16:15 +0100)]
MAINTAINERS: Add myself as mxf* maintainer

I have more time for this these days

4 years agoavcodec/ralf: Fix integer overflow in apply_lpc()
Michael Niedermayer [Sun, 8 Dec 2019 12:48:45 +0000 (13:48 +0100)]
avcodec/ralf: Fix integer overflow in apply_lpc()

Fixes: signed integer overflow: 2147482897 + 2048 cannot be represented in type 'int'
Fixes: 19240/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5743240326414336
Fixes: 19869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5150136636538880
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/dca_lbr: Fix some error codes and error passing
Michael Niedermayer [Sat, 4 Jan 2020 22:01:12 +0000 (23:01 +0100)]
avcodec/dca_lbr: Fix some error codes and error passing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/8svx: Use av_assert1(0) instead of error message in unreachable code
Michael Niedermayer [Sun, 29 Dec 2019 14:11:33 +0000 (15:11 +0100)]
avcodec/8svx: Use av_assert1(0) instead of error message in unreachable code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/wmavoice: Fix rounding and integer anomalies in calc_input_response()
Michael Niedermayer [Sat, 14 Dec 2019 14:27:44 +0000 (15:27 +0100)]
avcodec/wmavoice: Fix rounding and integer anomalies in calc_input_response()

Fixes: out of array access
Fixes: inf is outside the range of representable values of type 'int'
Fixes: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long'
Fixes: 19316/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-5677369365102592
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/wmavoice: sanity check block_align
Michael Niedermayer [Sat, 21 Dec 2019 21:27:37 +0000 (22:27 +0100)]
avcodec/wmavoice: sanity check block_align

This limit is roughly based on the bitreader limit, its likely a much tighter limit
could be used

Fixes: left shift of 1965039647 by 1 places cannot be represented in type 'int'
Fixes: 19545/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-5695391899320320
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/pcm: Fix invalid shift in pcm_decode_frame for LXF
Michael Niedermayer [Tue, 17 Dec 2019 23:07:50 +0000 (00:07 +0100)]
avcodec/pcm: Fix invalid shift in pcm_decode_frame for LXF

Fixes: left shift of 32 by 28 places cannot be represented in type 'int'
Fixes: 19472/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_LXF_fuzzer-5704364320096256
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/snappy: Sanity check bytestream2_get_levarint()
Michael Niedermayer [Sun, 19 Jan 2020 20:51:11 +0000 (21:51 +0100)]
avcodec/snappy: Sanity check bytestream2_get_levarint()

Fixes: left shift of 79 by 28 places cannot be represented in type 'int'
Fixes: 20202/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5719004081815552
Fixes: 20219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5641738677125120
Fixes: 20389/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5680721517871104
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 agoavformat/udp: cancel pending IO on win32 manually
Marton Balint [Sun, 26 Jan 2020 21:13:50 +0000 (22:13 +0100)]
avformat/udp: cancel pending IO on win32 manually

recvfrom() is not a cancellation point in pthreads-win32, see
https://sourceware.org/pthreads-win32/manual/pthread_cancel.html

In order to be able to cancel the reader thread on Win32 properly we first
shutdown the socket then call CancelIoEx to abort pending IO. Subsequent
recvfrom() calls will fail with WSAESHUTDOWN causing the thread to exit.

Fixes ticket #5717.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/udp: remove setting cancel state from the TX thread
Marton Balint [Sun, 26 Jan 2020 20:11:53 +0000 (21:11 +0100)]
avformat/udp: remove setting cancel state from the TX thread

Write mode does not use cancellation.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/mlpdsp: Fix a invalid shift in ff_mlp_rematrix_channel()
Michael Niedermayer [Sat, 1 Feb 2020 22:25:42 +0000 (23:25 +0100)]
avcodec/mlpdsp: Fix a invalid shift in ff_mlp_rematrix_channel()

Fixes: left shift of negative value -2
Fixes: 20305/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5677196618498048
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Jai Luthra <me@jailuthra.in>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/adpcm_argo: simplify and move duplicated logic into a function
Zane van Iperen [Sat, 1 Feb 2020 06:59:59 +0000 (06:59 +0000)]
avcodec/adpcm_argo: simplify and move duplicated logic into a function

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter: add xfade opencl filter
Paul B Mahol [Thu, 23 Jan 2020 15:29:34 +0000 (16:29 +0100)]
avfilter: add xfade opencl filter

4 years agodoc/filters: fix tonemap_vaapi filter name in documentation
Paul B Mahol [Sun, 2 Feb 2020 09:06:19 +0000 (10:06 +0100)]
doc/filters: fix tonemap_vaapi filter name in documentation

4 years agodoc/filters: make filters order more consistent
Paul B Mahol [Sun, 2 Feb 2020 09:04:35 +0000 (10:04 +0100)]
doc/filters: make filters order more consistent

4 years agoavcodec/v4l2_m2m: Cosmetics
Andriy Gelman [Mon, 13 Jan 2020 04:11:30 +0000 (23:11 -0500)]
avcodec/v4l2_m2m: Cosmetics

Change pointer symbol position.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
4 years agoavcodec/v4l2_m2m: Use consistent logging context
Andriy Gelman [Mon, 13 Jan 2020 04:11:29 +0000 (23:11 -0500)]
avcodec/v4l2_m2m: Use consistent logging context

Before this commit v4l2_m2m used two different logging contexts (from
V4L2m2mPriv and AVCodecContext). For consistency always use AVCodecContext.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
4 years agoavcodec/v4l2_m2m: Simplify capture buffer init check
Andriy Gelman [Mon, 13 Jan 2020 04:11:27 +0000 (23:11 -0500)]
avcodec/v4l2_m2m: Simplify capture buffer init check

Before this commit s->avctx == NULL was used to infer that an encoder is
being initialzed. Code readability has been improved by directly using
!av_codec_is_decoder() instead.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
4 years agoavcodec:v4l2_context: Remove NULL initialization
Andriy Gelman [Mon, 13 Jan 2020 04:11:26 +0000 (23:11 -0500)]
avcodec:v4l2_context: Remove NULL initialization

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
4 years agoavfilter/vf_xfade: remove unused header
Paul B Mahol [Sat, 1 Feb 2020 21:06:11 +0000 (22:06 +0100)]
avfilter/vf_xfade: remove unused header

4 years agoavfilter/vf_psnr: fix logic failure when comparing time bases
Paul B Mahol [Sat, 1 Feb 2020 20:10:25 +0000 (21:10 +0100)]
avfilter/vf_psnr: fix logic failure when comparing time bases

4 years agoavfilter/vf_ssim: fix logic failure when comparing time bases
Paul B Mahol [Sat, 1 Feb 2020 20:09:32 +0000 (21:09 +0100)]
avfilter/vf_ssim: fix logic failure when comparing time bases

4 years agoavcodec/utils: remove extra brackets
leozhang [Sat, 1 Feb 2020 09:12:13 +0000 (17:12 +0800)]
avcodec/utils: remove extra brackets

Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibavcodec/amfenc_hevc.c: Fix constant QP settings for I, P
OvchinnikovDmitrii [Tue, 28 Jan 2020 16:23:43 +0000 (19:23 +0300)]
libavcodec/amfenc_hevc.c: Fix constant QP settings for I, P

4 years agolavc/h265_profile_level: Fix the default profile in ff_h265_guess_level
Linjie Fu [Wed, 15 Jan 2020 06:54:43 +0000 (14:54 +0800)]
lavc/h265_profile_level: Fix the default profile in ff_h265_guess_level

Default to using multiplication factors for Main profile.

Introduced since cd3578a8e4e11e0ba021e621367a7974d6de5da0.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
4 years agoavformat/hlsenc: fix hls_ts_options with mpegts
Marton Balint [Mon, 23 Dec 2019 00:27:38 +0000 (01:27 +0100)]
avformat/hlsenc: fix hls_ts_options with mpegts

Was broken since cdbf8847ea97a985dfd55432e1384bb7fe5d2d3b.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavfilter/vf_geq: use per-thread AVExpr for expression evaluation
Marton Balint [Sat, 28 Dec 2019 13:50:12 +0000 (14:50 +0100)]
avfilter/vf_geq: use per-thread AVExpr for expression evaluation

There was no consensus about separating AVExprState from AVExpr so here is a
minimal patch using the existing AVExpr to fix ticket #7528.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/avdct: Clear IDCTDSPContext context
Michael Niedermayer [Mon, 27 Jan 2020 20:54:22 +0000 (21:54 +0100)]
avcodec/avdct: Clear IDCTDSPContext context

Fixes use of uninitialized variable and segfault

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMAINTAINERS: Add patchwork maintainer
Michael Niedermayer [Mon, 27 Jan 2020 20:54:21 +0000 (21:54 +0100)]
MAINTAINERS: Add patchwork maintainer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodashenc: check pts to prevent division by zero error
Alfred E. Heggestad [Thu, 30 Jan 2020 09:58:01 +0000 (10:58 +0100)]
dashenc: check pts to prevent division by zero error

this usecase will cause a division by zero trap:

1. dashenc has received one frame
2. os->max_pts and os->start_pts have same value
3. delta between max_pts and start_pts is 0
4. av_rescale_q(0, x, y) returns 0
5. this value is used as denominator in division
6. Bang! -> segfault

this fix checks that max_pts > start_pts.
the fix has been tested and works.

Signed-off-by: Alfred E. Heggestad <alfred.heggestad@gmail.com>
Reviewed-by: Jeyapal, Karthick <kjeyapal@akamai.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_xfade: add smooth transitions
Paul B Mahol [Fri, 31 Jan 2020 12:14:13 +0000 (13:14 +0100)]
avfilter/vf_xfade: add smooth transitions

4 years agodoc/filters: improve xfade description and add one example
Paul B Mahol [Fri, 31 Jan 2020 09:17:05 +0000 (10:17 +0100)]
doc/filters: improve xfade description and add one example

4 years agoavfilter/vf_drawtext: do not overread text if the last UTF8 sequence is invalid
Marton Balint [Wed, 29 Jan 2020 22:55:25 +0000 (23:55 +0100)]
avfilter/vf_drawtext: do not overread text if the last UTF8 sequence is invalid

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavfilter/vf_drawtext: use replacement chars for invalid UTF8 sequences
Marton Balint [Wed, 29 Jan 2020 22:29:04 +0000 (23:29 +0100)]
avfilter/vf_drawtext: use replacement chars for invalid UTF8 sequences

continue is explicitly disallowed for GET_UTF8, so let's fix that as well.
Fixes crash with invalid UTF8 sequences.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/common: warn about possible move of the data pointer after the last 0 byte...
Marton Balint [Wed, 29 Jan 2020 22:56:07 +0000 (23:56 +0100)]
avutil/common: warn about possible move of the data pointer after the last 0 byte in GET_UTF8

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/common: put ERROR statements into separate code blocks in GET_UTF8/16
Marton Balint [Wed, 29 Jan 2020 22:42:21 +0000 (23:42 +0100)]
avutil/common: put ERROR statements into separate code blocks in GET_UTF8/16

To be able to safely use more than one statement in ERROR.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/common: add parenthesis around GET_16BIT in GET_UTF16
Marton Balint [Wed, 29 Jan 2020 21:41:50 +0000 (22:41 +0100)]
avutil/common: add parenthesis around GET_16BIT in GET_UTF16

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/common: use unsigned int in GET_UTF8
Marton Balint [Wed, 29 Jan 2020 21:40:42 +0000 (22:40 +0100)]
avutil/common: use unsigned int in GET_UTF8

Right shift of signed value is implementation defined.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/x86/diracdsp: Fix high bits on Windows x86_64
Michael Niedermayer [Thu, 30 Jan 2020 21:04:06 +0000 (22:04 +0100)]
avcodec/x86/diracdsp: Fix high bits on Windows x86_64

Found-by: james
4 years agotests/fate/lavf-video.mak: fix fate-lavf-gif dependencies
Michael Niedermayer [Mon, 6 Jan 2020 12:43:10 +0000 (13:43 +0100)]
tests/fate/lavf-video.mak: fix fate-lavf-gif dependencies

The gif test should depend on gif not fits
Regression since: ac4b5d86222006fa71ffe5922e1a34f1422507d8

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/ralf: Fix overflows of biased values
Michael Niedermayer [Thu, 26 Dec 2019 23:11:59 +0000 (00:11 +0100)]
avcodec/ralf: Fix overflows of biased values

Fixes: signed integer overflow: 2003010644 * 2 cannot be represented in type 'int'
Fixes: 19593/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5660628006207488
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 agotools/target_dec_fuzzer: limit per frame samples for APE
Michael Niedermayer [Fri, 10 Jan 2020 21:39:47 +0000 (22:39 +0100)]
tools/target_dec_fuzzer: limit per frame samples for APE

APE in its highest compression mode is really slow so even one frame
of millions of samples takes a long time

Fixes: Timeout (too long -> 3sec)
Fixes: 19937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5751668818051072
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mov: Check STCO location
Michael Niedermayer [Sat, 11 Jan 2020 11:09:08 +0000 (12:09 +0100)]
avformat/mov: Check STCO location

Fixes: bypassing of checks and assertion failure
Fixes: asan_1003879.mp4
Found-by: Clusterfuzz + asan
Reported-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/wmalosslessdec: Fix multiple integer overflows
Michael Niedermayer [Thu, 9 Jan 2020 01:06:36 +0000 (02:06 +0100)]
avcodec/wmalosslessdec: Fix multiple integer overflows

Fixes: left shift of 3329 by 20 places cannot be represented in type 'int'
Fixes: signed integer overflow: -199378355 + -1948950833 cannot be represented in type 'int'
Fixes: 19837/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5752565837070336
Fixes: 19839/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5767483265122304
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/apedec: Fix undefined integer overflow in decode_array_0000()
Michael Niedermayer [Sat, 7 Dec 2019 19:55:16 +0000 (20:55 +0100)]
avcodec/apedec: Fix undefined integer overflow in decode_array_0000()

Fixes: signed integer overflow: -2143289344 - 6246400 cannot be represented in type 'int'
Fixes: 19239/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5173755680915456
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 agoremove tests/ref/lavf/fits
Michael Niedermayer [Mon, 6 Jan 2020 12:38:33 +0000 (13:38 +0100)]
remove tests/ref/lavf/fits

This appears to be forgotten in ac4b5d86222006fa71ffe5922e1a34f1422507d8

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/smacker: Check space before decoding type
Michael Niedermayer [Wed, 1 Jan 2020 19:43:05 +0000 (20:43 +0100)]
avcodec/smacker: Check space before decoding type

Fixes: Timeout (232sec -> 280ms)
Fixes: 19682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5654129649385472
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/rawdec: Use linesize in b64a
Michael Niedermayer [Wed, 1 Jan 2020 21:32:04 +0000 (22:32 +0100)]
avcodec/rawdec: Use linesize in b64a

Fixes: out of array access
Fixes: 19750/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RAWVIDEO_fuzzer-5074834119983104
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/iff: Over-allocate ham_palbuf for HAM6 IFF-PBM
Michael Niedermayer [Fri, 3 Jan 2020 22:24:15 +0000 (23:24 +0100)]
avcodec/iff: Over-allocate ham_palbuf for HAM6 IFF-PBM

IFF-PBM-HAM6 can read out of array without this overallocation
Fixes: Out of array read
Fixes: 19752/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5675331403120640
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 agodoc/filters: Document geq *sum functions
Michael Niedermayer [Sat, 28 Dec 2019 10:26:10 +0000 (11:26 +0100)]
doc/filters: Document geq *sum functions

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agotools/target_dec_fuzzer: Add threshold for ALS
Michael Niedermayer [Sat, 25 Jan 2020 18:53:49 +0000 (19:53 +0100)]
tools/target_dec_fuzzer: Add threshold for ALS

Fixes: Timeout (253sec -> 16sec)
Fixes: 18668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6227155369590784
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/x86/diracdsp: Fix incorrect src addressing in dequant_subband_32()
Michael Niedermayer [Wed, 29 Jan 2020 21:11:45 +0000 (22:11 +0100)]
avcodec/x86/diracdsp: Fix incorrect src addressing in dequant_subband_32()

Fixes: Segfault (not reproducable with asm, which made this hard to debug)
Fixes: decoding errors
Fixes: 19854/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5729372837511168
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>