Commit Graph

5303 Commits

Author SHA1 Message Date
Michael Niedermayer d5e7f01090 avfilter/vf_geq: Relicense to LGPL
All authors who have code in this under GPL agreed.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00
Martin Storsjö 0f50be625f fate: Add an option for disabling the 2k/4k tests
When testing on a memory limited system, these tests consume a
significant amount of memory and can often fail if testing by running
multiple processes in parallel.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-17 10:22:29 +02:00
Xinpeng Sun 2e2dfe6673 avfilter: Add tonemap vaapi filter for H2S
It performs HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion
with tone-mapping. It only supports HDR10 as input temporarily.

An example command to use this filter with vaapi codecs:
FFMPEG -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi \
-i INPUT -vf 'tonemap_vaapi=format=p010' -c:v hevc_vaapi -profile 2 OUTPUT

Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Zachary Zhou <zachary.zhou@intel.com>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-12-17 07:49:49 +08:00
Martin Storsjö 06ec9c4746 configure: Check for the SetDllDirectory and GetModuleHandle functions
These functions aren't available when building for the restricted
UWP/WinRT/WinStore API subsets.

Normally when building in this mode, one is probably only building
the libraries, but being able to build ffmpeg.exe still is useful
(and a ffmpeg.exe targeting these API subsets still can be run
e.g. in wine, for testing).

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-13 10:53:05 +02:00
macweng e3c732bb0c configure: add OPENSSL_init_ssl check if pkg-config fail
fix when pkg-config fail and openssl > 1.1.0 --enable-openssl fail,
the root cause is check_lib can't found the SSL_library_init().

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: macweng <macweng@tencent.com>
2019-12-11 14:46:53 +08:00
Paul B Mahol ed58f8475f avcodec: add mvha video decoder 2019-11-27 23:54:20 +01:00
Oleg Dobkin 32ba563cfc avutil/hwcontext_cuda: allow using primary CUDA device context
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-11-26 16:24:40 +01:00
Carl Eugen Hoyos ce8faea9fd configure: Add fft dependency for showspatial filter.
Mentioned in ticket #8378.
2019-11-17 23:29:23 +01:00
Carl Eugen Hoyos 8038a87d49 configure: Add fft dependency for headphone filter.
Mentioned in ticket #8378.
2019-11-17 23:24:38 +01:00
James Almer cc61466058 avformat: add an AV1 Annex B demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-12 22:21:51 -03:00
James Almer 72ec3358f4 avcodec: add an AV1 frame merge bitstream filter
This BSF takes Temporal Units split across different AVPackets and merges them
by looking for Temporal Delimiter OBUs.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-12 22:21:25 -03:00
Derek Buitenhuis d8bf24459b avcodec: Add librav1e encoder
Port to the new send/receive API by: James Almer <jamrial@gmail.com>.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-11-10 13:55:39 +00:00
Lou Logan 5896411437 configure: select missing rdft for several filters
afir, sinc, superequalizer, surround

For afir fft is replaced with rdft as:
rdft_select="fft"

Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-08 09:37:31 -09:00
Guo, Yejun 4d980a8ceb avfilter/vf_dnn_processing: add a generic filter for image proccessing with dnn networks
This filter accepts all the dnn networks which do image processing.
Currently, frame with formats rgb24 and bgr24 are supported. Other
formats such as gray and YUV will be supported next. The dnn network
can accept data in float32 or uint8 format. And the dnn network can
change frame size.

The following is a python script to halve the value of the first
channel of the pixel. It demos how to setup and execute dnn model
with python+tensorflow. It also generates .pb file which will be
used by ffmpeg.

