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

104520 Commits

Author SHA1 Message Date
Lynne
296cb99d46
hwcontext_vulkan: fix CreateSemaphore conflict with synchapi.h
Include windows.h to fix it. Normally, it'd be better to include it in
vulkan_functions.h, but I'm reasonably confident nothing else that uses
the Vulkan code will need to include Windows functions and not windows.h.
2021-11-12 14:45:20 +01:00
Lynne
57e11321ea
hwcontext_vulkan: use vkDeviceWaitIdle instead of vkWaitSemaphores on uninit
To silence a possible validation layer bug, switch the function. It only gets
triggered by vf_libplacebo, which is odd.
2021-11-12 14:45:17 +01:00
Limin Wang
ec6187b05b avfilter/src_movie: make the number of decode thread configurable
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-12 17:23:01 +08:00
Lynne
511096c3a0
doc/APIchanges: fix typos and correct a date 2021-11-12 07:53:02 +01:00
Lynne
8478d60d5b
doc/APIchanges: update for Vulkan API changes 2021-11-12 05:23:41 +01:00
Lynne
f705e9ea05
lavfi/vulkan: refactor, fix and fully implement multiple queues 2021-11-12 05:23:41 +01:00
Lynne
246f841b53
lavfi/glslang: migrate to the C API and robustify library detection
Finally, this is as close to usable as it gets for glslang.
Much faster to compile as well, and eliminates the need for a C++
compiler, which is great.
Also, changes to the resource limits won't break users, as we
can use designated initializers in C90.
2021-11-12 05:23:41 +01:00
Lynne
fef85c376a
lavfi/vulkan: use libavutil's vulkan loader
This finally fully eliminates the need to statically link to libvulkan!
2021-11-12 05:23:40 +01:00
Lynne
d05a18cdc7
lavu: move hwcontext_vulkan's function loader into separate files
This allows for the loader to be shared with libavcodec and libavfilter.
2021-11-12 05:23:40 +01:00
Lynne
1ffb59c056
hwcontext_vulkan: clean up extensions code and add additional defaults 2021-11-12 05:23:40 +01:00
Lynne
bde1fc5386
hwcontext_vulkan: host wait on semaphores before freeing frame 2021-11-12 05:23:39 +01:00
Lynne
f7f1613638
hwcontext_vulkan: report device that's used
Not sure why this wasn't done before.
2021-11-12 05:23:39 +01:00
Lynne
6bf9a6539e
vulkan: add support for encode and decode queues and refactor queue code
This simplifies and makes queue family picking simpler and more robust.
The requirements on the device context are relaxed. They made no sense
in the first place.

The video encode/decode extension is still in beta, at least on paper,
but I really doubt they'd change needing a separate queue family.
2021-11-12 05:23:36 +01:00
Lynne
dfc61800a2
lavfi/vulkan: port to using timeline semaphores 2021-11-12 03:36:46 +01:00
Lynne
09e4687b5b
hwcontext_vulkan: port CUDA interop to use timeline semaphores 2021-11-12 03:36:44 +01:00
Lynne
0370a580dc
hwcontext_vulkan: fix mapping from/to DRM/VAAPI frames 2021-11-12 03:36:42 +01:00
Lynne
00ef53c3ea
hwcontext_vulkan: switch to using timeline semaphores 2021-11-12 03:36:40 +01:00
Lynne
7f3878828d
hwcontext_vulkan: bump required Vulkan loader version to 1.2 2021-11-12 03:36:35 +01:00
Paul B Mahol
047c362d3c avfilter/vf_nlmeans: add x86 SIMD 2021-11-11 21:54:46 +01:00
Paul B Mahol
aebdffb9c5 avfilter/vf_estdif: allow to change two more options 2021-11-11 21:54:40 +01:00
Paul B Mahol
946493eb3e avcodec/mlpdec: cover case when >2 channels are in single substream
Previously it was assumed that all >2 channels streams have >1 substreams.
2021-11-11 21:54:32 +01:00
Limin Wang
afcf226b33 avfilter/af_atilt: use ff_filter_execute()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-11 21:54:17 +01:00
Zhao Zhili
9fd2b39428 avutil/opt: handle whole range of int64_t in av_opt_get_int
Make get_int/set_int symetric. The int64_t to double to int64_t
conversion is unprecise for large value.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-11 13:14:58 +01:00
Andreas Rheinhardt
44c65c6cc0 fftools/ffmpeg_opt: Fix copyinkf option name in warning message
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-10 15:20:12 +01:00
Andreas Rheinhardt
945b2dcc63 avformat/hls_sample_encryption: Fix precedence
Fixes Coverity ticket #1492869.

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:44:17 +01:00
Andreas Rheinhardt
ddd701fbbf avcodec/speexdec: Remove dead code
Fixes Coverity issue #1492840.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:44:14 +01:00
Andreas Rheinhardt
b59138b681 avcodec/libx264: Simplify copying packet data
x264.h: "the payloads of all output NALs are guaranteed to be
sequential in memory." Therefore we can omit the loop.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:42:42 +01:00
Andreas Rheinhardt
19ed9236db avcodec/libx264: Remove always-false checks
Always false since this encoder was switched to encode2 and
ff_alloc_packet() in 06484d0b8a
and f2b20b7a8b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:42:27 +01:00
Andreas Rheinhardt
6f1130be78 avcodec/libx264: Check for overflow if necessary
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:42:27 +01:00
Andreas Rheinhardt
e5199eebb4 avformat/apngenc: Use UINT16_MAX instead of USHRT_MAX
The latter needn't be 16 bits.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:40:36 +01:00
songyutong
8a969e1280 avcodec/videotoolboxenc: fix pixel buffer memory leak
In function vtenc_populate_extradata(), there is a manually created
pixel buffer that has not been released. So we should use CVPixelBufferRelease
to release this pixel buffer at the end, otherwise will cause a memory leak.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2021-11-09 07:14:39 -05:00
Paul B Mahol
a13646639f avfilter/vf_estdif: do some clip calculations only once in loop 2021-11-09 09:49:40 +01:00
Paul B Mahol
dcf83fd59d avfilter/vf_estdif: export distance cost as filter option 2021-11-09 09:49:39 +01:00
Paul B Mahol
45dc668aea avfilter/f_reverse: readjust frame timestamps for areverse 2021-11-07 20:47:21 +01:00
Paul B Mahol
0370c3e3d4 avfilter/af_adelay: use outlink where applicable 2021-11-07 20:47:21 +01:00
Andreas Rheinhardt
cd03a180cb avcodec/mjpegdec: Use AVCodecInternal.in_pkt for buffer packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:46:55 +01:00
Andreas Rheinhardt
7c5ee237be avcodec/libdav1d: Use av_memdup() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:38:22 +01:00
Andreas Rheinhardt
31d0487ba2 avcodec/libdav1d: Use AVCodecInternal.in_pkt instead of stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:34:33 +01:00
Andreas Rheinhardt
776e9f9e2a avcodec/libdav1d: Don't leak side-data-only packets
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:32:52 +01:00
Andreas Rheinhardt
ba91b8b685 avcodec/cuviddec: Use AVCodecInternal.in_pkt instead of stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:27:13 +01:00
Andreas Rheinhardt
9b851c4b92 avcodec/crystalhd: Use AVCodecInternal.in_pkt instead of stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:26:41 +01:00
Andreas Rheinhardt
e353300622 avcodec/binkaudio: Use AVCodecInternal.in_pkt for buffer packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:26:09 +01:00
Andreas Rheinhardt
ffdda740fe avcodec/internal: Allow receive_frame codecs to use decode_simple pkt
Decoders implementing the receive_frame API currently mostly use
stack packets to temporarily hold the packet they receive from
ff_decode_get_packet(). This role directly parallels the role of
in_pkt, the spare packet used in decode_simple_internal for the
decoders implementing the traditional decoding API. Said packet
is unused by the generic code for the decoders implementing the
receive_frame API, so allow them to use it to fulfill the function
it already fulfills for the traditional API for both APIs.

