]> git.sesse.net Git - ffmpeg/log
ffmpeg
3 years agoavcodec/imgconvert: Remove deprecated parts of pixel format API
Andreas Rheinhardt [Fri, 26 Feb 2021 07:19:06 +0000 (08:19 +0100)]
avcodec/imgconvert: Remove deprecated parts of pixel format API

Deprecated in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54 and
2a54ae9df8cbc1717b3929222ac75f384e2ff240.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated AVPicture API
Andreas Rheinhardt [Fri, 26 Feb 2021 05:19:42 +0000 (06:19 +0100)]
avcodec: Remove deprecated AVPicture API

Deprecated in a17a7661906ba295d67afd80ac0770422e1b02b3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/vdpau: Remove deprecated av_vdpau_get_profile
Andreas Rheinhardt [Fri, 26 Feb 2021 04:52:36 +0000 (05:52 +0100)]
avcodec/vdpau: Remove deprecated av_vdpau_get_profile

Deprecated in b10b6ac7a902f28e09e37a29c392e2f0c19e9526.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/options: Remove deprecated avcodec_copy_context
Andreas Rheinhardt [Fri, 26 Feb 2021 02:56:33 +0000 (03:56 +0100)]
avcodec/options: Remove deprecated avcodec_copy_context

Deprecated in 5f30ac27795f9f98043e8582ccaad8813104adc4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated avcodec_get_context_defaults3
Andreas Rheinhardt [Thu, 25 Feb 2021 19:37:24 +0000 (20:37 +0100)]
avcodec: Remove deprecated avcodec_get_context_defaults3

Deprecated in 04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/(movtext|srt|ttml|webvtt)enc: Reindent after previous commit
Andreas Rheinhardt [Thu, 25 Feb 2021 19:33:44 +0000 (20:33 +0100)]
avcodec/(movtext|srt|ttml|webvtt)enc: Reindent after previous commit

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated ASS with inline timing
Andreas Rheinhardt [Thu, 25 Feb 2021 19:30:58 +0000 (20:30 +0100)]
avcodec: Remove deprecated ASS with inline timing

Deprecated in 22ebbda637257a432c99330ca4c6024665418f0e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/mpegvideo_enc: Remove deprecated RTP-callback
Andreas Rheinhardt [Thu, 25 Feb 2021 19:15:20 +0000 (20:15 +0100)]
avcodec/mpegvideo_enc: Remove deprecated RTP-callback

Deprecated in 462a54e2291e1fa18e1f1254d09739dfbb795617.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/codec2utils: Remove legacy avpriv functions
Andreas Rheinhardt [Thu, 25 Feb 2021 19:07:50 +0000 (20:07 +0100)]
avcodec/codec2utils: Remove legacy avpriv functions

Unused since 37d742b607d47122d23d548ffd7ad9b09cbc5298.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/mpeg4audio: Remove avpriv_mpeg4audio_get_config
Andreas Rheinhardt [Thu, 25 Feb 2021 18:59:35 +0000 (19:59 +0100)]
avcodec/mpeg4audio: Remove avpriv_mpeg4audio_get_config

Superseded by avpriv_mpeg4audio_get_config2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/bitstream: Remove avpriv PutBits API functions
Andreas Rheinhardt [Thu, 25 Feb 2021 18:54:07 +0000 (19:54 +0100)]
avcodec/bitstream: Remove avpriv PutBits API functions

Scheduled for removal in 717503f7166d7032e32b935f2819d450524125d1.
Also remove PutBitContext.size_in_bits which has been scheduled
for removal in e7cbbd90267de2a0ad1b5fa8ccb29ab7bf8a26b8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated avcodec_get_chroma_sub_sample
Andreas Rheinhardt [Thu, 25 Feb 2021 18:45:33 +0000 (19:45 +0100)]
avcodec: Remove deprecated avcodec_get_chroma_sub_sample

Effectively deprecated in 2c800eb7375c65ffd56164b03bb035bdb3f1e172.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove remnants of user-visiable HW acceleration API
Andreas Rheinhardt [Thu, 25 Feb 2021 18:39:58 +0000 (19:39 +0100)]
avcodec: Remove remnants of user-visiable HW acceleration API

Disabled and deprecated in 3536a3efb9fde88d34d526a51b1080247326cd6e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove lock manager API
Andreas Rheinhardt [Thu, 25 Feb 2021 18:37:16 +0000 (19:37 +0100)]
avcodec: Remove lock manager API

