1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

111108 Commits

Author SHA1 Message Date
Anton Khirnov
593e8c2c6a lavc/binkaudio: reset input packet on errors
Make sure we don't repeatedly try to decode the same packet, making no
progress and possibly causing an infinite loop.
2023-06-17 18:06:33 +02:00
Armin Hasitzka
f2349e7e62 avformat/hls: Forward stream metadata from subdemuxer
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-06-17 18:06:33 +02:00
James Almer
dbc4c22890 avcodec/evc_parse: add missing includes
Fixes make checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 12:43:15 -03:00
James Almer
be91c5c80d configure: fix evc related dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:16:45 -03:00
James Almer
f24064e627 avcodec/evc_frame_merge_bsf: free EVCFMergeContext on flush and close
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
b1d0b59d81 avcodec/evc_frame_merge_bsf: check for av_memdup() failure
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
9fc1d9adc8 avcodec/evc_parse: make freeing EVCParserContext buffers a shared function
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
46a9be01b8 avcodec/evc_parse: free pps struct on parsing failure
Prevents future checks for their presence from succeeding.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
811460f5c2 avcodec/evc_parse: use the correct sps when parsing slice headers
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
44f26315c8 avcodec/evc_parse: use a local EVCParserSliceHeader when parsing slices
There's no need to store EVC_MAX_PPS_COUNT amount of slice headers in EVCParserContext.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
57879b23bc avcodec/evc_parse: zero sps, pps and sh structs
Otherwise stale values may remain in place.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:54 -03:00
James Almer
da2af70ffa avcodec/evc_parser: export framerate to the AVCodecContext
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-17 10:08:53 -03:00
Timo Rothenpieler
16fdb48e0d avcodec/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE 2023-06-16 22:10:42 +02:00
Timo Rothenpieler
6c418ae25e Revert "lavc/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE"
The implementation is flawed in that the frame opaque data is not in
fact correctly reordered along with the packets, but is being output in
packet input order, just like the dts are.

This reverts commit 3553809703.
2023-06-16 22:10:42 +02:00
Philip Langdale
73a2252f1d avfilter/vf_bwdif_cuda: CUDA accelerated bwdif deinterlacer
I've been sitting on this for 3 1/2 years now(!), and I finally got
around to fixing the loose ends and convincing myself that it was
correct. It follows the same basic structure as yadif_cuda, including
leaving out the edge handling, to avoid expensive branching.
2023-06-16 12:52:32 -07:00
Philip Langdale
3c07c2489d avfilter/scale_cuda: add support for rgb32/bgr32 conversions
As we are introducing two new formats and supporting conversions
between them, and also with the existing 0rgb32/0bgr32 formats, we get
a combinatorial explosion of kernels. I introduced a few new macros to
keep the things mostly managable.

The conversions are all simple, following existing patterns, with four
specific exceptions. When converting from 0rgb32/0bgr32 to rgb32/bgr32,
we need to ensure the alpha value is set to 1. In all other cases, it
can just be passed through, either to be used or ignored.
2023-06-16 10:40:21 -07:00
James Almer
f42df8384a avcodec/evc_parse: use the correct struct size when allocating pps
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-16 10:08:32 -03:00
James Almer
d00f0eebbd avcodec/evc_parser: remove superfluous memset calls
The entire EVCParserContext will be zeroed during allocation.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-16 09:57:35 -03:00
James Almer
a734fa92c8 avformat/evcdec: set the demuxer as AVFMT_NOTIMESTAMPS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-16 09:57:35 -03:00
Paul B Mahol
12a073f72c avfilter/buffersrc: stop passing AV_NOPTS_VALUE on EOF 2023-06-16 11:46:09 +02:00
Anton Khirnov
4abf42ab96 lavfi/graphparser: be more verbose when filtergraph parsing fails
When an option could not be found, print its name and value. Note that
this is not done while applying the options in
avfilter_graph_segment_apply_opts() to give the caller the option of
handling the missing options in some other way.
2023-06-16 08:07:02 +02:00
Lynne
ca818ab51c
vulkan_h264: filter out constrained/inter flags from the profile index
As the comment says, Vulkan signals all the constrant_set flags,
and does not want them OR'd onto the profile IDC.
So just unset them.
2023-06-15 22:00:42 +02:00
Dave Airlie
6964a97f91
vulkan/av1: fix filling out global motion params. 2023-06-15 22:00:41 +02:00
Lynne
d0f1d937fe
hwcontext_vulkan: free temporary array once unneeded
Fixes a small memory leak.
This also prevents leaks on malloc/mutex init errors.
2023-06-15 22:00:41 +02:00
Lynne
b4d5baa8b0
hwcontext_vulkan: call ff_vk_uninit() on device uninit
This fixes three memory leaks from ff_vk_load_props().
2023-06-15 22:00:41 +02:00
Lynne
f30b979ca2
pthread_frame: uninit the hwaccel of each frame thread
The issue is that with a threadsafe hwaccel and multiple enabled
frame threads, hwaccel->uninit() is never called.
Previously, the function was guaranteed to never have any threads
with hwaccel contexts, so it never bothered to uninit any.
2023-06-15 22:00:40 +02:00
Philip Langdale
41be6a5593 lavu/hwcontext_cuda: declare support for rgb32/bgr32
nvenc declares support for these formats, but if hwcontext_cuda doesn't
do that as well, then it's not possible to hwupload them for use in a
possible cuda pipeline before encoding.
2023-06-15 12:29:52 -07:00
Philip Langdale
ecc3f158e1 avfilter/vf_yadif_cuda: remove unnecessary private struct fields
I'm not sure why I originally did this, but there's no good reason to
put pointers to the cuda context and stream in the priv struct. They
are directly available in the device context that is already being
stored there.
2023-06-15 12:29:52 -07:00
Paul B Mahol
21f6496cce avcodec/bink: make two tables use uint8_t type 2023-06-15 18:14:12 +02:00
James Almer
81b4e4abb0 avformt/version: bump minor after evc muxer and demuxer additions
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-15 11:44:37 -03:00
James Almer
77c5c74375 avcodec/version: bump minor after evc parser and frame_merge bsf additions
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-15 11:44:04 -03:00
Dawid Kozinski
2997691558 avcodec/evc: Changes in MAINTAINERS file
- MAINTAINERS update

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 11:41:25 -03:00
Dawid Kozinski
7b15f1780f avcodec/evc: Changes in Changelog file
- Changelog update

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:57:41 -03:00
Dawid Kozinski
091705cd55 avformat/mov_demuxer: Extended MOV demuxer to handle EVC video content
- Added evc extension to the list of extensions for ff_mov_demuxer

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:57:41 -03:00
Dawid Kozinski
a04ca05f4c avformat/mov_muxer: Extended MOV muxer to handle EVC video content
- Changes in mov_write_video_tag function to handle EVC elementary stream
- Provided structure EVCDecoderConfigurationRecord that specifies the decoder configuration information for ISO/IEC 23094-1 video content

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:57:41 -03:00
Dawid Kozinski
ab2671c5f2 avformat/evc_demuxer: Added demuxer to handle reading EVC video files
- Provided AVInputFormat struct describing EVC input format (ff_evc_demuxer)

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:57:35 -03:00
Dawid Kozinski
3069a8fe3c avformat/evc_muxer: Added muxer to handle writing EVC encoded data into file or output bytestream
- Provided AVOutputFormat structure describing EVC output format (ff_evc_muxer)
- Added documentation for EVC muxer

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:51:13 -03:00
Dawid Kozinski
34e4f18360 avcodec/evc_parser: Added parser implementation for EVC format
- Added constants definitions for EVC parser
- Provided NAL units parsing following ISO_IEC_23094-1
- EVC parser registration

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2023-06-15 09:51:04 -03:00
Gyan Doshi
41229ef705 doc/muxers: harmonize option presentation in hls
No surrounding option has the '-' prefix.
2023-06-15 15:07:05 +05:30
Timo Rothenpieler
ac7c265b33 Revert "avcodec/nvenc: fix b-frame DTS behavior with fractional framerates"
This reverts commit 9a245bdf5d.

