]> git.sesse.net Git - ffmpeg/log
ffmpeg
2 years agoavformat/avio: Add Metacube support master
Steinar H. Gunderson [Sun, 2 May 2021 21:45:09 +0000 (23:45 +0200)]
avformat/avio: Add Metacube support

Support wrapping the output format in Metacube, as used by the Cubemap
stream reflector (originally designed for VLC). This is nominally meant
to run over HTTP, but longer-term would probably also be useful for
pipe output as a subprocess of Cubemap.

Integrating with Cubemap instantly gives FFmpeg access to a high-performance
(40Gbit++/sec on a regular quadcore, with TLS), multi-user, proven HTTP
reflector -- FFmpeg's own HTTP server still only has experimental multi-user
support. However, Cubemap is deliberately dumb and thus does not understand any
muxes; it is dependent on the origin (e.g. FFmpeg) to mark which bytes are
headers, and at which bytes new clients can start the stream, which is why
it needs its input wrapped in Metacube.

Metacube output is activated by -fflags metacube. E.g., to create streamable
MP4 on port 9095 that Cubemap can pick up and reflect:

  ffmpeg -i <input> -f mp4 -movflags empty_moov+frag_keyframe+default_base_moof+skip_trailer \
    -frag_duration 125000 -fflags metacube -listen 1 'http://[::]:9095'

Tested with MP4 and Matroska.

The metacube2.h header comes from the Cubemap distribution, and is nominally
public domain. It can be considered to be licensed under the LGPL 2.1, like
the rest of FFmpeg.

Signed-off-by: Steinar H. Gunderson <steinar+ffmpeg@gunderson.no>
2 years agoavfilter/vf_identity: fix typo
Limin Wang [Sun, 14 Mar 2021 02:07:54 +0000 (10:07 +0800)]
avfilter/vf_identity: fix typo

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2 years agoavfilter/vf_identity: remove unnecessary check
Limin Wang [Sat, 13 Mar 2021 02:36:04 +0000 (10:36 +0800)]
avfilter/vf_identity: remove unnecessary check

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2 years agoavfilter/vf_psnr: remove unnecessary check
Limin Wang [Sat, 13 Mar 2021 02:35:02 +0000 (10:35 +0800)]
avfilter/vf_psnr: remove unnecessary check

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2 years agoavfilter/vf_ssim: remove unnecessary check
Limin Wang [Sat, 13 Mar 2021 02:34:12 +0000 (10:34 +0800)]
avfilter/vf_ssim: remove unnecessary check

For the pointer have been checked in the previous few lines of code

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2 years agoavfilter/vf_scale: store the offset in a local variable before adding it
James Almer [Thu, 29 Apr 2021 16:14:06 +0000 (13:14 -0300)]
avfilter/vf_scale: store the offset in a local variable before adding it

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/mjpegdec: fix SOF check in EOI
James Almer [Wed, 28 Apr 2021 14:01:57 +0000 (11:01 -0300)]
avcodec/mjpegdec: fix SOF check in EOI

For frames decoded with skip_frame == AVDISCARD_ALL, a picture is not allocated
and got_picture is never set to 1 even if a SOF and SOS were parsed.
The existing check in EOI only cares if a SOF was parsed, not if a picture
allocated, so change it and add a new check to explicitly ensure a picture was
allocated when skip_frame != AVDISCARD_ALL.

Fixes probing and decoding when skip_frame is AVDISCARD_ALL.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/mem: Also poison new av_realloc-allocated blocks
Andreas Rheinhardt [Mon, 26 Apr 2021 16:34:31 +0000 (18:34 +0200)]
avutil/mem: Also poison new av_realloc-allocated blocks

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavformat/dump: Remove remnants of codec timebase
Andreas Rheinhardt [Fri, 30 Apr 2021 00:41:57 +0000 (02:41 +0200)]
avformat/dump: Remove remnants of codec timebase

Fixes Coverity issue #1477414.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoconfigure: fix vulkan dep for libglslang based filters
James Almer [Fri, 30 Apr 2021 00:22:11 +0000 (21:22 -0300)]
configure: fix vulkan dep for libglslang based filters

