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

10263 Commits

Author SHA1 Message Date
Paul B Mahol
fe85afbf8c avfilter/af_afftdn: use better approach for gain smoothing 2022-04-23 23:05:51 +02:00
Jan Ekström
eae3b84189 libavfilter/version: bump minor version for icc{gen,detect}
Missed during that patch set's life time.
2022-04-23 23:07:26 +03:00
Niklas Haas
2cb0cebd11 lavfi: add vf_iccdetect for parsing ICC profiles
This filter is designed to parse embedded ICC profiles and attempt
extracting colorspace tags from them, updating the AVFrame metadata
accordingly.

This is intentionally made a separate filter, rather than being part of
libavcodec itself, so that it's an opt-in behavior for the time being.
This also gives the user more flexibility to e.g. first attach an ICC
profile and then also set the colorspace tags from it.

This makes #9673 possible, though not automatic.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas
5cfeaeef0c lavfi: add vf_iccgen for generating ICC profiles
This filter is designed to specifically cover the task of generating ICC
profiles (and attaching them to output frames) on demand. Other tasks,
such as ICC profile loading/stripping, or ICC profile application, are
better left to separate filters (or included into e.g. vf_setparams).

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas
b9a25963f7 lavfi: add ICC profile support via lcms2
This introduces an optional dependency on lcms2 into FFmpeg. lcms2 is a
widely used library for ICC profile handling, which apart from being
used in almost all major image processing programs and video players,
has also been deployed in browsers. As such, it's both widely available
and well-tested.

Add a few helpers to cover our major use cases. This commit merely
introduces the helpers (and configure check), even though nothing uses
them yet.

It's worth pointing out that the reason the cmsToneCurves for each
AVCOL_TRC are cached inside the context, is because constructing a
cmsToneCurve requires evaluating the curve at 4096 (by default) grid
points and constructing a LUT. So, we ideally only want to do this once
per curve. This matters for e.g. ff_icc_profile_detect_transfer, which
essentially compares a profile against all of these generated LUTs.
Re-generating the LUTs for every iteration would be unnecessarily
wasteful.

The same consideration does not apply to e.g. cmsCreate*Profile, which
is a very lightweight operation just involving struct allocation and
setting a few pointers.

The cutoff value of 0.01 was determined by experimentation. The lowest
"false positive" delta I saw in practice was 0.13, and the largest
"false negative" delta was 0.0008. So a value of 0.01 sits comfortaby
almost exactly in the middle.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas
072dd047f0 lavfi: add ff_detect_color_primaries helper
Related to #9673, this helper exists to facilitate "guessing" the right
primary tags from a given set of raw primary coefficients.

The cutoff value of 0.001 was chosen by experimentation. The smallest
"false positive" delta observed in practice was 0.023329, while the
largest "false negative" delta was 0.00016. So, a value of 0.001 sits
comfortably in the middle.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas
6d83036662 lavfi: generalize colorspace coefficent helpers
These are needed beyond just vf_colorspace, so give them a new home in
colorspace.h.

