1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-02 09:19:58 +02:00
Commit Graph

6378 Commits

Author SHA1 Message Date
Paul B Mahol
57ef0f0f17 avfilter/vf_waveform: add gray10 and gray12 support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-11-29 11:34:48 +01:00
Vittorio Giovara
afb84857bf vf_colorspace: Forbid odd dimensions
This prevents writing past bounds.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-28 11:24:09 -05:00
Clément Bœsch
5d7be07a8b lavfi/f_ebur128: relicense to LGPL
All copyright holders have agreed to the relicensing.

Approved-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Approved-by: David Sedacca <sedacca@comcast.net>
Approved-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Approved-by: Jean First <jeanfirst@gmail.com>
Approved-by: Kyle Swanson <k@ylo.ph>
Approved-by: Michael Niedermayer <michael@niedermayer.cc>
Approved-by: Nicolas George <george@nsup.org>
Approved-by: Paul B Mahol <onemda@gmail.com>
Approved-by: Thilo Borgmann <thilo.borgmann@mail.de>
2016-11-27 20:46:20 +01:00
Paul B Mahol
4719e563a4 avfilter/vf_zscale: export approximate gamma option and enable it by default
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-11-27 11:43:54 +01:00
Diego Biurrun
ce6f780bc6 configure: Add missing asyncts filter, movie filter, and output example deps
Also add a missing avcodec.h #include in the movie filter.
2016-11-25 18:45:27 +01:00
Wan-Teh Chang
dceac9a4a7 avfilter/tests/.gitignore: add integral
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-24 21:10:37 +01:00
Moritz Barsnick
0700d02a69 lavfi/pan: allow negative gain parameters also for other inputs than the first named
Expands the parser to also accept the separator '-' in addition to
'+', and take the negative sign into consideration.

The optional sign for the first factor in the expression is already
covered by parsing for an integer.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-24 00:54:52 +01:00
Paul B Mahol
b96a6e2024 avfilter/vf_zscale: add support for some recent new additions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-11-23 19:02:20 +01:00
Timo Rothenpieler
0faf3c3a25 avfilter/vf_hwupload_cuda: check ff_formats_ref for errors 2016-11-22 10:34:27 +01:00
Timo Rothenpieler
b0ca90d7cb avfilter/vf_hwupload_cuda: use new hwdevice allocation API 2016-11-22 10:34:27 +01:00
Timo Rothenpieler
a0c9e76942 avfilter/vf_scale_npp: use dynamically loaded CUDA 2016-11-22 10:34:27 +01:00
Diego Biurrun
fbd1f7639d af_asyncts: Use llabs instead of labs for 64-bit variable
libavfilter/af_asyncts.c:212:9: warning: absolute value function 'labs' given an argument of type 'int64_t' (aka 'long long') but has parameter of type 'long' which may cause truncation of value [-Wabsolute-value]
2016-11-15 09:41:08 +01:00
Kyle Swanson
83b6b434ff lavfi/ebur128: use ff_ prefix
Signed-off-by: Kyle Swanson <k@ylo.ph>
2016-11-13 19:11:07 -06:00
Hendrik Leppkes
1f8e1c209d Merge commit 'c3f113d58488df7594a489bdbb993a69ad47063c'
* commit 'c3f113d58488df7594a489bdbb993a69ad47063c':
  vf_hwdownload: allocate the destination frame for the pool size

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-13 22:35:57 +01:00
Mark Thompson
1a359e5341 vf_scale_vaapi: Respect driver quirks around buffer destruction
(cherry picked from commit 582d4211e0)
2016-11-13 20:39:48 +00:00
Nicolas George
183ce55b0d lavfi: split frame_count between input and output.
AVFilterLink.frame_count is supposed to count the number of frames
that were passed on the link, but with min_samples, that number is
not always the same for the source and destination filters.
With the addition of a FIFO on the link, the difference will become
more significant.

Split the variable in two: frame_count_in counts the number of
frames that entered the link, frame_count_out counts the number
of frames that were sent to the destination filter.
2016-11-13 10:41:16 +01:00
Marton Balint
0f8b852a64 lavfi/ebur128: specify scaling_factor directly
This should fix build with Solaris CC.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-13 03:11:16 +01:00
Diego Biurrun
8ddfa5ae5e vf_drawtext: Drop wrong void* cast
libavfilter/vf_drawtext.c:844:49: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
2016-11-12 16:47:07 +01:00
Marton Balint
005d058f42 lavfi/loudnorm: add an internal libebur128 library
Also contains the following changes to the library:
- add ff_ prefix to functions
- remove cplusplus defines.
- add FF_ prefix to contants and some structs
- remove true peak calculation feature, since it uses its own resampler, and
  af_loudnorm does not need it.
- remove version info and some fprintf(stderr) functions
- convert to use av_malloc
- always use histogram mode for LRA calculation, otherwise LRA data is slowly
  consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
  BSD style linked list implementation which is probably not available on all
  platforms. So let's just remove the classic mode which not uses histogram.
- add ff_thread_once for calculating static histogram tables
- convert some functions to void which cannot fail
- remove intrinsics and some unused headers
- add support for planar audio
- remove channel / sample rate changer function, in ffmpeg usually we simply
  alloc a new context
- convert some static variables to defines
- declare static histogram variables as aligned
- convert some initalizations to mallocz
- add window size parameter to init function and remove window size setter
  function
- convert return codes to AVERROR
- fix indentation

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-11 19:37:54 +01:00
Alex Agranovsky
88db6c2890 avfilter/vf_drawtext: fixed default/flt formatting ignoring offset parameter
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-06 23:02:38 +01:00
Michael Niedermayer
0e66dcd733 avfilter/af_volumedetect: Remove dependency on channel layout
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-06 16:59:20 +01:00
Muhammad Faiz
b4e9252ae3 avfilter/af_firequalizer: add fft2 option
2-channels convolution using complex fft
improves speed significantly

not sure if it should be enabled by default
so disable it by default

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-11-04 09:45:01 +07:00
Mark Thompson
124e26971e lavfi: Hardware map filter
Takes a frame associated with a hardware context as input and maps it
to something else (another hardware frame or normal memory) for other
processing.  If the frame to map was originally in the target format
(but mapped to something else), the original frame is output.

