Commit Graph

118046 Commits

Author SHA1 Message Date
Paul B Mahol
4aeb9f7471 avfilter/af_surround: reduce scope of local variable 2024-10-04 01:20:46 +02:00
Marvin Scholz
e6c12507b3 fftools: do not access out of bounds filtergraph
The log message was logged for `filtergraphs[j]` which would cause a
heap buffer overflow in certain circumstances.

Correctly it should be logged for the current filtergraph, so just
use `fg` here.
2024-10-03 21:09:00 +02:00
Paul B Mahol
ae4b31c48c avfilter/af_acentercut: fix flushing of last frame 2024-10-03 09:19:50 +02:00
Paul B Mahol
54f3a22cc7 avfilter/af_surround: improve last frame flushing 2024-10-03 09:06:33 +02:00
Paul B Mahol
3bc1b5baee avfilter/af_dialoguenhance: fix last frames flushing 2024-10-03 08:15:30 +02:00
Paul B Mahol
e002d2686c avfilter/af_stereofield: do trim/flush for start/end samples 2024-10-03 02:28:20 +02:00
Paul B Mahol
81bc5d13a5 avfilter/af_surround: improve start trim 2024-10-03 01:11:54 +02:00
Paul B Mahol
b1548d7b7e avfilter/af_acentercut: remove dead store 2024-10-02 23:12:11 +02:00
Paul B Mahol
7f2b1aa734 avfilter/af_stereofield: rework fft_size calculation 2024-10-02 23:07:18 +02:00
Paul B Mahol
7d9bbd4364 avfilter/af_acentercut: do trim/flush for start/end samples 2024-10-02 23:02:43 +02:00
Paul B Mahol
af8ed73c4f avfilter/af_acentercut: rework fft_size calculation 2024-10-02 22:55:59 +02:00
Paul B Mahol
54f37c32c0 avfilter/af_dialoguenhance: do trim/flush for start/end samples 2024-10-02 22:49:18 +02:00
Paul B Mahol
ffd230973a avfilter/af_dialoguenhance: rework fft_size calculation 2024-10-02 22:17:51 +02:00
Paul B Mahol
afd9a67b33 avutil/opt: add back printing of separator 2024-10-02 22:14:57 +02:00
Paul B Mahol
bb8403ab4f avfilter/af_surround: stop using same smooth value for all frequency bins 2024-10-02 17:25:43 +02:00
Paul B Mahol
4e7729c138 avfilter/af_surround: do trim/flush for start/end samples 2024-10-02 11:57:04 +02:00
Paul B Mahol
266b1262fa doc/filters: update surround filter options 2024-10-02 09:04:14 +02:00
Paul B Mahol
c4062ff87f avfilter/af_surround: remove win_size option
Make it automatically adapt to input sample rate.
2024-10-02 08:55:52 +02:00
Paul B Mahol
92473b246a avutil/tx_template: refactor butterfly transforms 2024-10-01 21:26:38 +02:00
Paul B Mahol
1c88c08644 avfilter/af_surround: remove unused buffers 2024-10-01 21:16:48 +02:00
Tomas Härdin
041477001e lavf/mxfdec: Remove a call to avio_tell() in klv_read_packet()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:24:44 +02:00
Tomas Härdin
a00861cafd lavf/mxfdec: Speed up mxf_edit_unit_absolute_offset()
This involves computing the approximate location of the desired index table segment and linearly searching from there.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:24:44 +02:00
Tomas Härdin
1f248a6a3c lavf/mxfdec: Speed up klv_read_packet()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:24:44 +02:00
Anton Khirnov
6104660804 lavfi/avfilter: export AVFilter initialization state
This will allow the AVOption code to detect setting non-runtime options
after the filter has been initialized.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:24:44 +02:00
Anton Khirnov
c6fbc6b3c9 lavu/log,opt: detect setting non-runtime options post-init
Add a mechanism to AVClass to allow objects to signal their state to
generic code. When an object flags itself with the 'initialized' state,
print an error (and fail, after the next major bump) if the caller
attempts to set non-runtime options.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:24:44 +02:00
Anton Khirnov
156a0217d1 lavu/opt: consolidate common prologue for av_opt_set*()
The options-setting functions share several operations at their
beginnings - locating the option and the object to operate on, handling
the read-only and deprecated flags, and constructing the pointer to the
target value. Some of the functions also do not perform some of the
checks, although they should. E.g. a deprecation warning is currently
only printed for av_opt_set().

