Commit Graph

103337 Commits

Author SHA1 Message Date
Andreas Rheinhardt
f28db2ca27 avfilter/af_lv2: Free inpad's name generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:53 +02:00
Andreas Rheinhardt
7670e24eb0 avfilter/af_ladspa: Free inpad's name generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:50 +02:00
Andreas Rheinhardt
d2e72473df avfilter/af_join: Free inpads' names generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:47 +02:00
Andreas Rheinhardt
ad5d056dc3 avfilter/af_headphone: Free inpads' names generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:44 +02:00
Andreas Rheinhardt
0e936381ff avfilter/af_amix: Free inpads' names generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:41 +02:00
Andreas Rheinhardt
414c1b9b62 avfilter/af_amerge: Free inpads' names generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:38 +02:00
Andreas Rheinhardt
c54c8836cf avfilter/af_afir: Free inpads' names generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:34 +02:00
Andreas Rheinhardt
59b465e4df avfilter/af_acrossover: Free outpads' names generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:30 +02:00
Andreas Rheinhardt
f308f37441 avfilter/avfilter: Allow to free non-static pads generically
This can be enabled/disabled on a per-pad basis by setting
the AVFILTERPAD_FLAG_FREE_NAME flag; variants of ff_append_(in|out)pads
that do this for you have been added and will be put to use in the
following commits.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:13:25 +02:00
Andreas Rheinhardt
dff1709eb2 avfilter/internal: Uninline ff_insert_(in|out)pad()
These functions are not hot at all.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-22 16:12:06 +02:00
Gyan Doshi
d905af0c24 avformat/mov: add AVFMT_SHOW_IDS flag
The MOV muxer can store streamids as track ids but they aren't
visible when probing the result via lavf/dump or ffprobe due to
lack of this flag in the demuxer.
2021-08-22 17:55:31 +05:30
Paul B Mahol
da6aab45e4 avfilter/vf_v360: fill unused regions too for orthographic output format 2021-08-22 14:06:14 +02:00
Paul B Mahol
1616f7fb28 avfilter/vf_v360: refactor rescaling of i/j 2021-08-22 14:06:14 +02:00
Nicolas George
252128561e tools/dvd2concat: use option keyword
subfile,,start,X,end,Y,,: is ugly and will be gone some day.
2021-08-22 11:44:17 +02:00
Nicolas George
6d82d894ee tools/dvd2concat: document that -protocol_whitelist is needed 2021-08-22 11:44:17 +02:00
Nicolas George
0210c8fee2 lavf/concatdec: support per-file options 2021-08-22 11:44:16 +02:00
Nicolas George
46fb395952 libavformat/concatdec: remove support for unsafe=-1
It only makes sense as the default value,
but it is not the default since 689211d572.
2021-08-22 11:44:16 +02:00
Paul B Mahol
5b258c2770 avfilter/af_astats: remove invalid 5x factor in window size calculation
Also allow smaller window sizes, and change histogram for noise
floor calculation to uint64_t type.
2021-08-21 22:05:08 +02:00
Paul B Mahol
99ccad843f avfilter/aevalsrc: switch to activate
Allow to set the EOF timestamp.

FATE test is updated, as last 2 frames were duplicated.
2021-08-21 16:43:21 +02:00
Paul B Mahol
6854cc2ec7 avfilter/asrc_hilbert: switch to activate
Allow to set the EOF timestamp.
2021-08-21 16:31:40 +02:00
Paul B Mahol
5e2e9d50ce avfilter/asrc_afirsrc: switch to activate
Allow to set the EOF timestamp.
2021-08-21 16:27:27 +02:00
Paul B Mahol
9153038e0a avfilter/asrc_sinc: switch to activate
Allow to set the EOF timestamp.
2021-08-21 16:27:27 +02:00
Nicolas George
52091fcb5c lavfi/sine: switch to activate
Allow to set the EOF timestamp.

