Commit Graph

111164 Commits

Author SHA1 Message Date
Anton Khirnov
f8abab673c fftools/ffmpeg: move sub2video handling to ffmpeg_filter
Make all relevant state per-filtergraph input, rather than per-input
stream. Refactor the code to make it work and avoid leaking memory when
a single subtitle stream is sent to multiple filters.
2023-05-31 16:20:19 +02:00
Anton Khirnov
20cacfe493 fftools/ffmpeg: rework setting sub2video parameters
Set them in ifilter_parameters_from_dec(), similarly to audio/video
streams. This reduces the extent to which sub2video filters need to be
treated specially.
2023-05-31 16:20:19 +02:00
Anton Khirnov
ea5c39cef6 fftools/ffmpeg: tweak sub2video_heartbeat() arguments
This function should not take an InputStream, as it only uses it to get
the InputFile and the timebase. Pass those directly instead and avoid
confusion over dealing with multiple InputStreams.
2023-05-31 16:20:19 +02:00
Anton Khirnov
a6d67b11f5 fftools/ffmpeg_filter: move sub2video subtitle queue to InputFilterPriv
This queue should be associated with a specific filtergraph input - if
a subtitle stream is sent to multiple filters then each should have its
own queue.
2023-05-31 16:20:19 +02:00
Anton Khirnov
5d530e3a72 fftools/ffmpeg_dec: move sub2video submission to ffmpeg_filter
This code is a sub2video analogue of ifilter_send_frame(), so it
properly belongs to the filtering code.

Note that using sub2video with more than one target for a given input
subtitle stream is currently broken and this commit does not change
that. It will be addressed in following commits.
2023-05-31 16:19:49 +02:00
Anton Khirnov
3d35b73b2a fftools/ffmpeg: constify AVSubtitle parameters as appropriate 2023-05-31 16:15:47 +02:00
Anton Khirnov
ad4efb9158 fftools/ffmpeg_filter: try to configure filtergraphs earlier
When the filtergraph has no inputs, it can be configured immediately
when all its outputs are bound to output streams. This will simplify
treating some corner cases.
2023-05-31 16:15:47 +02:00
Anton Khirnov
7520cd9f07 fftools/ffmpeg_mux_init: move OutputFilter setup code to ffmpeg_filter
That is a more appropriate place for it.
2023-05-31 16:15:47 +02:00
Anton Khirnov
87b576135e fftools/ffmpeg_filter: factor out binding an output stream to OutputFilter
While the new function is trivial for now, it will become more useful in
future commits.
2023-05-31 16:15:47 +02:00
Anton Khirnov
dc5864a00c fftools/ffmpeg_filter: create Input/OutputFilters together with FilterGraph
This way the list of filtergraph inputs/outputs is always known after
FilterGraph creation. This will allow treating simple and complex
filtergraphs in a more uniform manner.
2023-05-31 16:15:47 +02:00
Anton Khirnov
a1061d4bdc fftools/ffmpeg_filter: move some functions higher up
Needed by the following commit.
2023-05-31 16:15:47 +02:00
Anton Khirnov
00183880aa fftools/ffmpeg_filter: decouple allocating InputFilter and binding it to InputStream
Will be useful in future commits.
2023-05-31 16:15:47 +02:00
Anton Khirnov
7ea10bfef3 fftools/ffmpeg_filter: store just the link label in OutputFilter
Not the entire AVFilterInOut. This is simpler.
2023-05-31 16:15:47 +02:00
Anton Khirnov
da7ae627e1 fftools/ffmpeg_filter: always pass graph description to fg_create()
Currently NULL would be passed for simple filtergraphs, which would
make the filter code extract the graph description from the output
stream when needed. This is unnecessarily convoluted.
2023-05-31 16:15:47 +02:00
Anton Khirnov
badf959ed6 fftools/ffmpeg_filter: use a dedicated variable for marking simple filtergraphs
Do not use an unrelated graph property, which will change in future
commits.
2023-05-31 16:15:47 +02:00
Anton Khirnov
b56db2956b fftools/ffmpeg: add logging for creating output streams 2023-05-31 16:15:47 +02:00
Anton Khirnov
eeb7d92ac7 fftools/ffmpeg_mux_init: merge ost_add_from_filter() to ost_add()
This way ost_add() knows about the complex filtergraph it is fed from,
which will become useful in future commits.
2023-05-31 16:15:47 +02:00
Devin Heitmueller
859c34706d avdevice/decklink_common: Convert to using avpriv_packet_list functions
The existing DecklinkQueue implementation was using the PacketList
structure but wasn't using the standard avpriv_packet_list_get and
avpriv_packet_list_put functions.  Convert to using them so we
eliminate the duplicate logic, per Marton Balint's suggestion.

