1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00
Commit Graph

116995 Commits

Author SHA1 Message Date
Niklas Haas
da80ee21ca tests/fate: force MPEG range for rawvideo tests
The input file is MPEG range, so we should also encode to MPEG range
before comparing against it. This bug was avoided in the past because
YUVJ inputs were automatically converted back to limited range when converting
to a different pixfmt (in the absence of tagging). However, with proper YUV
negotiation in place, the default behavior is to preserve the YUV range
wherever possible. Since `rawvideo` does not signal or care about the YUV
range, we need to explicitly request the desired output range to force a
conversion.

Affects all rawvideo tests, in particular vsynth and owdenoise.
2024-09-12 19:13:21 +02:00
Marvin Scholz
504c1ffcd8 fftools/ffmpeg: remove useless error check
When ret is checked here, it was never assigned anything, making this
check useless, as highlighted by Coverity.

It seems to be a copy paste mistake given that opt_match_per_stream_str
does not return an error code that could be checked and the previous
value assigned to ret is already checked above. So just remove this
check.

Fixes: CID1616292
2024-09-12 05:11:14 +02:00
James Almer
2e91532ead avfilter/af_join: pass the correct input layouts to ff_channel_layouts_ref
Should fix memory leaks show in fate-filter-join and fate-filter-crazychannels.

Reviewed-by: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-11 16:26:55 -03:00
Cameron Gutman
a15d2fdfd9 avcodec/amfenc: Fix AV1 HDR metadata for delayed surfaces
AMF_VIDEO_ENCODER_AV1_INPUT_HDR_METADATA was set above in the normal
input case but forgotten for the same in the delayed surface codepath.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
2024-09-11 15:45:59 +02:00
Lynne
4646a74d1e
lavc/Makefile: only compile hw_base_encode_h264.c when actually needed 2024-09-10 04:59:22 +02:00
Lynne
15c03b79d2
hw_base_encode_h264: remove unused AUD unit structure
Each codec initializes its own AUD structure when needed, which takes 2 lines.
2024-09-10 04:57:29 +02:00
Michael Riedl
9bcb86b0fa avdevice/decklink_dec: extend available actions on signal loss
Deprecate the option 'draw_bars' in favor of the new option 'signal_loss_action',
which controls the behavior when the input signal is not available
(including the behavior previously available through draw_bars).
The default behavior remains unchanged to be backwards compatible.
The new option is more flexible for extending now and in the future.

The new value 'repeat' repeats the last video frame.
This is useful for very short dropouts and was not available before.

Signed-off-by: Michael Riedl <michael.riedl@nativewaves.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-09 23:47:49 +02:00
Zhao Zhili
071c499026 avfilter/unsharp: Call function directly rather than via function pointer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-09-10 00:59:30 +08:00
Anton Khirnov
691e0a1082 lavfi/af_pan: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
b38f4e7f86 lavfi/af_pan: stop modifying private data in query_formats()
It is not supposed to have any side effects, and the modification in
question can just as well be done in filter init.
2024-09-09 17:26:18 +02:00
Anton Khirnov
d0f4c08207 lavfi/af_lv2: convert to query_func2() 2024-09-09 17:26:18 +02:00
Anton Khirnov
363d4a7559 lavfi/af_replaygain: convert to query_func2() 2024-09-09 17:26:18 +02:00
Anton Khirnov
75b2f5a7d3 lavfi/af_sidechaincompress: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
4c4199758c lavfi/af_sofalizer: convert to query_func2() 2024-09-09 17:26:18 +02:00
Anton Khirnov
449f670a14 lavfi/af_stereotools: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
c4d9282a56 lavfi/af_stereowiden: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
d90035c941 lavfi/af_surround: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
2ee4625d4b lavfi/af_virtualbass: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
7887d00ee6 lavfi/af_volume: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
e13592c22d lavfi/af_loudnorm: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
bfb139bb8d lavfi/af_ladspa: convert to query_func2() 2024-09-09 17:26:18 +02:00
Anton Khirnov
48d9a4d7ca lavfi/af_join: convert to query_func2()
Also, drop a redundant call that also happens implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
fdc6e31725 lavfi/af_headphone: convert to query_func2()
Also, drop a redundant call that also happens implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
c9c6f07436 lavfi/af_hdcd: convert to query_func2() 2024-09-09 17:26:17 +02:00
Anton Khirnov
0ec382f494 lavfi/af_haas: convert to query_func2()
Also, drop a redundant call that also happens implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
408587c836 lavfi/af_extrastereo: convert to query_func2()
Also, drop a redundant call that also happens implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
7896b95430 lavfi/af_earwax: convert to query_func2() 2024-09-09 17:26:17 +02:00
Anton Khirnov
e37d1efe65 lavfi/af_dialoguenhance: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
ffbafbfded lavfi/af_crossfeed: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
84fda7de79 lavfi/af_channelsplit: convert to query_func2()
Also, drop a redundant call that also happens implicitly in generic code.
2024-09-09 17:26:17 +02:00
Anton Khirnov
cfbf10412f tests/fate/filter-audio: add a test for handling more than 64 channels
The test constructs 66 sine waves of different frequencies and joins
them into a 7th order ambisonic layout with extra non-diegetic
stereo. The channels are then shifted circularly with channelmap and
separated into individual streams for muxing with channelsplit.

