Commit Graph

3097 Commits

Author SHA1 Message Date
Clément Bœsch dc65d784df lavfi/curves: add presets support.
Except for the vintage preset, the values are defined by Lou Logan based
on the ones found in Adobe Photoshop CS6.

Signed-off-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2013-03-25 23:48:51 +01:00
Björn S f248b8a902 blend: Adding yuvj pixelformats to the blend effect
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-25 13:14:38 +01:00
Michael Niedermayer ae65327e5e vsrc_testsrc: avoid floats and non bit exactness
The round to zero behavior is maintained, possibly this should
be changed to round to nearest.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-25 03:11:43 +01:00
Nicolas George 125acd2152 lavfi: support multiple rounds of format negotiation.
Remove the temporary hack for amerge and replace it with a
generic solution.
2013-03-24 23:17:47 +01:00
Nicolas George 00da527b44 lavfi/af_amerge: return EAGAIN if the input layouts are not known.
Also downgrade the error to a warning.
2013-03-24 23:17:47 +01:00
Clément Bœsch 386dc9a3a8 lavfi/thumbnail: add support for named options. 2013-03-24 20:38:12 +01:00
Stefano Sabatini 3b811bcf67 lavfi/colormatrix: reword error message in init
Change:
"source and destination color space are identical"

which is a true fact, but doesn't tell nothing about what's wrong, to:
"Source and destination color space must not be identical"

which tells more explicitly what the problem is.
2013-03-24 20:21:35 +01:00
Stefano Sabatini 1b140835b6 lavfi/colormatrix: add support for named options 2013-03-24 20:21:20 +01:00
Clément Bœsch cbf224b631 lavfi/tinterlace: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch 9e21c89841 lavfi/subtitles: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch 06784b737a lavfi/smartblur: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch 15878b2b5b lavfi/setfield: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch e62587bc5e lavfi/overlay: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch 5dc074d321 lavfi/kerndeint: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch ab228f9163 lavfi/idet: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch 552c02f20f lavfi/histeq: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch b27a8ba13c lavfi/gradfun: use standard options parsing. 2013-03-24 12:26:25 +01:00
Clément Bœsch b595819cde lavfi/geq: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch cb0fb4d04d lavfi/fieldorder: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch a733481d0a lavfi/field: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 7edda1a935 lavfi/deshake: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 1341dd2dd0 lavfi/cropdetect: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch a36d903601 lavfi/boxblur: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 3f8072886b lavfi/blackframe: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 67ad9fd098 lavfi/settb: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 8b994c8c1c lavfi/select: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch f7324c068f lavfi/perms: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 07b7c2a217 lavfi/sine: use standard options parsing. 2013-03-24 12:26:24 +01:00
Clément Bœsch 3ac77f67af lavfi/apad: use standard options parsing. 2013-03-24 12:26:24 +01:00
Michael Niedermayer 62f56fd7ea buffersink/uninit: use av_frame_free() not unref
Fixes memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 23:49:33 +01:00
Stefano Sabatini a42d15a3a0 lavfi/anullsrc: add missing checks 2013-03-23 16:53:25 +01:00
Stefano Sabatini 4e8062c2d7 lavfi/anullsrc: remove extra parentheses 2013-03-23 16:53:19 +01:00
Stefano Sabatini fe2cfd50f0 lavfi/anullsrc: simplify logging code in config_props 2013-03-23 16:53:13 +01:00
Stefano Sabatini 5373a2a221 lavfi/anullsrc: fix format negotiation
Samplerate and channel layouts must be set in query_formats.
2013-03-23 16:53:08 +01:00
Michael Niedermayer 9bb6504e3b Merge commit '20a8ee3061e6d777600c13db731bee3c25878991'
* commit '20a8ee3061e6d777600c13db731bee3c25878991':
  af_asyncts: fix compensation and PTS monotonicity

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 12:16:32 +01:00
Clément Bœsch 89b4e758d3 lavfi/blend: always peek the first frame of each queue.
Before the change, filter_frame() always waited for 2 samples in the
bottom frames queue. This notably fixes commands such as
./ffplay tests/lena.pnm -vf split,blend=c0_mode=addition
2013-03-22 23:09:08 +01:00
Jindřich Makovička 20a8ee3061 af_asyncts: fix compensation and PTS monotonicity
This patch improves af_asyncts behavior on streams with bogus PTS, which
are either non-monotonic, or contain PTS jitter, and trigger the
non-monotonicity error. With this patch, af_asyncts is able to correct
these streams and avoid the error.