Temporary fix until the filters are updated.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoconfigure: add -lvulkan to libglslang's lib flags
Lynne [Thu, 29 Apr 2021 22:51:20 +0000 (00:51 +0200)]
configure: add -lvulkan to libglslang's lib flags

Since libavutil no longer links to libvulkan but libavfilter's Vulkan
code wasn't ported yet to dynamically open the functions, do this
temporarily.

2 years agohwcontext_vulkan: dlopen libvulkan
Lynne [Thu, 29 Apr 2021 01:37:42 +0000 (03:37 +0200)]
hwcontext_vulkan: dlopen libvulkan

While Vulkan itself went more or less the way it was expected to go,
libvulkan didn't quite solve all of the opengl loader issues. It's multi-vendor,
yes, but unfortunately, the code is Google/Khronos QUALITY, so suffers from
big static linking issues (static linking on anything but OSX is unsupported),
has bugs, and due to the prefix system used, there are 3 or so ways to type out
functions.

Just solve all of those problems by dlopening it. We even have nice emulation
for it on Windows.

2 years agohwcontext_vulkan: dynamically load functions
Lynne [Thu, 29 Apr 2021 00:44:41 +0000 (02:44 +0200)]
hwcontext_vulkan: dynamically load functions

This patch allows for alternative loader implementations.

2 years agoavutil/hwcontext_vulkan: fix format specifiers for some printed variables
James Almer [Thu, 29 Apr 2021 16:32:24 +0000 (13:32 -0300)]
avutil/hwcontext_vulkan: fix format specifiers for some printed variables

VkPhysicalDeviceLimits.optimalBufferCopyRowPitchAlignment and
VkPhysicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment are of type
VkDeviceSize (a typedef uint64_t).
VkPhysicalDeviceLimits.minMemoryMapAlignment is of type size_t.

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Lynne <dev@lynne.ee>
2 years agofate: add adpcm_ima_ws test in a VQA v3 file
Zane van Iperen [Sun, 25 Apr 2021 04:34:52 +0000 (14:34 +1000)]
fate: add adpcm_ima_ws test in a VQA v3 file

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2 years agodoc/filters: Documentation to add sess_config option for tensorflow backend
Limin Wang [Thu, 29 Apr 2021 12:46:10 +0000 (20:46 +0800)]
doc/filters: Documentation to add sess_config option for tensorflow backend

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2 years agoavfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_data
Limin Wang [Wed, 28 Apr 2021 10:47:08 +0000 (18:47 +0800)]
avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_data

please use tools/python/tf_sess_config.py to get the sess_config after that.
note the byte order of session config is in normal order.
bump the MICRO version for the config change.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2 years agoavcodec/zmbvenc: Simplify setting keyframe flag
Andreas Rheinhardt [Sat, 24 Apr 2021 19:46:09 +0000 (21:46 +0200)]
avcodec/zmbvenc: Simplify setting keyframe flag

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavformat/mpegtsenc: Fix indentation inside if-clause in mpegts_write_pes()
zheng qian [Sun, 25 Apr 2021 02:52:21 +0000 (11:52 +0900)]
avformat/mpegtsenc: Fix indentation inside if-clause in mpegts_write_pes()

Fix indentation caused by the added stream_id check.

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other types
zheng qian [Sun, 25 Apr 2021 02:52:20 +0000 (11:52 +0900)]
avformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other types

According to the PES packet definition defined in Table 2-17 of ISO_IEC_13818-1
specification, some fields like PTS/DTS or pes_extension could only appears if
the stream_id meets the condition:

if (stream_id != 0xBC &&  // program_stream_map
    stream_id != 0xBE &&  // padding_stream
    stream_id != 0xBF &&  // private_stream_2
    stream_id != 0xF0 &&  // ECM
    stream_id != 0xF1 &&  // EMM
    stream_id != 0xFF &&  // program_stream_directory
    stream_id != 0xF2 &&  // DSMCC_stream
    stream_id != 0xF8)    // ITU-T Rec. H.222.1 type E stream

And the following stream_id types don't have fields like PTS/DTS:

else if ( stream_id == program_stream_map
|| stream_id == private_stream_2
|| stream_id == ECM
|| stream_id == EMM
|| stream_id == program_stream_directory
|| stream_id == DSMCC_stream
|| stream_id == ITU-T Rec. H.222.1 type E stream ) {
    for (i = 0; i < PES_packet_length; i++) {
        PES_packet_data_byte
    }
}