Also supports mapping backwards, where only the output has a hardware
context.  The link immediately before will be supplied with mapped
hardware frames which it can write directly into, and this filter
then unmaps them back to the actual hardware frames.
2016-11-03 23:49:05 +00:00
Mark Thompson
67c65e461c vf_hwupload_cuda: Fix build error
Broken by e3fb74f7f9.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-11-03 17:43:55 +01:00
Mark Thompson
e3fb74f7f9 lavfi: Always propagate hw_frames_ctx through links
Also adds a new flag to mark filters which are aware of hwframes and
will perform this task themselves, and marks all appropriate filters
with this flag.

This is required to allow software-mapped hardware frames to work,
because we need to have the frames context available for any later
mapping operation in the filter graph.

The output from the filter graph should only propagate further to an
encoder if the hardware format actually matches the visible format
(mapped frames are valid here and have an hw_frames_ctx, but this
should not be given to the encoder as its hardware context).
2016-11-02 20:29:05 +00:00
Mark Thompson
7e2561fa83 lavfi: Use ff_get_video_buffer in all filters using hwframes 2016-11-02 20:07:15 +00:00
Mark Thompson
7433feb82f lavfi: Make default get_video_buffer work with hardware frames 2016-11-02 20:07:15 +00:00
Diego Biurrun
85baef4ff1 vf_drawtext: Move static keyword to beginning of variable declaration
libavfilter/vf_drawtext.c:226:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
2016-11-02 10:29:00 +01:00
Vittorio Giovara
6f2ad32a16 vf_colorspace: Add support for film primaries
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-11-01 17:47:25 -04:00
Vittorio Giovara
4697f60444 vf_colorspace: Add support for smpte 431/432 (dci/display p3) primaries
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-11-01 17:47:25 -04:00
Vittorio Giovara
2996604acd vf_colorspace: Add support for ycgco color space
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-11-01 17:47:25 -04:00
Carl Eugen Hoyos
bf52730051 lavfi/mergeplanes: Fix little endian yuv formats >8 bit and <16bit.
Fixes remaining cases of ticket #5916.
2016-11-01 12:28:36 +01:00
Carl Eugen Hoyos
1a65d2a3cc lavfi/mergeplanes: Fix >8 bit for big endian formats and yuv4xxp16le.
Fixes part of ticket #5916.
2016-11-01 12:24:57 +01:00
Vittorio Giovara
5a123f1424 vf_colorspace: Add support for iec61966-2.4 (xvYCC) transfer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-31 21:02:12 +01:00
Muhammad Faiz
0686537002 avfilter/avf_showcqt: add bar_t option
custom bargraph transparency

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-29 22:11:58 +07:00
Rodger Combs
f53c26c694
lavfi/vf_overlay: support NV12 and NV21
Tested-by: Michael on x86-32/64 linux, mingw, mips/arm qemu linux
2016-10-26 20:13:30 -05:00
Michael Niedermayer
1609935b6c Bump minor versions after 3.2 branchpoint to seperate release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer
3f3025205f Bump minor versions for 3.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Yogender Gupta
f524275ef9 avfilter/scale_npp: fix passthrough mode
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-25 23:17:31 +02:00
Yogender Gupta
99aeae20de scale_npp: fix passthrough mode
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-10-25 14:48:13 +02:00
Vittorio Giovara
ba53d3ae8b vf_colorspace: Add support for iec61966-2.1 (sRGB) transfer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-10-24 16:07:44 -04:00
Ronald S. Bultje
f141ac4d0b vf_colorspace: don't spam console with warnings if range is unspecified. 2016-10-24 16:03:16 -04:00
Clément Bœsch
58672347cb lavfi: remove 2 unused lavc includes 2016-10-23 20:19:28 +02:00
Andreas Cadhalpun
c8a6eb58d7 doc: fix spelling errors
Thanks to Mathieu Malaterre <malat@debian.org> for reporting the
Que/Queue typo. (https://bugs.debian.org/839542)

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21 23:58:47 +02:00
Muhammad Faiz
258c49d614 avfilter/firequalizer: use zero phase kernel
this makes real-valued kernel

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-20 14:10:53 +07:00
Muhammad Faiz
56689a46b3 avfilter/showcqt: add cscheme option
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-20 14:10:43 +07:00
Sven C. Dack
1aa8fa418a avfilter/vf_scale_npp: select cubic and lanczos as alternative where super-sampling is not supported
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-10-19 12:51:59 +02:00
Muhammad Faiz
23b6f880d6 avfilter/firequalizer: add cubic_interpolate function on gain
smoother version of gain_interpolate

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-19 14:05:46 +07:00
Muhammad Faiz
d3be186ed1 avfilter/firequalizer: add dumpfile and dumpscale option
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-18 22:41:43 +07:00
Muhammad Faiz
923488bdaa avfilter/showcqt: add font option
this is fontconfig pattern

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-18 00:47:57 +07:00
Muhammad Faiz
92de89d14a avfilter/firequalizer: optimize gain/gain_entry command
do not rebuild when gain/gain_entry command are
equal with old gain/gain_entry

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-18 00:47:42 +07:00
Diego Biurrun
6be7944ee2 x86: Add missing colons after assembly labels
This fixes many warnings of the sort
warning: label alone on a line without a colon might be in error
2016-10-17 16:31:26 +02:00
Muhammad Faiz
1a9513bfbc avfilter/firequalizer: add scale option
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-17 03:17:50 +07:00
Muhammad Faiz
01ab60201b avfilter/firequalizer: add tukey window
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-16 05:50:47 +07:00
Muhammad Faiz
7c5fca15bb avfilter/firequalizer: change WFUNC_MIN/MAX to NB_WFUNC
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-16 05:48:36 +07:00
Muhammad Faiz
a11757d7cb avfilter/showcqt: add csp option
from colorspace filter

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-16 05:41:09 +07:00
Marton Balint
7845c13881 lavfi/sidedata: add filter for manipulating frame side data
This is a similar filter to f_metadata, only it works on side data. Since
adding side data from a user provided arbitrary binary string is unsafe,
because current code assumes that a side data of a certain kind has the proper
size, this filter only implements selection and deletion. Also, no value
matching support is implemented yet, because there is no uniform way to specify
a side data textually.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-13 23:01:53 +02:00
Marton Balint
24022402be lavfi/metadata: fix metadata deletion if comparison returns false
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-11 18:05:28 +02:00
Moritz Barsnick
efbc37a757 lavfi/pan: renormalize negative gain coefficients properly
The parser for the outdef will accept a negative value for the first
named channel's gain. As negative values effectively only invert the
phase of the signal, and not negate the level, the gains' absolute
values must be used to correctly accumulate the levels.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-11 03:27:59 +02:00
Muhammad Faiz
47d2be3056 avfilter/firequalizer: fix blackman window calculation
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-10 02:27:31 +07:00
Moritz Barsnick
f4e4bde1f4 lavfi: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-09 20:09:00 +02:00
Hendrik Leppkes
adfcf16f76 Merge commit '5b63b15663d31f50ce45d980b904a68795ad3f7a'
* commit '5b63b15663d31f50ce45d980b904a68795ad3f7a':
  lavfi: set the link hwframes context before configuring the dst input

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-10-07 13:29:11 +02:00
Burt P
2c3d936487 af_hdcd: disable auto-convert by default
As all known valid HDCD sample formats and sample rates are now handled
by the filter, remove the scan that "invades the privacy" of the filter graph
and turn off autoconvert by default as requested by Nicolas George.

http://ffmpeg.org/pipermail/ffmpeg-devel/2016-August/197571.html

Signed-off-by: Burt P <pburt0@gmail.com>
2016-10-05 12:52:56 -05:00
Burt P
f51ddbf83c af_hdcd: add experimental 20 and 24-bit decoding support
I don't have any legitimate 20 or 24-bit HDCD to test. It is known
that the PM Model Two would insert packets into 20 and 24-bit output,
but I have no idea what differences in behavior existed when decoding
20 or 24-bit. For now, as with 16-bit, PE (if enabled) will expand the
top 3dB into 9dB and LLE (gain adjust) will be applied if signaled.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-10-05 12:48:59 -05:00
Burt P
4f94f01414 af_hdcd: hdcd_scan() and hdcd_integrate() handle stereo and single channel
New versions of hdcd_scan() and hdcd_integrate() that also do the
work of hdcd_scan_stereo() and hdcd_integrate_stereo().

Some code split into previously separate functions to remove
duplication is now merged back into each function in the single
place where it is used.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-10-05 12:39:52 -05:00
Burt P
80d89c1960 af_hdcd: support s16p (WavPack) directly
The buffer is already being copied anyway, so interlace the planar
format during the copy and remove one use of auto-convert.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-10-05 12:38:26 -05:00
Burt P
7e46bb80ef af_hdcd: allow all HDCD sample rates
The PM Model Two could output HDCD-encoded audio in CD and all
DVD-Audio sample rates. (44100, 48000, 88200, 96000, 176400, and
192000 Hz)

Signed-off-by: Burt P <pburt0@gmail.com>
2016-10-05 12:37:55 -05:00
Burt P
de9b23ac1f af_hdcd: add mono as a supported channel layout
Signed-off-by: Burt P <pburt0@gmail.com>
2016-10-05 12:37:22 -05:00
Marton Balint
7ef3e5b593 lavfi/metadata: allow deleting all metadata
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-01 17:32:32 +02:00
Marton Balint
d946424f19 lavfi/metadata: fix setting metadata values
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-01 17:32:08 +02:00
James Almer
e4bfc9ecf7 avfilter/vf_colorspace: fix range for output colorspace option
Rreviewed-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
2016-09-28 17:33:38 -03:00
Michael Niedermayer
1e34584814 avfilter/tests/integral: Remove unused variables
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-24 20:30:40 +02:00
Clément Bœsch
c29b532a94 lavfi: add nlmeans filter
Fixes Ticket #4910
2016-09-24 09:52:10 +02:00
Paul B Mahol
9d16e46d9e avfilter/drawutils: allow drawing opaque text on transparent background
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-21 11:54:00 +02:00
Vittorio Giovara
cb78d14cf9 vf_colorspace: Interpret unspecified color range as limited range
This is the assumption that is made in pixel format conversion do
throughout the code (in particular swscale), and BT-specifications
mandate.

Add a warning to inform the user that an automatic selection is being
made.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-09-19 08:26:49 -04:00
Paul B Mahol
97f50d1c62 avfilter/vf_overlay: add YUVA422P to alpha_pix_fmts
Now yuv422 output format gives similar expected output as other output formats.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-17 15:38:30 +02:00
Paul B Mahol
0e7d2c60e9 avfilter/vf_overlay: support J formats too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-17 15:38:30 +02:00
Paul B Mahol
4096bb176b avfilter/vf_unsharp: limit matrix size in either direction to 23
Anything bigger is not supported anyway.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-17 13:57:45 +02:00
Paul B Mahol
d790887d1c avfilter/vf_unsharp: check if scalebits is too high
Otherwise filter would happily give overflows and produce useless output.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-17 13:57:45 +02:00
Paul B Mahol
5b509fafb0 avfilter/vf_lut2: also export video input bit depth
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-16 12:35:55 +02:00
Vittorio Giovara
76c28360b5 vf_colorspace: Add modern names for color range option
Allows to use values returned from API and from ffprobe directly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-09-14 17:24:22 -04:00
Mark Thompson
bdf7610eb2 vf_scale_vaapi: Crop input surface to active region
If the input has been decoded from a stream which uses edge cropping
then the whole surface need not be valid.  This defines an input
region for the scaler so we only use the active area of the frame.
2016-09-14 20:48:36 +01:00
Marton Balint
025db5afaf avfilter/af_amerge: allow merging 1 input only
Useful when the amerge filter parameters are generated from a script based on
the number of input streams, by allowing 1 input it does not have to be handled
specially.

The split filter also allows 1 output, so it is more consistent to allow
merging 1 input as well.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-09-13 21:35:31 +02:00
Vittorio Giovara
d41bfa9c0b vf_colorspace: Add BT-names for gamma22/28 transfer option
Allows to use values returned from API and from ffprobe directly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-09-13 10:22:23 -04:00
Paul B Mahol
a50ca6b357 avfilter/vf_convolution: add slice threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-12 14:38:45 +02:00
Paul B Mahol
afeffd891f avfilter: add sobel and prewitt filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-12 14:38:45 +02:00
Paul B Mahol
b791d0e4e0 avfilter/vf_vaguedenoiser: calculate dimensions at init
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-12 14:38:45 +02:00
Paul B Mahol
dc669d5fbe avfilter/vf_vaguedenoiser: change thresholding to function pointers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-12 14:38:45 +02:00
Paul B Mahol
97297fb144 avfilter/vf_overlay: inline yuv output formats
Overall speedup ~10-20%

Tested-by: Michael on mingw32 mingw64 linux32 mips and arm
2016-09-11 00:38:13 +02:00
Paul B Mahol
140a0485d3 avfilter/vf_overlay: split blend_image into functions for each overlay format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-11 00:27:01 +02:00
Michael Niedermayer
054f912c0d avfilter/avf_concat: Make independent of the channel layout
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-10 23:19:01 +02:00
Paul B Mahol
b257266ee8 avfilter/af_amix: use ff_all_channel_counts() instead of ff_all_channel_layouts()
Adds support for filtering frames with unknown channel layouts.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-10 13:05:31 +02:00
Paul B Mahol
c784b5cfdc avfilter/vf_histogram: set foreground alpha if possible in destination format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-10 00:28:28 +02:00
Paul B Mahol
7055b28d98 avfilter/vf_datascope: cleanup code a little
Make few helper functions.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-09 14:16:22 +02:00
Paul B Mahol
653ca05807 avfilter/vf_weave: do not leak unused frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-09 11:58:18 +02:00
Burt P
91117fc9f1 af_hdcd: fix bounds check in hdcd_envelope()
From Sebastian Ramacher.
https://github.com/bp0/libhdcd/pull/11

Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-08 18:13:12 -05:00
Paul B Mahol
e9770b40b1 avfilter/vf_datascope: let user change background opacity
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-09 00:40:30 +02:00
Paul B Mahol
ae31ab8070 avfilter/vf_shuffleframes: unbreak filter
Regression since 736e2e2c30.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-08 10:56:30 +02:00
Paul B Mahol
4fb6f9de0c avfilter/vf_waveform: make possible to change background opacity
Only useful if output pixel format have alpha.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-07 22:38:14 +02:00
Burt P
38445d58f1 af_hdcd: hdcd_analyze_gen() using int instead of float
Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-07 10:59:18 -05:00
Burt P
eb0086588f af_hdcd: tweak hdcd_analyze_prepare() a bit
* use the actual sample rate
* use a more sensible frequency for the tone
* update fate test result

Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-07 10:54:30 -05:00
Burt P
e700e21b6f af_hdcd: move decoding setup from init to config_input
Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-07 10:54:08 -05:00
Burt P
91be2ad756 af_hdcd: fix possible integer overflow
Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-07 10:53:41 -05:00
Burt P
5e553cab68 af_hdcd: some types renamed to remove _t
Following a suggestion by Diego Biurrun.
_t is reserved for POSIX, apparently.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-07 10:49:04 -05:00
Paul B Mahol
b7e78c75cc avfilter/vf_paletteuse: add option to use new palette for each output frame 2016-09-07 15:56:13 +02:00
Paul B Mahol
93ae68d62a avfilter/vf_palettegen: add mode for generating palette for each input frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-07 15:56:13 +02:00
Paul B Mahol
424f0f9e33 avfilter: add avgblur filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-07 15:36:54 +02:00
Michael Niedermayer
fdd9663781 avfilter/fifo: Make independent of the channel layout
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-06 12:36:28 +02:00
Michael Niedermayer
db3b93319d avfilter/af_atempo: Make independent of the channel layout
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Pavel Koshevoy <pkoshevoy@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-06 12:36:28 +02:00
Michael Niedermayer
3a3265899b avfilter/af_amix: make independent of the channel layout
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-06 12:36:28 +02:00
Carl Eugen Hoyos
70f4b453cb doc/showspectrum*: Change options order to reflect numeric values.
Fixes ticket #5823.
2016-09-06 11:52:10 +02:00
Paul B Mahol
496d97f465 avfilter/vf_owdenoise: hight bit-depth support 2016-09-06 01:29:46 +02:00
Paul B Mahol
443c9fab57 avfilter/vf_gblur: add sigmaV option, different vertical filtering
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04 23:59:45 +02:00
Paul B Mahol
28b920c09b avfilter/Makefile: move anullsrc and nullsink to correct place
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04 15:33:05 +02:00
Paul B Mahol
9833cf2ae1 avfilter/vf_bitplanenoise: silence clang warning, do not truncate value 2016-09-04 15:33:05 +02:00
Paul B Mahol
ee605aa730 avfilter: add gblur filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04 15:33:05 +02:00
Vittorio Giovara
5df993f3b1 vf_colorspace: Allow overriding input color properties
The filter needs input frames with color properties filled out by
the decoder. Since this is not always possible, add input options to
the filter so that user may override color space, color primaries,
transfer characteristics, and color range, as well as a generic option
to set all properties at once.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-09-04 13:11:32 +02:00
Paul B Mahol
b5cf307d0f avfilter/vf_zscale: make possible to change chroma location 2016-09-02 16:10:30 +02:00
Davinder Singh
367577dbe2 avfilter/vf_minterpolate: rename chroma log vars
also use AVPixFmtDescriptor instead of avcodec_get_chroma_sub_sample()
for log2_chroma*.
2016-09-02 13:08:21 +02:00
Paul B Mahol
3e1356f790 avfilter: add weave filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-02 12:27:28 +02:00
Lucas Cooper
aabe12eba3 avfilter/vf_psnr: Add max value output option to psnr stats log.
This allows retroactive calculation/aggregation of PSNR from the stats
log.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-01 11:54:31 +02:00
Timo Rothenpieler
2625b955a3 avfilter/drawutils: honor shift for color component description 2016-08-31 13:19:46 +02:00
Timo Rothenpieler
d3a23b6777 avfilter/drawutils: P010 is not supported 2016-08-31 13:19:46 +02:00
Paul B Mahol
8175fb03f0 avfilter/vf_lut: unbreak planar rgb suppot on big-endian 2016-08-31 11:18:40 +02:00
Burt P
728e80cd2e High Definition Compatible Digital (HDCD) decoder filter, using libhdcd
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-08-29 19:09:59 +02:00
Davinder Singh
11a631d4a7 avfilter/vf_minterpolate: do not right shift negative numbers
It was source of crashes. Use division instead.

Original patch by author. Log message by comitter.
2016-08-29 17:32:47 +02:00
Paul B Mahol
a0a57072c9 avfilter: make use of ff_filter_get_nb_threads 2016-08-29 16:27:09 +02:00
Paul B Mahol
5b1907142d avfilter: add ff_filter_get_nb_threads() 2016-08-29 16:27:09 +02:00
Paul B Mahol
449339084f avfilter: add nb_threads to AVFilterContext
To be used in following commits.
2016-08-29 16:27:09 +02:00
Paul B Mahol
88bcdf109a avfilter: hflip,swapuv,vflip: add timeline support 2016-08-28 11:00:06 +02:00
Paul B Mahol
f242d74d17 avfilter/vf_convolution: add >8 bit depth support 2016-08-27 16:04:07 +02:00
Paul B Mahol
b2c6a11fb6 avfilter/vf_atadenoise: add planes option
Make possible filtering only some planes.
2016-08-27 13:48:14 +02:00
Vittorio Giovara
69abf4f93c vf_colorspace: Add support for full range yuv
Whenever a full range video is input, since the YUVJ* formats are not
listed as supported for this filter, a range reduction takes place
through the auto-inserted format filter, forcing the conversion to
operate on a limited range,

However the filter handles full range videos perfectly fine, so adding
support to YUVJ* formats will allow skipping a conversion step, while
providing completely identical results.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-27 13:08:43 +02:00
Vittorio Giovara
6648da3591 vf_colorspace: Check av_frame_copy_props() return value
This function can potentially allocate memory.

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-27 13:08:43 +02:00
Paul B Mahol
0429ff4be6 avfilter: add vaguedenoiser filter 2016-08-26 23:17:19 +02:00
Michael Niedermayer
0c7979b43d avfilter/motion_estimation: Fix pre processor formating
IIRC, The spaces are not standard before the #

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-26 23:09:17 +02:00
Michael Niedermayer
7827813f8c avfilter/motion_estimation: Fix warning: variable dir_x set but not used
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-26 20:17:39 +02:00
Davinder Singh
b07d4a0fb2 avfilter: added motion estimation and interpolation filters
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-26 11:17:51 +02:00
Burt P
ec220a8c1c af_hdcd: av_frame_free(out) if av_frame_copy_props() fails
Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-25 17:12:16 -05:00
Burt P
9d5e3c3f59 af_hdcd: for easier maintenance alongside libhdcd
Mostly just re-arranges some code to make it easier to update this
filter and libhdcd together. filter_frame() is much simpler as a
result.

* use the HDCD detection data structure and functions from libhdcd,
  moved detection code out of filter_frame()
* moved analyze_mode preparation out of filter_frame() into
  hdcd_analyze_prepare(), from libhdcd
* moved some macro definitions to the top so they are all together

Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-25 17:11:57 -05:00
Michael Niedermayer
e1ced854f2 avfilter/af_acrusher: Rename sun/sov
The names are hard to understand and also seem to break build on at least some solaris
versions

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-25 18:36:59 +02:00
Paul B Mahol
feb2ea6e09 avfilter: add yuvtestsrc source filter 2016-08-25 11:16:09 +02:00
Paul B Mahol
5d7743019b avfilter: add lut2 filter 2016-08-25 11:16:09 +02:00
Burt P
8a78fc5b01 af_hdcd: check return value of av_frame_copy_props()
Anton Khirnov:
"[av_frame_copy_props()] potentially contains memory allocation,
so the return value needs to be checked."

Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-24 09:08:45 -05:00
Paul B Mahol
0edfd8e6f4 avfilter/vf_lut: add planar RGB support 2016-08-24 08:30:22 +02:00
Paul B Mahol
68dc0c13f9 avfilter/vf_maskedmerge: add support for more pixel formats 2016-08-23 15:21:06 +02:00
Paul B Mahol
bb109dce18 avfilter: add hysteresis filter 2016-08-23 15:21:06 +02:00
Paul B Mahol
12f997d061 avfilter: add maskedclamp filter 2016-08-23 15:21:06 +02:00
Burt P
0e0f8859ba af_hdcd: PE table limits
Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-21 13:48:46 -05:00
Burt P
accbb00ba7 af_hdcd: add AVOption to disable autoconversion in the filter graph
Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-21 13:48:08 -05:00
Burt P
8c19732a42 af_hdcd: add AVOption to set the CDT period
Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-21 13:47:20 -05:00
Burt P
400e2acd11 af_hdcd: Code comments update
Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-21 13:47:01 -05:00
Paul B Mahol
45e5d5f547 avfilter/avf_showvolume: calculate color table only once 2016-08-21 16:49:18 +02:00
Paul B Mahol
4d7d74802d avfilter/vf_crop: make possible to do exact cropping for subsampled videos 2016-08-21 10:06:48 +02:00
James Almer
27ee70290e avfilter/window_func: use a constant instead of acosh()
Should fix compilation with non C99 compilers like msvc 2012, where
acosh() is not available.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-20 11:50:58 -03:00
James Almer
a8e3833a61 x86/avf_showcqt: use the FMULADD_PS x86util macro
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-20 02:12:33 -03:00
Paul B Mahol
0d8b6a15dd avfilter/vf_histogram: make foreground and background opacity configurable 2016-08-19 18:03:07 +02:00
Paul B Mahol
e2a39b103e avfilter/avf_showvolume: use current peak value for picking colors 2016-08-18 20:14:58 +02:00
Paul B Mahol
b3c6e89d48 avfilter/avf_showspectrum: do not use uninitialized memory 2016-08-18 18:40:00 +02:00
Paul B Mahol
703ae350c2 avfilter/af_astats: fix flt(p) support 2016-08-18 15:30:05 +02:00
Paul B Mahol
81f7d07608 avfilter/af_astats: add support for s64(p) sample format 2016-08-18 15:30:05 +02:00
Paul B Mahol
5ee5f4b13c avfilter/avf_showfreqs: make minimum amplitude for log scaler configurable 2016-08-17 22:02:29 +02:00
Paul B Mahol
345c252e9c avfilter/avf_showspectrum: unbreak dB legend 2016-08-17 22:02:29 +02:00
Paul B Mahol
d299defbba avfilter/Makefile & allfilters: sort entries 2016-08-17 13:37:39 +02:00
Paul B Mahol
ed8d7e7a9b avfilter: add bitplanenoise filter 2016-08-17 13:24:28 +02:00
Paul B Mahol
b438c2025c avfilter/window_func: add cauchy, parzen and poisson window function 2016-08-16 18:09:50 +02:00
Paul B Mahol
a2c40931c8 avfilter/vaf_spectrumsynth: check return code 2016-08-16 16:01:35 +02:00
Paul B Mahol
1457786d69 avfilter/avf_showspectrum: do not let multiple threads to write to same part of memory 2016-08-16 15:56:12 +02:00
Paul B Mahol
ea58dd2beb avfilter/window_func: add dolph window 2016-08-16 15:56:12 +02:00
Paul B Mahol
3282e31baa avfilter/vf_atadenoise: set default size value to 9
This is enough, bigger sizes do not produce better output in 99% cases.
2016-08-15 23:04:08 +02:00
Paul B Mahol
fc3eb173f4 avfilter/vf_atadenoise: add support for more pixel formats 2016-08-15 23:00:28 +02:00
Paul B Mahol
4f226714f5 avfilter/af_astats: add support for other sample formats 2016-08-15 22:01:16 +02:00
Paul B Mahol
ce5ba77079 avfilter/avf_showspectrum: add some multithreading support 2016-08-15 13:17:06 +02:00
Paul B Mahol
ac18114b96 avfilter/vf_zoompan: fix pzoom usage 2016-08-15 09:55:36 +02:00
Paul B Mahol
ec4ed2f69c avfilter/vf_signalstats: fix saturation calculation for >8 bit 2016-08-14 10:00:35 +02:00
Paul B Mahol
3a81775bde avfilter/vf_signalstats: measure video bitdepth 2016-08-13 12:57:09 +02:00
Paul B Mahol
ee56d9bc89 avfilter/vf_signalstats: add >8 bit depth support 2016-08-13 12:57:09 +02:00
Paul B Mahol
b5314333de avfilter/af_adelay: make it possible to delay channels by exact number of samples 2016-08-11 21:46:06 +02:00
Paul B Mahol
eb3137255f avfilter/avf_avectorscope: fix initialization for prev_y in polar mode 2016-08-11 17:30:32 +02:00
Paul B Mahol
a130165ed9 avfilter/avf_avectorscope: add scale option 2016-08-11 17:21:54 +02:00
Paul B Mahol
7f1b14bc57 avfilter: add acrusher filter 2016-08-11 15:02:16 +02:00
Burt P
16ea0bca14 avfiltergraph.c: restore disabling of auto conversions
Restore a check added in 440af105f2
but lost sometime after. avfilter_graph_set_auto_convert() will
have an effect once again.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-10 11:37:28 -05:00
Paul B Mahol
80262d8c86 avfilter/avf_showwaves: add sqrt and cbrt amplitude scalers 2016-08-10 11:34:04 +02:00
Paul B Mahol
4506f91185 avfilter/vf_remap: >8 bit support 2016-08-10 10:02:05 +02:00
Michael Niedermayer
369ed11e3c avfilter/drawutils: Fix single plane with alpha
Fixes Ticket5720

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-09 12:42:57 +02:00
Burt P
dbd7a84c81 af_hdcd: Don't warn if converting from AV_SAMPLE_FMT_S16P
Also checking AVFilterLink->type is AVMEDIA_TYPE_AUDIO before
calling av_get_sample_fmt_name() on AVFilterLink->format.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-08 11:17:27 -05:00
Burt P
b2b659b17d af_hdcd: Add analyze mode
A new mode, selected by filter option, to aid in analysis of HDCD
encoded audio. In this mode the audio is replaced by a solid tone and
the amplitude is adjusted to signal some specified aspect of the process.
The output file can be loaded in an audio editor alongside the original,
where the user can see where different features or states are present.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-08 10:49:34 -05:00
Paul B Mahol
22d13e4290 avfilter/af_dynaudnorm: use better check for infinite loop
Apparently due to rounding this happens.
2016-08-07 23:47:04 +02:00
Paul B Mahol
571f33de0a avfilter/avf_showspectrum: improve dB scale description 2016-08-07 20:21:52 +02:00
Vitaly Ostrosablin
90ddcaaf2d avfilter: add crystalizer audio filter
Signed-off-by: Vitaly Ostrosablin <tmp6154@yandex.ru>
2016-08-07 10:58:42 +02:00
Burt P
2ce985c049 af_hdcd: convert AVOptions from INT to BOOL
As suggested by Timothy Gu.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-06 11:16:58 -05:00
Paul B Mahol
04a8bbca92 avfilter/avf_showspectrum: add color rotation feature
Mostly useful with channel color scheme.
2016-08-05 12:18:56 +02:00
Paul B Mahol
4be8ab70a6 avfilter/af_astats: extend bitdepth calculation 2016-08-03 20:32:43 +02:00
Burt P
e0b8cba058 af_hdcd: add flags to AVOption defs
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-08-02 22:40:23 -07:00
Timothy Gu
58c7bf789f doxygen: Standardize root-level modules 2016-08-02 22:15:25 -07:00
LoRd_MuldeR
8ab200fb8a avfilter/af_dynaudnorm: improve pre-filling code
In order to avoid possible clipping at the very
beginning. Especially apparent when "alternative"
boundary mode is used.

Adopted from original commit by committer.
2016-08-02 20:00:44 +02:00
Burt P
bea17a3d57 af_hdcd: Warn if there is any resampling or format conversion in the link chain
HDCD is only encoded in s16@44100Hz. Scan the chain of AVFilterLinks
for any resampling or format conversion/truncation that might cause
problems for the filter and issue warnings.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-01 23:57:55 +02:00
Burt P
d574e22659 af_hdcd: Process stereo channels together, fix #5727
Issue #5727: gain adjustment should only be applied if matching
gain value from a valid packet in both channels. The existing functions process
each channel separately, so it was not possible.

* New versions of hdcd_process(), hdcd_scan(), hdcd_integrate() named
  hdcd_*_stereo() that process both channels together.
* target_gain applied will be the last matching target_gain.
* The old single channel functions remain as an option. They can be
  used by: -af hdcd=process_stereo=0.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-01 23:57:55 +02:00
Burt P
12759cc034 af_hdcd: Move code detect/check into own function
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-01 19:48:32 +02:00
Burt P
b90d0ab4be af_hdcd: add force_pe filter option
Used to attempt replication of some results from
http://www.audiomisc.co.uk/HFN/HDCD/Examined.html
May not be generally useful, defaults to off.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-01 19:48:28 +02:00
Burt P
6517177d97 af_hdcd: Improve error detection logging
* Moves the filter context member out of state and into HDCDContext
* More useful information when an error is detected
* Gives a location near where the error was detected

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-01 19:48:24 +02:00
Burt P
390eea61be af_hdcd: give cdt expired counter a value for never set
The counter is now -1 if the code detect timer was never set,
and 0 if it was set but never expired.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-31 16:36:22 +02:00
Burt P
999c6b1da8 af_hdcd: fix a minor cosmetic annoyance
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-31 16:36:08 +02:00
Alexey Tourbin
906ee41141 avfilter/af_stereowiden: fix read/write past the end of buffer
The stereowiden filter uses a buffer, s->buffer[], and a pointer
within the buffer, s->write, to implement inter-channel delays.
The loop which applies the delayed samples turns out to be faulty.

   109      for (n = 0; n < in->nb_samples; n++, src += 2, dst += 2) {
   110          const float left = src[0], right = src[1];
   111          float *read = s->write + 2;
   112
   113          if (read > s->buffer + s->length)
   114              read = s->buffer;
   115
   116          dst[0] = drymix * left - crossfeed * right - feedback * read[1];
   117          dst[1] = drymix * right - crossfeed * left - feedback * read[0];
   118
   119          s->write[0] = left;
   120          s->write[1] = right;
   121
   122          if (s->write == s->buffer + s->length)
   123              s->write = s->buffer;
   124          else
   125              s->write += 2;
   126      }

For one, the buffer gets written past its end in lines 119-120, before
the bound check is done in lines 122-123.  This can be easily confirmed
by valgrind.

==3544== Invalid read of size 4
==3544==    at 0x593B41: filter_frame (af_stereowiden.c:116)
==3544==  Address 0xb1b03c4 is 4 bytes after a block of size 7,680 alloc'd
==3544==
==3544== Invalid read of size 4
==3544==    at 0x593B66: filter_frame (af_stereowiden.c:117)
==3544==  Address 0xb1b03c0 is 0 bytes after a block of size 7,680 alloc'd
==3544==
==3544== Invalid write of size 4
==3544==    at 0x593B79: filter_frame (af_stereowiden.c:119)
==3544==  Address 0xb1b03c0 is 0 bytes after a block of size 7,680 alloc'd
==3544==
==3544== Invalid write of size 4
==3544==    at 0x593B7D: filter_frame (af_stereowiden.c:120)
==3544==  Address 0xb1b03c4 is 4 bytes after a block of size 7,680 alloc'd

Also, using two separate pointers, s->write and read = s->write + 2,
does not seem to be well thought out.  To apply the delay of s->buffer[],
it is enough to read the delayed samples at the current position within
the buffer, and then to store new samples at the same current position.
Thus the application of delayed samples can probably be best described
with a single pointer s->cur.

I also introduce a minor change to ensure that the size of s->buffer[]
is always a multiple of 2.  Since the delay parameter is a float, it is
otherwise possible to trick the code into allocating off-by-one buffer.
2016-07-30 21:53:25 +02:00
Lucas Cooper
bc9ce5f6be avfilter: Add new format for PSNR stats log
Add an AVOption stats_version with a new header for V2 stats, which
specifies the stats log version and lists the fields that will be
present in the log (to ease parsing).

The primary motivation is to facilitate the addition of optional fields
to the log without breaking backwards compatibility, while making the
logs easier to parse.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-29 20:49:53 +02:00
Paul B Mahol
d7ae4f79d3 avfilter/f_drawgraph: add another slide mode 2016-07-28 10:30:06 +02:00
Clément Bœsch
37abc8cca2 lavfi/hdcd: fix style 2016-07-28 09:30:10 +02:00
Clément Bœsch
4791716c1d lavfi/hdcd: mark pe_str as static and const 2016-07-28 09:29:20 +02:00
Burt P
fb91143ef1 af_hdcd: Report PE as being intermittent or permanent
The Peak Extend feature could be enabled permanently or only
when needed. This is now reported.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-28 02:26:57 +02:00
Burt P
c26305f6ae af_hdcd: Add counter for cdt expirations
Adds a counter for when the "code detect timer" expired without
finding a valid packet.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-27 23:09:45 +02:00
Burt P
c7ba34b6ea af_hdcd: more comments in state struct
Add some comments describing the fields in hdcd_state_t.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-27 23:09:26 +02:00
Burt P
91854b8ef6 af_hdcd: Improve HDCD detection
HDCD is now only considered detected if a valid packet
is active in both channels simultaneously.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-27 22:21:43 +02:00
Clément Bœsch
c6e900e925 lavfi/curves: fix meaningless const int returned value
Spotted-by: James Almer <jamrial@gmail.com>
2016-07-26 21:22:27 +02:00
Clément Bœsch
308f9b1c49 lavfi/selectivecolor: add 16-bit support 2016-07-24 15:29:37 +02:00
Clément Bœsch
b8aaedcd01 lavfi/selectivecolor: fix picking black as neutral when alpha is present 2016-07-24 14:21:50 +02:00
Clément Bœsch
6e971f7d66 lavfi: bump minor after recent curves filter additions 2016-07-24 12:22:41 +02:00
Clément Bœsch
b470d81f4e lavfi/curves: prefix init and uninit function names 2016-07-24 12:18:30 +02:00
Clément Bœsch
62a31aecf6 lavfi/curves: pass log ctx as void* instead of AVFilterContext* 2016-07-24 12:18:30 +02:00
Clément Bœsch
39c6d4a8c5 lavfi/curves: reindent after previous commit 2016-07-24 12:18:30 +02:00
Clément Bœsch
e30cdac14b lavfi/curves: add 16-bit support 2016-07-24 12:18:30 +02:00
Clément Bœsch
f19f5b906d lavfi/curves: move alloc and init of LUTs inside config_input()
This is needed in order to have different sizes of LUTs according to the
input.
2016-07-24 12:18:30 +02:00
Clément Bœsch
050f790594 lavfi/curves: dynamically allocate LUTs
This simplifies following commits.
2016-07-24 12:18:30 +02:00
Clément Bœsch
4eee06ae87 lavfi/curves: add various const where it makes sense 2016-07-24 12:18:30 +02:00
Clément Bœsch
51a873d441 lavfi/curves: remove pointless logging since the addition of plot option 2016-07-24 12:18:30 +02:00
Clément Bœsch
4a8f5f1fd8 lavfi/curves: add plot option 2016-07-24 12:18:30 +02:00
Clément Bœsch
5c14018fc4 lavfi/curves: do not automatically insert points at x=0 and x=1
There is actually a need for the origin and end point not to be defined.
We can not automatically insert them with the y value of the first and
last point as it will influence the curves in a wrong way.

Fixes #5397
2016-07-24 12:18:30 +02:00
Anton Khirnov
ad71d3276f lavfi: add a QSV deinterlacing filter 2016-07-22 19:08:13 +02:00
Michael Niedermayer
9264bb7e79 avfilter/vf_psnr: Fix rounding error in average_max
The intermediate was rounded to an integer

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-21 11:26:28 +02:00
Burt P
c41718c0d0 af_hdcd: detect and report encoding errors and oddities
Count and report when a code is signaled but fails to match a known pattern.
For example try Līve - Secret Samadhi.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-14 22:09:00 +02:00
Burt P
5c7457c028 af_hdcd: only hdcd_update_info() when something changes
Only call hdcd_update_info() when the control code changes
instead of every frame, so the counters are more meaningful.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-14 22:09:00 +02:00
Burt P
33fc4cc7c6 af_hdcd: fewer false positives by ignoring code_counterC in HDCD detection
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-14 22:09:00 +02:00
Michael Niedermayer
e879819e7b avfilter/vf_uspp: Check for encoding failure
Fixes CID1363015

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-13 20:16:27 +02:00
Burt P
7af44ce2f7 af_hdcd: don't log full HDCD stats if HDCD was not detected
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 22:55:04 +02:00
Burt P
0d8caeb41e af_hdcd: integrate() renamed hdcd_integrate() to be consistent with the other function names
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 21:39:01 +02:00
Sami Hult
d4c8e93190 Changed metadata print option to accept general urls
This is an - once again - updated patch, that uses avio_write instead
of avio_puts to stream clean text output without null characters. Works
now for me as intended.

Changes metadata filter to accept general urls as file argument without
breaking former behaviour. As a byproduct, it also allows for writing to
file "-" if specified as "file:-".

Example:

ffmpeg -i test.wav -filter_complex "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file='pipe\:4'" -f null

Signed-off-by: Sami Hult <sami.hult@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-10 00:36:49 +02:00
Burt P
ba69a81019 libavfilter/af_hdcd.c: Collect HDCD stats and report
The new HDCD filter really does nothing to show that it is working or
that HDCD control information was even detected in the stream. This
patch collects information about the decode, like which features were
used, and reports it to the user at the end.

Also,
* Fixes low-level gain adjustment
* Updates the documentation

Signed-off-by: Burt P <pburt0@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 22:54:47 +02:00
Paul B Mahol
de30863fff avfilter/vf_rotate: add >8 bit depth support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-07-04 20:39:16 +02:00
Mark Thompson
582d4211e0 vf_scale_vaapi: Respect driver quirks around buffer destruction 2016-07-02 14:09:58 +01:00
Timo Rothenpieler
1a75145559 lavfi: Move new field to the end of AVFilterContext
This fixes an accidental ABI break introduced at 8688d3a.
2016-06-29 18:23:28 +02:00
Timo Rothenpieler
1eb43af1a0 lavfi: Move new field to the end of AVFilterLink
Even though this is not part of the public API, some external
applications access fields after it, thus breaking after updating from
ffmpeg 3.0 or earlier.
Since it is not public, it can be freely moved to the end to avoid
that problem in the future.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 12:53:07 +02:00
Anton Khirnov
c3f113d584 vf_hwdownload: allocate the destination frame for the pool size
The reasoning is the same as for the previous commit.
2016-06-28 08:32:00 +02:00
Matthieu Bouron
0acc170aad Merge commit '535a742c2695a9e0c586b50d7fa76e318232ff24'
* commit '535a742c2695a9e0c586b50d7fa76e318232ff24':
  build: Change structure of the linker version script templates

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-27 17:56:47 +02:00
Matthieu Bouron
9eb3da2f99 asm: FF_-prefix internal macros used in inline assembly
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
2016-06-27 17:21:18 +02:00
Hendrik Leppkes
c142dc203e Merge commit 'dc40a70c5755bccfb1a1349639943e1f408bea50'
* commit 'dc40a70c5755bccfb1a1349639943e1f408bea50':
  Drop unnecessary libavutil/x86/asm.h #includes

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:53:00 +02:00
Michael Niedermayer
8baa1d2209 avfilter/vf_paletteuse: enable skip_initial_unpaired
Fixes crash due to unprocessed input being passed through

This fixes the last segfault caused by mixing 3.0 and 3.1 libs and
applications

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-26 01:08:28 +02:00
Michael Niedermayer
f1dabc958e avfilter/dualinput: Add support to skip initial unpaired frames
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-26 01:01:28 +02:00
Michael Niedermayer
fdd8aac7e1 avfilter/src_movie: Add option to remove timestamp discontinuities
This can also be extended to remove discontiuities caused by seek commands

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-26 00:20:00 +02:00
Clément Bœsch
a887fbb582 lavfi/subtitles: remove unecessary checks 2016-06-25 19:14:21 +02:00
Clément Bœsch
e73ccfd6ad lavfi/subtitles: fix memleak after 6bcb1e1a
Spotted-by: James Almer <jamrial@gmail.com>
2016-06-25 19:12:03 +02:00
Clément Bœsch
6bcb1e1aff lavfi/subtitles: switch to codecpar 2016-06-25 16:53:35 +02:00