Deprecated in a04c2c707de2ce850f79870e84ac9d7ec7aa9143.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated av_codec_get_tag_string
Andreas Rheinhardt [Thu, 25 Feb 2021 18:34:56 +0000 (19:34 +0100)]
avcodec: Remove deprecated av_codec_get_tag_string

Deprecated in f156d35321bb600b2309b78185d600b2fa64d84a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove unneeded getters and setters
Andreas Rheinhardt [Thu, 25 Feb 2021 18:29:46 +0000 (19:29 +0100)]
avcodec: Remove unneeded getters and setters

Deprecated in c4131a0613c4b2c30c01b2550b41068815d27799.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove private options from AVCodecContext
Andreas Rheinhardt [Thu, 25 Feb 2021 18:20:01 +0000 (19:20 +0100)]
avcodec: Remove private options from AVCodecContext

Several options that were too codec-specific were deprecated between
0e6c8532215790bbe560a9eea4f3cc82bb55cf92 and
0e9c4fe254073b209970df3e3cb84531bc388e99.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated API to split/merge side-data
Andreas Rheinhardt [Thu, 25 Feb 2021 17:57:27 +0000 (18:57 +0100)]
avcodec: Remove deprecated API to split/merge side-data

Deprecated in d682ae70b4b3a53fb73ec30281f9f4cfbc531edd.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated coder type options
Andreas Rheinhardt [Thu, 25 Feb 2021 17:54:02 +0000 (18:54 +0100)]
avcodec: Remove deprecated coder type options

Deprecated in be00ec832c519427cd92218abac77dafdc1d5487.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated stat-bits fields
Andreas Rheinhardt [Thu, 25 Feb 2021 17:43:15 +0000 (18:43 +0100)]
avcodec: Remove deprecated stat-bits fields

Deprecated in 16216b713f9a21865cc07993961cf5d0ece24916.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove deprecated AVPacket API
Andreas Rheinhardt [Thu, 25 Feb 2021 17:14:11 +0000 (18:14 +0100)]
avcodec: Remove deprecated AVPacket API

Deprecated in ce70f28a1732c74a9cd7fec2d56178750bd6e457.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec, avformat: Remove AVPacket.convergence_duration
Andreas Rheinhardt [Thu, 25 Feb 2021 17:12:11 +0000 (18:12 +0100)]
avcodec, avformat: Remove AVPacket.convergence_duration

Deprecated in 948f3c19a8bd069768ca411212aaf8c1ed96b10d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove sidedata-only-packet cruft
Andreas Rheinhardt [Thu, 25 Feb 2021 17:01:14 +0000 (18:01 +0100)]
avcodec: Remove sidedata-only-packet cruft

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec, avformat: Remove old BSF API
Andreas Rheinhardt [Thu, 25 Feb 2021 16:49:56 +0000 (17:49 +0100)]
avcodec, avformat: Remove old BSF API

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat: Remove next API for AV(In|Out)putFormat
Andreas Rheinhardt [Thu, 25 Feb 2021 13:22:30 +0000 (14:22 +0100)]
avformat: Remove next API for AV(In|Out)putFormat

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec: Remove AVCodec, AVParser and AVBitStreamFilter next API
Andreas Rheinhardt [Thu, 25 Feb 2021 13:02:44 +0000 (14:02 +0100)]
avcodec: Remove AVCodec, AVParser and AVBitStreamFilter next API

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/dtsenc: reindent
Gyan Doshi [Tue, 27 Apr 2021 03:51:43 +0000 (09:21 +0530)]
avformat/dtsenc: reindent

3 years agoavformat/adtsenc: clarify option help
Gyan Doshi [Mon, 26 Apr 2021 11:20:03 +0000 (16:50 +0530)]
avformat/adtsenc: clarify option help

Also remove unnecessary unit as option does not accept any constants.

3 years agodoc/filters: correct http link
Limin Wang [Mon, 26 Apr 2021 10:48:51 +0000 (18:48 +0800)]
doc/filters: correct http link

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agolavfi/dnn/queue.h: Add Documentation to Queue
Shubhanshu Saxena [Mon, 26 Apr 2021 07:54:09 +0000 (13:24 +0530)]
lavfi/dnn/queue.h: Add Documentation to Queue

Documentation for Queue

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
3 years agolavfi/dnn/safe_queue.h: Add Documentation to SafeQueue
Shubhanshu Saxena [Mon, 26 Apr 2021 07:46:50 +0000 (13:16 +0530)]
lavfi/dnn/safe_queue.h: Add Documentation to SafeQueue

