Commit Graph

5490 Commits

Author SHA1 Message Date
Brad Smith
dbfafe11ae configure: add initial RISC-V support
OpenBSD only supports riscv64 but this is an attempt at adding
some of the initial bits for RISC-V support.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-29 21:44:14 +02:00
Limin Wang
4e3ffc9c54 configure: add hls demuxer link dependencies
Fixes building with --disable-everything --enable-demuxer=hls

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-28 09:28:57 +08:00
James Almer
7a1976919c configure: export pkg-config includedir variable
Some packages may not define custom cflags, in which case a simple
"pkg-config --cflags" call will return an empty string.
This change will be useful to get a valid include path that can be
used in library checks.

Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-10-09 09:50:12 -03:00
Roman Arzumanyan
ed084161ba avfilter/sharpen_npp: add sharpening video filter with borders control
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-10-07 18:07:53 +02:00
Martin Storsjö
cb8dc600d2 configure: arm: Don't add -march= to the compiler if no preference was passed
If no --cpu= option was passed to configure, we detect what the
compiler defaults to. This detected value was then fed back to the
rest of the configure logic, as if it was an explicit choice.

This breaks on Ubuntu 21.10 with GCC 11.1.

Since GCC 8, it's possible to add configure extra features via the
-march option, like e.g. -march=armv7-a+neon. If the -mfpu= option
is configured to default to 'auto', the fpu setting gets taken
from the -march option.

GCC 11.1 in Ubuntu seems to be configured to use -mfpu=auto. This
has the effect of breaking any compilation command that specifies
-march=armv7-a, because the driver implicitly also adds -mfloat-abi=hard,
and that combination results in this error:

    cc1: error: ‘-mfloat-abi=hard’: selected processor lacks an FPU

One can compile successfully by passing e.g. -march=armv7-a+fp.

Therefore, restructure configure. If no specific preference was set
(and the 'cpu' configure variable was set as the output of
probe_arm_arch), the value we tried to set via -march= was the same
value that we just tried to detect as the compiler default.

So instead, just try to detect what the compiler defaults to, with
to allow setting other configure settings (such as 'fast_unaligned'),
but don't try to spell out the compiler's default via the -march flag.

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-09-21 14:04:28 +03:00
Timo Rothenpieler
06de593303 avfilter/frei0r: use win32dlfcn wrapper 2021-09-15 12:37:02 +02:00
Timo Rothenpieler
1d23e125b6 configure: account for openssl3 license change 2021-09-15 12:37:02 +02:00
Andreas Rheinhardt
a1292895cb configure: Remove null_bsf dependency
Unneeded since c96904f525
(a bsf-list with zero bsfs is used since that commit).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-14 13:36:19 +02:00
Paul B Mahol
94d4cc24c3 avfilter/af_asoftclip: rewrite oversampling
Fixes most aliasing issues.
2021-09-12 12:55:50 +02:00
James Almer
8a6beccf0d avformat: add an AV1 Low overhead bitstream format muxer
Suggested-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-01 19:55:30 -03:00
Paul B Mahol
376ac5b7a8 avfilter/vf_convolve: switch to TX FFT from avutil 2021-08-17 09:15:06 +02:00
Limin Wang
5f3df7afa6 avdevice/decklink: add sqd configuration option
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-08-16 10:00:39 +08:00
Jin Bo
903c5d58f0 configure: [loongson] adjust MMI check in configure
After standardizing the use of 'pxor' in commit 'ebedd26', FFmpeg
build failed with upstream compiler, for 'pxor' is not supported
in time. This patch helps to workaround the build failure by
checking whether 'pxor' is supported during configuration, if not,
MMI will be disabled.