Updated to reflect feedback from Marton Balint provided on 05/11/23.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-05-31 00:21:00 +02:00
Paul Arzelier
a9042db1d3 avformat/oggparseflac: check init_get_bits' result
Check init_get_bits' result for NULL, to avoid dereferencing a NULL
pointer later (CWE-476).
Without this, a segfault happens when trying to decode a handcrafted
ogg-flac file with an absurdly long (e.g. 268435455 bytes) ogg header.

Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul Arzelier <paul.arzelier@free.fr>
2023-05-30 18:26:32 -03:00
Paul B Mahol
4d9afbeef5 avfilter/avf_aphasemeter: switch to activate 2023-05-30 20:09:47 +02:00
Paul B Mahol
3ea3a4ba16 avfilter/avf_aphasemeter: avoid using double 2023-05-30 20:09:46 +02:00
Paul B Mahol
862ebbf2ed avfilter/avf_abitscope: refactor bit counting for histogram
This helps compiler figure out it can unroll loop and give 4x speedup.
2023-05-30 19:21:13 +02:00
Paul B Mahol
1636fb415a avfilter/avf_ahistogram: refactor frame fill data code 2023-05-30 18:18:14 +02:00
Arnie Chang
c5508f60c2 lavc/h264chroma: RISC-V V add motion compensation for 8x8 chroma blocks
Optimize the put and avg filtering for 8x8 chroma blocks

Signed-off-by: Arnie Chang <arnie.chang@sifive.com>
2023-05-30 17:15:05 +02:00
Paul B Mahol
b01cfdb4ab avfilter/avf_showwaves: cleanup and simplify some draw calls 2023-05-30 17:00:30 +02:00
Sami Boukortt
06e8eedeba avfilter/vf_colorspace: fix message for missing/incorrect colorspace
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2023-05-30 09:05:19 -04:00
Paul B Mahol
81f658b99d avfilter/f_ebur128: set output frame duration
Also produce output video timestamps that are consistent with
10 frames per second.
2023-05-30 14:08:40 +02:00
Paul B Mahol
447bdddeac avfilter/af_afir: do not use ff_outlink_get_status() on inlinks 2023-05-30 14:08:22 +02:00
Paul B Mahol
4ab1184fae avfilter/af_headphone: do not call ff_outlink_get_status() on inlink 2023-05-30 02:16:47 +02:00
Paul B Mahol
492f64de08 avfilter/vf_framepack: remove not needed calls and add newline to log 2023-05-30 02:16:46 +02:00
Paul B Mahol
12acbcb7a2 avfilter/f_graphmonitor: always output last frame on EOF 2023-05-30 02:16:45 +02:00
Paul B Mahol
ac6a6d1abf avfilter/af_join: do not use ff_outlink_get_status() on inlink 2023-05-30 02:16:44 +02:00
Paul B Mahol
51a1124a68 avfilter/avf_showspectrum: do not use ff_outlink_get_status() on inlink 2023-05-30 02:16:42 +02:00
Lynne
9f9534f5b6
vulkan_decode: fix typo when setting AV1 capabilities
All pNext chained structs in Vulkan are defined as void *, so it doesn't
help catch this.
2023-05-29 23:26:10 +02:00
Paul B Mahol
ee664f41db avfilter/avf_showwaves: force output to fixed framerate if rate is set 2023-05-29 20:15:44 +02:00
Niklas Haas
c4cdd79435 lavfi/vf_libplacebo: add corner_rounding option
For what use it may be.
2023-05-29 19:11:18 +02:00
Niklas Haas
098b338369 lavfi/vf_libplacebo: require v5.278 for importing
Importing Vulkan device on older versions no longer works due to the
lavu vulkan API changes (specifically, the switch to planar textures by
default). Additionally, importing on versions that don't suppirt
lock/unlock_queue is unsafe with the advent of the threaded vulkan
hwaccel. As a plus, saves us some annoying #ifdef boilerplate.