Firstly, it fixes resample compensation calculation by supplying proper
units to avresample_set_compensation (sample count per second instead
of sample count per some arbitrary frame size). Also, the calculation of
the compensation itself is fixed - delta is proportional to an adjustment
of the compensation, not the compensation itself. Ideally, the compensation
should converge to a value that keeps delta at zero.

To be able to deal with sources with PTS jitter even without resampling,
small PTS errors are adjusted, so the output frames do not overlap.

Finally, one more monotonicity check is added.

The FATE reference changes because now there is 8 less samples of
silence because of the pts jitter.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
2013-03-22 20:09:34 +01:00
Paul B Mahol c5b484e616 lavfi/vf_stereo3d: use standard options parsing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-21 09:17:32 +00:00
Michael Niedermayer 76fdced109 asrc_sine: avoid use of INFINITY as it might be a non constant
This should fix compilation on openbsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 00:53:57 +01:00
Nicolas George 2753d4ebf0 lavfi/vf_yadif: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 8d4d11cd89 lavfi/vf_unsharp: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 769cc30072 lavfi/vf_transpose: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 392ec7ec1c lavfi/vf_pad: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George b201c167d0 lavfi/vf_fps: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 4e2bcec95f lavfi/vf_fade: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 80580b405a lavi/vf_drawbox: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 37438d0a72 lavfi/vf_delogo: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 40ecd44f00 lavfi/vf_decimate: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 6202cf5dd8 lavfi/vf_crop: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George e9ca55aedd lavfi/af_volume: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George e9f45a833d lavfi/vf_tile: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 8c6c811b21 lavfi/avf_concat: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George befbcc374d lavfi: add common code to handle options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 21b092de7c lavfi: add sine audio source. 2013-03-20 21:04:28 +01:00
Nicolas George 68fb7e260b lavfi/concat: fix silence duration computation.
Inside send_silence(), delta_ts was used inconsistently:
sometimes as the new value, sometimes as the old value.

Consistently use it as the new value, and add an argument
to know the last segment duration.
2013-03-20 20:59:45 +01:00
Nicolas George 5eb273b2e7 lavfi/buffersink: check av_frame_ref() failure. 2013-03-20 13:35:24 +01:00
Paul B Mahol ac44e52f50 lavfi/showwaves: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-20 12:29:54 +00:00
Michael Niedermayer df804041bd Merge commit '6599b087de62a5f9f2a8d61a1952d777d1bff804'
* commit '6599b087de62a5f9f2a8d61a1952d777d1bff804':
  buffersrc: fix a typo.
  lavc, lavfi: fix counting number of planes in AVBufferRef wrappers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 11:30:56 +01:00
Paul B Mahol 17c1881d58 lavfi: remove harddup libmpcodecs wrapper
It is supposed to be used with mencoder only and does
nothing when used with ffmpeg.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-19 17:15:53 +00:00
Anton Khirnov 6599b087de buffersrc: fix a typo.
Vertical shift is log2_chroma_h, not log2_chroma_w.
2013-03-19 11:12:17 +01:00
Anton Khirnov c977039e58 lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.
2013-03-19 11:12:17 +01:00
Clément Bœsch c10b57973d lavfi/pad: fix horizontal/vertical shift confusion. 2013-03-18 08:51:55 +01:00
Clément Bœsch 76d1c07c89 lavfi/ebur128: add metadata injection. 2013-03-18 03:21:08 +01:00
Michael Niedermayer 8152451b56 buffersrc: fix w/h error
Found-by: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-18 02:00:57 +01:00
Michael Niedermayer 975fbd43ad Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavfi/buffersink: fix header.
  lavfi/buffersrc: disable deprecated warnings.
  lavfi/buffersrc: check channel count changes.
  lavfi/buffersrc: set channel layout if it is known.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 14:30:33 +01:00
