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

5566 Commits

Author SHA1 Message Date
Paul B Mahol
a330430238 avfilter/vf_stack: make it possible to stop with shortest stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-26 10:02:00 +01:00
Paul B Mahol
56ff563f3b avfilter: add '.' at and of long filter description where it is missing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-25 22:22:17 +01:00
Paul B Mahol
142894d720 avfilter: do not leak frame if ff_get_audio_buffer() fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-25 21:59:33 +01:00
Paul B Mahol
fd3df296c1 avfilter/af_alimiter: make description a bit longer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-25 21:52:36 +01:00
Paul B Mahol
5b106215ba avfilter/af_sidechaincompress: add forgotten option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-25 12:57:13 +01:00
Ganesh Ajjanagadde
990619968a avfilter/vsrc_mandelbrot: change sin to sinf for color computation
lrintf is anyway used, suggesting we only care up to floating precision.
Rurthermore, there is a compat hack in avutil/libm for this function,
and it is used in avcodec/aacps_tablegen.h.

This yields a non-negligible speedup. Sample benchmark:
x86-64, Haswell, GNU/Linux:

old (draw_mandelbrot):
274635709 decicycles in draw_mandelbrot,     256 runs,      0 skips
300287046 decicycles in draw_mandelbrot,     512 runs,      0 skips
371819935 decicycles in draw_mandelbrot,    1024 runs,      0 skips
336663765 decicycles in draw_mandelbrot,    2048 runs,      0 skips
581851016 decicycles in draw_mandelbrot,    4096 runs,      0 skips

new (draw_mandelbrot):
269882717 decicycles in draw_mandelbrot,     256 runs,      0 skips
296359285 decicycles in draw_mandelbrot,     512 runs,      0 skips
370076599 decicycles in draw_mandelbrot,    1024 runs,      0 skips
331478354 decicycles in draw_mandelbrot,    2048 runs,      0 skips
571904318 decicycles in draw_mandelbrot,    4096 runs,      0 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-24 20:36:40 -05:00
Ganesh Ajjanagadde
e9c7493f19 avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculation
This rewrites into a similar expression avoiding sqrt. Similarity is
assured since sqrt(x^2 + y^2)/(x+y) lies in [1/sqrt(2), 1] for x, y > 0.

Tested on x86-64, Haswell, GNU/Linux.
Command:
ffmpeg -f lavfi -i mandelbrot -f null -

old (draw_mandelbrot):
277625266 decicycles in draw_mandelbrot,     256 runs,      0 skips
304527322 decicycles in draw_mandelbrot,     512 runs,      0 skips
377593582 decicycles in draw_mandelbrot,    1024 runs,      0 skips
338539499 decicycles in draw_mandelbrot,    2048 runs,      0 skips
583630357 decicycles in draw_mandelbrot,    4096 runs,      0 skips

new (draw_mandelbrot):
274635709 decicycles in draw_mandelbrot,     256 runs,      0 skips
300287046 decicycles in draw_mandelbrot,     512 runs,      0 skips
371819935 decicycles in draw_mandelbrot,    1024 runs,      0 skips
336663765 decicycles in draw_mandelbrot,    2048 runs,      0 skips
581851016 decicycles in draw_mandelbrot,    4096 runs,      0 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-24 20:36:40 -05:00
Timothy Gu
15dcc506d7 vsrc_mandelbrot: Don't use German in comments 2015-11-24 17:33:07 -08:00
Marton Balint
839eb1c77d lavfi/select: add support for concatdec_select option
This option can be used to select useful frames from an ffconcat file which is
using inpoints and outpoints but where the source files are not intra frame
only.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-25 00:34:29 +01:00
Michael Niedermayer
e4bfc726cd avfilter/vsrc_mandelbrot: Fix speed regression
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-24 03:17:32 +01:00
Paul B Mahol
04a7ce1a8c avfilter/af_afade: add missing fifo write for second stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-23 10:37:51 +01:00
Ganesh Ajjanagadde
18b4016431 avfilter/vf_fspp: use M_SQRT1_2, M_SQRT2
This uses M_SQRT1_2, M_SQRT2 instead of the actual literals. Fixed point
values remain unchanged.
Patch tested with FATE on x86.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-22 16:16:16 -05:00
Ganesh Ajjanagadde
7769e6602d avfilter/af_dynaudnorm: use M_PI
The ad-hoc pi constant has a ludicrous number of digits that offer no
value whatsoever. M_PI is more consistent and readable across the
codebase.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-20 08:29:56 -05:00
Hendrik Leppkes
51a3e52593 Merge commit '1339009c4924a20e872aa62897097bf5d071157c'
* commit '1339009c4924a20e872aa62897097bf5d071157c':
  vf_showinfo: show timebase & framerate too

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 15:01:15 +01:00
Hendrik Leppkes
1cb78a0dcf Merge commit '7d12cba95ca15198a930c05458dc414ac00c578b'
* commit '7d12cba95ca15198a930c05458dc414ac00c578b':
  vf_framepack: Check and update frame_rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 14:58:33 +01:00
