]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agoavcodec/mpeg12dec: Add CPB coded side data
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:24 +0000 (09:17 +0100)]
avcodec/mpeg12dec: Add CPB coded side data

This fixes mpeg2video stream copies to mpeg muxer like this:
  ffmpeg -i xdcamhd.mxf -c:v copy output.mpg

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavcodec/utils: Fix ff_add_cpb_side_data() add twice
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:23 +0000 (09:17 +0100)]
avcodec/utils: Fix ff_add_cpb_side_data() add twice

Makes it behave similarly to av_stream_add_side_data().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavformat/utils: Make find_stream_info get side data from codec context
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:22 +0000 (09:17 +0100)]
avformat/utils: Make find_stream_info get side data from codec context

This will allow probing input coded side data, and also forwarding them to the output.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavcodec/mpeg12dec: Do not alter avctx->rc_buffer_size
Nicolas Gaullier [Thu, 5 Mar 2020 08:17:21 +0000 (09:17 +0100)]
avcodec/mpeg12dec: Do not alter avctx->rc_buffer_size

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agohwcontext_opencl: include header file in HEADERS
Daniel Playfair Cal [Mon, 16 Mar 2020 01:20:46 +0000 (12:20 +1100)]
hwcontext_opencl: include header file in HEADERS

This matches the inclusion of the other hwcontext_<hwaccel>.h headers.
The skipping of the header depending on build flags is already present.

Signed-off-by: Daniel Playfair Cal: <daniel.playfair.cal@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agofftools/ffmpeg_opt: Fix [u]int64_t specifier string
Andreas Rheinhardt [Wed, 18 Mar 2020 02:56:18 +0000 (03:56 +0100)]
fftools/ffmpeg_opt: Fix [u]int64_t specifier string

PRId64 and PRIu64 already expand to the complete specifier; adding
another 'd' at the end is wrong and just leads to warnings that say
that only an option like '-frames:v 2d' will be used, although said
option won't be accepted at all ('Expected int64 for frames:v but found
2d').

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agodoc/general: Fix entry for AMQP
Andriy Gelman [Thu, 19 Mar 2020 11:57:31 +0000 (07:57 -0400)]
doc/general: Fix entry for AMQP

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavutil/hwcontext_cuda: combine transfer functions
Timo Rothenpieler [Thu, 19 Mar 2020 16:35:59 +0000 (17:35 +0100)]
avutil/hwcontext_cuda: combine transfer functions

Gets rid of some mostly duplicated code and adds the ability to do
hardware to hardware transfers.

4 years agoavformat/yuv4mpegdec: add support for 444alpha
Paul B Mahol [Thu, 19 Mar 2020 10:11:24 +0000 (11:11 +0100)]
avformat/yuv4mpegdec: add support for 444alpha

4 years agoavformat/yuv4mpegdec: use proper error codes
Paul B Mahol [Thu, 19 Mar 2020 10:08:42 +0000 (11:08 +0100)]
avformat/yuv4mpegdec: use proper error codes

4 years agoavutil/hwcontext_cuda: add YUVA420P pixel format
Yaroslav Pogrebnyak [Thu, 19 Mar 2020 12:08:20 +0000 (13:08 +0100)]
avutil/hwcontext_cuda: add YUVA420P pixel format

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agoavformat/xwma: return always proper error codes
Paul B Mahol [Thu, 19 Mar 2020 09:58:07 +0000 (10:58 +0100)]
avformat/xwma: return always proper error codes

4 years agolavfi/vf_dnn_processing: Fix compile warning of mixed declarations and code
Linjie Fu [Wed, 18 Mar 2020 04:23:10 +0000 (12:23 +0800)]
lavfi/vf_dnn_processing: Fix compile warning of mixed declarations and code

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
4 years agoMAINTAINERS: Don't mention Google+
Andreas Rheinhardt [Tue, 17 Mar 2020 22:56:20 +0000 (23:56 +0100)]
MAINTAINERS: Don't mention Google+