Stefano Sabatini 5787a71637 lavfi/swapuv: remove deprecated base field use 2013-03-17 13:06:01 +01:00
Michael Niedermayer 171bd38eda Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 12:59:04 +01:00
Nicolas George 7e6c67dd24 lavfi/buffersink: fix header.
Move non-obsolete functions, structures and constants outside
the scope of "#if FF_API_AVFILTERBUFFER".

Add attribute_deprecated to av_buffersink_get_buffer_ref()
and av_buffersink_poll_frame().

Add doxygen for av_buffersink_get_frame_flags().
2013-03-17 12:31:25 +01:00
Nicolas George a5149607df lavfi/buffersrc: disable deprecated warnings. 2013-03-17 12:31:24 +01:00
Nicolas George f29c28a884 lavfi/buffersrc: check channel count changes. 2013-03-17 12:31:24 +01:00
Nicolas George 3cd342636f lavfi/buffersrc: set channel layout if it is known.
Introduced in 01649c7, lost in the API change.
2013-03-17 11:59:51 +01:00
Anton Khirnov 6552808014 lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.
2013-03-17 09:10:04 +01:00
Clément Bœsch 286153ea48 lavfi/alphaextract: fix frame memleak. 2013-03-17 03:12:44 +01:00
Clément Bœsch 2b27f7fb04 lavfi/thumbnail: replace frame unref with free.
Fixes memleak spotted by FATE.
2013-03-17 01:46:22 +01:00
Stefano Sabatini db36ea5b5e lavfi/settb: add support for named options 2013-03-17 00:27:33 +01:00
Stefano Sabatini 0407a79e41 lavfi/blackframe: add support for named options 2013-03-17 00:27:08 +01:00
Hendrik Leppkes d8dccf69ff lavfi: let gcc realign the stack on public graph driving functions
The functions which actually drive the filter graph by pushing
frames through it need to ensure an aligned stack for SIMD functions.

This fixes a crash in YADIF filter when using a mingw build in a MSVC application.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 23:52:35 +01:00
Clément Bœsch 8d84e90c9b lavfi/delogo: 10l forgotten trailing NULL in shorthand.
Regression since de3e0ab3.
2013-03-16 23:37:58 +01:00
James Darnley c9a51c29fc yadif: remove an 'm' from the LOAD macro definition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 22:33:49 +01:00
James Darnley 1d3b14cac2 yadif: remove repeated check on width
The filter already checks that width (and height) are greater than 3.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 22:33:30 +01:00
James Darnley 7976d92dac yadif: cosmetic indentation from previous commits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 22:33:06 +01:00
James Darnley 0a5814c9ba yadif: x86 assembly for 9 to 14-bit samples
These smaller samples do not need to be unpacked to double words
allowing the code to process more pixels every iteration (still 2 in MMX
but 6 in SSE2).  It also avoids emulating the missing double word
instructions on older instruction sets.

Like with the previous code for 16-bit samples this has been tested on
an Athlon64 and a Core2Quad.

Athlon64:
1809275 decicycles in C,    32718 runs, 50 skips
 911675 decicycles in mmx,  32727 runs, 41 skips, 2.0x faster
 495284 decicycles in sse2, 32747 runs, 21 skips, 3.7x faster

Core2Quad:
 921363 decicycles in C,     32756 runs, 12 skips
 486537 decicycles in mmx,   32764 runs,  4 skips, 1.9x faster
 293296 decicycles in sse2,  32759 runs,  9 skips, 3.1x faster
 284910 decicycles in ssse3, 32759 runs,  9 skips, 3.2x faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 22:32:54 +01:00
James Darnley 17e7b49501 yadif: x86 assembly for 16-bit samples
This is a fairly dumb copy of the assembly for 8-bit samples but it
works and produces identical output to the C version.  The options have
been tested on an Athlon64 and a Core2Quad.

Athlon64:
1810385 decicycles in C,    32726 runs, 42 skips
1080744 decicycles in mmx,  32744 runs, 24 skips, 1.7x faster
 818315 decicycles in sse2, 32735 runs, 33 skips, 2.2x faster

