Commit Graph

5453 Commits

Author SHA1 Message Date
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