Introduce a prologue function that is called from every av_opt_set*()
and performs all these common initialization operations.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:22:37 +02:00
Anton Khirnov
0895f905d1 lavu/opt: combine option type size+name into a single descriptor
Makes it easier to handle options generically and will be useful in
future commits.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:22:36 +02:00
Anton Khirnov
331220509f lavu/class: improve AVClass doxy
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:52 +02:00
Zhao Zhili
353b850e7c avcodec/vvc: Don't use large array on stack
tmp_array in dmvr_hv takes 33024 bytes on stack, which can be
dangerous.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:52 +02:00
Zhao Zhili
bf87e7891d aarch64/vvc: Add dmvr
dmvr_8_12x20_c:                                          1.5 ( 1.00x)
dmvr_8_12x20_neon:                                       0.2 ( 6.56x)
dmvr_8_20x12_c:                                          1.0 ( 1.00x)
dmvr_8_20x12_neon:                                       0.2 ( 4.33x)
dmvr_8_20x20_c:                                          1.7 ( 1.00x)
dmvr_8_20x20_neon:                                       0.5 ( 3.63x)
dmvr_12_12x20_c:                                         2.2 ( 1.00x)
dmvr_12_12x20_neon:                                      0.5 ( 4.68x)
dmvr_12_20x12_c:                                         2.0 ( 1.00x)
dmvr_12_20x12_neon:                                      0.5 ( 4.16x)
dmvr_12_20x20_c:                                         3.7 ( 1.00x)
dmvr_12_20x20_neon:                                      0.7 ( 5.14x)

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:52 +02:00
Zhao Zhili
a659349bbf aarch64/vvc: Add dmvr_hv
dmvr_hv_8_12x20_c:                                       8.0 ( 1.00x)
dmvr_hv_8_12x20_neon:                                    1.2 ( 6.62x)
dmvr_hv_8_20x12_c:                                       8.0 ( 1.00x)
dmvr_hv_8_20x12_neon:                                    0.9 ( 8.37x)
dmvr_hv_8_20x20_c:                                      12.9 ( 1.00x)
dmvr_hv_8_20x20_neon:                                    1.7 ( 7.62x)
dmvr_hv_10_12x20_c:                                      7.0 ( 1.00x)
dmvr_hv_10_12x20_neon:                                   1.7 ( 4.09x)
dmvr_hv_10_20x12_c:                                      7.0 ( 1.00x)
dmvr_hv_10_20x12_neon:                                   1.7 ( 4.09x)
dmvr_hv_10_20x20_c:                                     11.2 ( 1.00x)
dmvr_hv_10_20x20_neon:                                   2.7 ( 4.15x)
dmvr_hv_12_12x20_c:                                      6.5 ( 1.00x)
dmvr_hv_12_12x20_neon:                                   1.7 ( 3.79x)
dmvr_hv_12_20x12_c:                                      6.5 ( 1.00x)
dmvr_hv_12_20x12_neon:                                   1.7 ( 3.79x)
dmvr_hv_12_20x20_c:                                     10.2 ( 1.00x)
dmvr_hv_12_20x20_neon:                                   2.2 ( 4.64x)

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:52 +02:00
Zhao Zhili
93970078ad aarch64/vvc: Add w_avg
w_avg_8_2x2_c:                                           0.0 ( 0.00x)
w_avg_8_2x2_neon:                                        0.0 ( 0.00x)
w_avg_8_4x4_c:                                           0.2 ( 1.00x)
w_avg_8_4x4_neon:                                        0.0 ( 0.00x)
w_avg_8_8x8_c:                                           1.2 ( 1.00x)
w_avg_8_8x8_neon:                                        0.2 ( 5.00x)
w_avg_8_16x16_c:                                         4.2 ( 1.00x)
w_avg_8_16x16_neon:                                      0.8 ( 5.67x)
w_avg_8_32x32_c:                                        16.2 ( 1.00x)
w_avg_8_32x32_neon:                                      2.5 ( 6.50x)
w_avg_8_64x64_c:                                        64.5 ( 1.00x)
w_avg_8_64x64_neon:                                      9.0 ( 7.17x)
w_avg_8_128x128_c:                                     269.5 ( 1.00x)
w_avg_8_128x128_neon:                                   35.5 ( 7.59x)
w_avg_10_2x2_c:                                          0.2 ( 1.00x)
w_avg_10_2x2_neon:                                       0.2 ( 1.00x)
w_avg_10_4x4_c:                                          0.2 ( 1.00x)
w_avg_10_4x4_neon:                                       0.2 ( 1.00x)
w_avg_10_8x8_c:                                          1.0 ( 1.00x)
w_avg_10_8x8_neon:                                       0.2 ( 4.00x)
w_avg_10_16x16_c:                                        4.2 ( 1.00x)
w_avg_10_16x16_neon:                                     0.8 ( 5.67x)
w_avg_10_32x32_c:                                       16.2 ( 1.00x)
w_avg_10_32x32_neon:                                     2.5 ( 6.50x)
w_avg_10_64x64_c:                                       66.2 ( 1.00x)
w_avg_10_64x64_neon:                                    10.0 ( 6.62x)
w_avg_10_128x128_c:                                    277.8 ( 1.00x)
w_avg_10_128x128_neon:                                  39.8 ( 6.99x)
w_avg_12_2x2_c:                                          0.0 ( 0.00x)
w_avg_12_2x2_neon:                                       0.2 ( 0.00x)
w_avg_12_4x4_c:                                          0.2 ( 1.00x)
w_avg_12_4x4_neon:                                       0.0 ( 0.00x)
w_avg_12_8x8_c:                                          1.2 ( 1.00x)
w_avg_12_8x8_neon:                                       0.5 ( 2.50x)
w_avg_12_16x16_c:                                        4.8 ( 1.00x)
w_avg_12_16x16_neon:                                     0.8 ( 6.33x)
w_avg_12_32x32_c:                                       17.0 ( 1.00x)
w_avg_12_32x32_neon:                                     2.8 ( 6.18x)
w_avg_12_64x64_c:                                       64.0 ( 1.00x)
w_avg_12_64x64_neon:                                    10.0 ( 6.40x)
w_avg_12_128x128_c:                                    269.2 ( 1.00x)
w_avg_12_128x128_neon:                                  42.0 ( 6.41x)

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:52 +02:00
James Almer
9cefaad55d avformat/mov: get heif image rotation from irot box
Based on a patch by Hacene Bouaroua.
Fixes ticket #11171.