Note that the last step is necessary because swr is not capable of
interleaving planar to packed for more than 64 channels, which would be
necessary to mux such a stream as PCM.
2024-09-09 17:26:17 +02:00
Anton Khirnov
18d492ff41 lavfi/af_channelsplit: support arbitrary channel layouts
Not just those containing channel values under 64. Also, remove an
arbitrary limitation on channel count.
2024-09-09 17:26:17 +02:00
Anton Khirnov
7dc81d33c2 lavfi/af_channelmap: remove an arbitrary limit on channel count 2024-09-09 17:26:17 +02:00
Brad Smith
a3f79fd22a aarch64: Implement support for elf_aux_info(3) on FreeBSD and OpenBSD
FreeBSD 12.0+, OpenBSD -current and what will be OpenBSD 7.6 support
elf_aux_info(3).

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-09 07:17:49 -04:00
Lynne
1709f3830e
fftools/opt_common: add missing newline after printing codecs
This fixes
ffmpeg -help bsf=trace_headers =>

Supported codecs: av1 h264 hevc vvc mjpeg mpeg2video vp8 vp9<no newline>
2024-09-09 13:03:04 +02:00
Marvin Scholz
9556379943 lavfi/avfiltergraph: fix leak on error
Introduced in eddffbedb3

Fixes: CID1618897 Resource leak
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-09 12:27:00 +02:00
Brad Smith
fe4b9ef69f avutil/cpu_internal: Provide ff_getauxval() wrapper for getauxvaul()
Initially used for getauxval() but will be used to add support for
other API, such as elf_aux_info().

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-09 06:20:11 -04:00
Lynne
5e9845f11e
vulkan(_decode): fix, simplify and improve queries
The old query code never worked properly, and did some hideous
heuristics to read the status bit, and work that into a return
code.
This is all best left to callers to do, which simplifies
our code a lot.

This also fixes minor validation errors regarding calling queries
which are not in their active state.
2024-09-09 07:05:46 +02:00
Lynne
3415e0533f
hwcontext_vulkan: disable more false positive validation checks
Both of these are fundamentally incompatible with video decoding.

The third one can be tracked in the following validation layer issue:
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6627
2024-09-09 07:05:46 +02:00
Lynne
9c65325819
vulkan_decode: use ff_vk_init
This solves the issue of an av_log function being called
with a context with invalid class.

Co-authored-by: Anton Khirnov <anton@khirnov.net>
2024-09-09 07:05:45 +02:00
Lynne
620822c0c5
vulkan: add a ff_vk_init function
This function sets the class correctly, and calls functions
that all users have to call anyway.
2024-09-09 07:05:45 +02:00
Lynne
0ffa967170
hwcontext_vulkan: ask for storage images by default
The issue is that we ask for storage images by default if
available, but because that is gated by the format supporting
storage images, and the check for the format supporting storage
images is gated by the usage, this resulted in a catch-22.
2024-09-09 07:05:45 +02:00
Lynne
eb5088d28c
vulkan_filter: require storage images properly, set usage flags explicitly
This caused images to be created without a storage usage, which broke
at least lavapipe.
2024-09-09 07:05:44 +02:00
Lynne
c41ef7f2ff
hwcontext_vulkan: add PREP_MODE_GENERAL for non-transfer_dst images
Vulkan filters don't need images which can be transferred into.
2024-09-09 07:05:44 +02:00
Lynne
66e950fcac
vulkan_video: move imageview creation and DPB fields to common context
Shared between decoders and encoders.
2024-09-09 07:05:44 +02:00
Lynne
06483d039a
vulkan: error out if query is called without being initialized 2024-09-09 07:05:43 +02:00
Lynne
fd86c373c2
vulkan: use correct return codes for query errors 2024-09-09 07:05:43 +02:00
Lynne
0a1f724bf4
vulkan_video: add utilities for H264 level/profile mapping 2024-09-09 07:05:42 +02:00
Lynne
3de73f1262
hw_base_encode: make recon_frames_ref optional
Vulkan supports some stupidly odd hardware, that unfortunately,
most modern GPUs happen to be.
The DPB images for encoders may be required to be preallocated
all at once, and rather than be individual frames, be layers of
a single frame.

As the hw_base_encode code is written with the thought that either
the driver or the device itself supports sane image allocation,
Vulkan does not leave us with this option.

So, in the case that the hardware does not support individual
frames to be used as DPBs, make the DBP frames context optional,
and let the subsystem manage this.
2024-09-09 07:05:42 +02:00
Lynne
e6019ed075
hw_base_encode: allocate DPB image upfront
Vulkan requires this, as it needs to initialize state upfront.
2024-09-09 07:05:42 +02:00