Commit Graph

114231 Commits

Author SHA1 Message Date
James Almer 901165516c fate/flvenc: force the av1 decoder in all steps for fate-enhanced-flv-av1
Tested-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-08 10:38:55 -03:00
联盟少侠 e6d933404f avfilter/avfilter: Fix for Incorrect Parameter in ff_filter_config_links
src/libavfilter/internal.h:255:45: note: passing argument to parameter 'filter' here
int ff_filter_config_links(AVFilterContext *filter);

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 13:12:21 +01:00
Martin Storsjö 71e871280d libavdevice: Fix the avfoundation device after switching to FFInputFormat
This was missed in b800327f4c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-03-08 12:48:59 +02:00
Anton Khirnov abd7da0af9 lavfi: deprecate avfilter_config_links()
It never makes sense for this function to be called by users.
2024-03-08 09:29:54 +01:00
Anton Khirnov 6b1f41e152 lavfi: deprecate avfilter_link_free()
It never makes sense for this function to be called by users.
2024-03-08 09:29:54 +01:00
Anton Khirnov c0aee39412 tests/fate/matroska: add tests for side data preference
Cf. #10857

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-03-08 07:44:05 +01:00
Anton Khirnov 6169bd0fea lavc/*dec: use side data preference for mastering display/content light metadata 2024-03-08 07:38:38 +01:00
Niklas Haas 588c5c3d51 avcodec/dpx: respect side data preference
If the time code side data is overridden by the packet level, we also
make sure not to update `p->metadata` to a mismatched timecode.
2024-03-08 07:37:56 +01:00
Niklas Haas 0b7aefe698 avcodec/libdav1d: respect side data preference
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-03-08 07:37:56 +01:00
Niklas Haas 133cbbe31e avcodec/webp: respect side data preference 2024-03-08 07:37:56 +01:00
Niklas Haas 276be6da9e avcodec/tiff: respect side data preference 2024-03-08 07:37:56 +01:00
Niklas Haas 454691a2ec avcodec/pngdec: respect side data preference 2024-03-08 07:37:56 +01:00
Niklas Haas ffb8dc7be6 avcodec/mpeg12dec: respect side data preference
We only need to consider side data types that may possibly come from the
packet.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-03-08 07:37:56 +01:00
Niklas Haas ed3cc8fc65 avcodec/mjpegdec: respect side data preference 2024-03-08 07:37:56 +01:00
Niklas Haas 62f40d0e38 avcodec/libjxldec: respect side data preference
Also fixes a memory leak where the side data was previously not properly
cleaned up on OOM.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-03-08 07:37:56 +01:00
Niklas Haas b9565db9a0 avcodec/hevcdec: respect side data preference
If the time code side data is overridden by the packet level, we also
make sure not to update `out->metadata` to a mismatched timecode.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-03-08 07:37:56 +01:00
Anton Khirnov d9f1b321cf lavc/hevcdec: pass an actual codec context to ff_h2645_sei_to_frame()
Needed by following commit.
2024-03-08 07:37:56 +01:00
Niklas Haas eec01ef65f avcodec/h264_slice: respect side data preference
If the time code side data is overridden by the packet level, we also
make sure not to update `out->metadata` to a mismatched timecode.
2024-03-08 07:37:56 +01:00
Niklas Haas 2c2d3d5acb avcodec/cri: respect side data preference
This function was already ignoring OOM errors.
2024-03-08 07:37:56 +01:00
Niklas Haas 01056078ed avcodec/av1dec: respect side data preference 2024-03-08 07:37:56 +01:00
Anton Khirnov 6dd832673b lavc: add content light/mastering display side data wrappers 2024-03-08 07:37:56 +01:00
Niklas Haas 8a70c5cb93 avcodec: add internal side data wrappers
The signature of these wrappers is more complicated due to a need to
distinguish between "failed allocating side data" and "side data was
already present".

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-03-08 07:37:56 +01:00
Anton Khirnov 68a8eca752 lavc: add a decoder option for configuring side data preference
This and the following commits fix #10857
2024-03-08 07:37:55 +01:00
Anton Khirnov efe4478778 lavu/opt: add array options 2024-03-08 07:36:15 +01:00
Anton Khirnov fc706276c0 lavu/opt: distinguish between native and foreign access for AVOption fields
Native access is from the code that declared the options, foreign access
is from code that is using the options. Forbid foreign access to
AVOption.offset/default_val, for which there is no good reason, and
which should allow us more freedom in extending their semantics in a
compatible way.
2024-03-08 07:24:50 +01:00
Anton Khirnov c259f80315 lavu/opt: factor per-type dispatch out of av_opt_copy()
Will be useful in following commits.
2024-03-08 07:24:50 +01:00
Anton Khirnov 2cd89194b0 libavutil/opt: rework figuring out option sizes
Replace the opt_size() function, currently only called from
av_opt_copy(), with
* a constant array of element sizes
* a function that signals whether an option type is POD (i.e.
  memcpyable) or not

Will be useful in following commits.
2024-03-08 07:24:50 +01:00
Anton Khirnov 85797886fe lavu/opt: factor per-type dispatch out of av_opt_set()
Will be useful in following commits.
2024-03-08 07:24:50 +01:00
Anton Khirnov a1be08ba05 lavu/opt: factor per-type dispatch out of av_opt_get()
Will be useful in following commits.
2024-03-08 07:24:50 +01:00
Andreas Rheinhardt 93178c6c1a avformat/tests/movenc: Constify write functions
Forgotten in 2a68d945cd.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 03:30:57 +01:00
Haihao Xiang eb7d019b32 lavfi/vulkan_filter: fix input format
Otherwise s->input_format is always yuv420p.

This fixes invalid output format for hwframe download in the command
below:
./ffmpeg -init_hw_device vulkan -f lavfi \
	-i testsrc=duration=1,format=nv12 \
	-vf 'hwupload,format=vulkan,scale_vulkan=1024:768,hwdownload,format=nv12' \
	-f null -

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2024-03-08 10:10:51 +08:00
Andreas Rheinhardt dfffe03755 avutil/dict: Deduplicate freeing dictionary
Reviewed-by: epirat07@gmail.com
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 01:01:49 +01:00
Andreas Rheinhardt 6cf904ac3d checkasm/hevc_deblock: Initialize buffer
Fixes the hevc_deblock checkasm test with Valgrind.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 01:01:49 +01:00
Andreas Rheinhardt ec1b6e0cd4 avcodec/ccaption_dec: Avoid relocations for strings
The longest string here takes four bytes, so using an array
of pointers is wasteful even when ignoring the cost of relocations;
the lack of relocations also implies that this array
will now be put into .rodata and not into .data.rel.ro.

Static asserts are used to ensure that all strings are always
properly zero-terminated.

Tested-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 00:59:24 +01:00
Andreas Rheinhardt c9f5cea9cc avcodec/vdpau: Deprecate redundant allocators and getter/setter
The allocators have been superseded by av_vdpau_bind_context().
The latter have only been added "to allow multiple forks to add
fields to the structure without breaking ABI" [1], but libav
is no more, so this is not needed any longer.

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2013-August/146954.html

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 00:58:40 +01:00
Andreas Rheinhardt 2a87345e69 avcodec/vdpau: Remove outdated comment
Forgotten in b773a8d8c1.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 00:57:09 +01:00
Niklas Haas 30d6861a11 fftools/ffprobe: add AVFilmGrainParams printing 2024-03-07 21:09:06 +01:00
Niklas Haas c2a233fe14 avfilter/vf_showinfo: add AVFilmGrainAOMParams support
For testing purposes.
2024-03-07 21:08:53 +01:00
Andreas Rheinhardt 2dfdee3969 avcodec/xvmc: Remove header
Forgotten in a12cd3be98.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 16:33:23 +01:00
Anton Khirnov 384a207ea9 lavf/matroskadec: add missing linebreaks in error messages 2024-03-07 15:59:31 +01:00
James Almer 783d00b203 libs: bump major version for all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 11:29:43 -03:00
Anton Khirnov 0757669629 lavc: move AVCodecContext.pts_correction* to DecodeContext
These fields are documented to be non-public and are only used in
decode.c
2024-03-07 08:53:32 -03:00
James Almer c8db1006ef avformat/avformat: Reorder AVFormatContext fields
Move related fields closer together.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:32 -03:00
James Almer 53cdf94653 avformat/avformat: remove AVFormatContext.ts_id
It's been replaced by a demuxer exported private option.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:32 -03:00
James Almer 823d60d55e avcodec/codec_par: Reorder AVCodecParameters fields
Move related fields closer together.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:31 -03:00
Andreas Rheinhardt 326c97dd38 avcodec/avcodec: Reorder AVCodecContext and AVSubtitleRect fields
Move related fields closer together and try to plug holes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
Andreas Rheinhardt 3e669b24e2 avutil/hwcontext: Allocate AVHWFramesCtx jointly with its internals
This is possible because the lifetime of these structures coincide.
It has the advantage of allowing to remove AVHWFramesInternal
from the public header; given that AVHWFramesInternal.priv is no more,
most accesses to AVHWFramesInternal are no more; indeed, the only
field accessed of it outside of hwcontext.c is the internal frame pool,
making this commit very simple.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
Andreas Rheinhardt a0b9b96269 avutil/hwcontext_internal: Remove unused AVHWFramesInternal.priv
It is no longer used by any hwcontext, as they all allocate
their private data together with their public data and access
it via AVHWFramesContext.hwctx.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
Andreas Rheinhardt 51d6bee667 avutil/hwcontext_d3d12va: Allocate pub and priv frames hwctx together
This is possible because the lifetime of both coincide.
Besides reducing the number of allocations this also simplifies
access to D3D12VAFramesContext as one no longer has to
go through AVHWFramesInternal.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
Andreas Rheinhardt dd397d05f1 avutil/hwcontext: Allocate AVHWDevCtx jointly with its internals
This is possible because the lifetime of these structures coincide.
It has the advantage of allowing to remove the AVHWDeviceInternal
from the public header; given that AVHWDeviceInternal.priv is no more,
all accesses to it happen in hwcontext.c, so that this commit moves
the joint structure there.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00