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
Paul B Mahol
6a955750d6 avfilter/vf_maskedclamp: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 00:08:04 +02:00
Paul B Mahol
356a33b20a avfilter/vf_atadenoise: do not abort if user specified invalid size
Update documentation with new size default.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 22:25:10 +02:00
Paul B Mahol
330215830e avfilter/vf_mix: clip output pixel values
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol
a5172dcab6 avfilter/vf_mix: add scale option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol
161e006cc0 avfilter: add tmix filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol
a12899ad9b avfiler/vf_mix: fix crash with >8 bit depth
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 14:08:21 +02:00
Vasile Toncu
9c01cdb94e avfilter/vf_interlace: remove duplicate code with same funcionality 2018-04-23 23:48:30 +02:00
Ruiling Song
d865783b6c lavf/qsv: clone the frame which may be managed by framework
For filters based on framesync, the input frame was managed
by framesync, so we should not directly keep and destroy it,
instead we make a clone of it here, or else double-free will occur.
But for other filters not based on framesync, we still need to
free the input frame inside filter_frame.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-04-21 19:00:43 +01:00
Ruiling Song
f3341a0452 lavf: make overlay_qsv work based on framesync
The existing version which was cherry-picked from Libav does not work
with FFmpeg framework, because ff_request_frame() was totally
different between Libav (recursive) and FFmpeg (non-recursive).
The existing overlay_qsv implementation depends on the recursive version
of ff_request_frame to trigger immediate call to request_frame() on input pad.
But this has been removed in FFmpeg since "lavfi: make request_frame() non-recursive."
Now that we have handy framesync support in FFmpeg, so I make it work
based on framesync. Some other fixing which is also needed to make
overlay_qsv work are put in a separate patch.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-04-21 19:00:43 +01:00
Paul B Mahol
21da248b5f avfilter: add deblock filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-21 11:34:49 +02:00
Paul B Mahol
396c019795 avfilter/avf_avectorscope: disable mirroring
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-18 18:14:35 +02:00
Paul B Mahol
2fc12f4971 avfilter: add lowshelf and highshelf filters
These are old bass and treble filters.
Make bass and treble filters better at boosting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-17 12:40:27 +02:00
Paul B Mahol
6e05a11e89 avfilter/af_afir: make max IR length configurable
Also increase max allowed dry/wet value.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 19:11:35 +02:00
Paul B Mahol
9cf0079638 avfilter/af_headphone: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 18:29:34 +02:00
Michael Niedermayer
3c1ecb057d Bump minor versions after release/4.0 branching
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Michael Niedermayer
7e3a070d9a Bump minor versions for branching release/4.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Martin Vignali
56315df32c avfilter/showvolume : cosmetic move bracket after func declaration to a new line 2018-04-16 11:35:07 +02:00
Martin Vignali
fd10a6e2f2 avfilter/showvolume : add persistent max display
draw a color line for the max level in the given duration
2018-04-16 11:35:03 +02:00
Martin Vignali
cb2f52b6a7 avfilter/showvolume : add display scale option
linear (current behaviour) or log display (more close to classic audio meter)
2018-04-16 11:34:59 +02:00
Paul B Mahol
e1c8bd2389 avfilter/af_headphone: fix type=time with hrir=multich
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 09:31:11 +02:00
Paul B Mahol
3e003a985f avfilter/af_headphone: add single hrir multichannel stream mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-15 16:08:28 +02:00
Paul B Mahol
a56580b117 avfilter/af_headphone: fix memory leak and overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 19:42:16 +02:00
Paul B Mahol
8daca7697b avfilter/af_headphone: do not output invalid samples when flushing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 18:38:54 +02:00
Paul B Mahol
01170e9db0 avfilter/af_headphone: fix flushing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 17:51:26 +02:00
Paul B Mahol
2b0f821f51 avfilter/af_headphone: improve performance and reduce latency
Remove not needed code.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 17:28:26 +02:00
James Almer
f790410b6b Merge commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42'
* commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42':
  qsv: adding Multi Frame Encode support