Reviewed-by: yinshiyou-hf@loongson.cn
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-08-10 16:16:06 +02:00
Paul B Mahol
b3117f376d avfilter/vaf_spectrumsynth: switch to TX FFT from avutil 2021-08-04 10:04:58 +02:00
Paul B Mahol
a428d2a487 avfilter/af_afftfilt: switch to TX FFT from avutil 2021-08-04 09:35:06 +02:00
Paul B Mahol
ae94868a57 avfilter/avf_showfreqs: switch to TX FFT from avutil 2021-07-30 09:44:51 +02:00
Paul B Mahol
0068b3d0f0 avfilter/avf_showcqt: switch to TX FFT from avutil 2021-07-27 21:16:28 +02:00
Paul B Mahol
925d41ebd4 avfilter/af_afftdn: switch to TX FFT from avutil 2021-07-27 20:48:40 +02:00
Paul B Mahol
60e2348e27 configure: remove sofalizer triggering of avcodec dependency 2021-07-24 17:01:20 +02:00
Paul B Mahol
014ace8f98 avfilter/avf_showspectrum: switch to TX FFT from avutil 2021-07-24 16:49:53 +02:00
Paul B Mahol
88b6342c2b avfilter/af_headphone: switch to TX FFT from avutil 2021-07-24 12:24:40 +02:00
Paul B Mahol
f6aeb94d72 avfilter/af_sofalizer: switch to TX FFT from avutil 2021-07-24 12:24:40 +02:00
J. Dekker
9a727235fd lavu/checkasm: add (private) kperf timing for macOS
Signed-off-by: J. Dekker <jdek@itanimul.li>
2021-07-20 19:40:03 +02:00
James Almer
cdbf2fc3e4 configure: use the correct header for the fallback libxext check
Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-15 16:53:56 -03:00
James Almer
395d9ad00a configure: clean up and fix xlib checks
Split them into separate checks per library.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-15 15:44:46 -03:00
Timo Rothenpieler
7ec7e6aa2d configure: use pkg-config for xlib/Xv 2021-07-14 23:58:24 +02:00
Tobias Rapp
f531a1a4e8 fate/ffprobe: Verify ffprobe XML output against schema file
Adds schema validation for ffprobe XML output so that updating the
ffprobe.xsd file upon changes to ffprobe is not forgotten. This was
suggested by Marton Balint in:
http://ffmpeg.org/pipermail/ffmpeg-devel/2021-March/278428.html

The schema FATE test is only run if xmllint command is available.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2021-07-13 08:57:23 +02:00
Jan Ekström
f32f56468c {configure,avcodec/libx264}: remove separate x264_csp_bgr check
We already require X264_BUILD >= 118, which includes an unconditional
definition of X264_CSP_BGR in itself, thus making this check
effectively always true.
2021-07-12 12:07:10 +03:00
Jan Ekström
25d28f297b configure: move x264_csp_bgr check under general libx264 checks
This makes the libx264rgb check work when pkg-config is utilized
and x264.h is not part of the standard include path (as is often
with cross-compilation, or when you just have a custom prefix in
general in f.ex. your home directory).

The X264_BUILD >= 118 required by configure since 2011 should have
X264_CSP_BGR defined unconditionally (it was added a few X264_BUILD
updates earlier), but as 134cba728b
added this additional check, I have kept it for now.
2021-07-12 12:07:10 +03:00
Timo Rothenpieler
62dc5df941 avfilter/scale_cuda: add support for pixel format conversion 2021-06-25 01:44:30 +02:00
Timo Rothenpieler
072788c46e avfilter: compress CUDA PTX code if possible 2021-06-22 14:05:44 +02:00
Timo Rothenpieler
abe150c9de configure: msys also has .exe suffix 2021-06-22 14:04:50 +02:00
Michael Niedermayer
c067d20177 Update missed irc links
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-18 18:58:25 +02:00
Martin Storsjö
f9626d1065 ffbuild: Avoid using the --preprocessor argument to windres
Instead use --preprocessor-arg; in binutils 2.36, the --preprocessor
flag was changed so that it no longer accepts a string containing
multiple arguments, but the whole --preprocessor argument is
treated as the path to the preprocessor executable (where the path
can contain spaces).