I will raise the minimum vf_libplacebo version globally on the next
stable release of libplacebo, and remove all of these checks.
2023-05-29 18:56:56 +02:00
Dawid Kozinski
637afea88e avcodec: MPEG-5 EVC codec registration
Added prerequisites that must be met before providing support for the MPEG-5 EVC codec
- Added new entry to codec IDs list
- Added new entry to the codec descriptor list
- Bumped libavcodec minor version
- Added profiles for EVC codec

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-29 11:38:21 -03:00
Paul B Mahol
45fa85a777 avfilter/silenceremove_template: refactor detectors using common peaks code 2023-05-29 11:47:11 +02:00
Paul B Mahol
f02964aee1 avfilter/af_silenceremove: add standard deviation detector
Useful in cases audio samples DC offset is not ~0.0, where
other detectors will fail to detect silence.
2023-05-29 11:47:10 +02:00
Paul B Mahol
aa4acc111e avfilter/af_silenceremove: use separate variable for size of cache 2023-05-29 11:47:07 +02:00
Paul B Mahol
364c03d9fe avfilter/silenceremove_template: improve ptp detector 2023-05-29 11:47:06 +02:00
Lynne
e71cd18049
vulkan_decode: do not align the image dimensions
According to Dave Airlie:

> <airlied> but I think ignoring it should be fine, I can't see any
> other way to get the imaeg extents correct for other usage
> <Lynne> what width/height should be used for the images?
> the final presentable dimensions, or the coded dimensions?
> <airlied> if you don't want noise I think the presentable dims
> <airlied> the driver should round up the allocations internally,
> but if you are going to sample from the images then w/h have to be
> the bounds of the image you want
> <airlied> since otherwise there's no way to stop the sampler from
> going outside the edges

Apparently, the alignment values are informative, rather than mandatory,
but the spec's wording makes it sound as if they're mandatory.
2023-05-29 05:12:27 +02:00
James Almer
246bec23a9 avcodec/hevc_ps: remove a unused variable
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-28 23:24:51 -03:00
James Almer
fe103ee61f avcodec/vulkan_dec: use PRId64 specifier for an int64_t
Fixes warnings on x86-32 and Windows.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-28 23:18:53 -03:00
Lynne
bae92361ed
vulkan_decode: check if yuv_sampler exists before freeing it
This prevents multiple NULL accesses - if yuv_sampler exists, then
everything required for it to be destroyed also exists.
2023-05-29 03:23:06 +02:00
Lynne
58f82fc26a
vulkan: replace usage of %lu with %"SIZE_SPECIFIER" 2023-05-29 03:22:58 +02:00
Michael Niedermayer
988fd5743d
avcodec/kbdwin: Remove low precision intermediate in ff_kbd_window_init_fixed()
Previously floats where scaled up to 32bit int, but floats do not
have 32bits in their mantisse so a quarter of the bits where nonsense.

It seems no fate test is affected by this change, which is interresting

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
17ecb224e9
avcodec/kbdwin: Avoid computing bessel values twice
Also reduce neeeded temporary storage by half

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
4ea87c0f73
avcodec/kbdwin: Use av_bessel_i0()
Old code used about 7 times as many cpu cycles as new

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00