Documentation for SafeQueue

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
3 years agoavcodec/msmpeg4enc: Reindent after the last commit
Andreas Rheinhardt [Thu, 10 Dec 2020 06:33:46 +0000 (07:33 +0100)]
avcodec/msmpeg4enc: Reindent after the last commit

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/msmpeg4enc: Make msmpeg4 encoders init-threadsafe
Andreas Rheinhardt [Thu, 10 Dec 2020 06:26:31 +0000 (07:26 +0100)]
avcodec/msmpeg4enc: Make msmpeg4 encoders init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/msmpeg4: Factor out common RLTable initialization code
Andreas Rheinhardt [Thu, 10 Dec 2020 05:39:41 +0000 (06:39 +0100)]
avcodec/msmpeg4: Factor out common RLTable initialization code

Up until now, both the msmpeg4 decoders and encoders initialized several
RLTables common to them (the decoders also initialized the VLCs of these
RLTables). This is an obstacle to making these codecs init-threadsafe.
So move this initialization to ff_msmpeg4_common_init() that already
contains this initialization code. This allows to reuse the AVOnce used
for initializing ff_v2_dc_lum/chroma_table which automatically makes
initializing these RLTables thread-safe.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/msmpeg4: Reindentation
Andreas Rheinhardt [Thu, 10 Dec 2020 04:42:35 +0000 (05:42 +0100)]
avcodec/msmpeg4: Reindentation

Forgotten in/after f5957f3fe2b8dfda13a9750acc3e3a03cd5d39c9.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/msmpeg4: Make ff_msmpeg4_common_init() thread-safe
Andreas Rheinhardt [Thu, 10 Dec 2020 04:37:54 +0000 (05:37 +0100)]
avcodec/msmpeg4: Make ff_msmpeg4_common_init() thread-safe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mpeg4videoenc: Make encoder init-threadsafe
Andreas Rheinhardt [Thu, 10 Dec 2020 04:00:40 +0000 (05:00 +0100)]
avcodec/mpeg4videoenc: Make encoder init-threadsafe

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/mpeg4video: Make initializing RLTable thread-safe
Andreas Rheinhardt [Thu, 10 Dec 2020 03:32:17 +0000 (04:32 +0100)]
avcodec/mpeg4video: Make initializing RLTable thread-safe

Up until now the RLTable ff_mpeg4_rl_intra was initialized by both mpeg4
decoder and encoder (except the VLCs that are only used by the decoder).
This is an obstacle to making these codecs init-threadsafe, so move
initializing this to a single function that is guarded by a dedicated
AVOnce.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/ituh263enc: Make static initializations thread-safe
Andreas Rheinhardt [Wed, 2 Dec 2020 00:58:09 +0000 (01:58 +0100)]
avcodec/ituh263enc: Make static initializations thread-safe

This already makes several encoders (namely FLV, H.263, H.263+ and
RealVideo 1.0 and 2.0 and SVQ1) that use this init-threadsafe.

It also makes the Snow encoder init-threadsafe; it was already marked
as such since commit d49210788b0836d56dd872d517fe73f83b080101, because
it was thought to be harmless if one and the same object was
initialized by multiple threads at the same time.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/encode: Zero padding in ff_get_encode_buffer()
Andreas Rheinhardt [Mon, 26 Apr 2021 18:47:03 +0000 (20:47 +0200)]
avcodec/encode: Zero padding in ff_get_encode_buffer()

The documentation of the get_encode_buffer() callback does not require
to zero the padding; therefore we do it in ff_get_encode_buffer().
This also constitutes an implicit check for whether the buffer is
actually allocated with padding.

The memset in avcodec_default_get_encode_buffer() is now redundant and
has been removed.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavcodec/svq3: Free array of frames in a loop
Andreas Rheinhardt [Thu, 15 Apr 2021 15:17:21 +0000 (17:17 +0200)]
avcodec/svq3: Free array of frames in a loop

Avoids code duplication

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavcodec/svq3: Remove unused function parameter
Andreas Rheinhardt [Thu, 15 Apr 2021 14:36:15 +0000 (16:36 +0200)]
avcodec/svq3: Remove unused function parameter

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavcodec/ivi: Fix indentation
Andreas Rheinhardt [Thu, 15 Apr 2021 14:20:50 +0000 (16:20 +0200)]
avcodec/ivi: Fix indentation