Merged-by: James Almer <jamrial@gmail.com>
2018-04-13 20:34:23 -03:00
James Almer
ae7e66fb4b Merge commit '29a8ed766354c45c9be4b8512c5b2eb25a450cdc'
* commit '29a8ed766354c45c9be4b8512c5b2eb25a450cdc':
  lavf/qsvvpp: bypass vpp if not needed.

Merged-by: James Almer <jamrial@gmail.com>
2018-04-13 19:58:47 -03:00
Paul B Mahol
9e40632668 avfilter: add vfrdet filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-13 08:41:51 +02:00
Maxym Dmytrychenko
cca5e4f040 qsv: adding Multi Frame Encode support
Starting from API 1.25 helps to improve performance of the simultaneous
encode, 1:N scenario, like:

./avconv  -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i
~/bbb_sunflower_1080p_60fps_normal.mp4  -vframes 600 -an \
    -filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1];
[s2]scale_qsv=960:540[o2]" \
    -map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f
rawvideo /tmp/3200a.264 \
    -map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f
rawvideo /tmp/1750a.264

Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Zhong Li
29a8ed7663 lavf/qsvvpp: bypass vpp if not needed.
Currently vpp pipeline is always created, even for the unnecessary
cases such as setting the option "vpp_qsv=w=1280:h=720" for an input
with native resolution 1280x720. Thus introduces unnecessary performance
dropping, so bypass vpp if not needed.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Josh de Kock
92fe0bf1e8 lavfi,lavd: add gitignore for generated static component lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:08:53 +01:00
Martin Vignali
f3df42e81d avfilter/x86/vf_blend : add SIMD for 16 bit version of
grainextract
grainmerge
average
extremity
negation
2018-04-05 21:46:16 +02:00
Martin Vignali
8eb0bb1108 avfilter/x86/vf_blend : reorganize DIFFERENCE macro to reduce line duplication between 8bit and 16 bit version 2018-04-05 21:46:11 +02:00
wm4
d6fc031caf avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL
PSEUDOPAL pixel formats are not paletted, but carried a palette with the
intention of allowing code to treat unpaletted formats as paletted. The
palette simply mapped the byte values to the resulting RGB values,
making it some sort of LUT for RGB conversion.

It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8,
GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap
formats. The last one, GRAY8, is more common, but its treatment is
grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming
from typical Y video planes was not mapped to the correct RGB values.
This cannot be fixed, because AVFrame.color_range can be freely changed
at runtime, and there is nothing to ensure the pseudo palette is
updated.

Also, nothing actually used the PSEUDOPAL palette data, except xwdenc
(trivially changed in the previous commit). All other code had to treat
it as a special case, just to ignore or to propagate palette data.

In conclusion, this was just a very strange old mechnaism that has no
real justification to exist anymore (although it may have been nice and
useful in the past). Now it's an artifact that makes the API harder to
use: API users who allocate their own pixel data have to be aware that
they need to allocate the palette, or FFmpeg will crash on them in
_some_ situations. On top of this, there was no API to allocate the
pseuo palette outside of av_frame_get_buffer().