It's currently unclear whether this behaviour will stay or if it
is going to be reverted in the future, see discussion at [1]. Just
to be safe, avoid using the --preprocessor argument. Don't redeclare
the full preprocessing command, but just add the $(CC_DEPFLAGS) options.

Based on a patch by Kyle Schwartz.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=27594

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-06-18 11:19:02 +03:00
Timo Rothenpieler
c67f354be8 configure: detect nvcc without sm_30 support
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-06-06 21:31:00 +02:00
Matthias Troffaes
13180968f8 configure: fix some filter dependencies
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2021-05-09 10:17:49 +02:00
Andreas Rheinhardt
8f588eea8e configure: Add missing mpegvideo dependency for IPU decoder
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-07 21:33:35 +02:00
Shiyou Yin
ab04fedaaa mips: Fix potential illegal instruction error.
MSA2 optimizations are attached to MSA macros in generic_macros_msa.h.
It's difficult to do runtime check for them. Remove this part of code
can make it more robust. H264 1080p decoding: 5.13x==>5.12x.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-07 17:53:23 +02:00
Guo, Yejun
41ef57fdb2 lavfi/dnn_classify: add filter dnn_classify for classification based on detection bounding boxes
classification is done on every detection bounding box in frame's side data,
which are the results of object detection (filter dnn_detect).

Please refer to commit log of dnn_detect for the material for detection,
and see below for classification.

- download material for classifcation:
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/emotions-recognition-retail-0003.bin
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/emotions-recognition-retail-0003.xml
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/emotions-recognition-retail-0003.label

- run command as:
./ffmpeg -i cici.jpg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:input=data:output=detection_out:confidence=0.6:labels=face-detection-adas-0001.label,dnn_classify=dnn_backend=openvino:model=emotions-recognition-retail-0003.xml:input=data:output=prob_emotion:confidence=0.3:labels=emotions-recognition-retail-0003.label:target=face,showinfo -f null -

We'll see the detect&classify result as below:
[Parsed_showinfo_2 @ 0x55b7d25e77c0]   side data - detection bounding boxes:
[Parsed_showinfo_2 @ 0x55b7d25e77c0] source: face-detection-adas-0001.xml, emotions-recognition-retail-0003.xml
[Parsed_showinfo_2 @ 0x55b7d25e77c0] index: 0,  region: (1005, 813) -> (1086, 905), label: face, confidence: 10000/10000.
[Parsed_showinfo_2 @ 0x55b7d25e77c0]            classify:  label: happy, confidence: 6757/10000.
[Parsed_showinfo_2 @ 0x55b7d25e77c0] index: 1,  region: (888, 839) -> (967, 926), label: face, confidence: 6917/10000.
[Parsed_showinfo_2 @ 0x55b7d25e77c0]            classify:  label: anger, confidence: 4320/10000.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-05-06 10:50:44 +08:00
Matthias C. M. Troffaes
ed409b8088 configure: dnn needs avformat
The source file "libavfilter/dnn/dnn_backend_native.h" includes
"libavformat/avio.h", so avformat needs to be declared as a dependency.
2021-05-06 10:33:58 +08:00
James Almer
036bb53ccc configure: fix vulkan dep for libglslang based filters
Temporary fix until the filters are updated.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-29 21:58:32 -03:00
Lynne
49e3a844ba
configure: add -lvulkan to libglslang's lib flags
Since libavutil no longer links to libvulkan but libavfilter's Vulkan
code wasn't ported yet to dynamically open the functions, do this
temporarily.
2021-04-30 00:52:43 +02:00
Lynne
cf17e2323f hwcontext_vulkan: dlopen libvulkan
While Vulkan itself went more or less the way it was expected to go,
libvulkan didn't quite solve all of the opengl loader issues. It's multi-vendor,
yes, but unfortunately, the code is Google/Khronos QUALITY, so suffers from
big static linking issues (static linking on anything but OSX is unsupported),
has bugs, and due to the prefix system used, there are 3 or so ways to type out
functions.