This commit basically broke all samples with fractional framerates,
rather than fixing them.
I at this point do not understand the original issue anymore, and I'm
not sure how this slipped my initial testing.
All my test samples must have happened to have a simple timebase.

The actual dts values pretty much always are just a simple chain of
1,2,3,4,5,... Or maybe slightly bigger steps. Each increase by one means
an advance in time by one unit of the timebase.
So a fractional framerate/timebase is already not an issue.

So with this patch applied, the calculation might end up substracting
huge values (1001 is a common one) from the dts, which would be an
offset of that many frames, not of that many fractions of a second.
This broke at least muxing into mp4, if the sample happened to have a
fractional framerate.

I do not thing the original issue this patch tried to fix existed in the
first place, so it can be reverted without further consequences.
2023-06-15 00:59:02 +02:00
Paul B Mahol
cfcd6e2108 avcodec/proresdec2: remove duplicated function 2023-06-14 12:04:15 +02:00
Niklas Haas
d26ea03f60 lavfi/vf_libplacebo: fix typo in assert
Not caught because av_assert1 was compiled out on my end.
2023-06-13 15:28:32 +02:00
Paul B Mahol
2d59ca0a66 avcodec: add VMX1 decoder 2023-06-12 23:43:05 +02:00
Dave Airlie
3b0ed2365c vulkan/h264: set non-existing flag for invalid gaps
This flag is used to indicate to the hw frames in the gaps,
vaapi constructs it from a bunch of implicit API information
around surface ids. vulkan should just send it explicitly.

Reviewed-by: Lynne <dev@lynne.ee>
2023-06-12 22:13:45 +02:00
Zhao Zhili
1460acc2ac avformat/hlsenc: fix CODECS attribute of H.264
1. Add avcc extradata support.
2. Add non-standard annexb support with 0 0 1 as prefix for SPS.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-12 20:09:33 +08:00
Michael Niedermayer
09621fd7d9
avformat/jpegxl_probe: Forward error codes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-06-11 21:11:39 -04:00
Michael Niedermayer
1ec4553e35
avformat/jpegxl_probe: check length instead of blindly reading
Enable the checked bitreader to avoid overread.
Also add a few checks in loops and between blocks so we exit instead of continued
execution.
Alternatively we could add manual checks so that no overread can happen. This would be
slightly faster but a bit more work and a bit more fragile

Fixes: Out of array accesses
Fixes: 59640/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-6584117345779712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-06-11 21:11:21 -04:00
Michael Niedermayer
25c937c0e0
avformat/jpegxl_probe: Remove intermediate macro obfuscation around get_bits*()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-06-11 21:11:02 -04:00
Martin Storsjö
d78bffbf3d libavutil: Add version bump for new aarch64 cpu flags
This was missed in 397cb623c8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-06-10 00:21:58 +03:00
Paul B Mahol
18b2ecc247 avcodec/wavarc: add 5elp mode support 2023-06-09 17:05:26 +02:00