Signed-off-by: Nicolas George <george@nsup.com>
2021-08-21 16:11:11 +02:00
Andreas Rheinhardt
a1094eaa30 doc/filters.texi: Correct asegment example
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-21 00:35:02 +02:00
Andreas Rheinhardt
78a4a76c85 avfilter/vf_convolution: Add mem_internal.h for DECLARE_ALIGNED
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-21 00:34:01 +02:00
Mikhail Nitenko
d3e56b56ae lavc/aarch64: add pred functions for 10-bit
Benchmarks:                        A53     A72
pred8x8_dc_10_c:                   64.2    49.5
pred8x8_dc_10_neon:                62.0    53.7
pred8x8_dc_128_10_c:               26.0    14.0
pred8x8_dc_128_10_neon:            30.7    17.5
pred8x8_horizontal_10_c:           60.0    27.7
pred8x8_horizontal_10_neon:        38.0    34.0
pred8x8_left_dc_10_c:              42.5    27.5
pred8x8_left_dc_10_neon:           51.0    41.2
pred8x8_mad_cow_dc_0l0_10_c:       55.7    37.2
pred8x8_mad_cow_dc_0l0_10_neon:    50.2    35.2
pred8x8_mad_cow_dc_0lt_10_c:       89.2    67.0
pred8x8_mad_cow_dc_0lt_10_neon:    52.2    46.7
pred8x8_mad_cow_dc_l0t_10_c:       74.7    51.0
pred8x8_mad_cow_dc_l0t_10_neon:    50.5    45.2
pred8x8_mad_cow_dc_l00_10_c:       58.0    38.0
pred8x8_mad_cow_dc_l00_10_neon:    42.5    37.5
pred8x8_plane_10_c:               354.0   288.7
pred8x8_plane_10_neon:            141.0   101.2
pred8x8_top_dc_10_c:               44.5    30.5
pred8x8_top_dc_10_neon:            40.0    31.0
pred8x8_vertical_10_c:             27.5    14.5
pred8x8_vertical_10_neon:          21.0    17.5
pred16x16_plane_10_c:            1242.0  1070.5
pred16x16_plane_10_neon:          324.0   196.7

Signed-off-by: Mikhail Nitenko <mnitenko@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-08-21 00:06:26 +03:00
Mikhail Nitenko
43ca887bc2 lavc/aarch64: h264, add chroma loop filters for 10bit
Benchmarks:                                             A53     A72
h264_h_loop_filter_chroma422_10bpp_c:                  282.7   114.2
h264_h_loop_filter_chroma422_10bpp_neon:               109.5    78.5
h264_h_loop_filter_chroma_10bpp_c:                     165.0    81.5
h264_h_loop_filter_chroma_10bpp_neon:                  120.0    76.7
h264_h_loop_filter_chroma_intra422_10bpp_c:            323.7   124.2
h264_h_loop_filter_chroma_intra422_10bpp_neon:         155.0   102.7
h264_h_loop_filter_chroma_intra_10bpp_c:               121.0    49.5
h264_h_loop_filter_chroma_intra_10bpp_neon:             79.7    53.7
h264_h_loop_filter_chroma_mbaff422_10bpp_c:            188.5    75.0
h264_h_loop_filter_chroma_mbaff422_10bpp_neon:         120.0    75.5
h264_h_loop_filter_chroma_mbaff_intra422_10bpp_c:      116.7    46.0
h264_h_loop_filter_chroma_mbaff_intra422_10bpp_neon:    79.7    53.7
h264_h_loop_filter_chroma_mbaff_intra_10bpp_c:          63.0    27.2
h264_h_loop_filter_chroma_mbaff_intra_10bpp_neon:       48.5    34.0
h264_v_loop_filter_chroma_10bpp_c:                     258.7   135.5
h264_v_loop_filter_chroma_10bpp_neon:                   71.2    51.0
h264_v_loop_filter_chroma_intra_10bpp_c:               158.0    70.7
h264_v_loop_filter_chroma_intra_10bpp_neon:             48.7    31.5