There is only one caveat in this: The packet is automatically
unreferenced in avcodec_flush_buffers(). But this is actually
positive as it means the decoders don't have to do this themselves
(in case the packet is preserved between receive_frame calls).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:12:58 +01:00
Andreas Rheinhardt
9139dc6140 avformat/matroskadec: Don't unnecessarily reduce aspect ratio
Fixes ticket #9497.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 15:38:03 +01:00
Alex Shumsky
1728127e8c avformat/mpegtsenc: do not include adaptation field in teletext TS packets
From ETSI EN 300 472 V1.3.1 (2003-05) Specification for conveying ITU-R System
B Teletext in DVB bitstreams:

4.1 Transport Stream (TS) packet format
The standard TS packet syntax and semantics are followed, noting the following
constraint:
- adaptation_field_control only the values "01" and "10" are permitted.

Some set top boxes (Motorola, Arris, Zyxel) refuse non-conforming packets.

Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-11-06 20:35:39 +01:00
Maksym Veremeyenko
a085418303 avformat/mpegtsenc: fix first_pcr initial update
Commit 6f36eb0da7 claim it fixes endless loop on
package generation if muxrate specified and copyts used. But actually it does
not work properly if -mpegts_copyts 1 is specified:

ffmpeg -y -copyts -i loewe.ts -c:v libx264 -x264opts nal-hrd=cbr:force-cfr=1 -b:v 3500k -minrate 3500k -maxrate 3500k -bufsize 1000k  -c:a mp2 -f mpegts -mpegts_copyts 1 -muxrate 4500k -vframes 1000 test.ts

ffmpeg generate huge file until it reach zero-based pcr value equal to first dts.

Attached patch fixes it.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-11-06 20:35:19 +01:00
Brad Isbell
9d4989f2e1 avdevice/dshow: Fix missing PCM sample size option when it is used as the lone option for DirectShow audio capture
Signed-off-by: Brad Isbell <brad@audiopump.co>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-05 22:58:43 +01:00
Brad Isbell
d9a9b4c877 avdevice/dshow: Use WAVEFORMATEX from AM_MEDIA_TYPE for describing device capabilities. (Fixes #9420)
Signed-off-by: Brad Isbell <brad@audiopump.co>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-05 22:58:42 +01:00
Zhao Zhili
7370f1f4c9 doc/muxers: note on Apple's version LHLS for lhls option 2021-11-05 15:34:30 -03:00
Zhao Zhili
a0f9650046 avformat/dashenc: enabling streaming and hls_playlist for lhls
Try to make the feature easier to use, especially since the user
have enabled -strict experimental manually. The user shouldn't
be surprised that hls_playlist is enabled for lhls automatically,
so change the log level from warning to info for that.
2021-11-05 15:32:11 -03:00