Hendrik Leppkes
ef636aacf5 Merge commit '018bdaed37d2f1735dbecfc58309a1a164abadd5'
* commit '018bdaed37d2f1735dbecfc58309a1a164abadd5':
  setpts: add FRAME_RATE constant

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 14:56:53 +01:00
Hendrik Leppkes
cb98712866 Merge commit '9df477e03ef74068f3de130adc4dd34349a16ef2'
* commit '9df477e03ef74068f3de130adc4dd34349a16ef2':
  yadif: update frame rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 14:50:33 +01:00
Hendrik Leppkes
0b73d0ff0d Merge commit '48ff6683ba5d40b629428673b1028e8ec542a9fa'
* commit '48ff6683ba5d40b629428673b1028e8ec542a9fa':
  lavfi: add a frame_rate field to AVFilterLink.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 14:47:29 +01:00
Michael Niedermayer
1b539fbfe3 avfilter/avf_showcqt: Fix uninitialized return code
Fixes CID1322329

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-11 01:07:45 +01:00
Paul B Mahol
5b349c8d7c aviflter/vf_waveform: speed up non-color filters
Remove loops, output is also more interesting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-10 20:42:13 +01:00
Hendrik Leppkes
43266457b4 Merge commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5'
* commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5':
  vf_pad: fix x, y option expression evaluation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:13:46 +01:00