It has been shut down in April 2019.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMAINTAINERS: Add myself as maintainer for matroska*
Andreas Rheinhardt [Tue, 17 Mar 2020 22:56:19 +0000 (23:56 +0100)]
MAINTAINERS: Add myself as maintainer for matroska*

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/nsvdec: Fix memleaks on errors while reading the header
Michael Niedermayer [Wed, 18 Mar 2020 19:20:44 +0000 (20:20 +0100)]
avformat/nsvdec: Fix memleaks on errors while reading the header

Fixes: memleaks
Fixes: 21084/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5655975492321280
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/siren: Fix integer overflow in get_dw()
Michael Niedermayer [Wed, 18 Mar 2020 19:20:43 +0000 (20:20 +0100)]
avcodec/siren: Fix integer overflow in get_dw()

Fixes: signed integer overflow: 685813396 + 1803454769 cannot be represented in type 'int'
Fixes: 21073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5744900508483584
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/ffwavesynth: Fix integer overflow in computation of ddphi
Michael Niedermayer [Sun, 15 Mar 2020 17:25:56 +0000 (18:25 +0100)]
avcodec/ffwavesynth: Fix integer overflow in computation of ddphi

Fixes: signed integer overflow: 1302123111085380114 - -8319005078741256972 cannot be represented in type 'long'
Fixes: 20991/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5148554161291264
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMAINTAINERS: add myself and my gpg key
Lynne [Tue, 17 Mar 2020 22:56:03 +0000 (22:56 +0000)]
MAINTAINERS: add myself and my gpg key

4 years agoavcodec/avcodec: Fix typos
Andriy Gelman [Thu, 5 Mar 2020 05:02:27 +0000 (00:02 -0500)]
avcodec/avcodec: Fix typos

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoscale_vulkan: add support for RGB->YUV conversions
Lynne [Sun, 15 Mar 2020 10:30:34 +0000 (10:30 +0000)]
scale_vulkan: add support for RGB->YUV conversions

Only top-left chroma position supported for now.

4 years agohwcontext_vulkan: fix imported image bitmask
Lynne [Tue, 17 Mar 2020 13:08:06 +0000 (13:08 +0000)]
hwcontext_vulkan: fix imported image bitmask

4 years agoremove CHAR_MIN/CHAR_MAX usage
Paul B Mahol [Tue, 17 Mar 2020 21:46:36 +0000 (22:46 +0100)]
remove CHAR_MIN/CHAR_MAX usage

It is not needed at all.

4 years agodoc/general: remove dupe entry and fix section
Paul B Mahol [Tue, 17 Mar 2020 19:06:11 +0000 (20:06 +0100)]
doc/general: remove dupe entry and fix section

4 years agodoc/general: mention more DPCM codecs
Paul B Mahol [Tue, 17 Mar 2020 18:52:46 +0000 (19:52 +0100)]
doc/general: mention more DPCM codecs

4 years agodoc/general: move apdcm zork to right place
Paul B Mahol [Tue, 17 Mar 2020 15:36:54 +0000 (16:36 +0100)]
doc/general: move apdcm zork to right place

4 years agodoc/general: mention some added CRI stuff
Paul B Mahol [Tue, 17 Mar 2020 15:32:00 +0000 (16:32 +0100)]
doc/general: mention some added CRI stuff

4 years agoavformat: add hca demuxer
Paul B Mahol [Sun, 15 Mar 2020 12:55:15 +0000 (13:55 +0100)]
avformat: add hca demuxer

4 years agoavcodec: add CRI HCA decoder
Paul B Mahol [Sun, 15 Mar 2020 12:28:13 +0000 (13:28 +0100)]
avcodec: add CRI HCA decoder

4 years agoavcodec/allcodecs: move sdx2 to correct place
Paul B Mahol [Sun, 15 Mar 2020 10:37:02 +0000 (11:37 +0100)]
avcodec/allcodecs: move sdx2 to correct place

4 years agoavformat: add derf demuxer
Paul B Mahol [Sun, 15 Mar 2020 09:47:29 +0000 (10:47 +0100)]
avformat: add derf demuxer