Just solve all of those problems by dlopening it. We even have nice emulation
for it on Windows.
2021-04-30 00:08:37 +02:00
Andreas Rheinhardt
a04ad248a0 avfilter: Constify all AVFilters
This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:05 -03:00
Andreas Rheinhardt
420cedd497 libavresample: Remove deprecated library
Deprecated in c29038f304.
The resample filter based upon this library has been removed as well.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt
7c1f347b18 avcodec: Remove deprecated old encode/decode APIs
Deprecated in commits 7fc329e2dd
and 31f6a4b4b8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Anton Khirnov
95054bfa48 Disable vf_uspp/mcdeint.
These filters depend on avcodec APIs that are to be removed. Some people
have expressed potential interest in updating these filters, so they are
merely disabled for now instead of being removed.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt
337f777f37 avcodec: Remove deprecated old aliases for NVENC encoders
Deprecated in 888a5c7947.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:05 -03:00
Guo, Yejun
aa9ffdaa1e lavfi: add filter dnn_detect for object detection
Below are the example steps to do object detection:

1. download and install l_openvino_toolkit_p_2021.1.110.tgz from
https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html
  or, we can get source code (tag 2021.1), build and install.
2. export LD_LIBRARY_PATH with openvino settings, for example:
.../deployment_tools/inference_engine/lib/intel64/:.../deployment_tools/inference_engine/external/tbb/lib/
3. rebuild ffmpeg from source code with configure option:
--enable-libopenvino
--extra-cflags='-I.../deployment_tools/inference_engine/include/'
--extra-ldflags='-L.../deployment_tools/inference_engine/lib/intel64'
4. download model files and test image
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.bin
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.xml
wget
https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.label
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/images/cici.jpg
5. run ffmpeg with:
./ffmpeg -i cici.jpg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:input=data:output=detection_out:confidence=0.6:labels=face-detection-adas-0001.label,showinfo -f null -

We'll see the detect result as below:
[Parsed_showinfo_1 @ 0x560c21ecbe40]   side data - detection bounding boxes:
[Parsed_showinfo_1 @ 0x560c21ecbe40] source: face-detection-adas-0001.xml
[Parsed_showinfo_1 @ 0x560c21ecbe40] index: 0,  region: (1005, 813) -> (1086, 905), label: face, confidence: 10000/10000.
[Parsed_showinfo_1 @ 0x560c21ecbe40] index: 1,  region: (888, 839) -> (967, 926), label: face, confidence: 6917/10000.

There are two faces detected with confidence 100% and 69.17%.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-04-17 17:27:02 +08:00
Gyan Doshi
36a5ae619a configure: select child muxers for rtp_mpegts 2021-03-21 15:50:23 +05:30
Hironori Bono
4892060f50 lavc/videotoolboxenc: Add support for HEVC with Alpha.
This change supports the "HEVC Video with Alpha" profile introduced in WWDC 2019
<https://developer.apple.com/videos/play/wwdc2019/506/>. (This change is a
partial fix for Ticket #7965.)

For example, the following command converts an animation PNG file to an HEVC
with Alpha video:
./ffmpeg -i fate-suite/apng/clock.png -c:v hevc_videotoolbox -allow_sw 1 -alpha_quality 0.75 -vtag hvc1 clock.mov

(This change uses the "HEVC Video with Alpha" profile only when the
'-alpha_quality' value is not 0 for backward compatibility.)

Signed-off-by: Hironori Bono <bouno@rouge.plala.or.jp>
2021-03-19 14:50:48 -04:00
Paul B Mahol
4098f809d6 libavformat: add librist protocol
This work is sponsored by Open Broadcast Systems.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2021-03-13 17:36:48 +01:00
parazyd
51367267c8 avformat/gopher: Add support for Gopher over TLS
This commit adds a "gophers" handler to the gopher protocol. gophers
is a community-adopted protocol that acts the same way like normal
gopher with the added TLS encapsulation.