Michael Niedermayer
1339009c49 vf_showinfo: show timebase & framerate too
(cherry picked from ffmpeg commit fdb9399681)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:15:23 +01:00
Michael Niedermayer
11f87ca71e vf_frei0r: also set AVFilterLink.frame_rate
(cherry picked from ffmpeg commit 353cf95f94)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:42 +01:00
Michael Niedermayer
7d12cba95c vf_framepack: Check and update frame_rate
(cherry picked from ffmpeg commit a46a23d30f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Stefano Sabatini
018bdaed37 setpts: add FRAME_RATE constant
Useful for dealing with constant frame-rate video.

(cherry picked from ffmpeg commit 722762f7e1)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Michael Niedermayer
9df477e03e yadif: update frame rate
(cherry picked from ffmpeg commit 3161958455)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Michael Niedermayer
65e73bc60f vf_interlace: implement frame rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from ffmpeg commit 227b4458fb)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Stefano Sabatini
5e91a5c5cf testsrc: set output framerate
(cherry picked from ffmpeg commit 7cd5fa35fe)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Nicolas George
1062880d69 vf_fps: set frame_rate.
(cherry picked from ffmpeg commit 0d24931604)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Nicolas George
61fb67dcb2 buffersrc: accept the frame rate as argument.
(cherry picked from ffmpeg commit 9ca440679d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Nicolas George
48ff6683ba lavfi: add a frame_rate field to AVFilterLink.
(cherry picked from ffmpeg commit 7b42036b3b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:34 +01:00
Kyle Swanson
6a11c7f160 avfilter: add anoisesrc
Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-08 18:50:26 +01:00
Nicolas George
785ac437be lavfi/af_asyncts: remove looping on request_frame(). 2015-11-07 16:43:36 +01:00
Nicolas George
a08fb3983f lavfi/af_amix: mostly fix scheduling. 2015-11-07 16:43:36 +01:00
Nicolas George
f53c4b6a18 lavfi/vf_framepack: fix scheduling. 2015-11-07 16:43:36 +01:00
Nicolas George
d0b82d798d lavfi/af_join: partially fix scheduling. 2015-11-07 16:43:36 +01:00
Nicolas George
67d3f5296e lavfi/fifo: do not assume request_frame() returns a frame. 2015-11-07 16:43:36 +01:00
Nicolas George
79c1be124e lavfi/avf_concat: return immediately after requesting a frame on input. 2015-11-07 16:43:36 +01:00
Nicolas George
d92e0848d9 lavfi: remove astreamsync.
It was only useful for very specific testing purposes
and appears to be currently partially broken.
2015-11-07 16:43:36 +01:00
Nicolas George
7037f9430b lavfi: add realtime filter.
Similar to the -re option in ffmpeg that only works for input files.
Can be used at any place in the filter graph.
2015-11-07 16:04:07 +01:00
Nicolas George
b16e569312 lavfi: add testsrc2 test source.
Similar to testsrc, but using drawutils and therefore
supporting a lot of pixel formats instead of just rgb24.
This allows using it as input for other tests without
requiring a format conversion.
It is also slightly faster than testsrc for some reason.
2015-11-07 16:02:48 +01:00
John Stebbins
2ec112f71c vf_pad: fix x, y option expression evaluation
Calculation of x an y based on width and height did not work when
width == 0 or height == 0.  "0" substitutes the input width and
height, but did so too late for x, y expression evaluation.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-06 15:03:51 +01:00
Muhammad Faiz
6df2c94130 avfilter/showcqt: remove yuv offset
this makes draw_bar faster
slightly different result with old version

check result (with ~3 minutes audio file):
old:
    real    0m49.611s
    user    0m49.260s
    sys     0m0.073s
new:
    real    0m47.606s
    user    0m47.378s
    sys     0m0.068s
PSNR between old and new:
yuv444p PSNR
    y:109.519298 u:107.506485 v:104.746878
    average:106.816074 min:99.167305 max:inf
yuv422p PSNR
    y:109.519298 u:108.025801 v:104.489734
    average:107.279817 min:98.007467 max:inf
yuv420p PSNR
    y:109.519298 u:108.363875 v:105.290200
    average:108.261511 min:97.461812 max:inf

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-03 23:47:09 +01:00
Ganesh Ajjanagadde
92e483f8ed all: use FFDIFFSIGN to resolve possible undefined behavior in comparators
FFDIFFSIGN was created explicitly for this purpose, since the common
return a - b idiom is unsafe regarding overflow on signed integers. It
optimizes to branchless code on common compilers.

FFDIFFSIGN also has the subjective benefit of being easier to read due
to lack of ternary operators.

Tested with FATE.

Things not covered by this are unsigned integers, for which overflows
are well defined, and also places where overflow is clearly impossible,
e.g an instance where the a - b was being done on 24 bit values.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-03 16:28:30 -05:00
Ganesh Ajjanagadde
03f5bcd921 avfilter/vf_rotate: correct log message
There seems to be some typos in the log messages that are fixed by this.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-03 16:22:33 -05:00
Ganesh Ajjanagadde
430f943e63 avfilter/vf_frei0r: use av_strtod instead of strtod for added flexibility
This converts the usage of strtod to av_strtod in order to unify and
make number parsing more consistent. This also adds support for SI
postfixes.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-02 06:50:18 -05:00
Timothy Gu
dee7440531 vf_boxblur: Templatize blur{8,16}
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-01 18:52:50 -08:00
Ganesh Ajjanagadde
7910a2c269 avfilter/vf_deshake: replace qsort with AV_QSORT
qsort is called indirectly in filter_frame, suggesting its performance
criticality. AV_QSORT is substantially faster due to the inlining of the
comparison callback. Thus, the increase in performance should be worth
the increase in binary size.

This optimization is just a low hanging fruit. The trac ticket 1430 is
a request for an improved deshake filter.

Sample benchmark (x86-64, Haswell, GNU/Linux):
File: original from https://trac.ffmpeg.org/ticket/1430
command: ffmpeg -stream_loop 8 -i file.webm -vf deshake=rx=64:ry=64 -f null -

Timer truncated at 1024 runs.
new:
28260 decicycles in qsort,       1 runs,      0 skips
35570 decicycles in qsort,       2 runs,      0 skips
39010 decicycles in qsort,       4 runs,      0 skips
46897 decicycles in qsort,       8 runs,      0 skips
40442 decicycles in qsort,      16 runs,      0 skips
41611 decicycles in qsort,      32 runs,      0 skips
40345 decicycles in qsort,      64 runs,      0 skips
38967 decicycles in qsort,     128 runs,      0 skips
38647 decicycles in qsort,     256 runs,      0 skips
40238 decicycles in qsort,     512 runs,      0 skips
39676 decicycles in qsort,    1024 runs,      0 skips

old:
1740280 decicycles in qsort,       1 runs,      0 skips
 923560 decicycles in qsort,       2 runs,      0 skips
 511330 decicycles in qsort,       4 runs,      0 skips
 309720 decicycles in qsort,       8 runs,      0 skips
 194900 decicycles in qsort,      16 runs,      0 skips
 142686 decicycles in qsort,      32 runs,      0 skips
 112516 decicycles in qsort,      64 runs,      0 skips
  98166 decicycles in qsort,     128 runs,      0 skips
  88147 decicycles in qsort,     256 runs,      0 skips
  88706 decicycles in qsort,     512 runs,      0 skips
  86783 decicycles in qsort,    1024 runs,      0 skips

Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-31 10:25:00 -04:00
Michael Niedermayer
34f49bfacd avfilter/avf_showcqt: Replace all fmin* and fmax* by FFMIN/FFMAX
Should fix build on x86_32-msvc2012

The alternative of emulating fmin/fmax* turns out to be non trivial

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 00:29:51 +01:00
Muhammad Faiz
306808f10f avfilter/showcqt: fix dependency with avformat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 22:45:46 +01:00
Steven Robertson
b38e685c05 vf_lut: Add support for RGB48 and RGBA64.
Signed-off-by: Steven Robertson <steven@strobe.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 03:55:12 +01:00
Ganesh Ajjanagadde
0fe5dcd660 avfilter/avf_showvolume: use log10 instead of log()/M_LN10
This is likely more precise and conveys the intent better.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:10:49 -04:00
Ganesh Ajjanagadde
b8e1980807 avfilter/vf_ssim: use log10 instead of log()/log(10)
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:02:05 -04:00
Ganesh Ajjanagadde
ec66bcc0e7 avfilter/avf_showspectrum: use log10 instead of log()/...
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:55:10 -04:00
Ganesh Ajjanagadde
59d37f5a4e avfilter/vf_psnr: use log10 instead of log()/log(10)
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:53:11 -04:00
Ganesh Ajjanagadde
4d0d85c94a avfilter/af_volume: use log10 instead of log()/M_LN10
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:46:00 -04:00
Kyle Swanson
3b1939bb66 avfilter/tremolo: fix wavetable buffer size
Signed-off-by: Kyle Swanson <k@ylo.ph>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-29 18:16:09 +01:00
Kyle Swanson
e5451f25d3 avfilter/asrc_sine: fix options typos
Signed-off-by: Kyle Swanson <k@ylo.ph>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-29 17:43:13 +01:00
James Almer
fc460fe618 avfilter/showcqt: fix compilation with libswscale disabled
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-29 02:11:58 -03:00
Michael Niedermayer
492dead9ac avfilter/avf_showcqt: Fix ;;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-28 03:26:08 +01:00
Muhammad Faiz
f8d429e0c5 avfilter/avf_showcqt: rewrite showcqt and add features
add yuv444p, yuv422p, and yuv420p output format (lower cpu usage
on ffplay playback because it does not do format conversion)
custom size with size/s option (fullhd option is deprecated)
custom layout with bar_h, axis_h, and sono_h option
support rational frame rate (within fps/r/rate option)
relaxed frame rate restriction (support fractional sample step)
support all input sample rates
separate sonogram and bargraph volume (with volume/sono_v and
volume2/bar_v)
timeclamp option alias (timeclamp/tc)
fcount option
gamma option alias (gamma/sono_g and gamma2/bar_g)
support custom frequency range (basefreq and endfreq)
support drawing axis using external image file (axisfile option)
alias for disabling drawing to axis (text/axis)
possibility to optimize it using arch specific asm code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-28 02:30:03 +01:00
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Timothy Gu
852c4b3d42 drawutils: Reindent 2015-10-26 23:24:30 -07:00
Timothy Gu
87d5509261 avfilter: Reindent 2015-10-26 23:24:18 -07:00
James Almer
d897d4c12d x86/vf_w3fdif: use aligned loads in w3fdif_complex_high
Found-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-27 01:49:22 -03:00
Kyle Swanson
dcb95ef482 avfilter: add vibrato filter
Signed-off-by: Kyle Swanson <k@ylo.ph>
2015-10-26 20:56:17 +01:00
Luca Barbato
ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Ganesh Ajjanagadde
68a0a164d1 avfilter/vf_removegrain: replace qsort with AV_QSORT
filter_slice calls qsort, so qsort is in a performance critical
position. AV_QSORT is substantially faster due to the inlining of the
comparison callback. Thus, the increase in performance is worth the
increase in binary size.

Sample benchmark (x86-64, Haswell, GNU/Linux),
filter-removegrain-mode-02 (from FATE)
new:
  24060 decicycles in qsort,       1 runs,      0 skips
  15690 decicycles in qsort,       2 runs,      0 skips
   9307 decicycles in qsort,       4 runs,      0 skips
   5572 decicycles in qsort,       8 runs,      0 skips
   3485 decicycles in qsort,      16 runs,      0 skips
   2517 decicycles in qsort,      32 runs,      0 skips
   1979 decicycles in qsort,      64 runs,      0 skips
   1911 decicycles in qsort,     128 runs,      0 skips
   1568 decicycles in qsort,     256 runs,      0 skips
   1596 decicycles in qsort,     512 runs,      0 skips
   1614 decicycles in qsort,    1024 runs,      0 skips
   1874 decicycles in qsort,    2046 runs,      2 skips
   2186 decicycles in qsort,    4094 runs,      2 skips

old:
 246960 decicycles in qsort,       1 runs,      0 skips
 135765 decicycles in qsort,       2 runs,      0 skips
  70920 decicycles in qsort,       4 runs,      0 skips
  37710 decicycles in qsort,       8 runs,      0 skips
  20831 decicycles in qsort,      16 runs,      0 skips
  12225 decicycles in qsort,      32 runs,      0 skips
   8083 decicycles in qsort,      64 runs,      0 skips
   6270 decicycles in qsort,     128 runs,      0 skips
   5321 decicycles in qsort,     256 runs,      0 skips
   4860 decicycles in qsort,     512 runs,      0 skips
   4424 decicycles in qsort,    1024 runs,      0 skips
   4191 decicycles in qsort,    2046 runs,      2 skips
   4934 decicycles in qsort,    4094 runs,      2 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-26 07:14:22 -04:00
Nicolas George
559603dae1 lavfi/drawutils: add const to blending mask. 2015-10-25 20:58:21 +01:00
Ganesh Ajjanagadde
7c8fcbbde3 avutil/tree: add additional const qualifier to the comparator
libc's qsort comparator has a const qualifier on both arguments. This
adds a missing const qualifier to exactly match the comparator API.

Existing usages of av_tree_find, av_tree_insert are appropriately
modified: type signature changes of the comparators, and removal of
unnecessary void * casts of function pointers.

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-24 20:38:07 -04:00
Ganesh Ajjanagadde
2ee51ef259 avfilter/vf_deshake: use a void * comparator for consistency
For generality, qsort uses a comparator whose elements are void *. This
makes the comparator have such a form, and thus makes the void * cast of
the comparator pointer useless. Furthermore, this makes the code more
consistent with other usages of qsort across the codebase.

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-24 20:35:31 -04:00
Ganesh Ajjanagadde
4c96985af1 all: remove some casts of function pointer to void *
These casts are unnecessary, and may safely be removed.
Found by enabling -Wpedantic on clang 3.7.

Tested with FATE.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-24 15:14:59 -04:00
Ganesh Ajjanagadde
683462911d avfilter: avoid zero arguments to variadic macro
ISO C requires at least one argument in the place of the ellipsis in a
variadic macro. In particular, under -pedantic, this triggers the
warning -Wgnu-zero-variadic-macro-arguments on clang 3.7.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-24 10:18:55 -04:00
Ronald S. Bultje
0c7b44a01c vf_psnr/ssim: don't crash if stats_file is NULL. 2015-10-23 06:38:30 -04:00
Paul B Mahol
ca09eacbce avfilter: add shuffleframes filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-23 11:49:01 +02:00
Ronald S. Bultje
e7d9061d4f vf_ssim: print per-channel dB values. 2015-10-22 17:18:40 -04:00
Ronald S. Bultje
81d7f118e2 vf_psnr: remove %0.2f format specifiers for stream summary line.
This makes output equally precise as vf_ssim.
2015-10-22 17:18:15 -04:00
Ganesh Ajjanagadde
8507b98c10 avfilter,swresample,swscale: use fabs, fabsf instead of FFABS
It is well known that fabs and fabsf are at least as fast and sometimes
faster than the FFABS macro, at least on the gcc+glibc combination.
For instance, see the reference:
http://patchwork.sourceware.org/patch/6735/.
This was a patch to glibc in order to remove their usages of a macro.

The reason essentially boils down to fabs using the __builtin_fabs of
the compiler, while FFABS needs to infer to not use a branch and to
simply change the sign bit. Usually the inference works, but sometimes
it does not. This may be easily checked by looking at the asm.

This also has the added benefit of reducing macro usage, which has
problems with side-effects.

Note that avcodec is not handled here, as it is huge and
most things there are integer arithmetic anyway.

Tested with FATE.

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-22 16:13:26 -04:00
Lou Logan
4c46f1d493 avfilter/vf_zscale: fix typo
Fixes #4958 as found by nicol.

Signed-off-by: Lou Logan <lou@lrcd.com>
2015-10-22 10:44:30 -08:00
Tobias Rapp
18e8fac531 avfilter/vf_ssim: Add support for writing stats to stdout
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-21 22:11:33 +02:00
Tobias Rapp
1ec8c1554e avfilter/vf_psnr: Add support for writing stats to stdout
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-21 00:39:50 +02:00
Kyle Swanson
32403d1fab avfilter/af_flanger: free frame on ENOMEM
Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-18 21:27:00 +02:00
Paul B Mahol
416e35e5aa avfilter: add zscale filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-18 18:01:56 +02:00
Paul B Mahol
002b0499b6 avfilter/af_ladspa: check functions return value in query_formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-18 02:01:44 +02:00
Ganesh Ajjanagadde
62144b225d avfilter/internal: Doxygen for ff_fmt_is_in
This clarifies and adds Doxygen for ff_fmt_is_in.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-17 18:58:38 -04:00
Ganesh Ajjanagadde
01790484c1 avfilter/internal: add av_warn_unused_result
av_warn_unused_result is added to functions whose return status should
be checked. Currently does not trigger any warnings, but should be
useful for future robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-17 12:27:45 -04:00
Timothy Gu
ed53c14a3c chromakey: Use the pixel descriptor API for chroma subsampling info 2015-10-17 07:43:23 -07:00
Clément Bœsch
8c9c8fd035 avfilter/selectivecolor: fix correction_method option range 2015-10-17 15:01:57 +02:00
Ganesh Ajjanagadde
3835554bf8 avfilter/avfiltergraph: fix -Wunused-result warnings
Commit bf0d2d6030 introduced
av_warn_unused_result to avfilter/formats, whose associated warnings
were mostly fixed in 6aaac24d72. This
fixes the issues in avfilter/avfiltergraph.

Tested with FATE.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-16 21:58:50 -04:00
Michael Niedermayer
377883c4be avfilter/avfilter: Error out if audio parameters change instead of failing an assert
Filters which support such changes should be excluded from these checks

Fixes Ticket4884

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-16 15:25:09 +02:00
Kyle Swanson
0131636f22 avfilter/af_tremolo: clean up extra newlines
Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-15 03:14:47 +02:00
Ganesh Ajjanagadde
bf0d2d6030 avfilter/formats: add av_warn_unused_result to function prototypes
This uses the av_warn_unused_result attribute liberally to catch some forms of improper
usage of functions defined in avfilter/formats.h.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-14 10:19:26 -04:00
Ganesh Ajjanagadde
6aaac24d72 avfilter/all: propagate errors of functions from avfilter/formats
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.

All of these were found by using av_warn_unused_result, demonstrating its utility.

Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.

Fixes: CID 1325680, 1325679, 1325678.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-14 10:04:01 -04:00
Ganesh Ajjanagadde
3b336ec2fb avfilter/af_sidechaincompress: replace FFABS with fabs 2015-10-13 09:37:18 +02:00
Ganesh Ajjanagadde
ac6b7c47cc avfilter/af_astats: replace FFABS with fabs 2015-10-13 09:34:39 +02:00
Ganesh Ajjanagadde
9ab98b580e avfilter/af_agate: replace FFABS with fabs 2015-10-13 09:31:16 +02:00
Alex Agranovsky
cf28490e56 avfilter/drawtext: allow to format pts with strftime
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
2015-10-12 16:56:58 +02:00
James Almer
224a529b44 x86/vf_w3fdif: use aligned loads in w3fdif_simple_high
Found-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-11 20:07:12 -03:00
James Almer
e8903fbf8e x86/vf_w3fdif: simplify w3fdif_simple_high
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-11 20:04:54 -03:00
Ganesh Ajjanagadde
624057df3f avfilter/buffersrc: add av_warn_unused_result attributes
This adds av_warn_unused_result whenever it is relevant.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2015-10-11 14:30:47 -04:00
James Almer
d2bf2d094e x86/vf_w3fdif: move pxor outside the loop in w3fdif_complex_low
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-11 14:23:21 -03:00
Clément Bœsch
49f4967dd0 avfilter: add selectivecolor filter 2015-10-11 13:44:33 +02:00
Paul B Mahol
c3d312bb7f avfilter/x86/vf_w3fdif: add colons after labels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-10 17:55:06 +02:00
Paul B Mahol
5740dc27e1 avfilter/vf_w3fdif: add x86 SIMD
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-10 17:33:43 +02:00
Andreas Cadhalpun
8d6625642d doc: fix spelling errors
Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-09 22:09:08 +02:00
Paul B Mahol
5e0abf59d8 avfilter/vf_blend: fix normal mode with opacity != 1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-09 12:12:03 +02:00
Justin Greer
9c168f9a22 avfilter/af_afade: fix start of fade out
Fixes #4919
2015-10-08 23:09:25 +02:00
Jean Delvare
8bc708fcee avfilter/delogo: Set default band to 1
The original interpolation algorithm behaved poorly on the borders and
did not even guarantee continuity at the borders. For this reason, a
second interpolation/blending pass was required on the borders to make
them seamless.

However, since the interpolation algorithm was improved in June 2013,
the border issues no longer exist. The new algorithm does guarantee
continuity at the borders, making the second pass useless. A larger
band always increases the cumulated interpolation error. In most cases
it also increases the average interpolation error, even though the
samples in the band are only partially interpolated.

For this reason I would like to get rid of the "band" parameter. As a
first step, let's change its default value from 4 to 1 and document it
as deprecated.

I have benchmarked this change on a combination of input sources and
realistic logo areas. Lowering the band value from 4 to 1 resulted in
8 to 39 % less interpolation error per frame (or 1 to 34 % less
interpolation error per luma sample.)

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2015-10-08 11:27:57 +02:00
Paul B Mahol
4e7fa057d2 avfilter/vf_w3fdif: scale down coefficiends by 2
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-07 23:33:50 +02:00
Paul B Mahol
624a1a0e69 avfilter/x86/vf_blend.asm: hardmix: do same with two pxor instructions less
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-07 23:12:09 +02:00
Paul B Mahol
e999210cec avfilter/x86/vf_blend.asm: 11th register is used, update functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-07 22:53:54 +02:00
Paul B Mahol
0948ba3204 avfilter/x86/vf_blend.asm: add hardmix and phoenix sse2 SIMD
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-07 22:50:15 +02:00
Nicolas George
8a9fa46e87 lavfi/vf_yadif: reindent after last commit. 2015-10-07 19:05:13 +02:00
Nicolas George
ea2fd42f9d lavfi/vf_thumbnail: reindent after last commit. 2015-10-07 19:05:13 +02:00
Nicolas George
90d087247c lavfi/vf_w3fdif: reindent after last commit. 2015-10-07 19:05:13 +02:00
Nicolas George
d7849248dd lavfi/vf_alphamerge: reindent after last commit. 2015-10-07 19:05:13 +02:00
Nicolas George
35c3043ea4 lavfi/avf_showspectrum: reindent after last commit. 2015-10-07 19:05:13 +02:00
Nicolas George
4883e5d540 lavfi/vf_yadif: remove looping on request_frame(). 2015-10-07 19:05:13 +02:00
Nicolas George
86b8a82f4f lavfi/vf_w3fdif: remove looping on request_frame(). 2015-10-07 19:05:13 +02:00
Nicolas George
73a5546ba8 lavfi/vf_thumbnail: remove looping on request_frame(). 2015-10-07 19:05:13 +02:00
Nicolas George
ca540fbdb4 lavfi/vf_select: remove looping on request_frame(). 2015-10-07 19:05:13 +02:00
Nicolas George
4bc7eb2dd2 lavfi/vf_fps: remove looping on request_frame(). 2015-10-07 19:05:13 +02:00
Nicolas George
a45e96a54f lavfi/vf_alphamerge: remove looping on request_frame(). 2015-10-07 19:00:22 +02:00
Nicolas George
8a2e2fc34a lavfi/avf_showwaves: remove looping on request_frame(). 2015-10-07 19:00:22 +02:00
Nicolas George
9a520c4d52 lavfi/avf_showspectrum: remove looping on request_frame(). 2015-10-07 19:00:22 +02:00
Nicolas George
114f3f526e lavfi/avf_showcqt: remove looping on request_frame(). 2015-10-07 19:00:22 +02:00
Nicolas George
4982130d5a lavfi/af_aresample: remove looping on request_frame(). 2015-10-07 19:00:22 +02:00
Paul B Mahol
ac74e857a2 avfilter/vf_stereo3d: add x86 SIMD for anaglyph outputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-06 21:01:24 +02:00
Paul B Mahol
a342c2a531 afilter/af_extrastereo: remove dead initialization
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-06 09:56:22 +02:00
Paul B Mahol
755242b912 avfilter:audio: fix shadowed AVFrame *out
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-06 09:54:45 +02:00
Michael Niedermayer
d1c8368e40 avfilter/af_extrastereo: Fix shadowed variable
Fixes CID1325675

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-06 03:16:24 +02:00
Paul B Mahol
0c2b37fed4 avfilter: add displace video filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-04 21:44:57 +02:00
Clément Bœsch
513fcd4167 avfilter/ebur128: use AV_OPT_TYPE_BOOL for video option 2015-10-04 13:10:29 +02:00
Kyle Swanson
4f721bfd46 avfilter/ebur128: add dualmono measurement option 2015-10-04 13:10:26 +02:00
Paul B Mahol
e306e43633 avfilter/vf_stereo3d: rewrite in preparation for SIMD
Also slightly faster.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-03 22:25:54 +02:00
Michael Niedermayer
fd9a528523 avfilter/vf_blend: Fix argument types, fix segfault in asm
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 21:59:24 +02:00
Paul B Mahol
9762554dd0 avfilter/vf_blend: add x86 SIMD for some modes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-03 21:26:17 +02:00
Paul B Mahol
13090895cf avfilter/vf_tinterlace: add mergex2 mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-03 15:22:16 +02:00
Hendrik Leppkes
5fa5e73e81 Merge commit '1aa24df74c052a73175c43e57d35b4835e537ec8'
* commit '1aa24df74c052a73175c43e57d35b4835e537ec8':
  lavu: Deprecate AVFrame.error[]

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 09:52:39 +02:00
Paul B Mahol
160556c9ad avfilter/vf_maskedmerge: add SIMD for maskedmerge with 8 bit depth input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-02 17:40:57 +02:00
Paul B Mahol
1d7d824494 avfilter/af_rubberband: add process_command()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-02 10:37:44 +02:00
Carl Eugen Hoyos
ac7b1f7423 lavfi/mandelbrot: Output RGB0 instead of RGBA. 2015-10-02 01:21:36 +02:00
Paul B Mahol
0701ff2c32 avfilter/x86/vf_psnr.asm: fix typo
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-01 21:53:13 +02:00
Paul B Mahol
30ce6fd106 avfilter/vf_maskedmerge: get rid of MaskedMergeContext from functions that do actual work
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-30 22:35:31 +02:00
Paul B Mahol
1da1574002 avfilter/vf_maskedmerge: rewrite and remove some duplicated code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-30 22:27:39 +02:00
Paul B Mahol
6ce02126ce avfilter/af_rubberband: flush only if there is something available
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-30 13:02:03 +02:00
Paul B Mahol
a019149249 avfilter/vf_atadenoise: do not use uninitialized data
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-29 20:50:20 +02:00
Hendrik Leppkes
f35c4ede9e Merge commit 'c9943f00cfa2471d1b8a3a9ddc7a21049a71090e'
* commit 'c9943f00cfa2471d1b8a3a9ddc7a21049a71090e':
  vf_framepack: Use av_image_copy() where appropriate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:44:14 +02:00
Vittorio Giovara
c9943f00cf vf_framepack: Use av_image_copy() where appropriate
This correctly adjust chroma subsampling for column interleaved mode,
and allows future high bitdepth support.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:01 +02:00
Hendrik Leppkes
c36e85b3d9 Merge commit 'ae25413daf42a06f078ed81bb545ec23a8e0b482'
* commit 'ae25413daf42a06f078ed81bb545ec23a8e0b482':
  lavfi: do not exclude hwaccel formats from ff_all_formats()

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 13:48:58 +02:00