Also improve readability by keeping a pointer to the IVIBandDesc that is
currently freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavcodec/vc2enc: Actually zero padding
Andreas Rheinhardt [Mon, 26 Apr 2021 16:16:24 +0000 (18:16 +0200)]
avcodec/vc2enc: Actually zero padding

This encoder sets the min_size in ff_alloc_packet2(), so it can not rely
on av_packet_make_refcounted() to zero the padding.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavformat/westwood_audenc: Remove unused variable
Andreas Rheinhardt [Mon, 26 Apr 2021 12:49:35 +0000 (14:49 +0200)]
avformat/westwood_audenc: Remove unused variable

Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavformat/westwood_audenc: Check for, not assert on invalid data
Andreas Rheinhardt [Mon, 26 Apr 2021 12:48:33 +0000 (14:48 +0200)]
avformat/westwood_audenc: Check for, not assert on invalid data

Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agodoc: update for adpcm_ima_ws encoder and wsaud muxer
Zane van Iperen [Mon, 26 Apr 2021 12:46:20 +0000 (22:46 +1000)]
doc: update for adpcm_ima_ws encoder and wsaud muxer

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 years agodoc/muxers: add entry for ALP muxer
Gyan Doshi [Mon, 26 Apr 2021 13:51:47 +0000 (19:21 +0530)]
doc/muxers: add entry for ALP muxer

3 years agoavcodec/ttmlenc: add support for region positioning and sizing
Jan Ekström [Mon, 29 Mar 2021 14:19:58 +0000 (17:19 +0300)]
avcodec/ttmlenc: add support for region positioning and sizing

The ASS margins are utilized to generate percentual values, as
the usage of cell-based sizing and offsetting seems to be not too
well supported by renderers.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
3 years agoavcodec/ttmlenc: add initial support for regions and styles
Jan Ekström [Mon, 29 Mar 2021 13:34:34 +0000 (16:34 +0300)]
avcodec/ttmlenc: add initial support for regions and styles

Attempts to utilize the TTML cell resolution as a mapping to the
reference resolution, and maps font size to cell size. Additionally
sets the display and text alignment according to the ASS alignment
number.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
3 years agoavformat/ttmlenc: enable writing out additional header values
Jan Ekström [Mon, 15 Mar 2021 14:01:52 +0000 (16:01 +0200)]
avformat/ttmlenc: enable writing out additional header values

This way the encoder may pass on the following values to the muxer:
1) Additional root "tt" element attributes, such as the subtitle
   canvas reference size.
2) Anything before the body element of the document, such as regions
   in the head element, which can configure styles.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
3 years agoavcodec/ttmlenc: split header writing into its own function
Jan Ekström [Mon, 15 Mar 2021 10:41:18 +0000 (12:41 +0200)]
avcodec/ttmlenc: split header writing into its own function

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
3 years agodoc/muxers: add entry for ADTS muxer
Gyan Doshi [Mon, 26 Apr 2021 11:08:19 +0000 (16:38 +0530)]
doc/muxers: add entry for ADTS muxer

3 years agofate: add adpcm_ima_ws test
Zane van Iperen [Mon, 26 Apr 2021 08:58:40 +0000 (18:58 +1000)]
fate: add adpcm_ima_ws test

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 years agoavformat/westwoodaudenc: Adds muxer for Westwood AUD format.
Aidan Richmond [Sun, 25 Apr 2021 20:00:01 +0000 (21:00 +0100)]
avformat/westwoodaudenc: Adds muxer for Westwood AUD format.

Format is still used by modders of these old games.

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Aidan Richmond <aidan.is@hotmail.co.uk>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 years agoavcodec/adpcmenc: Adds encoder for Westwood ADPCM.
Aidan Richmond [Sun, 25 Apr 2021 20:00:00 +0000 (21:00 +0100)]
avcodec/adpcmenc: Adds encoder for Westwood ADPCM.

Signed-off-by: Aidan Richmond <aidan.is@hotmail.co.uk>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 years agoavcodec/adpcm: Fixes output from Westwood ADPCM.
Aidan Richmond [Sun, 25 Apr 2021 20:00:02 +0000 (21:00 +0100)]
avcodec/adpcm: Fixes output from Westwood ADPCM.

Fixes bug #9198

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Aidan Richmond <aidan.is@hotmail.co.uk>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 years agox86/tx_float: remove ff_ prefix from external constant tables
James Almer [Sun, 25 Apr 2021 20:26:58 +0000 (17:26 -0300)]
x86/tx_float: remove ff_ prefix from external constant tables

Fixes compilation with some assemblers.