4 years agoavcodec: add derf dpcm decoder
Paul B Mahol [Sun, 15 Mar 2020 10:03:27 +0000 (11:03 +0100)]
avcodec: add derf dpcm decoder

4 years agoavformat: add fwse demuxer
Paul B Mahol [Sat, 14 Mar 2020 10:37:40 +0000 (11:37 +0100)]
avformat: add fwse demuxer

4 years agoavcodec: add ADPCM IMA MTF decoder
Paul B Mahol [Sat, 14 Mar 2020 10:55:58 +0000 (11:55 +0100)]
avcodec: add ADPCM IMA MTF decoder

4 years agofate/ffmpeg: add test for time limited sub2video instance
Jan Ekström [Wed, 11 Mar 2020 23:22:15 +0000 (01:22 +0200)]
fate/ffmpeg: add test for time limited sub2video instance

Utilizes a subpicture sample with one decodable subpicture for the
test.

Based on a failing test case in reported by Michael in
https://ffmpeg.org/pipermail/ffmpeg-devel/2019-February/240398.html
which at the time had no test case for it.

Additionally, this is the first test case for the presentation
graphics format.

4 years agofate/ffmpeg: add a second, simple sub2video test
Jan Ekström [Wed, 11 Mar 2020 22:38:33 +0000 (00:38 +0200)]
fate/ffmpeg: add a second, simple sub2video test

4 years agoffmpeg: explicitly handle sub2video subpicture initialization
Jan Ekström [Fri, 22 Feb 2019 23:48:08 +0000 (01:48 +0200)]
ffmpeg: explicitly handle sub2video subpicture initialization

Each time the sub2video structure is initialized, the sub2video
subpicture is initialized together with the first received heartbeat.
The heartbeat's PTS is utilized as the subpicture start time.

Additionally, add some documentation on the stages.

4 years agolavd/avfoundation: Add basic transport control observation for capable devices.
Thilo Borgmann [Thu, 5 Mar 2020 11:32:49 +0000 (12:32 +0100)]
lavd/avfoundation: Add basic transport control observation for capable devices.

4 years agoh264dec: do not return a value from init_dimensions()
Anton Khirnov [Mon, 17 Apr 2017 08:40:55 +0000 (10:40 +0200)]
h264dec: do not return a value from init_dimensions()

There are no failure cases left in this function.

4 years agovp3: eliminate copy_fields
Anton Khirnov [Mon, 11 Apr 2016 07:27:08 +0000 (09:27 +0200)]
vp3: eliminate copy_fields

It is very fragile against fields being moved and hides what is actually
being copied. Copy all the fields explicitly instead.

4 years agoexamples/avio_dir_cmd: drop support for move/delete operations
Anton Khirnov [Fri, 10 Jan 2020 11:10:09 +0000 (12:10 +0100)]
examples/avio_dir_cmd: drop support for move/delete operations

They use non-public functions, which is unacceptable for a public API
example. Rename the example back to avio_list_dir.

This effectively reverts c84d208c275d6a43b3c3421d38772179abf8acee and
767d780ec001167b2fd8f6cfe4ef78a3a8b1e34c.

4 years agompegvideo: drop an unnecessary function parameter
Anton Khirnov [Tue, 10 Mar 2020 13:14:14 +0000 (14:14 +0100)]
mpegvideo: drop an unnecessary function parameter

It is always 0.

4 years agompegvideodata: drop useless comments
Anton Khirnov [Mon, 9 Mar 2020 13:11:29 +0000 (14:11 +0100)]
mpegvideodata: drop useless comments

4 years agoavformat/webmdashenc: Remove write_trailer
Andreas Rheinhardt [Thu, 26 Dec 2019 10:53:32 +0000 (11:53 +0100)]
avformat/webmdashenc: Remove write_trailer

It doesn't do anything: All allocated blocks have already been freed in
write_header.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/mxfenc: allow all frame rates if -strict mode is set to unofficial or lower
Marton Balint [Thu, 5 Mar 2020 20:36:20 +0000 (21:36 +0100)]
avformat/mxfenc: allow all frame rates if -strict mode is set to unofficial or lower