The gophers protocol is supported by gopher servers like geomydae(8),
and clients like curl(1), clic(1), and hurl(1).

This commit also adds compilation guards to both gopher and gophers,
since now there are two protocols in the file it makes sense to
have this addition.

Signed-off-by: parazyd <parazyd@dyne.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-11 23:47:19 +01:00
parazyd
ed4c2e183b avformat/gopher: Add default_whitelist to ff_gopher_protocol
Signed-off-by: parazyd <parazyd@dyne.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-11 23:26:37 +01:00
Anton Khirnov
9e4225cf7f Handle AVID MJPEG streams directly in the MJPEG decoder.
AVID streams - currently handled by the AVRN decoder - can be (depending
on extradata contents) either MJPEG or raw video. To decode the MJPEG
variant, the AVRN decoder currently instantiates a MJPEG decoder
internally and forwards decoded frames to the caller (possibly after
cropping them).

This is suboptimal, because the AVRN decoder does not forward all the
features of the internal MJPEG decoder, such as direct rendering.
Handling such forwarding in a full and generic manner would be quite
hard, so it is simpler to just handle those streams in the MJPEG decoder
directly.

The AVRN decoder, which now handles only the raw streams, can now be
marked as supporting direct rendering.

This also removes the last remaining internal use of the obsolete
decoding API.
2021-02-25 11:46:28 +01:00
Andreas Rheinhardt
bb9167dbde avformat/isom: Split movaudio/movvideo tags off into a separate file
The NUT and avi demuxers only need ff_codec_movvideo_tags and so this
removes a dependency on the rest of isom.c as well as on mpeg4audio.c
(which isom depends on); it is similar for the Matroska demuxer and
muxers, except that the mpeg4audio.c dependency can't be avoided.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt
cff09fee1f configure: Remove mpegvideo_enc dependency from ljpeg encoder
It only existed because some code in mjpegenc_common.c relied on it;
yet said code was actually only used by mjpegenc.c and has been moved
there.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt
7bf2b76b41 configure, libavcodec/Makefile: Fix avrn dependencies
The avrn decoder actually only needs one thing: The MJPEG decoder.
Instead the Makefile made it compile mjpegdec and configure required
some of the prerequisites of the MJPEG decoder (exif and jpegtables).
Even if all the prerequisites of the MJPEG decoder were required, it
would still not make the MJPEG decoder usable, because for that
the MJPEG decoder needs to be in the list of codecs in codec_list.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt
3b26d030b5 configure, libavcodec/Makefile: Remove spurious CAF demuxer dependencies
Forgotten in 604fbb3132.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Matt Oliver
52cc323735 configure: use no-narrowing for cuda-llvm compilation
This fixes llvm compiler generating errors about narrowing conversion with
recent releases.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-02-22 17:07:30 +01:00
Paul B Mahol
67c8c863c7 avcodec: add initial exr image encoder 2021-02-18 13:00:40 +01:00
Andreas Rheinhardt
698a4b22d0 avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only user
The fixed-point AAC decoder is the only user of the fixed-point sinewin
tables from sinewin; and it only uses a few of them (about 10% when
counting by size). This means that guarding initializing these tables by
an AVOnce (as done in 3719122065) is
unnecessary for them. Furthermore the array of pointers to the
individual arrays is also unneeded.

Therefore this commit moves these tables directly into aacdec_fixed.c;
this is done by ridding the original sinewin.h and sinewin_tablegen.h
headers completely of any fixed-point code at the cost of a bit of
duplicated code (the alternative is an ugly ifdef-mess).