Reviewed-by: Lynne
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolibavformat/adtsenc: Increase ADTS_MAX_FRAME_BYTES from 8k to 16k
Chris Ribble [Sun, 25 Apr 2021 16:47:29 +0000 (11:47 -0500)]
libavformat/adtsenc: Increase ADTS_MAX_FRAME_BYTES from 8k to 16k

ADTS frames may contain up to 768 bytes per channel. With 16 channels,
this is 12k, which cannot fit into the maximum 8k buffer.

Signed-off-by: Chris Ribble <chris.ribble@resi.io>
3 years agoavcodec/mjpegdec: postpone calling ff_get_buffer() until the SOS marker
James Almer [Wed, 21 Apr 2021 16:33:33 +0000 (13:33 -0300)]
avcodec/mjpegdec: postpone calling ff_get_buffer() until the SOS marker

With JPEG-LS PAL8 samples, the JPEG-LS extension parameters signaled with
the LSE marker show up after SOF but before SOS. For those, the pixel format
chosen by get_format() in SOF is GRAY8, and then replaced by PAL8 in LSE.
This has not been an issue given both pixel formats allocate the second data
plane for the palette, but after the upcoming soname bump, GRAY8 will no longer
do that. This will result in segfauls when ff_jpegls_decode_lse() attempts to
write the palette on a buffer originally allocated as a GRAY8 one.

Work around this by calling ff_get_buffer() after the actual pixel format is
known.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_adelay: make per channel delay argument an int64_t
James Almer [Fri, 23 Apr 2021 03:26:09 +0000 (00:26 -0300)]
avfilter/af_adelay: make per channel delay argument an int64_t

Should fix ticket #9196

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/adpcm: init from extradata before setting sample formats
Zane van Iperen [Sun, 25 Apr 2021 01:27:41 +0000 (11:27 +1000)]
avcodec/adpcm: init from extradata before setting sample formats

Fixes a crash when decoding VQA files.

Regression since c012f9b265e172de9c240c9dfab8665936fa3e83.

Reported-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
3 years agolavfi/dnn_backend_openvino.c: Spelling Correction in OpenVino Backend
shubhanshu02 [Fri, 23 Apr 2021 10:56:51 +0000 (16:26 +0530)]
lavfi/dnn_backend_openvino.c: Spelling Correction in OpenVino Backend

Correct Spelling of the word `descibe` to `describe`
in init_model_ov

Signed-off-by: shubhanshu02 <shubhanshu.e01@gmail.com>
3 years agox86/tx_float: fix forgotten 2-argument mulps
Lynne [Sat, 24 Apr 2021 20:33:42 +0000 (22:33 +0200)]
x86/tx_float: fix forgotten 2-argument mulps

Yasm *really* cannot deal with any omitted arguments at all.

3 years agox86/tx_float: use all arguments on vperm2f and vpermilps and reindent comments
Lynne [Sat, 24 Apr 2021 20:15:41 +0000 (22:15 +0200)]
x86/tx_float: use all arguments on vperm2f and vpermilps and reindent comments

Apparently even old nasm isn't required to accept incomplete instructions.

3 years agox86/tx_float: Fixes compilation with old yasm
James Almer [Sat, 24 Apr 2021 19:01:04 +0000 (16:01 -0300)]
x86/tx_float: Fixes compilation with old yasm

Use three operand format on some instructions, and lea to load effective
addresses of tables.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolavu/x86/tx_float: fix FMA3 implying AVX2 is available
Lynne [Sat, 24 Apr 2021 16:45:02 +0000 (18:45 +0200)]
lavu/x86/tx_float: fix FMA3 implying AVX2 is available

It's the other way around - AVX2 implies FMA3 is available.

3 years agofate: add tests for JPEG-LS PAL8
James Almer [Wed, 21 Apr 2021 17:10:25 +0000 (14:10 -0300)]
fate: add tests for JPEG-LS PAL8

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolavu/x86: add FFT assembly
Lynne [Sat, 10 Apr 2021 01:54:22 +0000 (03:54 +0200)]
lavu/x86: add FFT assembly

This commit adds a pure x86 assembly SIMD version of the FFT in libavutil/tx.
The design of this pure assembly FFT is pretty unconventional.

