Commit Graph

109817 Commits

Author SHA1 Message Date
James Almer c52b1c283e avformat/version: postpone the remaining API deprecations
They are either too recent, or still need work like FF_API_COMPUTE_PKT_FIELDS2.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 1135ad0f26 avcodec/version: postpone the remaining API deprecations
They are either too recent, or still need work like FF_API_INIT_PACKET.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 0a95e4af99 avutil/version: postpone the remaining API deprecations
They are too recent.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
Leo Izen 719a93f4e4 avutil/{color_utils, csp}: merge color_utils into csp and expose API
libavutil/color_utils contains some avpriv_ symbols that map
enum AVTransferCharacteristic values to gamma-curve approximations and
to the actual transfer functions to invert them (i.e. -> linear).

There's two issues with this:
(1) avpriv is evil and should be avoided whenever possible
(2) libavutil/csp.h exposes a public API for handling color that
    already handles primaries and matricies

I don't see any reason this API has to be private, so this commit takes
the functionality from avutil/color_utils and merges it into avutil/csp
with an exposed av_ API rather than the previous avpriv_ API.

Every reference to the previous API has been updated to point to the
new one. color_utils.h has been deleted as well. This should not break
any applications as it only contained avpriv_ symbols in the first
place, so nothing in that header could be referenced by other
applications.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:35:14 +01:00
James Almer dc1b8135e0 avutil: remove FF_API_AV_MALLOCZ_ARRAY
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 16c4e8f9c1 avutil: remove FF_API_COLORSPACE_NAME
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 21814a70db avutil: remove FF_API_DECLARE_ALIGNED
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 30e1e7e0f3 avutil: remove FF_API_D2STR
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 4fcd6c82cf avdevice: remove FF_API_DEVICE_CAPABILITIES
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 8bc0d31320 avfilter: remove FF_API_PAD_COUNT
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 863822bfaf avfilter: remove FF_API_BUFFERSINK_ALLOC
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer a9e77b42e3 avfilter: remove FF_API_SWS_PARAM_OPTION
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 6d6ae3595b avformat: remove FF_API_AVSTREAM_CLASS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 1f86fc1c5e avformat: remove FF_HLS_TS_OPTIONS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 9b8a398930 avformat: remove FF_API_AVIOCONTEXT_WRITTEN
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer add33e370d avformat: remove FF_API_LAVF_PRIV_OPT
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 1ba8b6d9dc avcodec: remove FF_API_SUB_TEXT_FORMAT
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 3ceffe7839 avcodec: remove FF_API_FLAG_TRUNCATED
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 5f9e848e68 avcodec: remove FF_API_AVCTX_TIMEBASE
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:08 +01:00
James Almer 10c9a0874c avcodec: remove FF_API_AUTO_THREADS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:16 +01:00
James Almer 63258b6f7c avcodec: remove FF_API_GET_FRAME_CLASS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:16 +01:00
James Almer 0b3152779d avcodec: remove FF_API_DEBUG_MV
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:16 +01:00
James Almer e0786a8eeb avcodec: remove FF_API_THREAD_SAFE_CALLBACKS
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:16 +01:00
James Almer 2f9cd88617 avcodec: remove FF_API_UNUSED_CODEC_CAPS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:16 +01:00
James Almer 86806347d8 avcodec: remove FF_API_OPENH264_CABAC
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:15 +01:00
James Almer cb7de65589 avcodec: remove FF_API_OPENH264_SLICE_MODE
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt f843460eb7 avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE
It has been deprecated in 94d68a41fa
and can't be set via AVOptions. The only codecs that use it
(the MPEG-1/2 encoders) have private options for this.
So remove it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt 59c9dc82f4 avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit
20f9727018 did for AVCodec:
It adds a new type FFOutputFormat, moves all the internals
of AVOutputFormat to it and adds a now reduced AVOutputFormat
as first member.