Current implementation skipped the check of stream_id causing some kind of
streams like private_stream_2 to be incorrectly written with actually a
private_stream_1-like PES header with PTS/DTS field. For example, Japan DTV
transmits news and alerts through ARIB superimpose that utilizes
private_stream_2 still could not be remuxed correctly for now.

This patch set fixes the remuxing for private_stream_2 and
other stream_id types.

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mpegts: Fix indentation for stream_id constants
zheng qian [Sun, 25 Apr 2021 02:52:19 +0000 (11:52 +0900)]
avformat/mpegts: Fix indentation for stream_id constants

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mpegts: Add missing constants for MPEG-TS stream_id definitions
zheng qian [Sun, 25 Apr 2021 02:52:18 +0000 (11:52 +0900)]
avformat/mpegts: Add missing constants for MPEG-TS stream_id definitions

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mpegtsenc: factorize determining pes stream id
Marton Balint [Sat, 24 Apr 2021 08:34:39 +0000 (10:34 +0200)]
avformat/mpegtsenc: factorize determining pes stream id

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mpegtsenc: move is_dvb_subtitle/is_dvb_teletext initialization upwards
Marton Balint [Sat, 24 Apr 2021 08:22:26 +0000 (10:22 +0200)]
avformat/mpegtsenc: move is_dvb_subtitle/is_dvb_teletext initialization upwards

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agohwcontext_vulkan: reorder structure fields and add spaces in between
Lynne [Tue, 27 Apr 2021 23:39:25 +0000 (01:39 +0200)]
hwcontext_vulkan: reorder structure fields and add spaces in between

We're in the middle of an ABI unstable period, so we're allowed to.

2 years agoavcodec/flacenc: Remove always-true check
Andreas Rheinhardt [Sun, 29 Nov 2020 21:32:34 +0000 (22:32 +0100)]
avcodec/flacenc: Remove always-true check

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec: Remove redundant freeing of extradata of encoders
Andreas Rheinhardt [Wed, 14 Apr 2021 23:49:06 +0000 (01:49 +0200)]
avcodec: Remove redundant freeing of extradata of encoders

AVCodecContext.extradata is freed generically by libavcodec for
encoders, so it is unnecessary for an encoder to do it on its own.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec/adpcm_ima_apm: cosmetics
Zane van Iperen [Thu, 18 Feb 2021 03:48:38 +0000 (13:48 +1000)]
avcodec/adpcm_ima_apm: cosmetics

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2 years agoavcodec/adpcm_ima_apm: remove old extradata format
Zane van Iperen [Thu, 18 Feb 2021 03:47:13 +0000 (13:47 +1000)]
avcodec/adpcm_ima_apm: remove old extradata format

Was added in error very early on, passing in only the required fields.
Later, the muxer and demuxer were changed to pass the entire APMState
struct as extradata.

Technically a breaking change, but this was only around for a *very* short
time before it was updated,

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2 years agoavcodec/avcodec: Use avcodec_close() on avcodec_open2() failure
Andreas Rheinhardt [Wed, 28 Apr 2021 00:19:22 +0000 (02:19 +0200)]
avcodec/avcodec: Use avcodec_close() on avcodec_open2() failure

Compared to the earlier behaviour the following changes:
a) AVCodecInternal.byte_buffer is freed.
b) The last_pkt_props FIFO is emptied before freeing it.
c) If set AVCodecContext.hwaccel is uninitialized and its private data
is freed; hw_frames_ctx and hw_device_ctx are also unreferenced.
d) coded_side_data is freed.
e) active_thread_type is reset.
a), b), d) should be no-ops as the buffer/fifo should be empty and
no coded_side_data should exist at any point of avcodec_open2().
e) is obviously not bad.
c) is in accordance with the documentation of hw_(frames|device)_ctx
which states that libacodec takes over ownership of these references.
At least in the case of VC-1 it is possible for the hw acceleration to
be set during init and in this case freeing it actually fixes a memleak.