There was no consensus wheter or not to allow unofficial frame rates due to
possible interoperability issues, a compromise is to only allow it if -strict
mode is set to unofficial.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/mxfenc: factorize timecode checking and setting
Marton Balint [Tue, 3 Mar 2020 22:13:07 +0000 (23:13 +0100)]
avformat/mxfenc: factorize timecode checking and setting

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/mxfenc: add some missing content package rates
Marton Balint [Fri, 28 Feb 2020 00:29:51 +0000 (01:29 +0100)]
avformat/mxfenc: add some missing content package rates

Fixes ticket #8523.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/mxfenc: move content package rates and timebase combinations to a separate...
Marton Balint [Fri, 28 Feb 2020 00:21:04 +0000 (01:21 +0100)]
avformat/mxfenc: move content package rates and timebase combinations to a separate struct

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/mxf: get rid of samples per frame array usage
Marton Balint [Fri, 28 Feb 2020 00:10:45 +0000 (01:10 +0100)]
avformat/mxf: get rid of samples per frame array usage

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/audiointerleave: disallow using a samples_per_frame array
Marton Balint [Thu, 27 Feb 2020 23:26:20 +0000 (00:26 +0100)]
avformat/audiointerleave: disallow using a samples_per_frame array

Only MXF used an actual sample array, and that is unneeded there because simple
rounding rules can be used instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat/smoothstreaming: Fix memleaks on errors
Andreas Rheinhardt [Thu, 26 Dec 2019 10:53:28 +0000 (11:53 +0100)]
avformat/smoothstreaming: Fix memleaks on errors

If an AVFormatContext could be allocated, but white-/blacklists couldn't
be copied, the AVFormatContext would leak as it was only accessible
through a local variable that goes out of scope when one goes to fail.

Furthermore, in case writing a header of a submuxer failed, the options
used for said call could leak.

Both of these memleaks have been fixed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/matroskaenc: Check BlockAdditional size before use
Andreas Rheinhardt [Sun, 26 Jan 2020 05:10:27 +0000 (06:10 +0100)]
avformat/matroskaenc: Check BlockAdditional size before use

Don't read a 64bit number before having checked that the data is at
least 8 bytes long.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/avienc: Use AV_STRINGIFY for compile time constant
Andreas Rheinhardt [Sat, 14 Mar 2020 17:08:45 +0000 (18:08 +0100)]
avformat/avienc: Use AV_STRINGIFY for compile time constant

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/nutenc: Drop redundant frees
Andreas Rheinhardt [Sat, 14 Mar 2020 16:32:17 +0000 (17:32 +0100)]
avformat/nutenc: Drop redundant frees

Should writing the header fail, the allocations already performed will
be freed during deinit so remove the frees in nut_write_header().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/af_anequalizer: fix off by one in reallocation
Paul B Mahol [Sat, 14 Mar 2020 18:39:04 +0000 (19:39 +0100)]
avfilter/af_anequalizer: fix off by one in reallocation

4 years agoavformat/mux: Unify setting number of muxed packets
Andreas Rheinhardt [Thu, 12 Mar 2020 17:54:08 +0000 (18:54 +0100)]
avformat/mux: Unify setting number of muxed packets

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mux: Remove redundant checks for write errors
Andreas Rheinhardt [Thu, 12 Mar 2020 17:54:07 +0000 (18:54 +0100)]
avformat/mux: Remove redundant checks for write errors

If writing a packet didn't directly return an error, the AVIOContext's
error flag is checked for errors (if existing) by write_packet(). And if
write_packet() didn't indicate an error, its callers checked the error
flag of the AVIOContext (if existing). The latter check is redundant.

