Commit Graph

109872 Commits

Author SHA1 Message Date
Paul B Mahol
acd87d41f2 avfilter/vf_exposure: reduce copy operations 2023-02-11 10:36:56 +01:00
Anton Khirnov
2c4dcbd66b fftools/ffmpeg: rename -enc_stats* to -stats_enc*
This is consistent with -stats_mux*

As the options were added very recently, this should not break any
users.
2023-02-10 11:02:13 +01:00
Anton Khirnov
b40856c905 fftools/ffmpeg_mux: distinguish between sync queue and muxer EOF
Individual streams should be terminated in the former case, the whole
muxing process in the latter.

Reported-by: Gyan Doshi
2023-02-10 11:01:11 +01:00
Paul B Mahol
8ed1d6b5e4 avformat/wavarc: demux only data chunk content 2023-02-09 20:48:25 +01:00
James Almer
5bad485603 Bump major versions of all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
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