This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes
the pseudo palette optional. Nothing accesses it anymore, though if it's
set, it's propagated. It's still allocated and initialized for
compatibility with API users that rely on this feature. But new API
users do not need to allocate it. This was an explicit goal of this
patch.

Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I
first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL
macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0.

Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition,
FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation
functions manually changed to not allocating a palette.
2018-04-03 17:53:00 +02:00
Josh de Kock
89029bd2c7 lav*,tests: remove several register_all calls
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 03:26:22 +01:00
James Almer
f1805d160d avfilter: bump version for the latest API change
And fix the entry in doc/APIchanges

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-01 23:22:18 -03:00
Paul B Mahol
8dff6c2844 avfilter/af_amix: add weights option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-01 20:36:35 +02:00
Martin Vignali
78b6887da3 avfilter/showvolume : indent after prev commit and add comment 2018-04-01 15:40:05 +02:00
Martin Vignali
e4cfb2c669 avfilter/showvolume : move width test for draw volume to the start of the loop 2018-04-01 15:40:01 +02:00
Martin Vignali
4152413dde avfilter/showvolume : move clear picture part to a func
and use it if fade == 0.
2018-04-01 15:39:57 +02:00
enctac
be502ec6cd vf_libvmaf: Fix memory leak
Fixes ticket #6967
2018-03-31 20:58:09 -07:00
Michael Niedermayer
35eeff30ca avfilter/vf_signature: use av_strlcpy()
Fixes: out of array access

Found-by: Kira <kira_cxy@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-01 02:58:51 +02:00
Josh de Kock
8f1382f80e lavfi: add new iteration API
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:30 +01:00
Paul B Mahol
0c25caa470 avfilter/avf_showvolume: let fade be also exactly 0
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-31 09:27:57 +02:00
Martin Vignali
328df2f712 avfilter/showvolume : indent after prev commit 2018-03-31 09:11:43 +02:00
Martin Vignali
25b22666a3 avfilter/showvolume : calculate fade only if fade < 1. 2018-03-31 09:11:39 +02:00
Martin Vignali
34304677c0 avfilter/showvolume : add comment for orientation condition 2018-03-31 09:11:34 +02:00
Nicolas Gaullier
759381d96b lavfi/silencedetect: Fix missing log at eos
Fixes ticket #6968
2018-03-29 15:45:27 +02:00
Nicolas Gaullier
5170ab20e1 lavfi/silencedetect: Fix silence_end accuracy 2018-03-29 15:45:24 +02:00
Nicolas Gaullier
56b2731aae lavfi/silencedetect: Fix silence_start accuracy 2018-03-29 15:45:20 +02:00
Nicolas Gaullier
3deb17f9fb lavfi/silencedetect: Fix when silence_start=0
0 is a valid value for silence_start
2018-03-29 15:44:47 +02:00
Nicolas Gaullier
95e47654bc lavfi/silencedetect: Add mono mode
In mono mode, silence is detected in any single channel instead of all
of them simultaneously
2018-03-29 15:40:58 +02:00
Marton Balint
084ef7d7d5 avfilter/af_pan: reject expressions referencing the same channel multiple times
Fixes parsing of expressions like c0=c0+c0 or c0=c0|c0=c1.  Previously no
error was thrown and for input channels, only the last gain factor was used,
for output channels the source channel gains were combined.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-29 00:07:39 +02:00
drfer3
29c663d50c avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails
Fixes Coverity CID 1430382.
2018-03-26 22:28:24 +01:00
Mark Thompson
213839edff vf_avgblur_opencl: Don't run kernel on pixels outside the image
The output frame size is larger than the image containing a subsampled
plane - use the actual size of the image being written rather than the
dimensions of the intended output frame.

Reviewed-by: Dylan Fernando <dylanf123@gmail.com>
2018-03-26 22:28:24 +01:00
Danil Iashchenko
9f17875134 libavfilter: Add OpenCL convolution filter
Behaves like existing convolution filter.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-26 22:26:35 +01:00
Paul B Mahol
78f8036c9c avfilter/af_mcompand: make error message more helpful
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-25 23:26:26 +02:00
Paul B Mahol
3e3d567761 avfilter/avf_showvolume: implement basic rms metering mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 22:53:13 +01:00
Paul B Mahol
a8c2d375ca avfilter/avf_showwaves: add draw mode which controls how single sample is drawn
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 19:02:51 +01:00
Paul B Mahol
fe0fdc51b5 avfilter/vf_convolution: disable fast path if rdiv/bias are different from defaults
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 16:21:38 +01:00
Paul B Mahol
4e1307c0f7 avfilter/af_channelsplit: add channels option
So user can pick which channels to extract.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 10:11:19 +01:00
Mark Thompson
abf35afb6f vf_scale_vaapi: Apply cropping rectangle to input 2018-03-22 23:19:04 +00:00
drfer3
6135c958cd lavfi: Add OpenCL avgblur filter
Behaves like the existing avgblur filter, except working on OpenCL
hardware frames. Takes exactly the same options.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-22 23:16:25 +00:00
Mark Thompson
0568af521e lavfi/opencl: Avoid deprecation warnings when built with post-1.2 headers
The intended target is OpenCL 1.2, so disable warnings for APIs deprecated
after that.  This primarily applies to clCreateCommandQueue(), we can't use
the replacement clCreateCommandQueueWithProperties() because it was
introduced in OpenCL 2.0.