Signed-off-by: Mikhail Nitenko <mnitenko@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-08-21 00:06:26 +03:00
Mikhail Nitenko
756d2e087a lavc/aarch64: move transpose_4x8H to neon.S
transpose_4x8H was declared in vp9lpf_16bpp_neon, however this macro is
not unique to vp9 and could be used elsewhere.

Signed-off-by: Mikhail Nitenko <mnitenko@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-08-21 00:06:26 +03:00
Nicolas George
1698cd8422 doc/examples/encode_video: add explanations in comments. 2021-08-20 17:05:10 +02:00
Andreas Rheinhardt
3969c2abfb avfilter/avfiltergraph: Remove dead checks
These checks emit warnings in case the channel layouts lists are
inconsistent; yet since 69f5f6ea37
a function that is called earlier errors out if they are inconsistent.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 14:30:46 +02:00
Andreas Rheinhardt
4f46c3cf5c avfilter/formats: Don't set samplerate or channel count on video links
This currently happens by accident in a few filters that use
ff_set_common_(samplerates|channel_layouts) like afir (if the response
option is set) or agraphmonitor (due to the default code in
avfiltergraph.c). So change those functions to make sure it does no
longer happen.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 14:30:30 +02:00
Andreas Rheinhardt
79595024ed avfilter/formats: Avoid redundant counter
The ff_set_common_(formats|channel_layouts|samplerates) have to free
their list in case it doesn't have an owner; therefore they tracked
whether they attached it to an owner. But the list's refcount already
contains such a counter, so we don't have to keep track of whether we
have attached the list to an owner.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 14:30:17 +02:00
Andreas Rheinhardt
e88db774d8 avfilter/avfilter: Deprecate avfilter_pad_count()
It is unnecessary as the number of static inputs and outputs can now
be directly read via AVFilter.nb_(in|out)puts.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 14:29:46 +02:00
Andreas Rheinhardt
8f72bb866e fftools/cmdutils: Switch to avfilter_filter_pad_count()
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 14:29:15 +02:00
Andreas Rheinhardt
7c5f998196 avfilter/avfilter: Add avfilter_filter_pad_count()
It is intended as replacement for avfilter_pad_count(). In contrast to
the latter, it avoids a loop.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 13:19:59 +02:00
Andreas Rheinhardt
8be701d9f7 avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilter
Up until now, an AVFilter's lists of input and output AVFilterPads
were terminated by a sentinel and the only way to get the length
of these lists was by using avfilter_pad_count(). This has two
drawbacks: first, sizeof(AVFilterPad) is not negligible
(i.e. 64B on 64bit systems); second, getting the size involves
a function call instead of just reading the data.

This commit therefore changes this. The sentinels are removed and new
private fields nb_inputs and nb_outputs are added to AVFilter that
contain the number of elements of the respective AVFilterPad array.

Given that AVFilter.(in|out)puts are the only arrays of zero-terminated
AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads
are not zero-terminated and they already have a size field) the argument
to avfilter_pad_count() is always one of these lists, so it just has to
find the filter the list belongs to and read said number. This is slower
than before, but a replacement function that just reads the internal numbers
that users are expected to switch to will be added soon; and furthermore,
avfilter_pad_count() is probably never called in hot loops anyway.

