Commit Graph

116863 Commits

Author SHA1 Message Date
Anton Khirnov
f143723095 lavfi/af_agate: convert to query_func2()
Drop redundant ff_set_common_all_channel_counts() /
ff_set_common_all_samplerates() calls, since those happen implicitly in
generic code.
2024-09-05 10:03:33 +02:00
Rémi Denis-Courmont
d9f594209f checkasm/riscv: print official extension names 2024-09-04 22:04:11 +03:00
Rémi Denis-Courmont
27d28b68da swscale/rgb2rgb: enable R-V V deinterleaveBytes
T-Head C908:
deinterleave_bytes_c:                               100328.3 ( 1.00x)
deinterleave_bytes_rvv_i32:                          19331.3 ( 5.19x)
deinterleave_bytes_aligned_c:                       100337.5 ( 1.00x)
deinterleave_bytes_aligned_rvv_i32:                  15748.0 ( 6.37x)

SpacemiT X60:
deinterleave_bytes_c:                                95230.6 ( 1.00x)
deinterleave_bytes_rvv_i32:                           9790.3 ( 9.73x)
deinterleave_bytes_aligned_c:                        96564.1 ( 1.00x)
deinterleave_bytes_aligned_rvv_i32:                   7780.1 (12.41x)
2024-09-04 22:04:11 +03:00
Hendrik Leppkes
d4cfbf329c
hevc/sei: return INVALIDDATA when a referenced SPS is not available
The code previously returned ENOMEM, despite this not being an
allocation problem, but rather a bitstream problem referring to data not
currently available.

Fixes playback of such streams, as it allows further processing of NAL
units after skipping the broken SEI NAL.
2024-09-04 18:34:47 +02:00
Araz Iusubov
eda3fc6053 avcodec/amfenc: GPU driver version check
Implemented gpu driver check.
10-bit patch works incorrectly on driver version lower than 23.30.
Signed-off-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
2024-09-04 13:18:41 +02:00
Evgeny Pavlov
9f02408583 avcodec/amfenc: add 10 bit encoding in av1_amf
v2: refactored after review

Signed-off-by: Evgeny Pavlov <lucenticus@gmail.com>
Co-authored-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
Co-authored-by: Araz Iusubov <Primeadvice@gmail.com>
Signed-off-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
2024-09-04 13:18:28 +02:00
nyanmisaka
628762034d avcodec/amfenc: HDR metadata.
v2: fixes for indentation
Signed-off-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
2024-09-04 13:18:18 +02:00
Michael Fabian 'Xaymar' Dirks
fb4dd4b6f4 avcodec/amfenc: Fixes the color information in the output.
added 10 bit support for amf hevc.

before:

command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file.mkv -an -c:v h264_amf res.dx11_hw_h264.mkv
output -  Format of input frames context (p010le) is not supported by AMF.
command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf res.dx11_hw_hevc.mkv
output -  Format of input frames context (p010le) is not supported by AMF.

after:

command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v h264_amf res.dx11_hw_h264.mkv
output -  10-bit input video is not supported by AMF H264 encoder
command - ffmpeg.exe -hide_banner -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i test_10bit_file -an -c:v hevc_amf res.dx11_hw_hevc.mkv
output -  10bit file

v2 - lost line returned in ff_amf_pix_fmts
v3 - fixes after review
v4 - extract duplicated code, fix incorrect processing of 10-bit input for h264
v5 - non-functional changes after review

Co-authored-by: Evgeny Pavlov <lucenticus@gmail.com>
Co-authored-by: Araz Iusubov <Primeadvice@gmail.com>
Signed-off-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
2024-09-04 13:18:09 +02:00
Nicolas Gaullier
ee9ae4e8ba fftools/ffmpeg: Fix honor -r output option with streamcopy
Fix "ost->st->avg_frame_rate = ost->frame_rate" in streamcopy_init()
being reset to input's frame rate a few lines below.
Note that in current code, there are some discrepancies amongst the
muxers. For example, avienc relies on time_base, so it is not affected
by this patch, whereas mxfenc and matroskaenc do use avg_frame_rate,
so this patch fixes -r being honored.

In the updated fate test, the input is (wrongly) probed as 50fps. With
this patch, the correct value (25fps) is successfully forced with -r.

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Nicolas Gaullier
c14573a4d2 tests: Remove void -time_base overrides when streamcopying to mxf
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Nicolas Gaullier
59d2900df7 avformat/mxfenc: Fix guess frame_rate
The time_base was a bad guess.

Currently, fate-time_base test data assumed that overriding the input
time_base would affect the frame_rate, but this behaviour is not
documented, so just fix the fate data now that this is fixed.

Fix regression since 10185e2d4c:
previously, when streamcopying, the time_base was guessed from the
frame_rate considering it is often constant, so guessing the frame_rate
back from the time_base was often not a problem.