Also remove some unnecessary includes from overlay and program filters so
that the define is available at the right moment.
2018-03-22 23:14:14 +00:00
Mark Thompson
2a1542d105 lavfi/opencl: Derive global work size from plane image sizes
Add a new function to find the global work size given the output image and
the required block alignment, then use it in the overlay, program and unsharp
filters.  Fixes the overlay and unsharp filters applying the kernel to
locations outside the frame when subsampled planes are present.
2018-03-22 23:12:47 +00:00
Paul B Mahol
b78d55b2e6 avfilter/avf_showvolume: add background opacity option
This makes output more visible when overlayed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-22 23:08:33 +01:00
Paul B Mahol
36cf3eb76a avfilter/vf_waveform: add orange graticule
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-21 12:21:42 +01:00
Paul B Mahol
caef95737e avfilter/vf_waveform: add xflat mode
Also use macros for xflat and aflat mode.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-21 12:21:42 +01:00
Carl Eugen Hoyos
cbbefc05b1 lavfi/deshake: Check alignment before calling asm init function.
Do this for every frame to make sure dynamic filters do not
cause crashes.

Fixes ticket #7078.
2018-03-20 01:09:23 +01:00
Martin Vignali
3e7fa34d3b avfilter/vf_premultiply : fix unpremultiply_offset for rgb input 2018-03-18 13:45:04 +01:00
Paul B Mahol
5941179e28 avfilter/af_surround: drain input at EOF
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-16 12:31:56 +01:00
Paul B Mahol
8fb0e51bd1 avfilter: add drmeter audio filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-11 13:43:33 +01:00
Carl Eugen Hoyos
9fe61b6107 lavfi/drawutils: Do not claim to support P016.
Fixes fate on big-endian.
2018-03-08 11:56:41 +01:00
Calvin Walton
2b2c8b22da libavfilter/vf_fps: Minor cleanups
Since the config_props function now references both the input and output
links, rename the 'link' variable to 'outlink'.

Fix up some mismatching indentation.

Don't bother setting the width and height on the outlink; the filter
framework does that for us.
2018-03-08 11:23:34 +01:00
Calvin Walton
e4edc567a0 libavfilter/vf_fps: Rewrite using activate callback
The old version of the filter had a problem where it would queue up
all of the duplicate frames required to fill a timestamp gap in a
single call to filter_frame. In problematic files - I've hit this in
webcam streams with large gaps due to network issues - this will queue
up a potentially huge number of frames. (I've seen it trigger the Linux
OOM-killer on particularly large pts gaps.)