avcodec_close() needed only minor adjustments to make it work with
a potentially not fully initialized codec.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec/avcodec: Store whether AVCodec->close needs to be called
Andreas Rheinhardt [Sun, 18 Apr 2021 05:01:22 +0000 (07:01 +0200)]
avcodec/avcodec: Store whether AVCodec->close needs to be called

Right now all AVCodecContexts except those using frame-threaded decoding
call the codec's init function and expect its close function to be
called. In order to make sure that the close function is not called for
frame-threaded decoding ff_frame_thread_free() resets
AVCodecContext.codec (and because of this it has to free the private
AVOptions of the main AVCodecContext itself). This is not obvious and
potentially fragile. Instead add a field to AVCodecInternal that
indicates whether close should be called for this AVCodecContext.
It is always zero when using frame-threaded decoding, so that resetting
the codec is no longer necessary and has been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec/avcodec: Free frame_thread_encoder on avcodec_open2() error
Andreas Rheinhardt [Sun, 18 Apr 2021 04:21:50 +0000 (06:21 +0200)]
avcodec/avcodec: Free frame_thread_encoder on avcodec_open2() error

The frame_thread_encoder has so far not been freed in case an error
happened in avcodec_open2() after ff_frame_thread_encoder_init().
This commit changes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec/avcodec: Remove unnecessary forward declaration
Andreas Rheinhardt [Sun, 18 Apr 2021 03:49:30 +0000 (05:49 +0200)]
avcodec/avcodec: Remove unnecessary forward declaration

Forgotten in ba6cada92eb7c3446bfb1d4525031d405a052516.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec/Makefile: Remove obsolete dependency of eatqi dec on rl.o
Andreas Rheinhardt [Tue, 27 Apr 2021 13:06:13 +0000 (15:06 +0200)]
avcodec/Makefile: Remove obsolete dependency of eatqi dec on rl.o

Unnecessary since 6e8fcd9c5624c1a89e49803de9e10562ace61b6a.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec/packet_internal: move the next pointer in PacketList to the top of the struct
James Almer [Tue, 27 Apr 2021 22:20:37 +0000 (19:20 -0300)]
avcodec/packet_internal: move the next pointer in PacketList to the top of the struct

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agodoc/APIchanges: add hashes and version numbers for recent entries
James Almer [Tue, 27 Apr 2021 21:40:45 +0000 (18:40 -0300)]
doc/APIchanges: add hashes and version numbers for recent entries

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Constify all muxer/demuxers
Andreas Rheinhardt [Mon, 19 Apr 2021 17:45:24 +0000 (19:45 +0200)]
avformat: Constify all muxer/demuxers

This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavdevice: Constify all devices
Andreas Rheinhardt [Mon, 19 Apr 2021 16:56:01 +0000 (18:56 +0200)]
avdevice: Constify all devices

This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter: Constify all AVFilters
Andreas Rheinhardt [Mon, 19 Apr 2021 16:33:56 +0000 (18:33 +0200)]
avfilter: Constify all AVFilters

This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoBump major versions of all libraries.
Anton Khirnov [Mon, 5 Apr 2021 11:09:48 +0000 (13:09 +0200)]
Bump major versions of all libraries.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years agoavcodec: postpone removal of deprecated libopenh264 wrapper options
James Almer [Mon, 19 Apr 2021 12:57:46 +0000 (09:57 -0300)]
avcodec: postpone removal of deprecated libopenh264 wrapper options

They were deprecated only a year ago

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: postpone removal of deprecated codec caps
James Almer [Mon, 19 Apr 2021 12:56:40 +0000 (09:56 -0300)]
avcodec: postpone removal of deprecated codec caps

This was deprecated only a year ago

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/buffersrc: postpone removal of sws_param
James Almer [Mon, 19 Apr 2021 12:50:39 +0000 (09:50 -0300)]
avfilter/buffersrc: postpone removal of sws_param

It was depreacted less than two years ago

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil: remove deprecated AVClass.child_class_next
James Almer [Sun, 18 Apr 2021 15:41:52 +0000 (12:41 -0300)]
avutil: remove deprecated AVClass.child_class_next

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: remove deprecated AVStream.codec
James Almer [Sun, 18 Apr 2021 13:59:35 +0000 (10:59 -0300)]
avformat: remove deprecated AVStream.codec

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Move all AVCodecParser.split functions to remove_extradata_bsf
Andreas Rheinhardt [Sat, 6 Mar 2021 23:28:14 +0000 (00:28 +0100)]
avcodec: Move all AVCodecParser.split functions to remove_extradata_bsf

