1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

117464 Commits

Author SHA1 Message Date
Anton Khirnov
60192367a8 lavfi/f_ebur128: switch to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-10-04 10:03:34 +02:00
Anton Khirnov
4e66d0c5d0 lavfi/f_drawgraph: switch to query_func2() 2024-10-04 10:03:34 +02:00
Anton Khirnov
670530a927 lavfi/buffersrc: switch to query_func2() 2024-10-04 10:03:34 +02:00
Anton Khirnov
a7fe27f964 lavfi/buffersrc: validate hw context presence in video_init()
That is the more appropriate place for it than query_formats().
2024-10-04 10:03:34 +02:00
Anton Khirnov
2fa142f7c0 lavfi/buffersink: switch to query_func2() 2024-10-04 10:03:34 +02:00
Anton Khirnov
b8bf2f4e17 lavfi/buffersink: move channel layout parsing to init
That is a more appropriate place for this, and will also be useful in
future commits.
2024-10-04 10:03:34 +02:00
Anton Khirnov
2aad37ffb5 lavfi/buffersink: move the option sanity check to init
Options are set before init, so that is the appropriate place to
validate them.
2024-10-04 10:03:34 +02:00
Zhao Zhili
eff9ed7bff avcodec/mediacodecenc: Fix access of uninitialized value
When crop is skipped, av_strlcatf will access `str` which isn't
initialized properly.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-04 15:43:57 +08:00
Michael Niedermayer
556c767786
avcodec/ffv1enc: Correct error message about unsupported version
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-03 22:05:46 +02:00
James Almer
358fdf3083 avfilter: add missing build deps to msad filter
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:44:49 -03:00
James Almer
b094c47ab2 fate/mov: add a test for heic images with cropping and rotation metadata
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
650ce61745 avformat/mov: don't abort on invalid clap box data
Unless explode is requested.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
7573f02840 avformat/mov: get heif image mirroring from imir box
Complements 76eb3e5ff3.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
f225e6f3c6 avformat/mov: parse clap boxes that reference heif items
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
ba6eeb2c65 avformat/mov: parse colr boxes that reference tile grids
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
James Almer
58c265d956 avformat/mov: factorize getting the current item
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-02 12:38:24 -03:00
Tobias Rapp
c8cc58a13d avcodec/dxva2: Fix compilation with Mingw-w64
Adds missing ifdef guards to function prototypes depending on definitions from
dxva.h which are not available in Mingw-w64 version 4.0. The configure script
already checks for HEVC/VP9 types in dxva.h.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2024-10-02 17:28:30 +02:00
Martin Storsjö
a7449e4cbb libavcodec: Makefile: Move the librsvg entry to the right section
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-02 11:25:34 +03:00
Martin Storsjö
04a59bcac4 libavutil: Makefile: Fix alphabetical order for the film_grain_params files
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-02 11:25:14 +03:00
Martin Storsjö
4d204aa29b videotoolbox: Fix indentation of old existing code
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-02 11:24:17 +03:00
Jan Ekström
f9c5c5358c avcodec/videotoolbox: add AV1 hardware acceleration
Use AV1DecContext's current_obu to access the original OBUs, and
feed them to videotoolbox, rather than the bare slice data passed
via decode_slice.

This requires a small addition to AV1DecContext, for keeping track
of the current range of OBUs that belong to the current frame.

Co-authored-by: Ruslan Chernenko <ractyfree@gmail.com>
Co-authored-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-02 11:19:27 +03:00
Michael Niedermayer
7151081e33
avcodec/ffv1: Store and reuse sx/sy
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-01 19:22:35 +02:00
Michael Niedermayer
7d514655bf
avcodec/ffv1enc: Slice combination is unsupported
We always write minimal slices, the size calculation is wrong in some
corner cases but as its always 1x1 (minus1) we can for now just hard-code it

This helps with ticket 5548

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-01 19:22:35 +02:00
Michael Niedermayer
417b163c00
avcodec/ffv1enc: 2Pass mode is not possible with golomb coding
"Fixes" Ticket7063

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-01 19:22:35 +02:00
Tomas Härdin
25d605d080 lavf/mxfdec: Remove a call to avio_tell() in klv_read_packet() 2024-10-01 18:57:19 +02:00
Tomas Härdin
649ac17efd 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.
2024-10-01 18:57:19 +02:00
Tomas Härdin
e3fa469a55 lavf/mxfdec: Speed up klv_read_packet() 2024-10-01 18:57:19 +02:00
Anton Khirnov
262e6f8430 lavfi/avfilter: export AVFilter initialization state
This will allow the AVOption code to detect setting non-runtime options
after the filter has been initialized.
2024-10-01 09:57:58 +02:00
Anton Khirnov
0548ab2e42 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.
2024-10-01 09:57:57 +02:00
Anton Khirnov
3785b27b76 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.
2024-10-01 09:57:41 +02:00
Anton Khirnov
0d09645cfe 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.
2024-10-01 09:57:41 +02:00
Anton Khirnov
041d992060 lavu/class: improve AVClass doxy 2024-10-01 09:57:41 +02:00
Zhao Zhili
240c16bbc6 avcodec/vvc: Don't use large array on stack
tmp_array in dmvr_hv takes 33024 bytes on stack, which can be
dangerous.
2024-10-01 11:30:22 +08:00
Zhao Zhili
5988a2729b 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>
2024-10-01 10:28:54 +08:00
Zhao Zhili
bcd65ebd8f 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>
2024-10-01 10:28:54 +08:00
Zhao Zhili
0ba9e8d0d4 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>
2024-10-01 10:28:54 +08:00
James Almer
76eb3e5ff3 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>
2024-09-30 14:37:27 -03:00
James Almer
50d1b89fa0 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>
2024-09-30 14:36:24 -03:00
James Almer
04182b5549 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>
2024-09-30 10:59:05 -03:00
James Almer
6057cd8aee fate/filter-audio: add missing aresample filter dependency to fate-filter-crazychannels
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-30 09:07:54 -03:00
James Almer
b622714573 fate/hevc: add missing scale filter dependency to fate-hevc-mv-switch
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-30 09:07:54 -03:00
James Almer
b1a7b0411a 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>
2024-09-30 09:07:54 -03:00
Jonathan Baecker
f3d2624bfa 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>
2024-09-30 19:22:25 +08:00
Anton Khirnov
faa366003b fftools/ffmpeg_mux_init: consolidate connecting source to mux stream 2024-09-30 09:29:18 +02:00
Anton Khirnov
ba06c7b08f fftools/ffmpeg_mux_init: move the ost_get_filters() call to ost_bind_filter()
That is a more appropriate place for it.
2024-09-30 09:29:18 +02:00
Anton Khirnov
71916aa107 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.
2024-09-30 09:29:18 +02:00
Anton Khirnov
e83b5b2cc8 fftools/ffmpeg_mux_init: do not export forced_keyframes_const_names[]
It is only used in this file.
2024-09-30 09:29:18 +02:00
Anton Khirnov
c27b1e6c59 fftools/ffmpeg: drop unused OSTFinished 2024-09-30 09:29:18 +02:00
Anton Khirnov
64f3feb849 fftools/ffmpeg_mux: move OutputStream.enc_ctx to Encoder
The encoding AVCodecContext is a part of the encoder, and so should live
there.
2024-09-30 09:29:18 +02:00
Anton Khirnov
434377a764 fftools/ffmpeg_enc: split Encoder into a private and public part
Similar to what was previously done for other components, e.g. decoders
(see 3b84140a1b).

Start by moving {samples,frames}_encoded into the public struct.
2024-09-30 09:29:18 +02:00