The reason for checking twice lies in the FFmpeg-Libav split: The check
in write_packet() has been added in 9ad1e0c1 in Libav. FFmpeg already
had the other checks (since aec9390a), but when 9ad1e0c1 was merged
(in 1f1c1008), no one noticed the redundant checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibavcodec, libpostproc: Remove outcommented START/STOP_TIMER
Andreas Rheinhardt [Fri, 13 Mar 2020 13:06:01 +0000 (14:06 +0100)]
libavcodec, libpostproc: Remove outcommented START/STOP_TIMER

as well as includes of libavutil/timer.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mxfenc: Reorder fields in MXFIndexEntry to make it smaller
Andreas Rheinhardt [Fri, 13 Mar 2020 10:18:40 +0000 (11:18 +0100)]
avformat/mxfenc: Reorder fields in MXFIndexEntry to make it smaller

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavf/tty: Reduce probe score to fix ffmetadata auto-detection.
Carl Eugen Hoyos [Thu, 12 Mar 2020 23:53:16 +0000 (00:53 +0100)]
lavf/tty: Reduce probe score to fix ffmetadata auto-detection.

Fixes ticket #8568.

4 years agoavfilter/f_sendcmd: add more useful variables
Paul B Mahol [Fri, 13 Mar 2020 16:19:33 +0000 (17:19 +0100)]
avfilter/f_sendcmd: add more useful variables

4 years agoconfigure: Add llviddsp to mvha select
Thierry Foucu [Thu, 12 Mar 2020 16:32:22 +0000 (09:32 -0700)]
configure: Add llviddsp to mvha select

4 years agodiracdec: rewrite golomb reader
Lynne [Sun, 1 Mar 2020 11:23:53 +0000 (11:23 +0000)]
diracdec: rewrite golomb reader

This version is able to output multiple coefficients at a time and
is able to altogether remove actual golomb code parsing.
Its also able to partially recover the last coefficient in case
the packet is incomplete.

Total decoder performance gain for 8bit 420 1080p lossless: 40%.
Total decoder performance gain for 10bit 420 1080p lossless: 40%.

clang was able to vectorize the loop much better than
my handwritten assembly, but gcc was very naive and didn't.

Lookup table is a rewritten version of vc2hqdecode.

4 years agochangelog: add entry for the Vulkan hwcontext and filters
Lynne [Thu, 12 Mar 2020 20:20:22 +0000 (20:20 +0000)]
changelog: add entry for the Vulkan hwcontext and filters

4 years agohwcontext_vulkan: support more than one plane per DMABUF layer
Lynne [Thu, 12 Mar 2020 18:59:12 +0000 (18:59 +0000)]
hwcontext_vulkan: support more than one plane per DMABUF layer

Requires the dmabuf modifiers extension.
Allows for importing of compressed images with a second plane.

4 years agohwcontext_vulkan: duplicate DMABUF objects before importing them
Lynne [Thu, 12 Mar 2020 18:03:43 +0000 (18:03 +0000)]
hwcontext_vulkan: duplicate DMABUF objects before importing them

The specifications are very vague about who has ownership, and in this case,
Vulkan takes ownership of all DMABUF FDs passed to it, causing errors
to occur if someone gave us images for mapping which were meant to be kept.
The old behavior worked with one-way VAAPI and DMABUF imports, but was broken
with clients like wlroots' dmabuf-capture.

4 years agohwcontext_vulkan: initialize semaphores of DMABUF imports
Lynne [Thu, 12 Mar 2020 18:01:07 +0000 (18:01 +0000)]
hwcontext_vulkan: initialize semaphores of DMABUF imports

There was a recent change in Intel's driver that triggered a driver-internal
error if the semaphore given to the command buffer wasn't initialized.
Given that the specifications require the semaphore to be initialized,
this is within spec. Unlike what's causing it in the first place, which is
that there are no ways to extract/import dma sync objects from DMABUFs,
so we must leave our semaphores bare.

4 years agohwcontext_vulkan: only convert image layout for transfers if necessary
Lynne [Thu, 12 Mar 2020 16:57:14 +0000 (16:57 +0000)]
hwcontext_vulkan: only convert image layout for transfers if necessary