To reproduce:
ffmpeg -i fate-suite/mpeg2/dvd_still_frame.vob -an -c copy out.mxf

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Fei Wang
0b6d7cd9d9 lavc/qsvenc: Remove duplicate include header file
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-09-04 12:14:58 +08:00
Fei Wang
36396aff69 doc/av1_qsv: Add missed options
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-09-04 12:14:57 +08:00
Fei Wang
395d703c91 doc/av1_qsv: Fix typo
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-09-04 12:14:57 +08:00
Ramiro Polla
3f9b78bd19 avcodec/dnxhdenc: use BlockDSPContext from MpegEncContext
MpegEncContext already has a BlockDSPContext, so we don't need another
one for DNXHDEncContext (which has an MpegEncContext).
2024-09-03 17:47:37 +02:00
Ramiro Polla
4f7aeffd8c avcodec/mpegvideo: remove redundant workaround to recalculate last nonzero coefficient
The x86 optimized dct_quantize only calculates the last nonzero
coefficient correctly if the zigzag scan order is used. For the
alternate scan order, this value is incorrect.

To work around this, the dct_unquantize functions process the entire
block if the alternate scan order is used.

But a second workaround (bb198e198a) was added that recalculates the
last nonzero coefficient after dct_quantize is called if the alternate
scan order is used.

This commit removes the first workaround, which became redundant.
2024-09-03 17:14:24 +02:00
Ramiro Polla
b6f7271fa9 avcodec/x86/mpegvideoenc: remove av_assert2() for variable alignment
It's safe to assume that LOCAL_ALIGNED_16 does indeed align. Otherwise
we would have many more problems...

This assert was added in f8188626 all the way back in 2003.
2024-09-03 17:06:19 +02:00
Nuo Mi
3d2fafa229 avcodec/vvcdec: fix potential deadlock in report_frame_progress
Fixes:
https://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-tsan&time=20240823175808

Reproduction steps:
./configure --enable-memory-poisoning --toolchain=gcc-tsan --disable-stripping && make fate-vvc

Root cause:
We hold the current frame's lock while updating progress for other frames,
which also requires acquiring other frame locks. This could potentially lead to a deadlock.
However, I don't think this will happen in practice because progress updates are one-way, with no cyclic dependencies.
But we need this patch to make FATE happy.
2024-09-03 21:32:27 +08:00
Frank Plowman
54291f4383 lavc/vvc: Fix assertion bound on qPy_{a,b}
Signed-off-by: Frank Plowman <post@frankplowman.com>
2024-09-03 20:57:52 +08:00
Fei Wang
ae9cf903e8 cbs_av1: Copy loop filter and segment parameters of repeat frame from its mapped frame
Implement load/save loop filter and segment parameters defined in
section 7.20 and 7.21 in spec for show_existing_frame frames.

Fixes ticket #11151.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-09-03 14:03:40 +08:00
Marton Balint
a87a96105e avformat/libzmq: fix check for zmq protocol prefix
Fixes ticket #11134.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-02 22:51:17 +02:00
Marton Balint
90f68f7b2d avformat/mxfdec: disallow generic seek search
If the demuxer does not provide per-stream indexes, the generic seek search can
attempt to read the whole media file from the beginning when seeking. For large
MXF files this can cause huge lockups for a seek after the last timestamp,
which will eventually fail. So let's disable the generic seek for mxf, the
demuxer's own seek code should handle seeking just fine.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-02 22:50:52 +02:00
Stefano Mandelli
24eff5b547 avformat/rtsp: extend the PATH buffer to 2048
Recently, I have been experiencing an increasing number of user that use ffmpeg
to retrive RTSP stream from personal mediaproxies (e.g. MediaMtx) with
authorization based on JWT. The current length of PATH does not permit to
insert the token in the URL failing the authorization with no possibilities to
get the video.

VLC has just modified the RSTP max URL length, and it permits to use token
inside the URL.

