1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-18 03:19:31 +02:00
Commit Graph

6582 Commits

Author SHA1 Message Date
Nicolas George
f8d7b5febb lavfi: add a preinit callback to filters.
It is necessary for filters with child objects, to set the class
and default options values.
2017-08-29 10:19:04 +02:00
Nicolas George
19804024d5 lavfi/vf_overlay: move to framesync2. 2017-08-29 10:19:04 +02:00
Nicolas George
0ae8df4109 lavfi/framesync2: add dualinput helper functions. 2017-08-29 10:19:04 +02:00
Nicolas George
6bde475cf2 lavfi/f_streamselect: convert to framesync2. 2017-08-29 10:19:04 +02:00
Michael Niedermayer
aa26258faa avfilter/vf_zoompan: remove AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Suggested-by: <durandal_1707>
Fixes: assertion failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-27 20:41:56 +02:00
Paul B Mahol
bf39f7eadc avfilter/vf_zoompan: parse zoom,x and y expression during initialization
Fixes #6127.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-27 17:13:52 +02:00
Paul B Mahol
2ce43274e3 avfilter/vf_zoompan: switch to activate
Fixes #5182.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-27 17:13:21 +02:00
Paul B Mahol
99b6e68441 avfilter/af_amix: do not request samples if inlink reached EOF
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-27 08:53:50 +02:00
Paul B Mahol
7f5c655833 avfilter/af_amix: simplify const entries for duration in amix_options[]
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-26 21:17:27 +02:00
Paul B Mahol
15e9c4afdc avfilter/af_amix: switch to activate
Really fixes hangs and infinite loops.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-26 20:59:21 +02:00
Paul B Mahol
9d6aab6fa1 avfilter/af_surround: make volume configurable for front center and lfe channel 2017-08-26 11:30:31 +02:00
Muhammad Faiz
3ddd10290a avfilter/af_firequalizer: fix minval on cepstrum calculation
The impulse response is scaled with 2/rdft_len.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-08-25 17:36:04 +07:00
Paul B Mahol
48ddd8ddec avfilter/src_movie: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:29:50 +02:00
Paul B Mahol
5e706a2afb avfilter/split: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:27:19 +02:00
Paul B Mahol
0b940c95b2 avfilter/vf_decimate: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:23:21 +02:00
Paul B Mahol
dfea94ce99 avfilter/vf_fieldmatch: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:20:13 +02:00
Paul B Mahol
1a58da434a avfilter/avf_concat: check ff_insert_pad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:16:46 +02:00
Paul B Mahol
01b986cf18 avfilter/f_select: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:05:09 +02:00
Paul B Mahol
730734d4f3 avfilter/af_channelsplit: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 10:05:07 +02:00
Paul B Mahol
99dd47a647 avfilter/vf_extractplanes: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:57:53 +02:00
Paul B Mahol
9bd1bf382e avfilter/f_interleave: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:53:46 +02:00
Paul B Mahol
f39136b0a7 avfilter/af_merge: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:50:57 +02:00
Paul B Mahol
db5604ac26 avfilter/af_join: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:49:01 +02:00
Paul B Mahol
13f9639e3e avfilter/af_headphone: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:45:20 +02:00
Paul B Mahol
1e7ce6d925 avfilter/af_amix: check ff_insert_inpad() for failure 2017-08-25 09:36:22 +02:00
Paul B Mahol
4b96fd2b1e avfilter/af_agate: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:07:28 +02:00
Muhammad Faiz
e0e991f8a1 avfilter/af_firequalizer: reindent after previous commit
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-08-25 10:39:16 +07:00
Muhammad Faiz
ae1ce0db91 avfilter/af_firequalizer: add min_phase option
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-08-25 10:35:23 +07:00
Paul B Mahol
f0f48884b0 avfilter/af_sidechaincompress: switch to activate 2017-08-24 20:34:35 +02:00
Paul B Mahol
f8d0689d3f avfilter/vf_blend: rename addition128 and difference128 to grainmerge and grainextract 2017-08-24 14:45:52 +02:00
Paul B Mahol
e1be40bbb5 avfilter/vf_pseudocolor: add high bitdepth support 2017-08-22 12:50:24 +02:00
Paul B Mahol
f5361ee56f avfilter/vf_pseudocolor: add support for some subsampled formats 2017-08-20 18:12:15 +02:00
Paul B Mahol
e3a4afca07 avfilter: add pseudocolor filter 2017-08-19 12:42:24 +02:00
Paul B Mahol
16efcfe413 avfilter/vf_weave: fix top vs bottom field order
Fixes #6590.
2017-08-16 13:37:53 +02:00
Paul B Mahol
7b19e76aeb avfilter/vf_transpose: rewrite for x86 SIMD
Transpose first in chunks of 8x8 blocks.
15% faster overall.
2017-08-16 09:28:31 +02:00
Vittorio Giovara
62dfa2ba14 Add tonemap filter
Based off mpv automatic tonemapping capabilities.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-15 15:27:42 +02:00
Vittorio Giovara
8b9ae9a8e0 zscale: Enable single precision input/ouput filtering
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-15 15:27:40 +02:00
Paul B Mahol
8d2da0939c avfilter/vf_datascope: make it possible to change pixscope window position 2017-08-15 13:54:19 +02:00
Timo Rothenpieler
62b75537db avfilter/scale_npp: fix logic used in previous patch 2017-08-14 16:03:11 +02:00
Timo Rothenpieler
f4ebbda566 avfilter/scale_npp: check for buffer allocation failure
I totally did not forget to amend this to the previous patch...
2017-08-14 14:15:27 +02:00
Yogender Gupta
77c5a54192 avfilter/scale_npp: fix passthrough mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-08-14 13:56:10 +02:00
Marton Balint
498c90c708 avfilter/vf_overlay: fix alpha blending for planar formats with a transparent background
When the background had an alpha channel, the old code in blend_plane
calculated premultiplied alpha from the destination plane colors instead of the
destination alpha.