This revised version of the filter using the activate callback will
generate at most 1 frame each time it is called.
2018-03-08 11:23:34 +01:00
Paul B Mahol
2f147588f7 avfilter/vf_vaguedenoiser: fix plane copy for >8 bit depth formats
Fixes #7072.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-08 11:04:57 +01:00
Paul B Mahol
ea0963181a avfilter/af_alimiter: check if buffer_size is valid
Fixes #7050.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-07 21:37:01 +01:00
Michael Niedermayer
c87bf5b6d0 avfilter/vf_*_vaapi: Add missing AV_OPT_FLAG_FILTERING_PARAM
Reviewed-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Bodecs Bela
d723994449 avfilter/avf_concat: add next command
This patch makes it possible to dinamically close the current segment
and step to the next one by introducing command handling capabilities
into the filter. This new feature is very usefull when working with
real-time sources or live streams as source. Combinig usage with zmqsend
tool you can interactively end the current segment and step to next one.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2018-03-01 12:54:06 +01:00
Martin Vignali
53a03b5c8c avfilter/x86/vf_blend : add 16 bit version for BLEND_SIMPLE, phoenix, difference for SSE and AVX2 (x86_64) 2018-02-24 21:44:19 +01:00
Martin Vignali
6c6c9d14a8 avfilter/x86/vf_blend : indent 2018-02-24 21:44:16 +01:00
Martin Vignali
7590d58b61 avfilter/x86/vf_blend : reorganize init in order to add 16 bit version 2018-02-24 21:44:13 +01:00
Rodger Combs
0419623cdc lavfi/vf_transpose: fix regression with semiplanar formats
(e.g. nv12)

Regression since 7b19e76aeb
2018-02-23 17:20:10 -06:00
Michael Niedermayer
173939259a avfilter/avf_avectorscope: Fix ;;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-15 13:48:25 +01:00
Niklas Haas
7c82e0f61e avfilter/af_loudnorm: correctly initialize PTS
Right now, the PTS always starts out as 0, which causes problems on a
seek or when inserting this filter mid-stream.

Initialize it instead to AV_NOPTS_VALUE and copy the PTS from the first
frame instead if this is the case.
2018-02-14 18:10:53 +01:00
Mark Thompson
b668a1c8b3 Merge commit 'c6bc18bc121ea66df715123c59f7ef9542c0914a'
* commit 'c6bc18bc121ea66df715123c59f7ef9542c0914a':
  vf_hwupload/hwmap: Support setting a fixed pool size

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:56:12 +00:00
Mark Thompson
6e050e0085 Merge commit 'e4cdef00263dc8b3c8de9d34ceacd00dc68979c0'
* commit 'e4cdef00263dc8b3c8de9d34ceacd00dc68979c0':
  vf_scale_qsv: Support increasing hardware frame pool size

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:55:24 +00:00
Mark Thompson
b4fca397dd Merge commit 'b128be1748f3920a14a98307265df5f2d3433e1d'
* commit 'b128be1748f3920a14a98307265df5f2d3433e1d':
  vf_*_vaapi: Support increasing hardware frame pool size

