1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

111296 Commits

Author SHA1 Message Date
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
Paul B Mahol
024c30aa3b avcodec/exr: remove wrong scaling for 32bit DWA compression 2023-06-08 12:08:01 +02:00
Zhao Zhili
b7e79ba395 avformat/mov: decrease probe score for a random tag
The tag comes from samples/ffmpeg/mov/unrecognized/bartjones.mov
really looks like some random data. Now the random tag matched
another file, which isn't a mov.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 11:16:46 +08:00
Zhao Zhili
32a749c7a6 avfilter/dnn_backend_openvino: fix log message
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:44 +08:00
Zhao Zhili
6220252f42 configure: add pkg-config check for libopenvino
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:37 +08:00
Zhao Zhili
3a5d95e3fa avfilter/dnn_backend_tf: silence implicit cast warning
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:24 +08:00
Zhao Zhili
b0c0fedcda avfilter/dnn_backend_tf: fix use of uninitialized value
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:24 +08:00
Zhao Zhili
d9f41a343e avfilter/dnn_backend_tf: check TF_OperationOutputType return value
This also fixed a warning: implicit conversion from enumeration
type 'TF_DataType' (aka 'enum TF_DataType') to different
enumeration type 'DNNDataType'.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:24 +08:00
Zhao Zhili
f3495ef4f8 avfilter/dnn_backend_tf: remove unused define
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:23 +08:00
Zhao Zhili
e67af9e7f7 avfilter/vf_dnn_processing: replace magic number by enum value
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:23 +08:00
Zhao Zhili
e7e80e2083 avfilter/vf_dnn_detect: replace magic number by enum value
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:23 +08:00
Zhao Zhili
a887bc4ff1 avfilter/vf_dnn_classify: replace magic number by enum value
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:23 +08:00
Zhao Zhili
016f2f61c3 avfilter/dnn: add log context to ff_get_dnn_module
Print backend type when failed.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-06-08 10:50:23 +08:00