Also the calculation of the output alpha should only happen after the color
planes are already finished.

Fixes output of:
ffplay -f lavfi "testsrc2=alpha=32[a];color=black[b];[b][a]overlay[out0]"

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-10 22:25:51 +02:00
Andy
448c88e1a5 avfilter/dynaudnorm: increment input outside of the FFMIN macro so it doesn't get double incremented 2017-08-09 10:21:36 +02:00
Paul B Mahol
41096904d0 avfilter/vf_separatefields: stop leaking last frame
This can happen when filtering is ended without receiving EOF.
2017-08-08 18:53:10 +02:00
Paul B Mahol
1bef0088dc avfilter/drawutils: add gray9/10/12 support 2017-08-07 18:39:29 +02:00
Paul B Mahol
181c9abd47 avfilter/vf_premultiply: add inplace mode 2017-08-07 18:15:36 +02:00
Paul B Mahol
bac508fec1 avfilter: add support for GRAY9 and GBRAP10 2017-08-07 13:11:09 +02:00
Paul B Mahol
86222a7ea0 avfilter/vf_waveform: add support for 9 bit depth lowpass 2017-08-07 13:09:57 +02:00
Paul B Mahol
7bfbc2d787 avfilter/vf_extractplanes: add 9 bitdepth support 2017-08-07 13:09:56 +02:00
Paul B Mahol
5621a99e27 avfilter/drawutils: support gbrap10 too 2017-08-07 13:06:34 +02:00
Paul B Mahol
2cc56741b1 avfilter: add floodfill filter 2017-08-05 21:05:22 +02:00
Paul B Mahol
80bc648e77 avfilter: add tlut2 filter 2017-08-04 11:45:08 +02:00
Muhammad Faiz
f2d23ec03f avfilter/vf_ssim: fix temp size calculation
Also use av_mallocz_array.
Fix Ticket6519.

