Commit Graph

112938 Commits

Author SHA1 Message Date
Dave Johansen 39878fc504 avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for Audio
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-11-12 16:44:47 +08:00
Léon Spaans 9bcbe04aa0 avformat/hlsenc: set HTTP options before writing WebVTT HLS playlists
Fixes: Erroneous HTTP POST instead of HTTP PUT for WebVTT HLS variant playlists.

Signed-off-by: Léon Spaans <leons@gridpoint.nl>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-11-12 11:19:31 +08:00
Paul B Mahol 3ff811a41f avfilter/vf_colortemperature: add gbr(a)pf support 2023-11-12 02:39:44 +01:00
Paul B Mahol 10440a489a avcodec/gif_parser: split correctly also bitstreams that do not have extension blocks 2023-11-12 02:19:53 +01:00
Paul B Mahol 553b31da68 avfilter/avf_showcwt: fix invalid write for full bargraph 2023-11-11 23:29:45 +01:00
Paul B Mahol fa4c2884dd avfilter/avf_showcwt: do not return initial black frames with negative timestamps 2023-11-11 17:53:26 +01:00
Nuo Mi 09f783692e avcodec/cbs_h266: H266RawSliceHeader, expose curr_subpic_idx
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-11 11:53:21 -03:00
Wenbin Chen fa81de4af0 libavfilter/dnn/openvino: Reduce redundant memory allocation
We can directly get data ptr from tensor, so that extral memory
allocation can be removed.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-11-11 09:32:31 +08:00
Paul B Mahol 49719d3cb5 avfilter/avf_showcwt: add fm frequency scaler 2023-11-11 01:19:44 +01:00
Michael Niedermayer 409b29d3f9
doc/APIchanges: Fill in missing values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-10 02:04:25 +01:00
Michael Niedermayer ac4e3e188a
avcodec/evc_parse: Check num_remaining_tiles_in_slice_minus1
Fixes: out of array access
Fixes: 62467/clusterfuzz-testcase-minimized-ffmpeg_BSF_EVC_FRAME_MERGE_fuzzer-6092990982258688

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: "Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics" <d.kozinski@samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-10 00:15:28 +01:00
Michael Niedermayer bb0a684d93
avcodec/4xm: Check for cfrm exhaustion
Fixes: index -1 out of bounds for type 'CFrameBuffer [100]'
Fixes: 63877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5854263397711872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-10 00:14:02 +01:00
Michael Niedermayer 19fcf43131
avformat/mov: Disallow FTYP after streams
Fixes: Assertion !c->fc->nb_streams failed at libavformat/mov.c:7799
Fixes: 63875/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5479178702815232

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-10 00:14:02 +01:00
Niklas Haas 96d2a40b9e avcodec/pnm: explicitly tag color range
PGMYUV seems to be always limited range. This was a format originally
invented by FFmpeg at a time when YUVJ distinguished limited from full
range YUV, and this codec never appeared to output YUVJ in any
circumstance, so hard-coding limited range preserves the status quo.

The other formats are explicitly documented to be full range RGB/gray
formats. That said, don't tag them yet, due to outstanding bugs w.r.t
grayscale formats and color range handling.

This change in behavior updates a bunch of FATE tests in trivial ways
(added tagging being the only difference).
2023-11-09 12:53:35 +01:00
Niklas Haas cf60046cdc avfilter/vf_scale: tag output color space
When using vf_scale to force a specific output color space, also tag
this on the AVFrame. (Mirroring existing logic for output range)

Move the sanity fix for RGB after the new assignment, to avoid leaking
bogus YUV colorspace metadata for RGB spaces.
2023-11-09 12:53:35 +01:00
Niklas Haas 5d5bb77af1 avfilter/vf_scale: simplify color matrix parsing logic
No need to write a custom string parser when we can just use an integer
option with preset values. The various bits of fallback logic are wholly
redundant with equivalent logic already inside sws_getCoefficients.

Note: I disallowed setting 'out_color_matrix=auto', because this does
not do anything meaningful in the current code (just hard-codes
AVCOL_SPC_BT470BG fallback).
2023-11-09 12:53:35 +01:00
Niklas Haas ea9557043e avfilter/vf_alphamerge: warn if input not full range
Alpha planes must always be full range, so complain loudly if fed
limited range grayscale input.
2023-11-09 12:53:35 +01:00
Niklas Haas b7284f2410 avfilter/vf_extractplanes: tag alpha plane as full range
Alpha planes are explicitly full range, even for limited range YUVA
formats. Mark them as such.
2023-11-09 12:53:35 +01:00
Niklas Haas 736284e7b9 swscale/yuv2rgb: fix sws_getCoefficients for colorspace=0
The documentation states that invalid entries default to SWS_CS_DEFAULT.
A value of 0 is not a valid SWS_CS_*, yet the code incorrectly
hard-codes it to BT.709 coefficients instead of SWS_CS_DEFAULT.
2023-11-09 12:53:35 +01:00
Niklas Haas d043e5c54c swscale: don't omit ff_sws_init_range_convert for high-bit
This was a complete hack seemingly designed to work around a different
bug, which was fixed in the previous commit. As such, there is no more
reason not to do this, as it simply breaks changing color range in
sws_setColorspaceDetails for no reason.
2023-11-09 12:53:35 +01:00
Niklas Haas cedf589c09 swscale: fix sws_setColorspaceDetails after sws_init_context
More commonly, this fixes the case of sws_setColorspaceDetails after
sws_getContext, since the latter implies sws_init_context.

