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

7043 Commits

Author SHA1 Message Date
Ruiling Song
649d7ca477 lavfi: make vf_colorspace use functions from colorspace.c
These functions are shared among colorspace related filters.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:25 +01:00
Ruiling Song
8b8b0e2cd2 lavfi: add opencl tonemap filter
This filter does HDR(HDR10/HLG) to SDR conversion with tone-mapping.

An example command to use this filter with vaapi codecs:
FFMPEG -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device \
opencl=ocl@va -hwaccel vaapi -hwaccel_device va -hwaccel_output_format \
vaapi -i INPUT -filter_hw_device ocl -filter_complex \
'[0:v]hwmap,tonemap_opencl=t=bt2020:tonemap=linear:format=p010[x1]; \
[x1]hwmap=derive_device=vaapi:reverse=1' -c:v hevc_vaapi -profile 2 OUTPUT

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:18 +01:00
Danil Iashchenko
714da1fd89 lavfi: Add boxblur_opencl filter
Behaves like existing boxblur filter.
2018-06-21 00:31:42 +01:00
Danil Iashchenko
b41b6b3234 libavfilter/opencl: Add macro for setting opencl kernel arguments 2018-06-17 17:58:17 +01:00
Jun Zhao
483532bc72 lavfi/graphdump: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
9809ac98bd lavfi/af_amerge: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Pavel Koshevoy
29cddc99cd lavfi/atempo: raise max tempo limit (v2) 2018-06-14 19:19:17 -06:00
Sergey Lavrushkin
648361c2fa libavfilter/dnn_interface.c: fix av_freep dnn_module.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-08 10:26:08 -03:00
Sergey Lavrushkin
d29c35b4d8 libavfilter/vf_srcnn.c: adds DNN module backend AVOption, changes AV_LOG_INFO message to AV_LOG_VERBOSE.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-08 10:26:08 -03:00
Jun Zhao
3161df5b0c lavfi/opencl: remove redundant header.
remove redundant header

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-07 19:38:58 +08:00
Sergey Lavrushkin
d8c0bbb0aa Adds TensorFlow backend for dnn inference module.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-05 10:16:50 -03:00
Vishwanath Dixit
37abfe8c2d avfilter/drawtext: present 'hms' formatted 'pts' in 24h format
HMS is formatted as HH:MM:SS.mmm, but, HH part is not limited to
24 hours. For example, the the drawn text may look like this:
243029:20:30.342. To present the timestamp in more readable and
user friendly format, this patch provides an additional option
to limit the hour part in the range 0-23.

Note: Actually the above required format can be obtained with
format options 'localtime' and 'gmtime', but,  milliseconds part
is not supported in those formats.
2018-06-04 10:57:45 +05:30
Paul B Mahol
29e0879b29 avfilter/f_drawgraph: fix drawing of first point for non-first metadata key
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 18:50:04 +02:00
Paul B Mahol
9832885386 avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Fixes #7242.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 14:57:25 +02:00
Paul B Mahol
49eda27c6e avfilter/avf_showspectrum: also show sample rate and channel layout
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:43:43 +02:00
Paul B Mahol
9add1786ad avfilter/avf_showspectrum: avoid overwritting text
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:26:43 +02:00
Paul B Mahol
d0bf1aa3c5 avfilter/avf_showspectrum: improve axes drawing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:06:35 +02:00
Paul B Mahol
af31084399 avfilter/vf_lut3d: unbreak haldclut with planar rgb formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-02 19:16:22 +02:00
Jan Ekström
76daf4529b lavfi/Makefile: move dnn_*.o under vf_srcnn
These files depend on libavformat, and the vf_srcnn filter
currently is the only thing utilizing these dnn_* files and
already happens to have a dependency on libavformat.

This fixes compilation in cases where libavformat is not a
dependency for libavfilter.