This does not affect/improve extensibility of both public
or private fields for muxers (it is still a mess due to lavd).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt f23ae839fc avformat/demux: Avoid stack packet when decoding frame
Possible now that avcodec_decode_subtitle2() accepts a const AVPacket*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt 868a31b42d avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket*
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt 0281e28c37 avformat/avformat: Move codecpar up in AVStream
It is the most commonly used field and moving it to the start
e.g. allows to encode the offset in a pointer+offset addressing
mode on one byte on x86.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt 145f6b2223 avformat/avformat: Remove AVOutputFormat.data_codec
No AVOutputFormat has this set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Anton Khirnov 42a0dd6e7e fftools/ffmpeg: add an option for writing pre-muxing stats
Analogous to -enc_stats*, but happens right before muxing. Useful
because bitstream filters and the sync queue can modify packets after
encoding and before muxing. Also has access to the muxing timebase.
2023-02-09 15:24:15 +01:00
Anton Khirnov 6d4f3ae116 fftools/ffmpeg: store output packet timebases in the packet
Useful to keep track of what timebase the packet's timestamps are in.
2023-02-09 15:24:15 +01:00
Paul B Mahol 458ae405ef Revert "avfilter/af_pan: fix regression introduced with switch to new channel layout API"
This reverts commit 93a9ee7afd.

Was not fixing real problem, issue is probably outside of pan filter.
2023-02-09 13:40:00 +01:00
Marth64 25f31929b6 ffmpeg_opt: move help text for -ab/-b:a to audio category
Since at least 4.4.3, -ab/-b:a help text was in the video section
of ffmpeg -h, but these are audio options.

Signed-off-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 12:45:53 +01:00
rcombs 18cd65998b ffprobe: report the corrupt flag on packets
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 12:45:53 +01:00
Anton Khirnov 63a348659b configure: make flite depend on threads
The filter calls pthreads functions unconditionally.
2023-02-09 12:45:53 +01:00
Gyan Doshi 159b028df5 avcodec/h264_metadata_bsf: remove AUDs at any position
Some files, likely due to faulty packetization or muxing, can have AUDs
at other positions besides the head unit of a packet. Remove these too.
2023-02-09 14:38:28 +05:30
gnattu d09254a658 avformat/hls: Add option to retry failed segments for hls
Current HLS implementation simply skip a failed segment to catch up
the stream, but this is not optimal for some use cases like livestream
recording.
Add an option to retry a failed segment to ensure the output file is
a complete stream.

Signed-off-by: gnattu <gnattuoc@me.com>
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
2023-02-09 14:37:23 +05:30
Paul B Mahol 7e1d474021 avfilter/af_compand: simplify frame allocation 2023-02-08 18:56:57 +01:00
Paul B Mahol 068ad04908 avfilter/af_compensationdelay: simplify frame allocation 2023-02-08 18:56:56 +01:00
Tomas Härdin a678b0c252 sws/utils.c: Do not uselessly call initFilter() when unscaling 2023-02-08 15:53:55 +01:00
Leo Izen 5cf0bc4236
avcodec/pngenc: avoid writing cICP when inappropriate
We parse the fallback cHRM on decode and correctly determine that we
have BT.709 primaries, but unknown TRC. This causes us to write cICP
where we shouldn't. Primaries without transfer can be handled entirely
by cHRM, so we should only write cICP if we actually know the transfer
function.

Additionally, we should avoid writing cICP if there's an ICC profile
because the spec says decoders must prioritize cICP over the ICC
profile.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-02-08 08:50:34 -05:00
Paul B Mahol c56f5be678 avcodec/wavarc: fix 16bit 0CPY mode 2023-02-07 20:58:59 +01:00
Paul B Mahol 93a9ee7afd avfilter/af_pan: fix regression introduced with switch to new channel layout API
Fixes #10168
2023-02-07 18:28:57 +01:00
Paul B Mahol df4ab69cfa avcodec/wavarc: add support for 0CPY 2023-02-07 17:13:11 +01:00
Paul B Mahol 0c7af7b954 avcodec/bonk: properly handle some other errors 2023-02-07 17:13:11 +01:00
Paul B Mahol 5dba4b217c avcodec/wavarc: properly handle invalid data 2023-02-07 17:13:10 +01:00
Niklas Haas 62dfa54688 avfilter/vf_libplacebo: fix format query
We need to construct the output format list separatedly from the input
format list, because we need to adhere to two extra requirements:

1. Big-endian output formats are always unsupported (runtime error)
2. Combining 'vulkan' with an explicit out_format that is not supported
   by the vulkan frame allocation code is illegal and will crash (abort)

As a free side benefit, this rewrite fixes a possible memory leak in the
`fail` path that was present in the old code.

Signed-off-by: Niklas Haas <git@haasn.dev>
2023-02-07 15:11:49 +01:00