On the lowest level, instead of splitting the complex numbers into
real and imaginary parts, we keep complex numbers together but split
them in terms of parity. This saves a number of shuffles in each transform,
but more importantly, it splits each transform into two independent
paths, which we process using separate registers in parallel.
This allows us to keep all units saturated and lets us use all available
registers to avoid dependencies.
Moreover, it allows us to double the granularity of our per-load permutation,
skipping many expensive lookups and allowing us to use just 4 loads per register,
rather than 8, or in case FMA3 (and by extension, AVX2), use the vgatherdpd
instruction, which is at least as fast as 4 separate loads on old hardware,
and quite a bit faster on modern CPUs).

Higher up, we go for a bottom-up construction of large transforms, foregoing
the traditional per-transform call-return recursion chains. Instead, we always
start at the bottom-most basis transform (in this case, a 32-point transform),
and continue constructing larger and larger transforms until we return to the
top-most transform.
This way, we only touch the stack 3 times per a complete target transform:
once for the 1/2 length transform and two times for the 1/4 length transform.

The combination algorithm we use is a standard Split-Radix algorithm,
as used in our C code. Although a version with less operations exists
(Steven G. Johnson and Matteo Frigo's "A modified split-radix FFT with fewer
arithmetic operations", IEEE Trans. Signal Process. 55 (1), 111–119 (2007),
which is the one FFTW uses), it only has 2% less operations and requires at least 4x
the binary code (due to it needing 4 different paths to do a single transform).
That version also has other issues which prevent it from being implemented
with SIMD code as efficiently, which makes it lose the marginal gains it offered,
and cannot be performed bottom-up, requiring many recursive call-return chains,
whose overhead adds up.

We go through a lot of effort to minimize load/stores by keeping as much in
registers in between construcring transforms. This saves us around 32 cycles,
on paper, but in reality a lot more due to load/store aliasing (a load from a
memory location cannot be issued while there's a store pending, and there are
only so many (2 for Zen 3) load/store units in a CPU).
Also, we interleave coefficients during the last stage to save on a store+load
per register.

Each of the smallest, basis transforms (4, 8 and 16-point in our case)
has been extremely optimized. Our 8-point transform is barely 20 instructions
in total, beating our old implementation 8-point transform by 1 instruction.
Our 2x8-point transform is 23 instructions, beating our old implementation by
6 instruction and needing 50% less cycles. Our 16-point transform's combination
code takes slightly more instructions than our old implementation, but makes up
for it by requiring a lot less arithmetic operations.

Overall, the transform was optimized for the timings of Zen 3, which at the
time of writing has the most IPC from all documented CPUs. Shuffles were
preferred over arithmetic operations due to their 1/0.5 latency/throughput.

On average, this code is 30% faster than our old libavcodec implementation.
It's able to trade blows with the previously-untouchable FFTW on small transforms,
and due to its tiny size and better prediction, outdoes FFTW on larger transforms
by 11% on the largest currently supported size.

3 years agodoc/transforms: add documentation for the FFT transforms
Lynne [Sat, 17 Apr 2021 15:35:14 +0000 (17:35 +0200)]
doc/transforms: add documentation for the FFT transforms

Makes the code far easier to follow, and makes creating new SIMD
for the transforms far, far easier.

3 years agocheckasm: add av_tx FFT SIMD testing code
Lynne [Sat, 10 Apr 2021 01:53:38 +0000 (03:53 +0200)]
checkasm: add av_tx FFT SIMD testing code

This sadly required making changes to the code itself,
due to the same context needing to be reused for both versions.
The lookup table had to be duplicated for both versions.

3 years agolavu/tx: add parity revtab generator version
Lynne [Sat, 10 Apr 2021 01:52:31 +0000 (03:52 +0200)]
lavu/tx: add parity revtab generator version

This will be used for SIMD support.

3 years agolavu: bump minor and add APIchanges entry for the lavu/tx changes
Lynne [Mon, 19 Apr 2021 20:15:34 +0000 (22:15 +0200)]
lavu: bump minor and add APIchanges entry for the lavu/tx changes

3 years agolavu/tx: add full-sized iMDCT transform flag
Lynne [Sat, 10 Apr 2021 01:55:37 +0000 (03:55 +0200)]
lavu/tx: add full-sized iMDCT transform flag

3 years agolavu/tx: add unaligned flag to the API
Lynne [Sat, 10 Apr 2021 01:55:14 +0000 (03:55 +0200)]
lavu/tx: add unaligned flag to the API

3 years agolavu/tx: add a 9-point FFT and (i)MDCT
Lynne [Sat, 10 Apr 2021 02:19:06 +0000 (04:19 +0200)]
lavu/tx: add a 9-point FFT and (i)MDCT