In addition to moving code around, also merge the white point and
primary coefficients into a single struct to slightly increase the
convenience and shrink the size of the new API by avoiding the need
to introduce an extra function just to look up the white point as well.
The only place the distinction matters is in a single enum comparison,
which can just as well be a single memcpy - the difference is
negligible.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Paul B Mahol
ce23794b91 avfilter/avf_showspectrum: filter support all channel counts 2022-04-23 19:24:43 +02:00
Paul B Mahol
a64e250680 avfilter/af_afftdn: add gain_smooth option 2022-04-23 16:25:45 +02:00
Paul B Mahol
16463520d9 avfilter: add colorchart video filter 2022-04-23 11:00:42 +02:00
Paul B Mahol
43ea19fef4 avfilter: add colormap video filter 2022-04-23 10:59:34 +02:00
Paul B Mahol
b1b7249606 avfilter/vf_lagfun: small speed-up 2022-04-23 10:58:29 +02:00
Michael Niedermayer
fbd22504c4 avfilter/vsrc_mandelbrot: Check for malloc failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-22 12:24:14 +02:00
Paul B Mahol
0b6e801d4a avfilter/avf_showfreqs: add option to draw subset of channels 2022-04-22 01:20:21 +02:00
Paul B Mahol
fd834924d7 avfilter/avf_showfreqs: filter support all channel counts 2022-04-22 01:20:21 +02:00
Michael Niedermayer
d353909e77 avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirements
Fixes: issues with non trivial linesize

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-21 22:42:20 +02:00
Michael Niedermayer
d740782701 avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-21 22:42:20 +02:00
Paul B Mahol
b9e75c1862 avfilter/vf_ciescope: add option to disable CIE tongue filling 2022-04-19 22:08:15 +02:00
Paul B Mahol
da4b7c2be4 avfilter/vf_ciescope: little optimizations 2022-04-19 20:32:23 +02:00
Paul B Mahol
8b717a4044 avfilter/avf_ahistogram: set time_base to outlink
And rescale timestamps.
2022-04-19 19:22:40 +02:00
Paul B Mahol
d41f85235d avfilter/avf_avectorscope: set time_base to outlink
And rescale timestamps.
2022-04-18 20:24:54 +02:00
Paul B Mahol
9f73c40d32 avfilter/avf_showvolume: set time_base to outlink
And rescale timestamps.
2022-04-18 20:24:54 +02:00
Paul B Mahol
4e98cc29f4 avfilter/vf_feedback: add missing .process_command 2022-04-15 18:57:36 +02:00
Paul B Mahol
391ce570c8 avfilter: add pixelize video filter 2022-04-14 22:37:21 +02:00
Paul B Mahol
7e81295488 avfilter: add feedback video filter 2022-04-14 22:29:46 +02:00
Paul B Mahol
a34fe3dfa9 avfilter/avf_showspectrum: fix pts offset by one 2022-04-14 22:26:54 +02:00
Paul B Mahol
1764a6887b avfilter/avf_showspectrum: add alpha pixel format support 2022-04-14 17:29:14 +02:00
Paul B Mahol
bf6735e945 avfilter/af_adenorm: simplify handling of commands 2022-04-13 22:02:47 +02:00
Paul B Mahol
24144af2dd avfilter/avf_showvolume: check for allocation error and stop leaks 2022-04-13 18:24:25 +02:00
Paul B Mahol
9a22c6508a avfilter/vf_deblock: fix posible overreads 2022-04-13 10:25:08 +02:00
Paul B Mahol
b74f212b7a avfilter/vf_xmedian: simplify changing index variable 2022-04-13 09:54:20 +02:00
Paul B Mahol
9d40fe20c9 avfilter/af_crystalizer: remove no longer needed wrapper function 2022-04-13 09:41:14 +02:00
Paul B Mahol
63d12a48b5 avfilter/vf_chromashift: simplify handling of commands 2022-04-13 09:30:36 +02:00
Paul B Mahol
25cd1845ab avfilter/af_asetnsamples: fix excessive frames queueing at start 2022-04-12 19:30:58 +02:00
James Almer
b64043a83d avfilter/vf_drawbox: remove redefinition of DrawBoxContext typedef
It's forbidden in C99.

Should fix compilation with old non C11 compilers.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-04-12 11:09:59 -03:00
Gyan Doshi
1405b65d22 avfilter/lensfun: add option db_path
The lensfun filter, at present, loads its database from a path hardcoded
at build time. This may not be known or available to end users.

Added option db_path allows custom path.
2022-04-12 15:20:10 +05:30
Paul B Mahol
1047fedd0f avfilter: add Audio Video Sync Test filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2022-04-12 10:51:46 +02:00
Paul B Mahol
13fe148c31 avfilter/f_ebur128: fix typos for swr chlayouts 2022-04-11 23:14:54 +02:00
Paul B Mahol
6e45acd23b avfilter: let single output frame A->V filters set reasonable frame rate 2022-04-10 22:41:26 +02:00
Paul B Mahol
5a9de38e54 avfilter/vf_waveform: copy props from input frame 2022-04-08 18:54:00 +02:00
Paul B Mahol
a700dc3735 avfilter/vf_waveform: add some support for commands 2022-04-08 18:54:00 +02:00
Paul B Mahol
e528ced7c8 avfilter/vf_vectorscope: add some commands support 2022-04-08 18:54:00 +02:00
Paul B Mahol
49526852c3 avfilter/vf_drawbox: add packed rgb support 2022-04-08 12:17:26 +02:00
Paul B Mahol
8d6acba59a avfilter/vf_colorkey: use multiplication instead of division 2022-04-08 10:16:59 +02:00
Paul B Mahol
c3f5f1bc56 avfilter/vf_colorkey: add >8 depth support 2022-04-08 10:02:33 +02:00
Hendrik Leppkes
cd96211ace avfilter/f_ebur128: multiply in integer first, before dividing in float
Restores the order of operations from before 15a1104, which reduces
errors from floating point calculations, and fixes FATE on mingw64.
2022-04-07 16:37:51 +02:00
Paul B Mahol
55d414829c avfilter/af_ladspa: fix pts compensation if number of samples per frame is lower than latency 2022-04-07 09:39:55 +02:00
Paul B Mahol
4fbf3c828b avfilter/af_ladspa: compensate output pts if latency compensation is on 2022-04-06 16:59:45 +02:00
Paul B Mahol
21ca221068 avfilter/vsrc_gradients: add spiral type 2022-04-05 17:38:16 +02:00
Paul B Mahol
8e1cedbb61 avfilter/vsrc_gradients: add circular type 2022-04-05 17:38:16 +02:00