import tensorflow as tf
import numpy as np
import imageio
in_img = imageio.imread('in.bmp')
in_img = in_img.astype(np.float32)/255.0
in_data = in_img[np.newaxis, :]
filter_data = np.array([0.5, 0, 0, 0, 1., 0, 0, 0, 1.]).reshape(1,1,3,3).astype(np.float32)
filter = tf.Variable(filter_data)
x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
y = tf.nn.conv2d(x, filter, strides=[1, 1, 1, 1], padding='VALID', name='dnn_out')
sess=tf.Session()
sess.run(tf.global_variables_initializer())
output = sess.run(y, feed_dict={x: in_data})
graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
tf.train.write_graph(graph_def, '.', 'halve_first_channel.pb', as_text=False)
output = output * 255.0
output = output.astype(np.uint8)
imageio.imsave("out.bmp", np.squeeze(output))

To do the same thing with ffmpeg:
- generate halve_first_channel.pb with the above script
- generate halve_first_channel.model with tools/python/convert.py
- try with following commands
  ./ffmpeg -i input.jpg -vf dnn_processing=model=halve_first_channel.model:input=dnn_in:output=dnn_out:fmt=rgb24:dnn_backend=native -y out.native.png
  ./ffmpeg -i input.jpg -vf dnn_processing=model=halve_first_channel.pb:input=dnn_in:output=dnn_out:fmt=rgb24:dnn_backend=tensorflow -y out.tf.png

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-11-07 15:46:00 -03:00
Lou Logan 0663f0e0da configure: select mdct for dca encoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-06 09:49:59 -09:00
Lou Logan 121326d7b8 configure: select bswapdsp for ylc decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:40:27 -09:00
Lou Logan c69ade947a configure: select fft for qdmc decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:40:27 -09:00
Lou Logan 16503a933d configure: select bswapdsp for mdec decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:40:08 -09:00
Lou Logan 04e23e027e configure: select bswapdsp for imm4 decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:38:52 -09:00
Lou Logan 1c7e661adb configure: select audiodsp for acelp_kelvin decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:10:11 -09:00
Lou Logan e8e788da97 configure: select mdct for atrac3al decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:06:22 -09:00
Lou Logan e5511bc1bd configure: select mdct & sinewin for atrac3pal decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:01:45 -09:00
Lou Logan 16ccafad95 configure: select riffdec for act demuxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Lou Logan 132bc8817e configure: select jpegtables for rtp muxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Zhong Li 33583803e1 lavc/qsvenc: enable vp9 encoder
1. must enable low_power mode since just VDENC can be supported by iHD
driver right now
2. Coding option1 and extra_data are not supported by MSDK
3. IVF header will be inserted in MSDK by default, but it is not needed
for FFmpeg, so disable it.

Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-11-03 16:45:35 +08:00
Lou Logan 881f083a16 configure: fix standalone compilation of mxf muxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2019-10-30 11:10:00 -08:00
ManojGuptaBonda 1054752c56 Add support for VP9 VDPAU hwaccel decode
Support for VDPAU accelerated VP9 decoding was added with libvdpau-1.3.
Support for the same in ffmpeg is added with this patch. Profiles
related to VDPAU VP9 can be found in latest vdpau.h present in
libvdpau-1.3. DRC clips are not supported yet due to
http://trac.ffmpeg.org/ticket/8068

Add VP9 VDPAU to list of hwaccels and supported formats
Added file vdpau_vp9.c and Modified configure to add VDPAU VP9 support.
Mapped VP9 profiles to VDPAU VP9 profiles. Populated the codec specific
params that need to be passed to VDPAU.

Signed-off-by: Philip Langdale <philipl@overt.org>
2019-10-26 09:57:01 -07:00
Hendrik Leppkes 4e759b5675 configure: check for a sufficiently recent enough AMF version
Due to the recent addition of Vulkan support to AMF, we require more
recent headers that include the new structures, which have been
available since AMF 1.4.9 released in September 2018.

Fixes Ticket #8125
2019-09-09 09:56:12 +02:00
Jun Zhao 43b3412631 configure: fix --disable-v4l2-m2m can't work
Use the command ./configure with/without --disable-v4l2-m2m test.