Reviewed-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-08-04 06:53:39 +07:00
Yogender Gupta
2e8679373a hwupload_cuda : Add 10/16 bit format support
Signed-off-by: Philip Langdale <philipl@overt.org>
2017-08-03 15:25:35 -07:00
Paul B Mahol
c79e753471 avfilter: add unpremultiply filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-02 11:13:49 +02:00
Nicolas George
8b2cd8e0e4 lavfi/vf_displace: move to "activate" design. 2017-07-30 12:27:17 +02:00
Nicolas George
5dbb111900 lavfi/vf_hysteresis: move to "activate" design. 2017-07-30 12:27:13 +02:00
Nicolas George
dbc4af862e lavfi/vf_lut2: move to "activate" design. 2017-07-30 12:27:10 +02:00
Nicolas George
27d8af03ae lavfi/vf_maskedclamp: move to "activate" design. 2017-07-30 12:27:06 +02:00
Nicolas George
0bc331bd57 lavfi/vf_mergeplanes: move to "activate" design. 2017-07-30 12:27:03 +02:00
Nicolas George
a5e3b0c193 lavfi/vf_maskedmerge: move to "activate" design. 2017-07-30 12:27:00 +02:00
Nicolas George
620608467f lavfi/vf_midequalizer: move to "activate" design. 2017-07-30 12:26:57 +02:00
Nicolas George
b894415a70 lavfi/vf_premultiply: move to "activate" design. 2017-07-30 12:26:53 +02:00
Nicolas George
dbf7a67094 lavfi/vf_remap: move to "activate" design. 2017-07-30 12:26:50 +02:00
Nicolas George
d07e25de76 lavfi/vf_threshold: move to "activate" design.
Also fix missing dependency.
2017-07-30 12:26:43 +02:00
Nicolas George
0dd8320e16 lavfi/vf_stack: move to "activate" design. 2017-07-30 12:26:34 +02:00
Nicolas George
4e0e9ce2dc lavfi/framesync2: implement "activate" design.
With this helper API, filters that used the first framesync
helper API can easily be changed to use the new and more
extensible design for filters with a single activate() callback.
2017-07-30 12:24:03 +02:00
Nicolas George
ed1c884b9e lavfi: add outlink helper functions.
These wrappers cost nothing, they make the namespace more
consistent and they will be useful if/when locking becomes
necessary.
2017-07-30 12:24:00 +02:00
Nicolas George
b77f041dff lavfi: make FFERROR_NOT_READY available to filters.
I am not entirely sure that this return code is useful,
but having and using it makes no harm.
2017-07-30 12:23:56 +02:00
Nicolas George
873306f265 lavfi/framesync2: rename all conflicting symbols. 2017-07-30 12:23:54 +02:00
Nicolas George
cffea1b483 lavfi: copy framesync into framesync2.
framesync2 will be the base for the version using activate.
Most of the logic will be the same, but the code cannot be shared.
Copying the file initially without change will make the diff
easier to read.
2017-07-30 12:23:52 +02:00
Nicolas George
1daacba91f Revert "Revert "lavfi/buffersrc: push the frame deeper if requested.""
This reverts commit 04aa09c4bc
and reintroduces 0ff5567a30 that
was temporarily reverted due to minor regressions.

It also reverts e5bce8b4ce that fixed FATE refs.
The fate-ffm change is caused by field_order now being set
on the output format because the first frame arrives earlier.
The fate-mxf change is assumed to be the same.
2017-07-30 12:22:41 +02:00
Nicolas George
bbc7cfbf1e lavfi/testsrc2: fix completely transparent alpha. 2017-07-25 09:27:35 +02:00
Muhammad Faiz
7e9f550003 avfilter/w3fdif: do not write to line before start line
That line has been written by previous job.
Fix tsan warning.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-23 20:32:42 +07:00
Vittorio Giovara
2e91a96d7b zscale: Factor out graph building 2017-07-21 20:07:40 +02:00
Vittorio Giovara
0a243bedec zscale: Factor out format initialization 2017-07-21 20:07:40 +02:00
Paul B Mahol
12791ec5b0 avfilter/af_astats: measure dynamic range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 21:07:45 +02:00
Paul B Mahol
a17fcd8e04 avfilter/af_astats: do not overwrite already set values when doing reset
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 20:11:43 +02:00
George Boyle
6e156075b0 avfilter: Add blue and violet noise generation filters
For the blue and violet noise, I took the pink and brown noise
respectively and subtracted the offsets instead of adding them. When I
eyeball the frequency spectrum of the resulting outputs it looks correct
to me, i.e. the blue graph appears to be a mirror image of the pink, and
the same can be said of the violet and the brown. I did not do anything
else to confirm the correctness.
2017-07-19 19:51:04 +02:00
Muhammad Faiz
22b72de04b avfilter/pthread: use slice threading from avutil
Benchmark (with 2 cpus):
./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
    -filter_threads $threads -vf transpose=clock -f null null