Core2Quad:
 924025 decicycles in C,     32750 runs, 18 skips
 623995 decicycles in mmx,   32767 runs,  1 skips, 1.5x faster
 406223 decicycles in sse2,  32764 runs,  4 skips, 2.3x faster
 387842 decicycles in ssse3, 32767 runs,  1 skips, 2.4x faster
 307726 decicycles in sse4,  32763 runs,  5 skips, 3.0x faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 22:32:34 +01:00
Hendrik Leppkes a77f453703 lavfi/avcodec: deprecate remainders of the avcodec glue code
Since lavfi works natively with AVFrame now, these functions are no longer
necessary and can be removed in a future bump.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 17:04:36 +01:00
Michael Niedermayer 946cbf04ee Merge remote-tracking branch 'qatar/master'
* qatar/master:
  af_join: do not leak input frames.
  asrc_anullsrc: return EOF, not -1

Conflicts:
	libavfilter/asrc_anullsrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 16:58:41 +01:00
Michael Niedermayer 7fff5781b6 Merge commit 'e4a7b2177d14678ae240edcabaacfe2b14619b7b'
* commit 'e4a7b2177d14678ae240edcabaacfe2b14619b7b':
  vf_showinfo: remove its useless init function
  AVOptions: fix using named constants with child contexts.

Conflicts:
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 16:38:11 +01:00
Michael Niedermayer b64077bebe Merge commit '9676b9a2cdc4a90611188fc48d8d388e427997c5'
* commit '9676b9a2cdc4a90611188fc48d8d388e427997c5':
  AVOption: remove an unused function parameter.
  filters.texi: restore mistakenly removed section name for noformat
  avfiltergraph: use sizeof(var) instead of sizeof(type)

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 16:28:27 +01:00
Michael Niedermayer ecade984ac Merge commit '42c7c61ab25809620b8c8809b3da73e25f5bbaaf'
* commit '42c7c61ab25809620b8c8809b3da73e25f5bbaaf':
  avfiltergraph: replace AVFilterGraph.filter_count with nb_filters

Conflicts:
	doc/APIchanges
	libavfilter/avfiltergraph.c
	libavfilter/avfiltergraph.h
	libavfilter/graphparser.c
	libavfilter/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 16:09:37 +01:00
Clément Bœsch 3b2b636a2a lavfi: add perms and aperms filters. 2013-03-16 16:04:59 +01:00
Anton Khirnov 4750b05d67 af_join: do not leak input frames. 2013-03-16 05:37:01 +01:00
Anton Khirnov c2b9bd97f5 asrc_anullsrc: return EOF, not -1 2013-03-16 05:36:46 +01:00
Anton Khirnov f4281f4571 asrc_anullsrc: do not set samplerate and channel layout explicitly
They are auto-negotiated.
2013-03-16 05:36:35 +01:00
Anton Khirnov e4a7b2177d vf_showinfo: remove its useless init function
Filter private data is memset to 0 so there is no point in explicitly
initing anything to 0.
2013-03-16 05:36:14 +01:00
Anton Khirnov dd74e3ef33 avfiltergraph: use sizeof(var) instead of sizeof(type) 2013-03-16 05:34:20 +01:00
Anton Khirnov 42c7c61ab2 avfiltergraph: replace AVFilterGraph.filter_count with nb_filters
This is more consistent with the naming in the rest of Libav.
2013-03-16 05:33:23 +01:00
Anton Khirnov 556aab8f11 lavfi: use designated initializers in avfilter_class 2013-03-16 05:33:06 +01:00
James Darnley 3d751b1ef6 yadif: correct strides in filter_edges_16bit
The C code treats the data as arrays of uint16_t so strides must not
be in bytes but in pixels.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-15 19:10:55 +01:00
Michael Niedermayer cd5f50a255 avfilter: avoid direct access to AVFrame.channels
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-15 16:13:53 +01:00
Michael Niedermayer 0bcea7b575 vf_pp: use new API to access qp table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-15 03:02:27 +01:00
Clément Bœsch 1edbeb3532 lavfi/ebur128: check histogram allocations. 2013-03-15 02:58:29 +01:00