4 years agohwcontext_vulkan: minor corrections for DMABUF mapping
Lynne [Thu, 12 Mar 2020 16:46:01 +0000 (16:46 +0000)]
hwcontext_vulkan: minor corrections for DMABUF mapping

We need to consider the amount of layers instead of the image's planes.

4 years agoavformat/avidec: recognize H265 fourcc as hevc
Paul B Mahol [Fri, 6 Mar 2020 20:16:49 +0000 (21:16 +0100)]
avformat/avidec: recognize H265 fourcc as hevc

Fixes decoding of came2_2020-01-13__20-38-58_21-00-00__Chn2.avi

4 years agoavformat/vpk: add seeking support
Paul B Mahol [Thu, 12 Mar 2020 17:47:39 +0000 (18:47 +0100)]
avformat/vpk: add seeking support

4 years agoavfilter/vf_dnn_processing.c: add frame size change support for planar yuv format
Guo, Yejun [Fri, 21 Feb 2020 12:40:07 +0000 (20:40 +0800)]
avfilter/vf_dnn_processing.c: add frame size change support for planar yuv format

The Y channel is handled by dnn, and also resized by dnn. The UV channels
are resized with swscale.

The command to use espcn.pb (see vf_sr) looks like:
./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y -y tmp.espcn.jpg

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavfilter/vf_dnn_processing.c: add planar yuv format support
Guo, Yejun [Fri, 21 Feb 2020 06:20:48 +0000 (14:20 +0800)]
avfilter/vf_dnn_processing.c: add planar yuv format support

Only the Y channel is handled by dnn, the UV channels are copied
without changes.

The command to use srcnn.pb (see vf_sr) looks like:
./ffmpeg -i 480p.jpg -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=tensorflow:model=srcnn.pb:input=x:output=y -y srcnn.jpg

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavfilter/vf_dnn_processing.c: use swscale for uint8<->float32 convert
Guo, Yejun [Thu, 20 Feb 2020 07:25:57 +0000 (15:25 +0800)]
avfilter/vf_dnn_processing.c: use swscale for uint8<->float32 convert

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavformat/hlsenc: set the options when open the key info files
Steven Liu [Thu, 12 Mar 2020 06:00:45 +0000 (14:00 +0800)]
avformat/hlsenc: set the options when open the key info files

make the options same as segments for the http put method

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
4 years agoavformat/hlsenc: Fix initial setting for start_pts
Hongcheng Zhong [Fri, 6 Mar 2020 03:58:22 +0000 (11:58 +0800)]
avformat/hlsenc: Fix initial setting for start_pts

This patch fixes Bug #8469
If x264 baseline profile is used with other profiles,
start_pts will be initialized to audio stream's first pts,
while the duration is calculated based on video stream's pts.
In this patch the start_pts is initialized with the correct stream's first pts.

Signed-off-by: Hongcheng Zhong <sj.hc_Zhong@sjtu.edu.cn>
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
4 years agoavcodec/cbs_jpeg: Check length for SOS
Michael Niedermayer [Sat, 7 Mar 2020 14:42:58 +0000 (15:42 +0100)]
avcodec/cbs_jpeg: Check length for SOS

Fixes: out of array access
Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584
Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680
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/adpcm: Fix invalid shift in AV_CODEC_ID_ADPCM_PSX
Michael Niedermayer [Sun, 1 Mar 2020 21:46:34 +0000 (22:46 +0100)]
avcodec/adpcm: Fix invalid shift in AV_CODEC_ID_ADPCM_PSX

Fixes: left shift of negative value -1
Fixes: 20859/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_PSX_fuzzer-5720391507247104
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/mpeg12dec: Fix invalid shift in mpeg2_fast_decode_block_intra()
Michael Niedermayer [Thu, 5 Dec 2019 21:35:03 +0000 (22:35 +0100)]
avcodec/mpeg12dec: Fix invalid shift in mpeg2_fast_decode_block_intra()

Fixes: left shift of negative value -695
Fixes: 19232/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5702856963522560
Fixes: 19555/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5741218147598336
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 agolsws/input: Do not change transparency range.
Carl Eugen Hoyos [Sat, 15 Feb 2020 09:07:51 +0000 (10:07 +0100)]
lsws/input: Do not change transparency range.