Reported by Kam_ on IRC.
2018-06-02 19:00:57 +03:00
Paul B Mahol
e28b1fa6e9 avfilter: add adeclick and adeclip audio filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-02 13:09:06 +02:00
John Cox
8d4fc2ea06 avfilter: use av_clip_uintp2_c where clip is variable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-31 16:22:59 +02:00
Paul B Mahol
1aa5192451 avfilter/af_aiir: draw IR frequency response
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-30 17:26:08 +02:00
Paul B Mahol
d0e740b8fb avfilter/af_afir: fix picking of IR channel
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-30 12:30:24 +02:00
Paul B Mahol
73438dbbbc avfilter/af_afir: draw IR frequency response
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-29 21:57:42 +02:00
Sergey Lavrushkin
bdf1bbdbb4 Adds dnn inference module for simple convolutional networks. Reimplements srcnn filter based on it.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-05-29 10:02:30 -03:00
James Almer
79126ce80e avfilter/vsrc_testsrc: fix a preprocessor check
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-18 17:42:57 -03:00
Tobias Rapp
eb28b5ec8a avfilter/vsrc_testsrc: add pal75bars and pal100bars video filter sources
Generates color bar test patterns based on EBU PAL recommendations.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-05-18 15:39:54 +02:00
Paul B Mahol
e9dd5b4f5e avfilter/vf_waveform: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-18 13:15:09 +02:00
Paul B Mahol
4e816b5491 avfilter: add aderivative and aintegral filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-16 12:20:38 +02:00
Paul B Mahol
2bde38c0ab avfilter/vf_lut2: add timeline support to tlut2 filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 18:26:16 +02:00
Paul B Mahol
a27cab9eca avfilter/vf_blend: add timeline support to tblend filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 18:08:35 +02:00
Paul B Mahol
80b474875e avfilter/vf_srcnn: use function to get number of threads
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 16:04:33 +02:00
Paul B Mahol
e3a697eda3 avfilter/vf_amplify: check if array is availabe before using it
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 16:04:33 +02:00
Paul B Mahol
1c2e5fc454 avfilter/vf_maskedmerge: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-12 15:46:28 +02:00
Paul B Mahol
9b6f8fb25d avfilter/vf_deblock: add timeline support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-12 12:34:02 +02:00
Paul B Mahol
974eb4aaaa avfilter: add fftdnoiz filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-10 14:44:17 +02:00
Jun Zhao
74a7ddd985 lavfi/tests/filtfmts: fix the build warning.
fix the build warning: ignoring return value.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-10 19:28:51 +08:00
Timo Rothenpieler
1c15d26615 avfilter/vf_hwupload_cuda: update supported pix_fmts 2018-05-10 00:34:22 +02:00
Hendrik Leppkes
8007a86363 lavfi/vf_srcnn: use avio_check instead of access
The filter uses avio for file access already, and avio_check is
portable.

Fixes trac #7192.
2018-05-08 17:52:33 +02:00
Clément Bœsch
1eb4e731fc lavfi/swaprect: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT 2018-05-08 12:47:38 +02:00
Clément Bœsch
8d6354aa82 lavfi/nlmeans: use AV_CEIL_RSHIFT instead of deprecated FF_CEIL_RSHIFT 2018-05-08 12:47:38 +02:00
Clément Bœsch
e6114d21ac lavfi/nlmeans: inline integral patch value function
This prevents redundant position computation and make the code faster
(1.1x faster overall).
2018-05-08 10:28:06 +02:00
Clément Bœsch
4278f79ef6 lavfi/nlmeans: use unsigned for the integral patch value
This value can not be negative.
2018-05-08 10:28:06 +02:00
Clément Bœsch
de956198a9 lavfi/nlmeans: reorder memory accesses in get_integral_patch_value
This doesn't seem to make much of a difference but it can't hurt.
2018-05-08 10:28:06 +02:00
Clément Bœsch
34e1e53e28 lavfi/nlmeans: move final weighted averaging out of nlmeans_plane
This helps figuring out where the filter is slow:

  70.53%  ffmpeg_g  ffmpeg_g          [.] nlmeans_slice
  25.73%  ffmpeg_g  ffmpeg_g          [.] compute_safe_ssd_integral_image_c
   1.74%  ffmpeg_g  ffmpeg_g          [.] compute_unsafe_ssd_integral_image
   0.82%  ffmpeg_g  ffmpeg_g          [.] ff_mjpeg_decode_sos
   0.51%  ffmpeg_g  [unknown]         [k] 0xffffffff91800a80
   0.24%  ffmpeg_g  ffmpeg_g          [.] weight_averages

(Tested with a large image that takes several seconds to process)

Since this function is irrelevant speed wise, the file's TODO is
updated.
2018-05-08 10:28:06 +02:00
Clément Bœsch
667503ef68 lavfi/nlmeans: switch from double to float
Overall speed appears to be 1.1x faster with no noticeable quality
impact.
2018-05-08 10:28:06 +02:00
Clément Bœsch
43d16aef63 lavfi/nlmeans: make compute_safe_ssd_integral_image_c faster
before:  ssd_integral_image_c: 49204.6
after:   ssd_integral_image_c: 44272.8

Unrolling by 4 made the biggest difference on odroid-c2 (aarch64);
unrolling by 2 or 8 both raised 46k cycles vs 44k for 4.

Additionally, this is a much better reference when writing SIMD (SIMD
vectorization will just target 16 instead of 4).
2018-05-08 10:28:06 +02:00
Clément Bœsch
5a71bce371 lavfi/nlmeans: add AArch64 SIMD for compute_safe_ssd_integral_image
ssd_integral_image_c: 49204.6
ssd_integral_image_neon: 28346.8
2018-05-08 10:28:06 +02:00
Clément Bœsch
5ba14f4f1a lavfi/nlmeans: use ptrdiff_t for linesizes
Similarly to previous commit, this will help writing SIMD code by not
having manual zero-extension in SIMD code
2018-05-08 10:28:06 +02:00
Clément Bœsch
26f02c51ce lavfi/nlmeans: add SIMD-friendly assumptions for compute_safe_ssd_integral_image
SIMD code will not have to deal with padding itself. Overwriting in that
function may have been possible but involve large overreading of the
sources. Instead, we simply make sure the width to process is always a
multiple of 16. Additionally, there must be some actual area to process
so the SIMD code can have its boundary checks after processing the first
pixels.
2018-05-08 10:28:06 +02:00