Rewritten to apply to common VAAPI code rather than specific filters.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:44:28 +00:00
Mark Thompson
bcab11a1a2 Merge commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d'
* commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d':
  lavfi: Add support for increasing hardware frame pool sizes

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:28:12 +00:00
Mark Thompson
c6bc18bc12 vf_hwupload/hwmap: Support setting a fixed pool size
These filters do not directly know whether the API they are using will
support dynamic frame pools, so this is somewhat tricky.  If the user
sets extra_hw_frames, we assume that they are aware of the problem and
set a fixed size based on that.  If not, most cases use dynamic sizing
just like they did previously.  The hardware-reverse-mapping case for
hwmap previously had a large fixed size (64) here, primarily as a hack
for QSV use - this is removed and extra_hw_frames will need to be set
for QSV to work since it requires fixed-size pools (as the other cases
do, and which didn't work before).
2018-02-11 22:11:10 +00:00
Mark Thompson
e4cdef0026 vf_scale_qsv: Support increasing hardware frame pool size
The deinterlacer does not change, because it does not allocate any new
frames (for output it uses the same pool as the input).
2018-02-11 22:11:10 +00:00
Mark Thompson
b128be1748 vf_*_vaapi: Support increasing hardware frame pool size
Defaults to 10 frames to preserve compatibility, but can allocate
fewer if extra_hw_frames is set explicitly.
2018-02-11 22:11:10 +00:00
Mark Thompson
6d86cef06b lavfi: Add support for increasing hardware frame pool sizes
AVFilterContext.extra_hw_frames functions identically to the field of
the same name in AVCodecContext.
2018-02-11 22:11:06 +00:00
Rostislav Pehlivanov
33d632d40e lavfi: add a gitignore file for OpenCL compiled kernels
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-02-07 11:25:58 +00:00
Nikolas Bowe
c86490c49a avfilter/af_join: Fix crash in join filter
Previously if ff_outlink_frame_wanted() returned 0 it could dereference a null pointer when trying to read nb_samples.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-03 21:37:19 +01:00
Steven Liu
27fe8930e0 avfilter: add comments for duplicate line
comment about the looks like a duplicate line.
but that is used to reason x is expressed from y

Suggested-by: Paul B Mahol
Suggested-by: Michael Niedermayer
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-02-01 10:55:19 +08:00
Martin Vignali
3a230ce5fa avfilter/x86/vf_blend : avfilter/x86/vf_blend : add AVX2 version for each func except divide
and optimize average, grainextract, multiply, screen, grain merge
2018-01-28 20:21:32 +01:00
Marton Balint
4d95c6d5d7 avfilter/vf_framerate: add SIMD functions for frame blending
Blend function speedups on x86_64 Core i5 4460:

ffmpeg -f lavfi -i allyuv -vf framerate=60:threads=1 -f null none

C:     447548411 decicycles in Blend,    2048 runs,      0 skips
SSSE3: 130020087 decicycles in Blend,    2048 runs,      0 skips
AVX2:  128508221 decicycles in Blend,    2048 runs,      0 skips

ffmpeg -f lavfi -i allyuv -vf format=yuv420p12,framerate=60:threads=1 -f null none

C:     228932745 decicycles in Blend,    2048 runs,      0 skips
SSE4:  123357781 decicycles in Blend,    2048 runs,      0 skips
AVX2:  121215353 decicycles in Blend,    2048 runs,      0 skips

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 18:50:52 +01:00
Marton Balint
2cbe6bac03 avfilter/vf_framerate: change blend factor precision
This is done mainly in preparation for the SIMD patches.

- for the 8-bit input, decrease the blend factor precision to 7-bit.
- for the 16-bit input, increase the blend factor precision to 15-bit.
- make sure the blend functions are not called with 0 or maximum blending
  factors, because we don't want the signed factor integers to overflow.

Fate test changes are due to different rounding.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 18:50:50 +01:00
Marton Balint
1b6ffe9aca avfilter/vf_framerate: factorize blend functions and unify filter_slice
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 17:07:37 +01:00
Marton Balint
5bf774a4a4 avfilter/vf_framerate: unify luma and chroma blending
The expressions were mathematically equvivalent...

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 17:07:37 +01:00
Michael Niedermayer
3f621455d6 avfilter/vf_transpose: Fix regression with packed pixel formats
Regression since: c6939f65a1
Found-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:10:52 +01:00
Michael Niedermayer
c6939f65a1 avfilter/vf_transpose: Fix used plane count.
Fixes out of array access
Fixes: poc.mp4

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-27 04:29:30 +01:00
Jun Zhao
4e6e1e5350 lavfi/misc_vaapi: use default value setting if without arguments.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 23:16:18 +00:00
Jun Zhao
658ac0672f lavfi/procamp_vaapi: fix the green video issue if without arguments.
Fix the green output issue when use procamp_vaapi without any
arguments, now if use procamp_vaapi without any arguments, will use
the default value to setting procamp_vaapi.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 23:16:08 +00:00
Jun Zhao
4dbae00bac lavfi/vf_xxx_vaapi: fix typo.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
2018-01-24 11:31:14 +01:00
James Almer
f0320afab9 avfilter/Makefile: skip compiling vaapi_vpp.h when vaapi is not enabled
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-23 23:42:05 -03:00
Jun Zhao
9bba10c174 lavfi: add denoise and sharpness VAAPI video filters.
Most code between them is common, so put them in a new file for
miscellaneous VAAPI filters.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao
fcf5eae4bf lavfi: add ProcAmp (color balance) VAAPI video filter.
Add ProcAmp(color balance) vaapi video filter, use the option
like -vf "procamp_vaapi=b=10:h=120:c=2.8:s=3.7" to set
brightness/hue/contrast/saturation.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao
92704c480e lavfi: use common VAAPI VPP infrastructure for vf_deinterlace_vaapi.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao
19214f0051 lavfi: use common VAAPI VPP infrastructure for vf_scale_vaapi.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Jun Zhao
dfdeed5a2c lavfi: VAAPI VPP common infrastructure.
Re-work the VAAPI common infrastructure to avoid code duplication
between filters.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-21 22:56:52 +00:00
Gyan Doshi
6c1c6c6c71 avfilter/drawtext - implement fix_bounds
When enabled, text, including effects like shadow or box, will be
completely bound within the video frame.

Default value changed to false to keep continuity of behaviour.

Fixes #6960.

Signed-off-by: Kyle Swanson <k@ylo.ph>
2018-01-20 16:30:56 -08:00
Marton Balint
e3acba0d5d avfilter/formats: remove support for deprecated channel count specification
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:07:44 +01:00
Rodger Combs
381a4820c6 lavfi/vf_scale_vaapi: set output SAR 2018-01-18 19:18:33 -06:00
Paul B Mahol
8088b5d69c avfilter/af_afade: acrossfade: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-18 16:26:14 +01:00
Gyan Doshi
e1e89c0695 avfilter/vidstab: check bytesPerPixel only for packed formats.
libvidstab introduced this variable only for packed formats but in
vf_vidstab*.c, it's checked for all inputs. So the filter errors out for YUV422/444P streams.

Fixes #6736.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-17 20:02:14 +01:00
Jun Zhao
383804edd8 lavfi/deinterlace_vaapi: fix can't show full option information.
use ffmpeg -h filter=deinterlace_vaapi can't get full help information,
the root cause is not setting the flags fileld in options.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-17 20:02:14 +01:00
Robert Nagy
856b7cae9f avfilter/vf_idet: added more YUVA formats to idet query_formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-14 23:19:01 +01:00
Marton Balint
0c31a3876d avfilter/vf_framerate: simplify filter
The framerate filter was quite convoluted with some filter_frame /
request_frame logic bugs. It seemed easier to rewrite the whole filter_frame /
request_frame part and also the frame interpolation ratio calculation part in
one step.

Notable changes:
- The filter now only stores 2 frames instead of 3
- filter_frame outputs all the frames it can to be able to handle consecutive
  filter_frame calls which previously caused early drops of buffered frames.
- because of this, request_frame is largely simplified and it only outputs
  frames on flush. Previously consecuitve request_frame calls could cause the
  filter to think it is in flush mode filling its buffer with the same frames
  causing a "ghost" effect on the output.
- PTS discontinuities are handled better
- frames with unknown PTS values are now dropped

Fixes ticket #4870.
Probably fixes ticket #5493.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-12 23:40:41 +01:00
Martin Vignali
b94cd55155 avfilter/x86/vf_interlace : add AVX2 version 2018-01-11 21:03:19 +01:00
Mark Thompson
526a87b471 vf_program_opencl: Add missing error code returns
Fixes CID #1427285.
2018-01-10 23:27:19 +00:00
Mark Thompson
9b4611a1c1 vf_overlay_opencl: Don't leak output frame on error
Fixes CID #1423277.
2018-01-10 23:25:56 +00:00
Paul B Mahol
de8a1d8d4d avfilter/af_aiir: add polar zeros/poles format variant
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 20:25:50 +01:00
Paul B Mahol
de5b12c93f avfilter/af_aiir: unbreak clipping detection
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 19:24:41 +01:00
Paul B Mahol
3c29f68b4d avfilter/af_aiir: do not leak memory on failure in convert_zp2tf()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-10 18:38:01 +01:00
Paul B Mahol
e9edd61965 avfilter/af_aiir: refactor code so it uses IIRChannel struct
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 17:46:27 +01:00
Paul B Mahol
21c99f4b40 avfilter/af_aiir: make default processing to serially cascaded
Also add several helpfull log messages.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 13:08:01 +01:00
Paul B Mahol
d9a3074b93 avfilter/af_aiir: add slice threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 12:25:35 +01:00
Paul B Mahol
7add1ca2b5 avfilter/af_aiir: add cascaded biquads support
Also add precision option.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-09 12:25:35 +01:00
Paul B Mahol
3f234a0b22 avfilter/af_aiir: do not forget to free gains too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-08 11:22:21 +01:00
Paul B Mahol
205046420d avfilter/af_aiir: fix typo which may cause overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-08 08:45:02 +01:00
Mark Thompson
dfdc146161 lavfi: Add filters to run arbitrary OpenCL programs 2018-01-07 23:24:30 +00:00
Mark Thompson
202b59cd3d lavfi/opencl: Use filter device if no input device is available
This allows implementing sources as well as filters.
2018-01-07 23:24:28 +00:00
Paul B Mahol
2d3df8e2e9 avfilter/af_aiir: rename options, provide gains in separate option
This way it can be also used for other format.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-07 21:22:38 +01:00
Paul B Mahol
6c65de3db0 avfilter/af_aiir: add support for alternative coefficients format
Support for zeros/poles syntax on Z-plane.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-07 17:03:46 +01:00
James Almer
b2c42fc6dc avfilter: deprecate avfilter_link_get_channels()
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-06 11:01:16 -03:00
Paul B Mahol
50b3cd22dd avfilter/av_biquads: scale a0 too
Fixes bug when using commands to alter coefficients.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-06 14:58:00 +01:00
James Almer
da5b05c833 Revert "avfilter: deprecate avfilter_link_get_channels()"
This reverts commit 798dcf2432.

It was applied by accident before it could be reviewed.
2018-01-05 22:13:28 -03:00
James Almer
798dcf2432 avfilter: deprecate avfilter_link_get_channels()
And move the channels field to the public section of the struct.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-05 17:49:09 -03:00
Paul B Mahol
52c959a237 avfilter/af_aiir: do not crash with invalid options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-05 19:58:07 +01:00
James Almer
167e659b28 avfilter: use a mutex instead of atomics in avfilter_register()
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-05 13:18:34 -03:00
Paul B Mahol
7bb1be9af0 avfilter: add arbitrary audio IIR filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-05 17:04:21 +01:00
Marc-Antoine Arnaud
e425047a47 avfilter: rename variables in geq
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-05 03:35:48 +01:00
Marc-Antoine Arnaud
ac6b0bba79 avfilter: slice processing for geq
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-05 03:35:48 +01:00
Marc-Antoine Arnaud
206b25f9f4 avfilter: reorder variable definition in geq
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-05 03:35:48 +01:00
Marton Balint
f528c49c7c avfilter/vf_framerate: calculate interpolation as integer
It was truncated to int later on anyway. Fate test changes are due to rounding
instead of truncation.

Fixes fate test failures on x86-32 (gcc 4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1))
after 090b740680.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-04 22:37:43 +01:00
Paul B Mahol
89bbf5c7ec avfilter: add hilbert source FIR filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-04 12:26:19 +01:00
Paul B Mahol
88cbd25b19 avfilter: pass outlink to ff_get_audio_buffer()
This is more correct.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-03 22:52:47 +01:00
Nicolas George
29b5f3115d lavfi/framesync: remove an invalid free. 2018-01-03 19:54:39 +01:00