This saves about 49KiB from the binary; notice that these sentinels are
not in .bss despite being zeroed: they are in .data.rel.ro due to the
non-sentinels.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 12:53:58 +02:00
Andreas Rheinhardt
d53d48c799 fftools/cmdutils: Use avfilter_pad_count() for AVFilter's number of pads
Besides being nicer code this also has the advantage of not making
assumptions about the internal implementation: While it is documented
that the AVFilter.inputs and AVFilter.outputs arrays are terminated
by a zeroed sentinel, one is not allowed to infer that one can just
check avfilter_pad_get_name(padarray, i) to see whether one has reached
the sentinel:
It could be that the pointer to the string is contained
in a different structure than AVFilterPad that needs to be accessed
first: return pad->struct->string.
It could be that for small strings an internal buffer in
AVFilterPad is used (to avoid a relocation) whereas for longer strings
an external string is used; this is useful to avoid relocations:
return pad->string_ptr ? pad->string_ptr : pad->interal_string
Or it could be that the name has a default value:
return pad->name ? pad->name : "default"
(This actually made sense for us because the name of most of our
AVFilterPads is just "default"; doing so would save lots of relocations.)

The only thing one is allowed to infer from the existence of the
sentinel is that one is allowed to use avfilter_pad_count() to get
the number of pads. Therefore it is used.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 12:52:33 +02:00
Andreas Rheinhardt
c83a7dd25f avcodec/h264_parser: Fix undefined left shift
Use an uint32_t for the NAL unit size of an AVC H.264 NAL unit instead
of an int as a left shift of a signed value is undefined behaviour
if the result doesn't fit into the target type.

Also make the log message never output negative lengths.

Fixes: left shift of 16711968 by 8 places cannot be represented in type 'int'
Fixes: 36601/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6581933285965824

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 12:19:12 +02:00
Andreas Rheinhardt
29bf3fafa0 avfilter/avfiltergraph: Don't use AVClass * for logcontext
Forgotten in 57fa314090.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 12:09:07 +02:00
Paul B Mahol
d5b3e0403e avfilter/vf_colorcorrect: fix average analyze mode and add minmax mode 2021-08-20 10:55:33 +02:00
Nicolas George
b06f12b68b lavfi/formats: document the negotiation process 2021-08-20 10:26:36 +02:00
Nicolas George
24de2b7618 lavfi/formats: rename AVFilterNegotiation.nb to nb_mergers 2021-08-20 10:26:36 +02:00
Nicolas George
703c3c4151 lavfi/formats: cosmetic: move negotiation stuff at the end
It was between AVFilterFormats and AVFilterChannelLayouts.
2021-08-20 10:26:36 +02:00
Paul B Mahol
7871b3ca5e avfilter/vf_signalstats: avoid doubles in calculations 2021-08-20 07:34:17 +02:00
Paul B Mahol
ed6ea4f9ca avfilter/vf_chromakey: fix diff scaling for chromahold filter 2021-08-20 07:25:16 +02:00
Christopher Degawa
8990c5869e get_cabac_inline_x86: Don't inline if 32-bit clang on windows
Fixes https://trac.ffmpeg.org/ticket/8903

relevant https://github.com/msys2/MINGW-packages/discussions/9258

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-08-19 22:29:23 +03:00
Steven Liu
c64d56a2f5 avformat/hlsenc: minus subtitle streams count when subtitle stream between video and audio streams
because subtitles streams will be written to webvtt m3u8 list
so the stream index should minus subtitles streams count when subtitle
between audio and video streams.
testcase:
before patch:
ffmpeg -i input -map 0🅰️0 -map 0:s:0 -map 0✌️0 -f hls aaaa.m3u8
will EXC_BAD_ACCESS

after patch:
ffmpeg -i input -map 0🅰️0 -map 0:s:0 -map 0✌️0 -f hls aaaa.m3u8
will ok

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2021-08-19 18:24:15 +08:00
Steven Liu
5dc1b4b997 avformat/hlsenc: set http options before use delete http method
Fix ticket: 9338
Set options which set by user from parent options.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2021-08-19 18:24:12 +08:00
Paul B Mahol
79934cc702 avfilter/vf_paletteuse: do not use in dithering transparent palette 2021-08-19 09:45:09 +02:00
Paul B Mahol
6d09de90d1 avfilter/vf_paletteuse: fix some integer overflows 2021-08-19 09:45:09 +02:00