Co-authored-by: Hacene Bouaroua <hbouaroua@freebox.fr>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:52 +02:00
James Almer
f1c930d8ef avformat/avformat: add side data to AVStreamGroupTileGrid
Will be used to export certain information present in HEIF samples, like
rotation metadata, ICC profiles, and potentially others.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-01 20:20:51 +02:00
Paul B Mahol
7deea7bff7 avfilter/af_surround: improve and extend focus option 2024-10-01 19:12:33 +02:00
Paul B Mahol
0d4b7bb343 avfilter/surround_template: improve some calculations 2024-10-01 15:59:19 +02:00
Paul B Mahol
b4f3f23568 avfilter/surround_template: use fma() 2024-10-01 09:52:56 +02:00
Paul B Mahol
5aef46d83c avfilter/surround_template: factor out special function to process default spread values
Gives big speed boost.
2024-10-01 09:52:51 +02:00
Paul B Mahol
3e2b97afda avfilter/af_surround: avoid loss of precision in processing 2024-10-01 01:29:49 +02:00
Paul B Mahol
5171d9bdea avfilter/af_surround: increase max limit for level_out/in 2024-09-30 22:30:55 +02:00
James Almer
44db3c26ed avformat/mov: don't return the latest stream when an item stream is expected
Otherwise, things like ICC profiles as read from the colr box meant for an item
with no stream (like a grid) may end up being added to the wrong stream.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:52 +02:00
James Almer
36026488e8 fate/filter-audio: add missing aresample filter dependency to fate-filter-crazychannels
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:52 +02:00
James Almer
e27b4d6d4c fate/hevc: add missing scale filter dependency to fate-hevc-mv-switch
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:52 +02:00
James Almer
f0d9d6b102 fate/vcodec: add missing scale filter dependency to ffv1-2pass10 vsynth tests
Also, add sws_flags matching other similar tests while at it.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00
Jonathan Baecker
774afec939 avformat/hlsenc: Fix missing EXT-X-DISCONTINUITY tag in subtitle streams
The EXT-X-DISCONTINUITY tag was not being added to subtitle streams,
causing synchronization issues.i
This patch ensures that the tag is applied consistently across video and subtitle streams.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00
Anton Khirnov
b8afb881b9 fftools/ffmpeg_mux_init: consolidate connecting source to mux stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00
Anton Khirnov
e60bbd1a8f fftools/ffmpeg_mux_init: move the ost_get_filters() call to ost_bind_filter()
That is a more appropriate place for it.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00
Anton Khirnov
407b158a49 fftools/ffmpeg_mux_init: move the check for filtering+streamcopy
To streamcopy_init().

This will allow to simplify the control flow in ost_add() by moving the
ost_get_filters() call (which previously had to handle both encoding and
streamcopy streams) to ost_bind_filter() (which is only called for
audio/video encoding).

Also, return EINVAL rather than ENOSYS, as trying to combine filtering
with streamcopy is a parameter error.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00
Anton Khirnov
008872ba7c fftools/ffmpeg_mux_init: do not export forced_keyframes_const_names[]
It is only used in this file.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00
Anton Khirnov
04a411fe04 fftools/ffmpeg: drop unused OSTFinished
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:51 +02:00