Fixes ticket #8509.

4 years agoavcodec/wavpack: check for allocation failure
Paul B Mahol [Wed, 11 Mar 2020 20:53:27 +0000 (21:53 +0100)]
avcodec/wavpack: check for allocation failure

4 years agoavcodec/wavpack: fix some syle issues
Paul B Mahol [Wed, 11 Mar 2020 20:50:02 +0000 (21:50 +0100)]
avcodec/wavpack: fix some syle issues

4 years agoavcodec/wavpack: add support for DSD files
David Bryant [Mon, 9 Mar 2020 22:23:53 +0000 (15:23 -0700)]
avcodec/wavpack: add support for DSD files

Add support for WavPack DSD files to the existing WavPack decoder using
avcodec/dsd to perform the 8:1 decimation to 32-bit float samples. We must
serialize the dsd2pcm operation (cross-boundary filtering) but would like
to use frame-level multithreading for the CPU-intensive DSD decompression,
and this is accomplished with ff_thread_report/await_progress(). Because
the dsd2pcm operation is independent across channels we use slice-based
multithreading for that part.

Also a few things were removed from the existing WavPack decoder that
weren't being used (primarily the SavedContext stuff) and the WavPack
demuxer was enhanced to correctly determine the sampling rate of DSD
files (and of course to no longer reject them).

Signed-off-by: David Bryant <david@wavpack.com>
4 years agolavc/aarch64: Remove unneeded file vp9mc_aarch64.c
Carl Eugen Hoyos [Wed, 11 Mar 2020 13:36:07 +0000 (14:36 +0100)]
lavc/aarch64: Remove unneeded file vp9mc_aarch64.c

4 years agolavc/aarch64: Fix suffix of new file vp9mc_aarch64.
Carl Eugen Hoyos [Wed, 11 Mar 2020 13:29:22 +0000 (14:29 +0100)]
lavc/aarch64: Fix suffix of new file vp9mc_aarch64.

4 years agolavc/aarch64: Fix compilation with --disable-neon
Carl Eugen Hoyos [Wed, 11 Mar 2020 12:16:47 +0000 (13:16 +0100)]
lavc/aarch64: Fix compilation with --disable-neon

Fixes ticket #8565.

4 years agolavc/aarch64: Move non-neon vp9 copy functions out of neon source file.
Carl Eugen Hoyos [Wed, 11 Mar 2020 12:01:02 +0000 (13:01 +0100)]
lavc/aarch64: Move non-neon vp9 copy functions out of neon source file.

Fixes part of ticket #8565.

4 years agoMakefile: Delete more created files when running "make distclean".
Carl Eugen Hoyos [Wed, 11 Mar 2020 10:39:44 +0000 (11:39 +0100)]
Makefile: Delete more created files when running "make distclean".

4 years agoavfilter/Makefile: remove dnn files when calling make clean
James Almer [Tue, 10 Mar 2020 15:55:11 +0000 (12:55 -0300)]
avfilter/Makefile: remove dnn files when calling make clean

Also remove the ancient reference to libmpcodecs while at it.

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
4 years agofate/adpcm: add adpcm_ima_alp tests
Zane van Iperen [Mon, 9 Mar 2020 13:07:47 +0000 (13:07 +0000)]
fate/adpcm: add adpcm_ima_alp tests

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/cbs_h2645: Treat slices without data as invalid
Andreas Rheinhardt [Mon, 9 Dec 2019 22:26:03 +0000 (23:26 +0100)]
avcodec/cbs_h2645: Treat slices without data as invalid

Slices that end after their header (meaning slices after the header
without any data before the rbsp_stop_one_bit or possibly without any
rbsp_stop_one_bit at all) are invalid and are now dropped. This ensures
that one doesn't run into two asserts in cbs_h2645_write_slice_data().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fixes: 19629/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-5676822528524288
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/cbs_h2645: Remove dead code to delete trailing zeroes
Andreas Rheinhardt [Mon, 9 Dec 2019 22:26:02 +0000 (23:26 +0100)]
avcodec/cbs_h2645: Remove dead code to delete trailing zeroes