For these reasons, I propose this patch to extend the PATH buffer from 1024 to
2048 in order to use tokens and the authorization process based on JWT.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-02 22:50:52 +02:00
Anton Khirnov
3f9ca51015 lavc/opus*: move to opus/ subdir 2024-09-02 11:56:53 +02:00
Anton Khirnov
c3fb696311 lavfi/af_aformat: convert to query_func2() 2024-09-02 11:55:22 +02:00
Anton Khirnov
8bc419aeb4 lavfi/af_aformat: change options from strings to arrays
Allows to drop custom parsing code, and also the assumption that
query_formats() is not called more than once.
2024-09-02 11:55:22 +02:00
Anton Khirnov
dc488d832c lavfi/af_afir: convert to query_func2()
Drop redundant ff_set_common_all_channel_counts() /
ff_set_common_all_samplerates() calls, since those happen implicitly in
generic code.
2024-09-02 11:55:22 +02:00
Anton Khirnov
584be51334 lavfi/af_adynamicequalizer: convert to query_func2()
Drop redundant ff_set_common_all_channel_counts() /
ff_set_common_all_samplerates() calls, since those happen implicitly in
generic code.
2024-09-02 11:55:22 +02:00
Anton Khirnov
079834e645 lavfi/af_acrossover: convert to query_func2()
Drop redundant ff_set_common_all_channel_counts() /
ff_set_common_all_samplerates() calls, since those happen implicitly in
generic code.
2024-09-02 11:55:22 +02:00
Anton Khirnov
edf53e15b4 lavfi/af_aap: convert to query_func2()
Drop redundant ff_set_common_all_channel_counts() /
ff_set_common_all_samplerates() calls, since those happen implicitly in
generic code.
2024-09-02 11:55:22 +02:00
Anton Khirnov
0f004a0416 lavfi/aeval: convert to query_func2()
Drop redundant ff_set_common_all_channel_counts() /
ff_set_common_all_samplerates() calls, since those happen implicitly in
generic code.
2024-09-02 11:55:22 +02:00
Anton Khirnov
eddffbedb3 lavfi: add query_func2()
It differs from query_func() in accepting arrays of input/output format
configurations to be filled as callback parameters. This allows to mark
the filter context as const, ensuring it is not modified by this
function, as it is not supposed to have any side effects beyond
returning the supported formats.
2024-09-02 11:55:20 +02:00
James Almer
01f2d95fbf x86/h264_weight: don't do arithmetic right shift of a 32bit values in 64bit registers
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-01 15:43:18 -03:00
Ramiro Polla
00b64fca55 configure: improve check for POSIX ioctl
Instead of relying on system #ifdefs which may or may not be correct,
detect the POSIX ioctl signature at configure time.
2024-09-01 18:01:43 +02:00
Ramiro Polla
6aafe61285 avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t 2024-09-01 13:42:30 +02:00
Dale Curtis
7753a9d627 lavc: Check codec_whitelist early in avcodec_open2()
This ensures that if a codec isn't on codec_whitelist, trying to open it
will not trigger ff_codec_close(), which could invalidate useful
information still present in the context.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-01 12:42:20 +02:00
Matthieu Bouron
0a780d3076 avcodec: add Mediacodec audio decoders support
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2024-09-01 12:25:56 +02:00
Rémi Denis-Courmont
7d1dda4892 lavc/h264dsp: R-V V loop_filter_chroma
T-Head C908:
h264_v_loop_filter_chroma_8bpp_c:      137.4
h264_v_loop_filter_chroma_8bpp_rvv_i32: 54.2
2024-09-01 10:58:48 +03:00
Rémi Denis-Courmont
3a53656837 lavc/h264dsp: do not write back unmodified rows in R-V V loop filter 2024-09-01 10:52:26 +03:00
Gyan Doshi
b5daaa1503 avfilter/formats: correct error message
The check is for color space, not range.
2024-09-01 10:10:16 +05:30
James Almer
a4228a0ac1 avformat/iamf_parser: use ffio_read_size() where useful
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 23:44:13 -03:00
Marvin Scholz
b6a0eab528 avformat/iamf_parse: Fix return of uninitialized value
The ret value here is not yet intialized so the return would return
uninitialized data. What was probably meant to be checked here was the
return value of ffio_read_size, which can return an error.

Introduced in 38bcb3ba7b

Fixes: CID1618758
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 21:21:39 -03:00
Michael Niedermayer
8a2c401625
MAINTAINERS: Add webpage link to our mailing list page
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:10:57 +02:00
Michael Niedermayer
e5f4c6d7b5
MAINTAINERS: Add 2 git repositories
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:10:57 +02:00
Michael Niedermayer
880ef64c12
MAINTAINERS: Add T field based on the linux kernel MAINTAINERs
Text was stolen from the linux kernel
This is thus identical to the kernel just a different more compact format.
I am very happy also to switch the file entirely to the format of the linux kernel maintainer list
if people prefer

This allows specifying a git repository for an area

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:10:36 +02:00
Michael Niedermayer
01af5a473a
MAINTAINERS: Add a profile entry for fate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:08:28 +02:00
Michael Niedermayer
eabd7e7142
MAINTAINERS: Add P field based on the linux kernel MAINTAINERs
Text was stolen from the linux kernel
This is thus identical to the kernel just a different more compact format.
I am very happy also to switch the file entirely to the format of the linux kernel maintainer list
if people prefer

This allows specifying more details than what fits on a single line

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:08:28 +02:00
Michael Niedermayer
bb870a7fcf
MAINTAINERS: Add B field based on the linux kernel MAINTAINERs
Text was stolen from the linux kernel
This is thus identical to the kernel just a different more compact format.
I am very happy also to switch the file entirely to the format of the linux kernel maintainer list
if people prefer

This allows specifying a bug tracker. It would allow a maintainer to
use gitlab, github, or something else to keep track of bugs

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:08:26 +02:00
Michael Niedermayer
e1baf45b12
MAINTAINERS: Add some webpages to some areas
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:07:58 +02:00
Michael Niedermayer
02090abf74
MAINTAINERS: Add W field based on the linux kernel MAINTAINERs
Text was stolen from the linux kernel
This is thus identical to the kernel just a different more compact format.
I am very happy also to switch the file entirely to the format of the linux kernel maintainer list
if people prefer

This allows specifying a webpage for an area

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-08-31 23:07:36 +02:00