The remove_extradata bsf is the only user of these functions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Constify all the AVCodecParsers
Andreas Rheinhardt [Sat, 6 Mar 2021 23:20:43 +0000 (00:20 +0100)]
avcodec: Constify all the AVCodecParsers

Possible now that the next pointer no longer exists.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Constify AVCodecParserContext.parser
Andreas Rheinhardt [Sat, 6 Mar 2021 23:10:12 +0000 (00:10 +0100)]
avcodec: Constify AVCodecParserContext.parser

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Constify AVCodecs
Andreas Rheinhardt [Thu, 25 Feb 2021 09:50:26 +0000 (10:50 +0100)]
avcodec: Constify AVCodecs

Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavdevice/avdevice: Constify av_*_device_next API
Andreas Rheinhardt [Thu, 25 Feb 2021 01:58:13 +0000 (02:58 +0100)]
avdevice/avdevice: Constify av_*_device_next API

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavdevice/avdevice: Constify avdevice_list_input_sources/output_sinks
Andreas Rheinhardt [Thu, 25 Feb 2021 01:54:18 +0000 (02:54 +0100)]
avdevice/avdevice: Constify avdevice_list_input_sources/output_sinks

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avformat, utils: Make av_find_best_stream const-correct
Andreas Rheinhardt [Thu, 25 Feb 2021 00:53:40 +0000 (01:53 +0100)]
avformat/avformat, utils: Make av_find_best_stream const-correct

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/codec, allcodecs: Constify the AVCodec API
Andreas Rheinhardt [Thu, 25 Feb 2021 06:45:51 +0000 (07:45 +0100)]
avcodec/codec, allcodecs: Constify the AVCodec API

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avformat: Constify AVFormatContext.*_codec pointers
Andreas Rheinhardt [Thu, 25 Feb 2021 04:32:20 +0000 (05:32 +0100)]
avformat/avformat: Constify AVFormatContext.*_codec pointers

This also allows to exclusively use pointers to const AVCodec in
fftools/ffmpeg_opt.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolibavresample: Remove deprecated library
Andreas Rheinhardt [Wed, 14 Apr 2021 02:33:24 +0000 (04:33 +0200)]
libavresample: Remove deprecated library

Deprecated in c29038f3041a4080342b2e333c1967d136749c0f.
The resample filter based upon this library has been removed as well.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/cpu: Remove deprecated functions
Andreas Rheinhardt [Wed, 14 Apr 2021 13:02:24 +0000 (15:02 +0200)]
avutil/cpu: Remove deprecated functions

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/buffer: Switch AVBuffer API to size_t
Andreas Rheinhardt [Wed, 14 Apr 2021 12:59:32 +0000 (14:59 +0200)]
avutil/buffer: Switch AVBuffer API to size_t

Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL
Andreas Rheinhardt [Tue, 13 Apr 2021 23:46:26 +0000 (01:46 +0200)]
avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL

Deprecated in d6fc031caf64eed921bbdef86d79d56bfc2633b0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/frame: Remove deprecated getters and setters
Andreas Rheinhardt [Sat, 6 Mar 2021 21:13:09 +0000 (22:13 +0100)]
avutil/frame: Remove deprecated getters and setters

Deprecated in 7df37dd319f2d9d3e1becd5d433884e3ccfa1ee2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil: Switch crypto APIs to size_t
Andreas Rheinhardt [Sat, 6 Mar 2021 20:56:20 +0000 (21:56 +0100)]
avutil: Switch crypto APIs to size_t

Announced in e435beb1ea5380a90774dbf51fdc8c941e486551.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/frame: Remove deprecated AVFrame.pkt_pts field
Andreas Rheinhardt [Sat, 6 Mar 2021 19:40:41 +0000 (20:40 +0100)]
avutil/frame: Remove deprecated AVFrame.pkt_pts field