Trailing zeroes are already discarded when splitting a fragment, which
makes the code to remove them when decomposing slices dead code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/v4l2_m2m: Avoid using intermediate buffer
Andreas Rheinhardt [Tue, 3 Mar 2020 04:20:05 +0000 (05:20 +0100)]
avcodec/v4l2_m2m: Avoid using intermediate buffer

Up until now, v4l2_m2m would write via snprintf() into an intermediate
buffer and then copy from there (via strncpy()) to the end buffer. This
commit changes this by removing the intermediate buffer.

The call to strncpy() was actually of the form strncpy(dst, src,
strlen(src) + 1) which is unsafe in general, but safe in this instance
because dst and src were both of the same size and src was a proper
zero-terminated string. But this nevertheless led to a compiler warning
"‘strncpy’ specified bound depends on the length of the source argument
[-Wstringop-overflow=]" in GCC 9.2. strlen() was unnecessary anyway.

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/movenc: add ICC profile support to colr atom
vectronic [Mon, 23 Sep 2019 20:43:06 +0000 (21:43 +0100)]
avformat/movenc: add ICC profile support to colr atom

If 'write_colr' movflag is set, then movflag 'prefer_icc' can
be used to first look for an AV_PKT_DATA_ICC_PROFILE entry to
encode.

If ICC profile doesn't exist, default behaviour enabled by
'write_colr' occurs.

Signed-off-by: vectronic <hello.vectronic@gmail.com>
4 years agoavformat/mov: whitespace indent
vectronic [Mon, 23 Sep 2019 20:43:05 +0000 (21:43 +0100)]
avformat/mov: whitespace indent

Signed-off-by: vectronic <hello.vectronic@gmail.com>
4 years agoavformat/mov: add ICC profile support for colr atom
vectronic [Mon, 23 Sep 2019 20:43:04 +0000 (21:43 +0100)]
avformat/mov: add ICC profile support for colr atom

Signed-off-by: vectronic <hello.vectronic@gmail.com>
4 years agoAPI: add AV_PKT_DATA_ICC_PROFILE to AVPacketSideDataType
vectronic [Mon, 23 Sep 2019 20:43:02 +0000 (21:43 +0100)]
API: add AV_PKT_DATA_ICC_PROFILE to AVPacketSideDataType

Signed-off-by: vectronic <hello.vectronic@gmail.com>
4 years agolavc/vaapi_encode_h265: fix conf_win_xxx_offset for 4:2:2/4:4:4 encoding
Linjie Fu [Sun, 8 Mar 2020 08:28:46 +0000 (16:28 +0800)]
lavc/vaapi_encode_h265: fix conf_win_xxx_offset for 4:2:2/4:4:4 encoding

Use desc->log2_chroma_w/h to calculate the sps->conf_win_right/bottom_offset.

Based on Table 6-1, SubWidthC and SubHeightC depend on chroma format(log2_chroma_w/h).

Based on D-28 and D-29, set the correct cropped width/height.

croppedWidth  = pic_width_in_luma_samples −
                SubWidthC * ( conf_win_right_offset + conf_win_left_offset );

croppedHeight = pic_height_in_luma_samples −
                SubHeightC * ( conf_win_bottom_offset + conf_win_top_offset );

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
4 years agoavformat/libzmq: Make default pkt_size value consistent with amqp
Andriy Gelman [Sun, 8 Mar 2020 20:33:29 +0000 (16:33 -0400)]
avformat/libzmq: Make default pkt_size value consistent with amqp

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat: Add AMQP version 0-9-1 protocol support
Andriy Gelman [Sun, 8 Mar 2020 21:25:31 +0000 (17:25 -0400)]
avformat: Add AMQP version 0-9-1 protocol support

Supports connecting to a RabbitMQ broker via AMQP version 0-9-1.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>