This saves about 58KB from the binary when using hardcoded tables (as
these tables are hardcoded in this scenario); when not using hardcoded
tables, most of these savings only affect the .bss segment, but the rest
(< 1KB) contains relocations (i.e. savings in .data.rel.ro).

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:28:29 +01:00
Limin Wang
9605307e78 avformat/mxf: add platform local tag
Please check the string of platform with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
application_platform: Lavf (linux)

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:06 +08:00
Reimar Döffinger
a16bcc13d9 configure: add fallback to $arch in msvc assembler check.
Setting the defaults for $arch happens only later, so
the current code would not set AS correctly if --arch
was not specified on the command-line.
Fix it by adding an explicit fallback to $arch_default.

Signed-off-by: Josh Dekker <josh@itanimul.li>
2021-01-25 09:09:00 +01:00
Derek Buitenhuis
e55a80da38 avcodec/librav1e: Pass through timestamps as opaque user data
avcodec has no facilities to generate timestamps properly from
output frame numbers (and it would be wrong for VFR anyway),
so pass through the timestamps using rav1e's opaque user data
feature, which was added in v0.4.0.

This bumps the minimum librav1e version to 0.4.0.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-01-17 14:49:46 +00:00
Lynne
63505fc60a
configure: update copyright year 2021-01-01 00:38:22 +01:00
Andreas Rheinhardt
eea2638e9a configure, libavcodec/speedhq: Fix compiling SpeedHQ encoder
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 12:06:04 +01:00
Lynne
53c56585a6
hwcontext_drm: make dependency on Linux kernel headers optional
This was introduced in version 4.6. And may not exist all without an
optional package. So to prevent a hard dependency on needing the Linux
kernel headers to compile, make this optional.

Also ignore the status of the ioctl, since it may fail on older kernels
which don't support it. It's okay to ignore as its not fatal and any
serious errors will be caught later by the mmap call.
2020-12-30 23:14:46 +01:00
Anton Khirnov
19ce064239 smvjpegdec: merge into mjpegdec
SMVJPEG stores frames as slices of a big JPEG image. The decoder is
implemented as a wrapper that instantiates a full internal MJPEG
decoder, then forwards the decoded frames with offset data pointers.
This is unnecessarily complex and fragile, not supporting useful decoder
capabilities like direct rendering.

Re-implement the decoder inside the MJPEG decoder, which is accomplished
by returning each decoded frame multiple times, setting cropping
information appropriately on each instance.

One peculiar aspect of the previous design is that since
- the smvjpeg decoder returns one frame per input packet
- there are multiple frames in each packets (the aformentioned slices)
the demuxer needs to return each packet multiple times.
This is now also eliminated - the demuxer now returns each packet
exactly once, with the duration set to the number of frames it decodes
to.

This also removes one of the last remaining internal uses of the old
video decoding API.
2020-12-10 10:07:09 +01:00
Andreas Rheinhardt
313e572440 avcodec/mss4: Don't duplicate standard JPEG tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:46 +01:00
Hendrik Leppkes
8f4aec719e avcodec/dxva2: add AV1 decode support
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2020-11-12 15:55:16 +01:00
Timo Rothenpieler
ac5b45abab avcodec/nvdec: add av1 hwaccel
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Co-authored-by: James Almer <jamrial@gmail.com>
2020-11-11 18:36:09 +01:00
Paul B Mahol
ee4a046540 avfilter/af_asoftclip: add oversampling support 2020-11-10 15:25:18 +01:00
Fei Wang
3308bbf776 avcodec: add av1 VAAPI decoder
Example cmdline:
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -v verbose \
-c:v av1 -i input.ivf -pix_fmt yuv420p -vsync passthrough -f md5     \
-y out.md5

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2020-11-02 22:57:23 +00:00
Timo Rothenpieler
0a31d57a56 configure: check for nvdec/cuvid AV1 support 2020-10-15 23:25:05 +02:00
Roman Arzumanyan
b23e6ae886 avcodec/cuviddec: add av1 support
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-15 21:20:40 +02:00
James Almer
e9521d9298 configure: add missing atsc_a53 dependencies to hevcparse and h264_parser
Found-by: Chris Miceli <chris@miceli.net.au>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-10-08 10:15:18 -03:00
hwren
c952db9d68 lavc,doc: add libuavs3d video decoder wrapper
Signed-off-by: hbj <hanbj@pku.edu.cn>
Signed-off-by: hwren <hwrenx@126.com>
2020-10-06 00:01:33 +08:00
Lynne
45070eec4c
libwavpackenc: remove libwavpackenc wrapper
The manual states "there is virtually no reason to use that encoder.".