Reviewed-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-05 18:55:09 +08:00
Jun Zhao da6e569916 configure: fix --disable-alsa can't work
fix --disable-alsa can't work in configure

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-05 18:54:53 +08:00
Aman Gupta 7eb465e185 configure: ensure --enable-omx-rpi uses rpi-specific IL headers
When compiling natively on an RPI where libomxil-bellagio-dev
was also installed, `check_headers OMX_Core.h` succeeded and
the -isystem compiler flag was never added to the build.

For non-native builds, the error message now mentions the
raspberrypi/firmware repository where the RPI specific
headers are available.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-03 10:58:24 -07:00
Andriy Gelman ef43a4d6b3 avformat: Add ZeroMQ as a protocol
When ffmpeg was streaming, multiple clients were only supported by using a
multicast destination address. An alternative was to stream to a server which
re-distributes the content. This commit adds ZeroMQ as a protocol, which allows
multiple clients to connect to a single ffmpeg instance.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-02 23:08:43 +02:00
Andrey Semashev 7ea2710ec4 configure: Update libmysofa check with a new symbol.
The current code in libavfilter/af_sofalizer.c requires
mysofa_neighborhood_init_withstepdefine function, which only appeared
in libmysofa 0.7. Use this function in configure script to bail out
early if a too old libmysofa is found in the system instead of failing
at compile time.
2019-09-02 19:06:24 +02:00
Nick Renieris c31c708929 lavc/tiff: Decode embedded JPEGs in DNG images
Used a technique similar to lavc/tdsc.c for invoking the MJPEG decoder.

This commit adds support for:
- DNG tiles
- DNG tile huffman lossless JPEG decoding
- DNG 8-bpp ("packed" as dcraw calls it) decoding
- DNG color scaling [1]
  - LinearizationTable tag
  - BlackLevel tag

[1]: As specified in the DNG Specification - Chapter 5

Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02 09:26:52 +02:00
Paul B Mahol 7c0b3ba7dd avcodec: add IMM5 decoder 2019-08-29 21:04:54 +02:00
Aman Gupta 59e651c052 configure: fix --enable-omx compile on raspberry pi
Many ffmpeg + rpi compilation guides on the internet recommend
using `./configure --enable-omx --enable-omx-rpi`. This fails
to find the IL OMX headers on device because the omx require_headers
check happens first before the add_cflags in omx_rpi.

A workaround is to use `./configure --enable-omx-rpi` only, since
omx_rpi already implies omx. But because many users expect to use
existing scripts and commands, we swap the order here so omx_rpi
special cases are applied first.

In the past this wasn't an issue because users noticed the OMX_Core.h
missing error and installed libomxil-bellagio-dev. But since
76c82843cc, the rpi specific headers from /opt/vc/include/IL
are required.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-08-29 08:52:37 -07:00
Jarek Samic b29c7bcbf6 lavfi: add deshake_opencl filter 2019-08-23 00:56:13 +01:00
Zhong Li 655ff4708b lavc/qsvdec: Add VP9 decoder support
VP9 decoder is support on Intel kabyLake+ platforms with MSDK Version 1.19+

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-08-20 13:34:04 +08:00
Zhong Li 7555cfd29b lavc/qsvdec: Add mjpeg decoder support
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-08-20 13:34:04 +08:00
Zhong Li 0dfcfc5096 lavc/qsvdec: remove orignal parser code since not needed now
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-08-20 13:34:03 +08:00
James Almer 03ba386833 avcodec/libdav1d: allow setting frame size limit in pixels
Signed-off-by: James Almer <jamrial@gmail.com>
2019-08-14 22:01:05 -03:00
Limin Wang 391b67fcb5 lavc/videotoolboxenc: add hdr10, linear, hlg color transfer function for videotoolboxenc
Below is the testing ffmpeg command for the setting:
./ffmpeg -i input.ts -c:v hevc_videotoolbox -color_primaries bt2020 -colorspace bt2020_ncl -color_trc smpte2084 smpte2048.ts
./ffmpeg -i input.ts -c:v hevc_videotoolbox -color_primaries bt2020 -colorspace bt2020_ncl -color_trc linear linear.ts
./ffmpeg -i input.ts -c:v hevc_videotoolbox -color_primaries bt2020 -colorspace bt2020_ncl -color_trc arib-std-b67 hlg.ts

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
2019-08-11 10:52:15 -04:00
Ricardo Constantino 5ac28e9cc1 configure: cuda_llvm: fix include path for MSYS2
MSYS2 converts paths to MinGW-based applications from unix to
pseudo-windows paths on execution time.
Since there was no space between '-include' and the path, MSYS2 doesn't
detect the path properly.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-08-05 22:54:39 +02:00
Rodger Combs 01994c93db build: add support for building CUDA files with clang
This avoids using the CUDA SDK at all; instead, we provide a minimal
reimplementation of the basic functionality that lavfi actually uses.
It generates very similar code to what NVCC produces.