Deprecated in 32c8359093d1ff4f45ed19518b449b3ac3769d27.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/frame: Remove deprecated AVFrame.error
Andreas Rheinhardt [Sat, 6 Mar 2021 19:22:14 +0000 (20:22 +0100)]
avutil/frame: Remove deprecated AVFrame.error

Deprecated in 1aa24df74c052a73175c43e57d35b4835e537ec8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/pixdesc: Remove deprecated off-by-one fields from pix fmt descs
Andreas Rheinhardt [Sat, 6 Mar 2021 19:01:53 +0000 (20:01 +0100)]
avutil/pixdesc: Remove deprecated off-by-one fields from pix fmt descs

Deprecated in 2268db2cd052674fde55c7d48b7a5098ce89b4ba.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/frame: Remove AVFrame QP table API
Andreas Rheinhardt [Sat, 6 Mar 2021 18:33:32 +0000 (19:33 +0100)]
avutil/frame: Remove AVFrame QP table API

Originally deprecated in 1296b1f6c0631ab79464e22d48a6a1548450b943;
scheduled again for removal in a9915268327b097bba84a07f68968d8c07f4b549.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavutil/pixfmt: Remove deprecated VAAPI pixel formats
Andreas Rheinhardt [Sat, 6 Mar 2021 18:23:55 +0000 (19:23 +0100)]
avutil/pixfmt: Remove deprecated VAAPI pixel formats

Deprecated in 9f8e57efe4400ca86352277873792792279c3b15.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Remove deprecated old encode/decode APIs
Andreas Rheinhardt [Wed, 14 Apr 2021 02:09:53 +0000 (04:09 +0200)]
avcodec: Remove deprecated old encode/decode APIs