The problem here is that sws_init_context sets up the range conversion
and fast path tables based on the values of srcRange/dstRange at init
time. This may result in locking in a "wrong" path (either using
unscaled fast path when range conversion later required, or using
scaled slow path when range conversion becomes no longer required).

There are two way outs:

1. Always initialize range conversion and unscaled converters, even if
   they will be unused, and extend the runtime check.
2. Re-do initialization if the values change after
   sws_setColorspaceDetails.

I opted for approach 1 because it was simpler and easier to reason
about.

Reword the av_log message to make it clear that this special converter
is not necessarily used, depending on whether or not there is range
conversion or YUV matrix conversion going on.
2023-11-09 12:53:35 +01:00
Anton Khirnov acf63d5350 lavu/log: do not assume AVClass.item_name is always set 2023-11-09 11:25:17 +01:00
Anton Khirnov 26ebd96371 fftools/ffmpeg_filter: return an error on ofilter_alloc() failure 2023-11-09 11:25:17 +01:00
Anton Khirnov 5db07311a0 fftools/ffmpeg_filter: fail on ifilter_alloc() failure 2023-11-09 11:25:17 +01:00
Anton Khirnov ed0a50923a fftools/cmdutils: only set array size after allocation succeeded 2023-11-09 11:25:17 +01:00
Marvin Scholz e900a559c2 fate: enhance tpad filter test
Adds another test that uses the start_duration and stop_duration
options instead of start and stop.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-09 11:11:00 +01:00
Marvin Scholz 6667741029 avfilter/vf_tpad: fix check for drawing initialization
The check if drawing needs to be initialized and supported formats
should be drawable ones was flawed, as pad_stop/pad_start is only
populated from stop_duration/start_duration after these checks.

To fix that, check the _duration variants as well and for better
readability and maintainability break the check out into its own
helper.

Fixes a regression from 86b252ea9d
Fix #10621

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-09 11:11:00 +01:00
Lynne 99fcdee5e8
nlmeans_vulkan: fix offsets calculation and various stride issues
We calculated offsets as pairs, but addressed them in the shader
as single float values, while reading them as ivec2s.

Also removes unused code (was provisionally added if cooperative matrices
could be used, but that turned out to be impossible).
2023-11-09 09:14:18 +01:00
Víctor Manuel Jáquez Leal 854012ec59 avutil/hwcontext_vulkan: get VkFormatFeatureFlagBits2
Rather than the VkFormatFeatureFlagBits enum

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2023-11-09 09:13:47 +01:00
Zhao Zhili 6f39dee974 avutil/hwcontext_vulkan: fix run on macOS
VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS,
and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should
be set.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-09 19:23:01 +08:00
Frank Plowman f16900bda2 doc/html: fix styling issue with Texinfo 7.0
Texinfo 7.0 produces quite different HTML to Texinfo 6.8. Without
this change, enumerated option flags (i.e. Possible values of x
are...) render as white text on a white background with Texinfo 7.0
and are unreadable. This change removes a style for the selector
`.table .table` which causes the background to turn white for these
elements. As far as I can tell, it is not actually used anywhere in
files generated by Texinfo 6.8.

Signed-off-by: Frank Plowman <post@frankplowman.com>
2023-11-08 23:54:23 +01:00
Frank Plowman f01fdedb69 doc/html: support texinfo 7.0
Resolves trac ticket #10636 (http://trac.ffmpeg.org/ticket/10636).

Texinfo 7.0, released in November 2022, changed the names of various
functions. Compiling docs with Texinfo 7.0 resulted in warnings and
improperly formatted documentation. More old names appear to have
been removed in Texinfo 7.1, released October 2023, which causes docs
compilation to fail.

This commit addresses the issue by adding logic to switch between the old
and new function names depending on the Texinfo version. Texinfo 6.8
produces identical documentation before and after the patch.

CC
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1938238.html
https://bugs.gentoo.org/916104