The header contains no implementation code derived from the SDK.
The function and type declarations are derived from the SDK only to the
extent required to build a compatible implementation. This is generally
accepted to qualify as fair use.

Because this option does not require the proprietary SDK, it does not require
the "--enable-nonfree" flag in configure.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-08-04 19:08:08 +02:00
Shiyou Yin a45e8ade2d avutil/mips: optimize UNPCK&SAD macros with MSA2.0 instruction.
Loongson 3A4000 and 2k1000 has supported MSA2.0.
This patch optimized SAD_UB2_UH,UNPCK_R_SH_SW,UNPCK_SB_SH and UNPCK_SH_SW with MSA2.0 instruction.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-07-10 12:54:57 +02:00
Andreas Rheinhardt f83b46e218 configure, cbs_h2645: Remove unneeded golomb dependency
This has been forgotten in 44cde38c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-07-08 22:59:41 +01:00
Alexander Strasser 99147312ce configure: print_in_columns: Replace pr with awk
Get rid of pr dependency and write the columns strictly
alphabetical without page size considerations (POSIX
specifies 66 lines as default).

Setting the page size via pr's -l option was considered,
but as there is issue #5680 which wants to avoid pr
mainly because it's not in busybox, we chose to replace
pr instead.

Before pr would attempt to write pages, thus if a page
boundary was reached, the output looked confusing as one
couldn't see there was a new page and the alphabetical
order was disrupted when scanning down one of the columns.

This change is based on a shell implementation submitted
before by Yejun.

Possible differences to the current version using pr:
1. pr implementations should truncate items to not overflow columns;
   depending on how it's done not truncating shall be better IMHO.
2. pr implementations might balance columns differently;
   we use minimum number of lines and might end up not
   using all columns or might have lesser entries in the
   last column(s)
3. we use spaces only for padding the columns; at least the GNU pr
   version on my system also by default stuffs in tabs in addition
   to a single space in between columns. I don't see that this
   behaviour is demanded by POSIX, though I might be very well
   overlooking things. Anyway for our use case I can't see a need
   for having the additional tabs, or why it would be better compared
   to padding with spaces only.

Fixes output for sizes with width < column width, too.

Fixes remaining part of ticket #5680

Contributor: Guo, Yejun <yejun.guo@intel.com>
2019-06-24 23:25:56 +02:00
James Almer f66bd0e8de configure: add missing dnn dependency to derain filter
Signed-off-by: James Almer <jamrial@gmail.com>
2019-06-12 10:27:35 -03:00
Peter Ross 43dbdee264 VP4 video decoder 2019-06-12 20:06:20 +10:00
Ruiling Song 1d74150a7d lavfi/opencl: add nlmeans_opencl filter
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-05-24 15:09:22 +08:00