Commit Graph

104985 Commits

Author SHA1 Message Date
rcombs
b7e1ec7bda lavu/videotoolbox: expose routine to set CVPixelBufferRef metadata 2021-12-22 18:43:17 -06:00
rcombs
69bd95dcd8 lavu/videotoolbox: expose conversion routines for color parameters
Also fixes symbol lookup errors on older macOS when built with a newer SDK,
introduced in 6cab5206b0
2021-12-22 18:42:51 -06:00
rcombs
9a890e49b6 lavc/proresdec: fix threaded hwaccel decode 2021-12-22 18:38:40 -06:00
rcombs
0e7684e554 FATE: always pass -nostdin to ffmpeg
This avoids making terminal config changes that may not be reverted properly
during parallel testing.
2021-12-22 18:38:40 -06:00
rcombs
18192166e7 lavc/videotoolboxenc: add ProRes support 2021-12-22 18:38:40 -06:00
rcombs
88d804b7ff swscale: add P210/P410/P216/P416 output 2021-12-22 18:38:40 -06:00
rcombs
310a1c25e8 lavc/Makefile: fix missing hevc_videotoolbox case 2021-12-22 18:38:40 -06:00
rcombs
2bb5edc38c lavc/videotoolboxenc: add handling for non-NAL-based codecs 2021-12-22 18:38:40 -06:00
rcombs
30539394bb lavc/videotoolboxenc: vastly simplify get_cv_pixel_info
No longer requires per-format switch cases.