3 years agolavu/tx: add a 7-point FFT and (i)MDCT
Lynne [Sat, 10 Apr 2021 01:51:59 +0000 (03:51 +0200)]
lavu/tx: add a 7-point FFT and (i)MDCT

3 years agolavu/tx: refactor power-of-two FFT
Lynne [Sat, 10 Apr 2021 01:47:18 +0000 (03:47 +0200)]
lavu/tx: refactor power-of-two FFT

This commit refactors the power-of-two FFT, making it faster and
halving the size of all tables, making the code much smaller on
all systems.
This removes the big/small pass split, because on modern systems
the "big" pass is always faster, and even on older machines there
is no measurable speed difference.

3 years agolavu/tx: minor code style improvements and additional comments
Lynne [Sat, 10 Apr 2021 01:45:03 +0000 (03:45 +0200)]
lavu/tx: minor code style improvements and additional comments

3 years agoavcodec/exr: Return correct error code on allocation failure
Andreas Rheinhardt [Mon, 19 Apr 2021 01:22:42 +0000 (03:22 +0200)]
avcodec/exr: Return correct error code on allocation failure

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavcodec/avcodec: Actually honour the documentation of subtitle_header
Andreas Rheinhardt [Sun, 18 Apr 2021 03:26:32 +0000 (05:26 +0200)]
avcodec/avcodec: Actually honour the documentation of subtitle_header

It is only supposed to be freed by libavcodec for decoders, yet
avcodec_open2() always frees it on failure.
Furthermore, avcodec_close() doesn't free it for decoders.
Both of this has been changed.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agotests/fate: add a test for APNG_DISPOSE_OP_BACKGROUND
Anton Khirnov [Fri, 2 Apr 2021 08:27:13 +0000 (10:27 +0200)]
tests/fate: add a test for APNG_DISPOSE_OP_BACKGROUND

3 years agoavformat/asfdec_o: Use ff_get_extradata()
Michael Niedermayer [Fri, 23 Apr 2021 15:16:20 +0000 (17:16 +0200)]
avformat/asfdec_o: Use ff_get_extradata()

Fixes: OOM
Fixes: 27240/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5937469859823616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/av1_metadata: don't store the inserted TD OBU in stack
James Almer [Thu, 22 Apr 2021 16:15:03 +0000 (13:15 -0300)]
avcodec/av1_metadata: don't store the inserted TD OBU in stack

Fixes: stack-use-after-return
Fixes: clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_METADATA_fuzzer-5931515701755904
Fixes: clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_METADATA_fuzzer-6105676541722624
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/id3v2: Check end for overflow in id3v2_parse()
Michael Niedermayer [Mon, 19 Apr 2021 18:23:44 +0000 (20:23 +0200)]
avformat/id3v2: Check end for overflow in id3v2_parse()

Fixes: signed integer overflow: 9223372036840103978 + 67637280 cannot be represented in type 'long'
Fixes: 33341/clusterfuzz-testcase-minimized-ffmpeg_dem_DSF_fuzzer-6408154041679872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mxfdec: Fix file position addition
Michael Niedermayer [Mon, 1 Feb 2021 18:59:55 +0000 (19:59 +0100)]
avformat/mxfdec: Fix file position addition

Fixes: signed integer overflow: 9223372036854775805 + 4 cannot be represented in type 'long'
Fixes: 29927/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5579985228267520
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/wtvdec: Improve size overflow checks in parse_chunks()
Michael Niedermayer [Mon, 19 Apr 2021 18:23:41 +0000 (20:23 +0200)]
avformat/wtvdec: Improve size overflow checks in parse_chunks()

Fixes: signed integer overflow: 32 + 2147483647 cannot be represented in type 'int
Fixes: 32967/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5132856218222592
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>
3 years agoavcodec/faxcompr: Check remaining bits on error in decode_group3_1d_line()
Michael Niedermayer [Thu, 15 Apr 2021 18:08:22 +0000 (20:08 +0200)]
avcodec/faxcompr: Check remaining bits on error in decode_group3_1d_line()

Fixes: Timeout
Fixes: 32886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4779761466474496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotools/target_dec_fuzzer: Adjust threshold for paf video
Michael Niedermayer [Thu, 15 Apr 2021 16:57:36 +0000 (18:57 +0200)]
tools/target_dec_fuzzer: Adjust threshold for paf video

Fixes: Timeout (long -> 2sec)
Fixes: 32790/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5497584169910272
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: check for pts overflow in mov_read_sidx()
Michael Niedermayer [Thu, 15 Apr 2021 16:43:25 +0000 (18:43 +0200)]
avformat/mov: check for pts overflow in mov_read_sidx()