Deprecated in commits 7fc329e2dd6226dfecaa4a1d7adf353bf2773726
and 31f6a4b4b83aca1d73f3cfc99ce2b39331970bf3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Remove deprecated AVCodecContext.coded_frame
Andreas Rheinhardt [Wed, 14 Apr 2021 01:36:13 +0000 (03:36 +0200)]
avcodec: Remove deprecated AVCodecContext.coded_frame

Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370.
(The currently disabled filter vf_mcdeint and vf_uspp were users of
this field; they have not been changed, so that whoever wants to fix
them can see the state of these filters when they were disabled.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoDisable vf_uspp/mcdeint.
Anton Khirnov [Mon, 5 Apr 2021 11:09:43 +0000 (13:09 +0200)]
Disable vf_uspp/mcdeint.

These filters depend on avcodec APIs that are to be removed. Some people
have expressed potential interest in updating these filters, so they are
merely disabled for now instead of being removed.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolibswscale: Remove unused deprecated functions, make used ones static
Andreas Rheinhardt [Wed, 14 Apr 2021 12:14:53 +0000 (14:14 +0200)]
libswscale: Remove unused deprecated functions, make used ones static

Deprecated in 3b905b9fe611efb3282aa4c5c659e1870d91a83b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/Makefile: Don't compile transform.c unconditionally
Andreas Rheinhardt [Wed, 24 Feb 2021 14:20:39 +0000 (15:20 +0100)]
avfilter/Makefile: Don't compile transform.c unconditionally

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/transform: Stop exporting internal functions
Andreas Rheinhardt [Wed, 24 Feb 2021 13:52:04 +0000 (14:52 +0100)]
avfilter/transform: Stop exporting internal functions

avfilter_transform, avfilter_(add|sub|mult)_matrix are not part of the
public API (transform.h is not a public header), yet they are currently
exported because of their name. This commit changes this:
avfilter_transform is renamed to ff_affine_transform; the other
functions are just removed as they have never been used at all.

Found-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/formats: Remove avfilter_make_format64_list()
Andreas Rheinhardt [Sat, 6 Mar 2021 18:06:56 +0000 (19:06 +0100)]
avfilter/formats: Remove avfilter_make_format64_list()

The API it is part of has been made private long ago (see commit
b74a1da49db5ebed51aceae6cacc2329288a92c1).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/avfilter: Remove deprecated avfilter_link_set_closed()
Andreas Rheinhardt [Sat, 6 Mar 2021 17:54:45 +0000 (18:54 +0100)]
avfilter/avfilter: Remove deprecated avfilter_link_set_closed()

Deprecated in 39a09e995d32d16e4f8c87a6ff5273cb9d98146e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter: Remove avfilter_next/avfilter_register API
Andreas Rheinhardt [Sat, 6 Mar 2021 17:44:21 +0000 (18:44 +0100)]
avfilter: Remove avfilter_next/avfilter_register API

Deprecated in 8f1382f80e0d4184c54c14afdda6482f050fbba7.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter: Remove deprecated avfilter_link_get_channels
Andreas Rheinhardt [Sat, 6 Mar 2021 17:08:50 +0000 (18:08 +0100)]
avfilter: Remove deprecated avfilter_link_get_channels

Deprecated in b2c42fc6dc3502a8b6cae441c54d898972a51cff.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter: Remove deprecated resample_lavr_opts
Andreas Rheinhardt [Sat, 6 Mar 2021 16:52:24 +0000 (17:52 +0100)]
avfilter: Remove deprecated resample_lavr_opts

Deprecated in 3796fb2692f87d0000fc0aa4572ac025a6469c2b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/avfilter: Remove compatibility code for old filter options
Andreas Rheinhardt [Sat, 6 Mar 2021 16:39:17 +0000 (17:39 +0100)]
avfilter/avfilter: Remove compatibility code for old filter options

Added in ad7d972e08dddb1788ac6a434d1be314febcb09d; the old syntax has
been deprecated in b439c992c23f3e0f3832fffd2a34a664b236c525.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Switch AVChapter.id to 64bits
Andreas Rheinhardt [Tue, 13 Apr 2021 22:35:37 +0000 (00:35 +0200)]
avformat: Switch AVChapter.id to 64bits

Announced in e318438f2f30525d8baca2b5683aa9898d0c56f7.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove deprecated av_demuxer_open()
Andreas Rheinhardt [Tue, 13 Apr 2021 22:29:37 +0000 (00:29 +0200)]
avformat: Remove deprecated av_demuxer_open()

Deprecate in e37f161e66e042d6c2c7470c4d9881df9427fc4a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove deprecated AVFMT_FLAG_MP4A_LATM flag, latm option
Andreas Rheinhardt [Sat, 6 Mar 2021 16:18:46 +0000 (17:18 +0100)]
avformat: Remove deprecated AVFMT_FLAG_MP4A_LATM flag, latm option

Deprecated in 67747c89ad4d3bfb4381c3d274603a4f0da773d8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/dashenc: Remove deprecated min_seg_duration option
Andreas Rheinhardt [Sat, 6 Mar 2021 16:14:23 +0000 (17:14 +0100)]
avformat/dashenc: Remove deprecated min_seg_duration option

Deprecated in 01ba52852d2ada3c79fe02a7de5bc1fdc27d56e8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/rtsp: Remove deprecated old options, rename stimeout->timeout
Andreas Rheinhardt [Sat, 6 Mar 2021 15:55:37 +0000 (16:55 +0100)]
avformat/rtsp: Remove deprecated old options, rename stimeout->timeout

Deprecated in ff46124b0df17a1d35249e09ae8eae9a61f16e04.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/aviobuf: End grace period of allowing 0 from read_packet
Andreas Rheinhardt [Sat, 6 Mar 2021 15:51:13 +0000 (16:51 +0100)]
avformat/aviobuf: End grace period of allowing 0 from read_packet

See a606f27f4c610708fa96e35eed7b7537d3d8f712.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/mov, movenc: Stop exporting rotation via metadata
Andreas Rheinhardt [Sat, 6 Mar 2021 15:33:48 +0000 (16:33 +0100)]
avformat/mov, movenc: Stop exporting rotation via metadata

Deprecated in ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b.

(The reference file of the mov-zombie test needed to be updated, because
a rotate metadata tag is no longer exported; the side-data is of course
still present.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove remnants of side data merging
Andreas Rheinhardt [Sat, 6 Mar 2021 14:59:06 +0000 (15:59 +0100)]
avformat: Remove remnants of side data merging

Deprecated in d682ae70b4b3a53fb73ec30281f9f4cfbc531edd,
ineffective since ca4df37f06f8a47651c67693b4851ed8d7e3ef74.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/hlsenc: Remove deprecated localtime options
Andreas Rheinhardt [Sat, 6 Mar 2021 14:57:03 +0000 (15:57 +0100)]
avformat/hlsenc: Remove deprecated localtime options

Deprecated in fbd8746efabe441469eb410d2ffa6af64987ca80.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/hlsenc: Remove deprecated wrap option
Andreas Rheinhardt [Sat, 6 Mar 2021 14:45:17 +0000 (15:45 +0100)]
avformat/hlsenc: Remove deprecated wrap option

Deprecated in d96ebc5ef88024869de06bcf92b2ad99b01d47e3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/http: Remove deprecated "user-agent" option
Andreas Rheinhardt [Sat, 6 Mar 2021 13:11:56 +0000 (14:11 +0100)]
avformat/http: Remove deprecated "user-agent" option

Deprecated in 27714b462d1bff9e9b40fbdabb39f58e79032b81.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avformat: Remove outdated private fields
Andreas Rheinhardt [Fri, 26 Feb 2021 10:35:46 +0000 (11:35 +0100)]
avformat/avformat: Remove outdated private fields

Affected function pointers (always NULL) in AVInputFormat,
AVOutputFormat as well as private fields of AVStream.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove deprecated filename field from AVFormatContext
Andreas Rheinhardt [Fri, 26 Feb 2021 10:33:09 +0000 (11:33 +0100)]
avformat: Remove deprecated filename field from AVFormatContext

Deprecated in fa8308d3d4f27d6fb38ac2069887a7b259f1c6ab.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove getters and setters
Andreas Rheinhardt [Thu, 25 Feb 2021 13:49:18 +0000 (14:49 +0100)]
avformat: Remove getters and setters

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove deprecated old open callbacks
Andreas Rheinhardt [Thu, 25 Feb 2021 13:45:28 +0000 (14:45 +0100)]
avformat: Remove deprecated old open callbacks

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Remove FFserver leftovers
Andreas Rheinhardt [Thu, 25 Feb 2021 13:42:59 +0000 (14:42 +0100)]
avformat: Remove FFserver leftovers

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat: Constify the API wrt AV(In|Out)putFormat
Andreas Rheinhardt [Thu, 25 Feb 2021 02:11:32 +0000 (03:11 +0100)]
avformat: Constify the API wrt AV(In|Out)putFormat

Also constify AVProbeData.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Switch AVCPBProperties to 64bits
Andreas Rheinhardt [Fri, 26 Feb 2021 10:19:02 +0000 (11:19 +0100)]
avcodec: Switch AVCPBProperties to 64bits

Announced in 2e8b0446c6798947dac77fee4a06f9c4e8131ab5.
Two FATE-tests needed to be updated because the checksums of
side data containing an AVCPBProperties struct changed.

buffer_size has also been switched to 64bits because it is a bitsize.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/parser: Remove deprecated av_parser_change
Andreas Rheinhardt [Fri, 26 Feb 2021 09:42:02 +0000 (10:42 +0100)]
avcodec/parser: Remove deprecated av_parser_change

Deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/mpegvideo: Remove deprecated rc_strategy option
Andreas Rheinhardt [Fri, 26 Feb 2021 09:02:28 +0000 (10:02 +0100)]
avcodec/mpegvideo: Remove deprecated rc_strategy option

Deprecated in d05c3b9ceeb9d00d4500c376448230e45f6ab108.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/vaapi: Remove old and deprecated VAAPI context and header
Andreas Rheinhardt [Fri, 26 Feb 2021 08:37:37 +0000 (09:37 +0100)]
avcodec/vaapi: Remove old and deprecated VAAPI context and header

Deprecated in 851960f6f8cf1f946fe42fa36cf6598fac68072c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Remove deprecated old aliases for NVENC encoders
Andreas Rheinhardt [Fri, 26 Feb 2021 07:41:10 +0000 (08:41 +0100)]
avcodec: Remove deprecated old aliases for NVENC encoders

Deprecated in 888a5c794778a2f2aad22e9b4a3952dff92b11fa.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec: Remove deprecated VBV delay field
Andreas Rheinhardt [Fri, 26 Feb 2021 07:22:35 +0000 (08:22 +0100)]
avcodec: Remove deprecated VBV delay field

Deprecated in 2507b5dd674834be7261772996f47ae3b95cca69.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>