It supports less sample formats than the native encoder, is less efficient
than the native encoder and is also slower and pretty much remains untested.
libwavpack also isn't being fuzzed, which given that we plug the parameters
without any sanitizing them looks concerning.
2020-10-02 17:43:15 +02:00
Haihao Xiang
cc25ae5d8a lavc/qsvdec: Add QSV AV1 decoder
AV1 decoder is supported on Tiger Lake+ platforms since libmfx 1.34

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2020-09-26 23:42:39 +08:00
Guo, Yejun
2003e32f62 dnn: change dnn interface to replace DNNData* with AVFrame*
Currently, every filter needs to provide code to transfer data from
AVFrame* to model input (DNNData*), and also from model output
(DNNData*) to AVFrame*. Actually, such transfer can be implemented
within DNN module, and so filter can focus on its own business logic.

DNN module also exports the function pointer pre_proc and post_proc
in struct DNNModel, just in case that a filter has its special logic
to transfer data between AVFrame* and DNNData*. The default implementation
within DNN module is used if the filter does not set pre/post_proc.
2020-09-21 21:26:56 +08:00
Fei Wang
47be5a5056 avcodec: add AV1 hardware accelerated decoder
This AV1 decoder is currently only used for hardware accelerated decoding.
It can be extended into a native decoder in the future, so set its name to
"av1" and temporarily give it the lowest priority in the codec list.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-09-12 13:08:34 -03:00
Shiyou Yin
5a844b638a configure: Fix msa can't be disabled when '--cpu=loongson3a' assigned.
There are compiler and runtime check for MSA and MMI.
Remove the redundant setting of MSA and MMI for cores specified by "--cpu".

Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-10 23:31:10 +02:00
Philip Langdale
98ea1a662e configure: Add additional glslang libraries to make linking work
The latest builds of glslang introduce new libraries that need to be
linked for all symbols to be fully resolved.

This change will break building against older installations of glslang
and it's very hard to tell them apart as the library change upstream
was not accompanied by any version bump and no official release has
been made with this change it - just lots of people packaging up git
snapshots. So, apologies in advance.
2020-09-07 13:18:00 -07:00
Paul B Mahol
7f95339319 avcodec: add MobiClip video decoder 2020-09-03 18:09:30 +02:00
Limin Wang
7e61940794 avformat/mpegtsenc: support DVB 6A descriptor for AC-3
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-08-23 07:19:11 +08:00
James Almer
0de01da1d2 avcodec: move ff_alloc_a53_sei() to atsc_53
Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-15 13:01:25 -03:00
James Almer
1ab3ae6fd5 avcodec/hevc_sei: use ff_parse_a53_cc() to parse A53 Closed Captions
Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-15 13:01:19 -03:00
James Almer
c93ba51ef3 avcodec/h264_sei: use ff_parse_a53_cc() to parse A53 Closed Captions
Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-15 13:01:13 -03:00
James Almer
6c1bf7c02e avcodec/libdav1d: add support for A53 Closed Captions
Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-15 13:01:08 -03:00
James Almer
1841921277 avcodec: split off A53 Closed Caption parsing code into its own file
Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-15 13:01:00 -03:00
Xu Guangxin
9a7bdb6d71 avformat/av1dec: add low-overhead bitstream format
It's defined in Section 5.2, used by netflix.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-14 00:02:13 -03:00
Mark Thompson
ef934dba2d kmsgrab: Use GetFB2 if available
The most useful feature here is the ability to automatically extract the
framebuffer format and modifiers.  It also makes support for multi-plane
framebuffers possible, though none are added to the format table in this
patch.