The frame==0 path was unused (and would've crashed anyway).
2021-12-22 18:38:40 -06:00
rcombs
c8323350f4 lavc/videotoolboxenc: config-gate ATSC CC support 2021-12-22 18:38:40 -06:00
rcombs
7644c6224f lavc/videotoolboxenc: fix RGB support 2021-12-22 18:38:40 -06:00
rcombs
e55db79612 lavc/videotoolboxenc: detect alpha more generically
Fixes support for alpha in hardware input frames
2021-12-22 18:38:40 -06:00
rcombs
2acb13cb93 lavc/videotoolboxenc: don't access int64_t member as int 2021-12-22 18:38:40 -06:00
rcombs
028a6ed1a1 lavc/videotoolboxenc: use common routine for pixfmt conversion 2021-12-22 18:38:40 -06:00
James Almer
131dbb9a7a ffprobe: add missing separator when printing side data in compact output
Should fix ticket #7153

Signed-off-by: James Almer <jamrial@gmail.com>
2021-12-22 09:41:13 -03:00
Gerard Sole
18ad360648 libavformat: add side_data copy in concat demuxer
Adds support for concat demuxer to copy the side data information
from the input file to the resulting file. It will behave like the
metadata copy, where the metadata of the first file is kept in the
the output file.

Extract the current code that already performs the stream side_data
copy into a separate method and reuse the method in the concat demuxer.

Signed-off-by: Gerard Sole <g.sole.ca@gmail.com>
2021-12-22 12:05:41 +01:00
Limin Wang
2ac8bcec63 avcodec/v210enc: suppport frame thread for v210
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-22 09:27:30 +08:00
Limin Wang
8ecd7cdb46 avcodec/rawenc: suppport frame thread for rawvideo
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-22 09:27:30 +08:00
Limin Wang
0e1f5f8871 fate: use single thread for rawvideo
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-22 09:27:30 +08:00
James Almer
e1d3ef9217 avutil/tests/cpu: add slowgather
Signed-off-by: James Almer <jamrial@gmail.com>
2021-12-21 17:52:09 -03:00
James Almer
e68e379e0c avutil/cpu: add slowgather to av_parse_cpu_caps()
Signed-off-by: James Almer <jamrial@gmail.com>
2021-12-21 17:51:27 -03:00
James Almer
8c2d2fd6cc avutil/cpu: move slow gather checks below in the function
Put them together with other similar slow flag checks.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-12-21 17:51:17 -03:00
Alan Kelly
eebe406c80 libswscale: Test AV_CPU_FLAG_SLOW_GATHER for hscale functions.
This is instead of EXTERNAL_AVX2_FAST so that the avx2 hscale functions
are only used where they are faster.
2021-12-21 17:44:53 -03:00
Alan Kelly
ffbab99f2c libavutil/cpu: Add AV_CPU_FLAG_SLOW_GATHER.
This flag is set on Haswell and earlier and all AMD cpus.
2021-12-21 17:44:44 -03:00
Lynne
14b6805eb2
configure: improve non-pkgconfig Vulkan version check
Check for the patch version as well as the major+minor version.

The VK_API_VERSION macros are not usable in preprocessor code due
to casts.
The patch (header) version is meant to linearly increment and
not be reset, however it's better to trust, but verify.
2021-12-21 15:28:50 +01:00
Lynne
fa2e460f63
configure: autodetect vulkan 2021-12-21 12:30:10 +01:00
Andreas Rheinhardt
155dcfe2e2 avcodec/libx264: Don't unnecessarily add in-band extradata
The check here is meant to check for whether avcintra-class option
(default value -1) has been set; yet it checks for the x264_param_t
value where 0 is the default value (treated as "no avcintra-mode"
by x264). This meant that in-band extradata has been added unnecessarily
when using global headers; furthermore, the first output packet
had two x264 SEIs.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-21 08:35:05 +01:00
John-Paul Stewart
50bfd5e96e avformat/mvdec: explicitly set duration
Resolves a warning that duration is being innaccurately estimated based
on bitrate.

Signed-off-by: John-Paul Stewart <jpstewart@personalprojects.net>
Reviewed-by: Peter Ross <pross@xvid.org>
2021-12-21 12:01:22 +11:00
John-Paul Stewart
3c9ffbd009 avformat/mvdec: read frame rate from data stream
Prior to this patch, for version 2 of the file format the frame rate was
hard-coded at 15 fps.  This uses the 64-bit floating-point value from
the data stream, similar to what is already done for version 3 of the
file format (around line 206).

Signed-off-by: John-Paul Stewart <jpstewart@personalprojects.net>
Reviewed-by: Peter Ross <pross@xvid.org>
2021-12-21 12:01:17 +11:00
Henrik Gramner
15cfb4eee3 checkasm: Use the correct AVTXContext in av_tx tests
Keep a reference to the correct associated context of the reference
function and use that context when calling the reference function.
2021-12-20 23:58:05 +01:00
U. Artie Eoff
cde2efb5da MAINTAINERS: Add Haihao Xiang for vaapi
Current listed maintainers for vaapi plugin are
not reponsive and/or currently active in the
ffmpeg community.  Thus, vaapi plugin patches
(and qsv plugin) have generally gone ignored or
lost in the ether for too long.

Remove Gwenole Beauchesne from vaapi maintainer
who has not been active since 2016.

Current alternative maintainer for vaapi is Mark
Thompson whom has not been active since
March/April 2021.

Therefore, add Haihao Xiang to vaapi maintainer
who's primary role is FFmpeg development with a
focus on the vaapi and qsv plugins.  Haihao has
over a decade of media experience and many years
of FFmpeg development experience, amongst other
media frameworks.

The additional patch for adding Haihao as qsv
plugin maintainer has been submitted previously:

https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210608141134.27448-1-zhongli_dev@126.com/

This will help FFmpeg to continue to be the leading
multimedia framework by allowing these plugins to be
actively improved, enhanced, and maintained for existing
and future HW platforms.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2021-12-20 14:31:57 -08:00
Zhao Zhili
278068dc60 avutil/display: fix inverted doc
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-20 21:29:42 +01:00
Zhao Zhili
35420ab7fd build: simplify rules for metal
Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-12-20 12:05:39 -08:00
Zhao Zhili
3c56b9c597 build: add .metal to vpath to fix build error
Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-12-20 12:05:07 -08:00
Zhong Li
c47896536c MAINTAINERS: Add Haihao Xiang for qsv
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-12-20 23:36:07 +08:00
Andreas Rheinhardt
16b1df7541 avformat/wvenc: Make init function out of write_header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-20 14:29:01 +01:00
Andreas Rheinhardt
ba27e248cf avformat/crcenc: Make init function out of write_header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-20 14:29:01 +01:00
Andreas Rheinhardt
631e31773b avformat/sdp: Fix use of uninitialised value
Fixes Coverity ticket #1495831.
Regression since fe31708eaa.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-20 02:37:08 +01:00
Aman Karmani
9c590b76f4 avutil: add objc.h to SKIPHEADERS
Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-12-19 09:41:16 -08:00
Aman Karmani
11aa9ca153 configure: fix metal detection and respect explicit disable
Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-12-19 08:29:00 -08:00
Haihao Xiang
bbe9faa01c lavc/qsvenc: dump parameters for mjpeg encoding in verbose mode
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-12-19 22:25:31 +08:00
Haihao Xiang
45801af11f lavc/qsvenc: dump parameters for VP9 encoding in verbose mode
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-12-19 22:16:39 +08:00
Haihao Xiang
2544f709ba lavc/qsvenc: add VP9 profiles
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-12-19 22:16:21 +08:00
Haihao Xiang
50c38e1a44 lavc/qsvenc: define profile array per codec
The SDK defines HEVC, VP9 and AV1 profiles in the same values
e.g.
MFX_PROFILE_HEVC_MAIN             =1,
MFX_PROFILE_VP9_0                 =1,
MFX_PROFILE_AV1_MAIN              =1,

To avoid potential errors when adding VP9, AV1 profiles later,
this patch defines profile array per codec.

Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-12-19 22:14:51 +08:00
Haihao Xiang
3857ecbe70 lavc/qsvenc: remove VC1 profiles
The SDK doesn't support VC1 encoding. In addition, both
MFX_PROFILE_VC1_SIMPLE and MFX_PROFILE_HEVC_MAIN are 1 in the SDK, HEVC
main profile is recognized as simple profile in the verbose output if
don't remove VC1 profiles.

$ ffmpeg -v verbose -qsv_device /dev/dri/renderD129 -f lavfi -i
yuvtestsrc -c:v hevc_qsv -f null -

[hevc_qsv @ 0x55bdf7eb4eb0] profile: simple; level: 21

Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-12-19 22:13:58 +08:00
Andreas Rheinhardt
98f87c3d29 avcodec/ffv1dec: Don't copy unused field
The decoder always uses AVCodecContext.bits_per_raw_sample.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:18:47 +01:00
Andreas Rheinhardt
485121b92c avcodec/ffv1, ffv1dec: Add const where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:18:07 +01:00
Andreas Rheinhardt
17605d1a4a avcodec/ffv1dec: Remove redundant writes, fix races
Every modification of the data that is copied in update_thread_context()
is a data race if it happens after ff_thread_finish_setup. ffv1dec's
update_thread_context() simply uses memcpy for updating the new context,
so that every modification of the src's context is a race.
Some of these modifications are unnecessary: picture_number is write-only
for the decoder and cur will be reset when decoding the next frame anyway.
So remove them. And while just at it, also don't set cur for the slice
contexts as this variable is write-only.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:14:39 +01:00
Sebastian Kirmayer
dfd06ee710 avutil/twofish: Fixed decryption
The previous implementation swapped the two halves of the plaintext. The
existing tests only decrypted data with a plaintext of all zeroes, which is
not affected by swapping the halves. Tests which detect the old buggy behavior
have been added.

Signed-off-by: Sebastian Kirmayer <ffmpeg@kirmayer.eu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:02:59 +01:00
Andreas Rheinhardt
bb69b734c7 avformat/mxfenc: Avoid allocation for timecode track
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:01:47 +01:00