Signed-off-by: Frank Plowman <post@frankplowman.com>
2023-11-08 23:53:19 +01:00
Anton Khirnov 2b4035d1dc doc/community: improve wording
By intent, and in practice, the "active contributor" criterion applies
to the person authoring the commits, not the one pushing them into the
repository.
2023-11-08 17:01:50 +01:00
Anton Khirnov 88f9164f97 doc/community: update the rules according to voting results
Cf.:
* http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-October/316054.html
* http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-November/316618.html
2023-11-08 17:01:50 +01:00
James Almer b82957a66a avutil: bump minor version after recent commits
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-08 10:13:50 -03:00
James Almer 04e53927ad avutil/channel_layout: add a 9.1.4 channel layout
Mapping to ITU-R BS.2051-3 "Sound System G" and ITU-R BS.1196-8 "Channel
Configuration 20".

Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-08 10:09:46 -03:00
James Almer b4169760b0 avutil/channel_layout: add a 7.2.3 channel layout
Mapping to ITU-R BS.2051-3 "Sound System F" and ITU-R BS.1196-8 "Channel
Configuration 15".

Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-08 10:09:46 -03:00
Henrik Gramner ed8ddf0bd3 x86inc: Add REPX macro to repeat instructions/operations
When operating on large blocks of data it's common to repeatedly use
an instruction on multiple registers. Using the REPX macro makes it
easy to quickly write dense code to achieve this without having to
explicitly duplicate the same instruction over and over.

For example,

    REPX {paddw x, m4}, m0, m1, m2, m3
    REPX {mova [r0+16*x], m5}, 0, 1, 2, 3

will expand to

    paddw       m0, m4
    paddw       m1, m4
    paddw       m2, m4
    paddw       m3, m4
    mova [r0+16*0], m5
    mova [r0+16*1], m5
    mova [r0+16*2], m5
    mova [r0+16*3], m5

Commit taken from x264:
6d10612ab0

Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-08 13:49:08 +01:00
Zhao Zhili 5a2ca4bf7a MAINTAINERS: add myself as a mediacodec and videotoolbox maintainer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-08 16:15:04 +08:00
Peter Ross 10869cd849 avcodec: LEAD MCMP decoder
Partially fixes ticket #798

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2023-11-08 17:37:58 +11:00
Zhao Zhili f084e9b0be avdevice/android_camera: fix build failure due to typo
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-07 11:10:07 +08:00
Rémi Denis-Courmont adc87a5f7c lavc/opusdsp: rewrite R-V V postfilter
This uses a more traditional approach allowing up processing of up to
period minus two elements per iteration. This also allows the algorithm
to work for all and any vector length.

As the T-Head C908 device under test can load 16 elements loop, there is
unsurprisingly a little performance drop when the period is minimal and
the parallelism is capped at 13 elements:

Before:
postfilter_15_c:         21222.2
postfilter_15_rvv_f32:   22007.7
postfilter_512_c:        20189.7
postfilter_512_rvv_f32:  22004.2
postfilter_1022_c:       20189.7
postfilter_1022_rvv_f32: 22004.2

After:
postfilter_15_c:         20189.5
postfilter_15_rvv_f32:    7057.2
postfilter_512_c:        20189.5
postfilter_512_rvv_f32:   5667.2
postfilter_1022_c:       20192.7
postfilter_1022_rvv_f32:  5667.2
2023-11-06 22:09:30 +02:00
Rémi Denis-Courmont 02594c8c01 lavc/pixblockdsp: rework R-V V get_pixels_unaligned
As in the aligned case, we can use VLSE64.V, though the way of doing so
gets more convoluted, so the performance gains are more modest:

get_pixels_unaligned_c:       126.7
get_pixels_unaligned_rvv_i32: 145.5 (before)
get_pixels_unaligned_rvv_i64:  62.2 (after)

For the reference, those are the aligned benchmarks (unchanged) on the
same T-Head C908 hardware:

get_pixels_c:                 126.7
get_pixels_rvi:                85.7
get_pixels_rvv_i64:            33.2
2023-11-06 19:42:49 +02:00
Rémi Denis-Courmont f68ad5d2de lavc/sbrdsp: R-V V sbr_hf_g_filt
hf_g_filt_c:      1552.5
hf_g_filt_rvv_f32: 679.5
2023-11-06 19:42:49 +02:00
Paul B Mahol 44a0148fad avfilter/af_adynamicequalizer: do detection of threshold first
Makes better results in final output if multiple filters are cascaded at once.
2023-11-05 16:00:29 +01:00
Paul B Mahol 799fad1828 avfilter/af_adynamicequalizer: always start filtering from unit gain 2023-11-05 16:00:28 +01:00
Anton Khirnov f9fdaa2ca9 configure: warn when threading is disabled
Explicitly state what the implications of this are.
2023-11-05 11:30:13 +01:00
Anton Khirnov ad3df6bf35 lavf/smacker: export sample_aspect_ratio
Partially fixes #10617
2023-11-05 11:30:13 +01:00
Rob Hall 1a7a85137e ffbuild: Add gzip -n flag to fix reproducible builds
Without this flag, timestamps were embedded into the final
binary if CUDA was enabled.

Signed-off-by: Rob Hall <robxnanocode@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-05 11:30:13 +01:00
Paul B Mahol fd1712b6fb avfilter/af_adynamicequalizer: merge direction option with mode option
More user-friendly and self-explanatory what certain mode does.
2023-11-04 15:39:24 +01:00