This requires libdrm 2.4.101 (from April 2020) to build, so it includes a
configure check to allow compatibility with existing distributions.  Even
with libdrm support, it still won't do anything at runtime if you are
running Linux < 5.7 (before June 2020).
2020-08-09 20:18:48 +01:00
Mark Thompson
30a4bdbc1f libsvtav1: Rename without a _
The external library is called libsvtav1, so use this name everywhere.
2020-07-31 22:30:35 +01:00
Daryl Seah
0e20dee5c2 avcodec: Add an SVT-AV1 encoder wrapper
Signed-off-by: Daryl Seah <daryl.seah@intel.com>
Signed-off-by: Jing SUN <jing.a.sun@intel.com>
Signed-off-by: ZhiZhen Tang <zhizhen.tang@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-29 17:11:26 -03:00
Jiaxun Yang
d57d6def73 ffbuild: Refine MIPS handling
To enable runtime detection for MIPS, we need to refine ffbuild
part to support buildding these feature together.

Firstly, we fixed configure, let it probe native ability of toolchain
to decide wether a feature can to be enabled, also clearly marked
the conflictions between loongson2 & loongson3 and Release 6 & rest.

Secondly, we compile MMI and MSA C sources with their own flags to ensure
their flags won't pollute the whole program and generate illegal code.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-23 16:30:02 +02:00
Milos Zivkovic
c4e0868243 avdevice/decklink_dec: add support for extracting and outputing klv from vanc
Signed-off-by: Milos Zivkovic <zivkovic@teralogics.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-07-03 00:24:59 +02:00
Kyle Swanson
4979afdb85 configure: remove libvmaf from EXTERNAL_LIBRARY_VERSION3_LIST
since libvmaf v1.5.1, libvmaf has been relicensed as BSD+Patent

Signed-off-by: Kyle Swanson <k@ylo.ph>
2020-07-02 12:56:02 -07:00
Guo, Yejun
ff37ebaf30 dnn: add openvino as one of dnn backend
OpenVINO is a Deep Learning Deployment Toolkit at
https://github.com/openvinotoolkit/openvino, it supports CPU, GPU
and heterogeneous plugins to accelerate deep learning inferencing.

Please refer to https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md
to build openvino (c library is built at the same time). Please add
option -DENABLE_MKL_DNN=ON for cmake to enable CPU path. The header
files and libraries are installed to /usr/local/deployment_tools/inference_engine/
with default options on my system.

To build FFmpeg with openvion, take my system as an example, run with:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/deployment_tools/inference_engine/lib/intel64/:/usr/local/deployment_tools/inference_engine/external/tbb/lib/
$ ../ffmpeg/configure --enable-libopenvino --extra-cflags=-I/usr/local/deployment_tools/inference_engine/include/ --extra-ldflags=-L/usr/local/deployment_tools/inference_engine/lib/intel64
$ make

Here are the features provided by OpenVINO inference engine:
- support more DNN model formats
It supports TensorFlow, Caffe, ONNX, MXNet and Kaldi by converting them
into OpenVINO format with a python script. And torth model
can be first converted into ONNX and then to OpenVINO format.

see the script at https://github.com/openvinotoolkit/openvino/tree/master/model-optimizer/mo.py
which also does some optimization at model level.

- optimize at inference stage
It optimizes for X86 CPUs with SSE, AVX etc.

It also optimizes based on OpenCL for Intel GPUs.
(only Intel GPU supported becuase Intel OpenCL extension is used for optimization)

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2020-07-02 09:36:34 +08:00
Thilo Borgmann
b737575c76 lavdevice: Add AudioToolbox output device. 2020-06-15 15:09:33 +02:00