Fixes: signed integer overflow: 9223372036846336888 + 4278255871 cannot be represented in type 'long'
Fixes: 32782/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6059216516284416
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/jpeglsdec: Don't presume the context to contain a JLSState
Andreas Rheinhardt [Tue, 20 Apr 2021 16:18:36 +0000 (18:18 +0200)]
avcodec/jpeglsdec: Don't presume the context to contain a JLSState

Before 9b3c46a081a9f01559082bf7a154fc6be1e06c18 every call to
ff_jpegls_decode_picture() allocated and freed a JLSState. This commit
instead put said structure into the context of the JPEG-LS decoder to
avoid said allocation. But said function can also be called from other
MJPEG-based decoders and their contexts doesn't contain said structure,
leading to segfaults. This commit fixes this: The JLSState is now
allocated on the first call to ff_jpegls_decode_picture() and stored in
the context.

Found-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoavcodec/utils: Check ima wav duration for overflow
Michael Niedermayer [Sat, 10 Apr 2021 18:32:55 +0000 (20:32 +0200)]
avcodec/utils: Check ima wav duration for overflow

Fixes: signed integer overflow: 44331634 * 65 cannot be represented in type 'int'
Fixes: 32120/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-5760221223583744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotools/target_dec_fuzzer: adjust threshold for arbc
Michael Niedermayer [Sat, 10 Apr 2021 18:23:32 +0000 (20:23 +0200)]
tools/target_dec_fuzzer: adjust threshold for arbc

Fixes: Timeout (63sec -> 48ms)
Fixes: 31886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5287235705503744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotools/target_dec_fuzzer: Adjust threshold for TSCC
Michael Niedermayer [Sat, 10 Apr 2021 18:01:03 +0000 (20:01 +0200)]
tools/target_dec_fuzzer: Adjust threshold for TSCC

Fixes: Timeout
Fixes: 31850/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TSCC_fuzzer-5940231289307136
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/rv10: Execute whole size check earlier for rv20
Michael Niedermayer [Sat, 10 Apr 2021 16:43:50 +0000 (18:43 +0200)]
avcodec/rv10: Execute whole size check earlier for rv20

Fixes: Timeout
Fixes: 31380/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV20_fuzzer-5230899257016320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/cafdec: Check channels
Michael Niedermayer [Fri, 9 Apr 2021 20:46:13 +0000 (22:46 +0200)]
avformat/cafdec: Check channels

Fixes: signed integer overflow: -1184429040541376544 * 32 cannot be represented in type 'long'
Fixes: 31788/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6236746338664448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodoc/filters: note requirements for xfade inputs
Gyan Doshi [Tue, 20 Apr 2021 04:02:50 +0000 (09:32 +0530)]
doc/filters: note requirements for xfade inputs

3 years agoavutil/cpu: Schedule deprecated functions for removal
Andreas Rheinhardt [Wed, 14 Apr 2021 12:25:05 +0000 (14:25 +0200)]
avutil/cpu: Schedule deprecated functions for removal

av_set_cpu_flags_mask() has been deprecated in the commit which merged
it: 6df42f98746be06c883ce683563e07c9a2af983f; av_parse_cpu_flags() has
been deprecated in 4b529edff8934c258af95e5acc51f84deea66262.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agoInclude attributes.h directly
Andreas Rheinhardt [Wed, 14 Apr 2021 13:11:43 +0000 (15:11 +0200)]
Include attributes.h directly

Some files currently rely on libavutil/cpu.h to include it for them;
yet said file won't use include it any more after the currently
deprecated functions are removed, so include attributes.h directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years agolavc/aarch64: add pred16x16 10-bit functions
Mikhail Nitenko [Thu, 15 Apr 2021 09:13:52 +0000 (12:13 +0300)]
lavc/aarch64: add pred16x16 10-bit functions

Benchmarks:                      A53     A72
pred16x16_dc_10_c:              136.0   124.0
pred16x16_dc_10_neon:           121.2   106.0
pred16x16_horizontal_10_c:      155.0    73.2
pred16x16_horizontal_10_neon:    82.2    67.7
pred16x16_top_dc_10_c:          106.0    93.7
pred16x16_top_dc_10_neon:        87.7    77.2
pred16x16_vertical_10_c:         83.0    67.7
pred16x16_vertical_10_neon:      54.2    61.7

Some functions work slower than C and are left commented out.