threads=2:
  old: 31.129s 31.446s 31.574s
  new: 29.602s 29.636s 29.656s
threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation):
  old: 40.132s 40.279s 40.279s
  new: 39.308s 39.570s 39.693s
threads=4:
  old: 31.306s 31.366s 31.654s
  new: 30.231s 30.360s 30.451s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:51:38 +07:00
Ashish Singh
615479d51c avfilter: add LIBVMAF filter
This one changes the previous vmaf patch to libvmaf to keep it separate from the
native implementation of vmaf inside ffmpeg later.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-07-16 08:21:32 -04:00
James Almer
5688fd77b5 x86/vf_limiter: make limiter functions work on x86_32
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-13 18:17:17 -03:00
Paul B Mahol
01e545d046 avfilter: add limiter filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-08 11:49:54 +02:00
Derek Buitenhuis
b198e09138 af_amix: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:32:03 -04:00
Derek Buitenhuis
704b774ae0 af_tempo: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:24:49 -04:00
Kevin Mark
d32a6c36e4 libavfilter/scale2ref: Maintain main input's DAR
The scale2ref filter will now maintain the DAR of the main input and
not the DAR of the reference input. This previous behavior was deemed
counterintuitive for most (all?) use-cases.

Before:
scale2ref=iw/4:ow/mdar
in  w:320 h:240 fmt:rgb24 sar:1/1
ref w:640 h:360 fmt:rgb24 sar:1/1
out w:160 h:120 fmt:rgb24 sar:4/3 flags:0x2
SAR: ((120 * 640) / (160 * 360)) * (1 / 1) = 4 / 3
DAR: (160 / 120) * (4 / 3) = 16 / 9
(main out now same DAR as ref)

Now:
scale2ref=iw/4:ow/mdar
in  w:320 h:240 fmt:rgb24 sar:1/1
ref w:640 h:360 fmt:rgb24 sar:1/1
out w:160 h:120 fmt:rgb24 sar:1/1 flags:0x2
SAR: ((120 * 320) / (160 * 240)) * (1 / 1) = 1 / 1
DAR: (160 / 120) * (1 / 1) = 4 / 3
(main out same DAR as main in)

The scale2ref FATE test has also been updated.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-04 15:09:10 +02:00
Paul B Mahol
1212041c91 avfilter/vf_ssim: use unsigned so result can be properly stored
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-04 10:21:14 +02:00
Michael Niedermayer
ecc16d893d avfilter/vf_geq: >8 bps support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-30 12:34:34 +02:00
James Almer
d2ef9e6e7f x86/vf_blend: use ABS2 macro 2017-06-27 20:45:55 -03:00
James Almer
0daa1cf073 x86/vf_blend: optimize difference and negation functions
Process more pixels per loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-27 13:17:23 -03:00
James Almer
fa50d9360b x86/vf_blend: add sse and ssse3 extremity functions
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-27 13:17:23 -03:00
Paul B Mahol
e9510dc032 avfilter: remove usage of empty header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-26 19:43:41 +02:00
Paul B Mahol
22a03c2900 avfilter/vf_blend: add extremity blend mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25 16:39:10 +02:00
Paul B Mahol
8a14374ab3 avfilter/vf_waveform: allow alpha output for >8 depth planar rgb inputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25 13:14:22 +02:00
Paul B Mahol
f269a1e0b8 avfilter/vf_overlay: separate functions with main alpha
~5-15% faster overall with main input without alpha.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25 12:32:53 +02:00
Paul B Mahol
5c1f4330d4 avfilter/vf_lut2: add support for gray10 and gray12 pixel formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 22:40:32 +02:00
Paul B Mahol
c1b43e8452 avfilter/vf_overlay: remove rgb option
Its been deprecated for over 3 years.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:20:46 +02:00
Paul B Mahol
f483949188 avfilter/af_headphone: do not free frame that's gonna be reused later
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:15:57 +02:00
Paul B Mahol
c90b88090c avfilter: do not leak AVFrame on failed buffer allocation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:15:57 +02:00
Ronald S. Bultje
97f7f83169 vf_spp: only assign function pointers if permutation matches expectations. 2017-06-24 07:53:15 -04:00