Commit Graph
100 Commits
Author SHA1 Message Date
Clément Bœsch 570d63eef3 lavu: add FF_CEIL_RSHIFT and use it in various places. 2013-05-09 16:59:42 +02:00
Clément Bœsch d3f7b98f87 lavfi/overlay: reindent fix. 2013-05-07 15:43:28 +02:00
Clément Bœsch 5043d8d213 lavfi/alphaextract: copy width and not linesize.
Padding data is not supposed to be copied.
2013-05-07 15:33:49 +02:00
Clément Bœsch c3dcd3a255 sws: factorize rgb 9+ planar funcs declarations. 2013-05-07 15:23:27 +02:00
Clément Bœsch a82cc54fb5 lavf/mpsub: remove sscanf from probing.
This should make probing faster.
2013-05-06 22:50:59 +02:00
Clément Bœsch e85ea7d387 lavfi/frei0r: fix crash when parameters are not set. 2013-05-03 17:08:33 +02:00
Clément Bœsch 24939d567b fate/pixfmts: use the appropriate variable names for temporary files.
${1} is now the filter args and is inappropriate as a unique name for
the test (and causes some FATE issues because of the ':' in them).
${filter} is not used either to replace the ${1} because ${outfile}
already contains a unique name for the test.
2013-05-01 13:25:42 +02:00
Clément Bœsch 14f45bcbe7 doc/filters: fix scale example equivalence.
scale=w=200:h=100 and scale=w=200:h=100 are of course equivalent...
2013-05-01 04:46:14 +02:00
Clément Bœsch e3e66568cc doc/filters: replace hqdn3d with smartblur in timeline section.
hqdn3d needs some adjustements before timeline support can be restored
(patch welcome).
2013-05-01 04:44:27 +02:00
Clément Bœsch 2609434b45 fate: remove forgotten transpose filter results from old system. 2013-04-30 02:12:47 +02:00
Clément Bœsch 45734dea9e fate: port remaining filters to new system.
Merge of b963f021b6 is now complete.
2013-04-30 02:12:45 +02:00
Clément Bœsch 93aede41ce fate: move kerndeint test to the new system. 2013-04-30 01:47:53 +02:00
Clément Bœsch 1e0a0aafba fate: port our pixfmts change to fate-run.sh.
This patch is the same as 52b23cbf1c.
2013-04-30 01:47:53 +02:00
Clément Bœsch e881057c98 fate: add a rule for pixfmts tests. 2013-04-30 01:47:53 +02:00
Clément Bœsch a466c2c470 fate: fix filtfmts-test dependency after 9a5924f. 2013-04-30 01:19:24 +02:00
Clément Bœsch d558e46469 lavfi: add two opencl headers to SKIPHEADERS.
Fix make checkheaders.
2013-04-30 00:34:58 +02:00
Clément Bœsch 6b222ea963 fate: add bitexact flags to alphaextract/alphamerge tests.
Should fix a FATE failure.
2013-04-29 22:28:37 +02:00
Clément Bœsch 9a5924f862 fate: add filters dependencies to pixfmts tests. 2013-04-29 22:25:04 +02:00
Clément Bœsch 15d6436a2a fate: move a few simple pixfmts tests to the new system. 2013-04-29 22:25:04 +02:00
Clément Bœsch 3ae44df18f fate: move lavd filters tests to the new system.
Also make life test a bit more useful.
2013-04-29 21:48:49 +02:00
Clément Bœsch 6ea013fb62 fate: remove '#' in filter parameters.
It was considered a comment.
2013-04-29 21:48:48 +02:00
Clément Bœsch 22a86492ec fate: move alphaextract and alphamerge tests to the new system.
The standalone alphaextract tests are removed since already the filters
are already tested by the alphamerge tests.
2013-04-29 21:10:13 +02:00
Clément Bœsch 9a0e40ec8c fate: move colormatrix tests to the new system. 2013-04-29 20:20:13 +02:00
Clément Bœsch 80bcbed157 fate: restore our settings for drawtext/fade/unsharp. 2013-04-29 20:00:49 +02:00
Clément Bœsch c703f7bdbd fate: move more tests from lavfi-regression.sh to filter-video.mak. 2013-04-29 20:00:49 +02:00
Clément Bœsch 039c2b7828 lavfi/hqdn3d: remove timeline flag.
The filter stores some temporal data, which needs to be done with the
passthrough callback system when timeline is enabled. Until then,
timeline support is disabled.
2013-04-26 21:27:02 +02:00
Clément Bœsch 035a3792c2 lavfi/subtitles: zero-init AVSubtitle.
This avoids invalid free when the stream id doesn't match the packet
stream index.

Ticket #2501
2013-04-25 00:56:38 +02:00
Clément Bœsch 73050df240 lavfi: add timeline support in {de,remove}logo.
Both don't change anything in the context between frames.
2013-04-24 20:13:01 +02:00
Clément Bœsch 1f6aa7de3e lavfi: add vidstabutils.h to SKIPHEADERS.
Fix checkheaders when vid.stab is not available.
2013-04-24 19:38:06 +02:00
Clément Bœsch c7d2a3abf0 lavfi/vidstabdetect: fix direct path.
The frame must be writable if the show option is set, otherwise pass the
frame unchanged.
2013-04-24 18:30:43 +02:00
Clément Bœsch c82f6e58da lavfi/vidstab: remove mention of defaults for consistency with other filters. 2013-04-24 18:30:43 +02:00
Clément Bœsch 111ac10b60 lavfi/vidstab: make use of direct variable. 2013-04-24 18:30:42 +02:00
Clément Bœsch 9273cc8eb5 lavfi/vidstab: add missing flags for 2 options. 2013-04-24 18:30:42 +02:00
Clément Bœsch c857c21a8c doc/filters: reword vidstab options intro. 2013-04-24 18:30:42 +02:00
Clément Bœsch cdc48775aa lavfi/vidstab: consistent descriptions. 2013-04-24 18:30:42 +02:00
Clément Bœsch 017051266b lavfi/vidstab: miscelenaous cosmetics and typo fixes. 2013-04-24 18:30:42 +02:00
Clément Bœsch 15d2f26998 lavfi/overlay: support timeline through the new system. 2013-04-23 01:02:28 +02:00
Clément Bœsch 38853169ce lavfi: add 'enable' command injection to filters supporting timeline. 2013-04-23 01:02:28 +02:00
Clément Bœsch fdd93eabfb lavfi: add timeline support.
Flag added in a few simple filters. A bunch of other filters can likely
use the feature as well.
2013-04-23 01:02:27 +02:00
Clément Bœsch b8a5c76131 lavfi: add frame counter into AVFilterLink and use it in filters. 2013-04-23 01:02:27 +02:00
Clément Bœsch 67cc31d6c7 lavf/gif: add final_delay option. 2013-04-20 00:11:04 +02:00
Clément Bœsch a16c20569d lavf/gifdec: add loop support.
Loop is ignored by default.
2013-04-20 00:05:35 +02:00
Clément Bœsch f5ede48fbb lavc/gif: miscellaneous cosmetics. 2013-04-19 23:59:22 +02:00
Clément Bœsch 7004cad36d Changelog: notify GIF improvements. 2013-04-19 23:59:22 +02:00
Clément Bœsch 5927ebab51 doc/general: animated GIF are now compressed. 2013-04-19 23:59:21 +02:00
Clément Bœsch e1b35bdde2 lavc/gif: add flag to enable transparency detection between frames.
While this is not always optimal, in practice most of the common cases are.

  ffmpeg -i big_buck_bunny_1080p_h264.mov -ss 45 -vf scale=320:160 -gifflags -transdiff -frames:v 50 -y bbb-notrans.gif
  ffmpeg -i big_buck_bunny_1080p_h264.mov -ss 45 -vf scale=320:160 -gifflags +transdiff -frames:v 50 -y bbb-trans.gif

  -rw-r--r-- 1 ubitux ubitux 1.1M Apr 19 19:00 bbb-notrans.gif
  -rw-r--r-- 1 ubitux ubitux 378K Apr 19 19:00 bbb-trans.gif
2013-04-19 23:59:21 +02:00
Clément Bœsch 0f1250b7e5 lavc/gif: make possible to disable offsetting. 2013-04-19 23:59:21 +02:00
Clément Bœsch 30e6a02c23 lavf/http: remove duplicated dec flag. 2013-04-19 14:44:58 +02:00
Clément Bœsch 380cfce2b2 lavc: add AV_CODEC_PROP_TEXT_SUB.
CC are not marked. Also allow potential mixed types later.
2013-04-19 13:15:54 +02:00
Clément Bœsch 6189ff3679 lavf/gif: avoid forward declaration. 2013-04-19 12:11:10 +02:00
Clément Bœsch a7c5b7a676 lavf/gif: correct the delay after the first frame.
To define accurately the delay between two frames, it is necessary to
have both available. Before this commit, the first frame had a delay of
0; while in practice the problem is not visible in most situation, it is
problematic with low frame rate and large scene change.

This commit notably fixes output generated with commands such as:

  ffmpeg -i big_buck_bunny_1080p_h264.mov
     -vf "select='gt(scene,0.4)',scale=320:-1,setpts=N/TB"
     -frames:v 5 -y out.gif

Also, to avoid odd loop delays, the N-1 delay is duplicated for the last
frame.
2013-04-19 12:02:19 +02:00
Clément Bœsch 7e57adb464 lavf/gif: fix timing.
pkt->duration can not be used since the values are only based on frame
rate.
2013-04-19 02:15:57 +02:00
Clément Bœsch 13478b270a gif: use only one graphic control extension block per image.
The encoder now doesn't produce any extra graphic control extension
block anymore. Only the image is encoded, and the muxer writing
its own GCE containing notably the timing information now includes the
optional palette transmitted through packet side data.

This commit avoid setting clashes between the two GCE, and reduce the
size of the generated file with pal8 output.
2013-04-19 02:10:59 +02:00
Clément Bœsch 7b80b3cef0 lavc/utils: merge side data after video encode.
This allows encoders to communicate side data to the muxers.
2013-04-19 02:10:12 +02:00
Clément Bœsch 3d786591b8 fate/gif: create meaningful gif encoding tests. 2013-04-19 02:05:01 +02:00
Clément Bœsch 7c1a002c78 subtitles: introduce ASS codec id and use it.
Currently, we have a AV_CODEC_ID_SSA, which matches the way the ASS/SSA
markup is muxed in a standalone .ass/.ssa file. This means the AVPacket
data starts with a "Dialogue:" string, followed by a timing information
(start and end of the event as string) and a trailing CRLF after each
line. One packet can contain several lines. We'll refer to this layout
as "SSA" or "SSA lines".

In matroska, this markup is not stored as such: it has no "Dialogue:"
prefix, it contains a ReadOrder field, the timing information is not in
the payload, and it doesn't contain the trailing CRLF. See [1] for more
info. We'll refer to this layout as "ASS".

Since we have only one common codec for both formats, the matroska
demuxer is constructing an AVPacket following the "SSA lines" format.
This causes several problems, so it was decided to change this into
clean ASS packets.

Some insight about what is changed or unchanged in this commit:

  CODECS
  ------

  - the decoding process still writes "SSA lines" markup inside the ass
    fields of the subtitles rectangles (sub->rects[n]->ass), which is
    still the current common way of representing decoded subtitles
    markup. It is meant to change later.

  - new ASS codec id: AV_CODEC_ID_ASS (which is different from the
    legacy AV_CODEC_ID_SSA)

  - lavc/assdec: the "ass" decoder is renamed into "ssa" (instead of
    "ass") for consistency with the codec id and allows to add a real
    ass decoder. This ass decoder receives clean ASS lines (so it starts
    with a ReadOrder, is followed by the Layer, etc). We make sure this
    is decoded properly in a new ass-line rectangle of the decoded
    subtitles (the ssa decoder OTOH is doing a simple straightforward
    copy). Using the packet timing instead of data string makes sure the
    ass-line now contains the appropriate timing.

  - lavc/assenc: just like the ass decoder, the "ssa" encoder is renamed
    into "ssa" (instead of "ass") for consistency with the codec id, and
    allows to add a real "ass" encoder.

    One important thing about this encoder is that it only supports one
    ass rectangle: we could have put several dialogue events in the
    AVPacket (separated by a \0 for instance) but this would have cause
    trouble for the muxer which needs not only the start time, but also
    the duration: typically, you have merged events with the same start
    time (stored in the AVPacket->pts) but a different duration. At the
    moment, only the matroska do the merge with the SSA-line codec.

    We will need to make sure all the decoders in the future can't add
    more than one rectangle (and only one Dialogue line in it
    obviously).

  FORMATS
  -------

  - lavf/assenc: the .ass/.ssa muxer can take both SSA and ASS packets.
    In the case of ASS packets as input, it adds the timing based on the
    AVPacket pts and duration, and mux it with "Dialogue:", trailing
    CRLF, etc.

  - lavf/assdec: unchanged; it currently still only outputs SSA-lines
    packets.

  - lavf/mkv: the demuxer can now output ASS packets without the need of
    any "SSA-lines" reconstruction hack. It will become the default at
    next libavformat bump, and the SSA support will be dropped from the
    demuxer. The muxer can take ASS packets since it's muxed normally,
    and still supports the old SSA packets. All the SSA support and
    hacks in Matroska code will be dropped at next lavf bump.

[1]: http://www.matroska.org/technical/specs/subtitles/ssa.html
2013-04-18 23:23:59 +02:00
Clément Bœsch 90a56ebbe5 lavc/gif: avoid encoding 0x0 images.
It seems browsers don't like it very much.
2013-04-18 15:30:02 +02:00
Clément Bœsch 9db1c6455e lavf/gif: support only GIF codec. 2013-04-18 13:53:47 +02:00
Clément Bœsch 01367b0fca lavf/gif: merge gif_write_{packet,video}.
Avoid a pointless split.
2013-04-18 13:42:26 +02:00
Clément Bœsch b7a3f14360 lavf/gif: trim unnecessarily long netscape ext code.
Extension description comments are now placed along the avio calls, the
always defined macro removed, and the always true loop_count check as
well (loop option is bound to 0-65535).
2013-04-18 13:42:14 +02:00
Clément Bœsch 0a0e6877ff lavf/gif: remove unused fields. 2013-04-18 13:40:45 +02:00
Clément Bœsch 28f9858c91 lavf/gif: simplify streams type checking. 2013-04-18 13:40:45 +02:00
Clément Bœsch 32cc7ba8a7 fate: hot fix for gif failure. 2013-04-18 01:41:23 +02:00
Clément Bœsch b6408ffc45 lavf/gif: fix assert in avio API after dfb3231. 2013-04-18 01:13:17 +02:00
Clément Bœsch 91a5b4d480 gif: remove outdated comments. 2013-04-18 00:43:38 +02:00
Clément Bœsch 8694e87127 lavc/gif: return more meaningful error code. 2013-04-18 00:24:25 +02:00
Clément Bœsch 71411b69a2 lavc/gif: merge two allocation checks. 2013-04-18 00:24:25 +02:00
Clément Bœsch dfb323109c lavf/gif: simplify palette writing. 2013-04-18 00:24:25 +02:00
Clément Bœsch 7b972d82b6 gif: reindent after previous commits. 2013-04-18 00:24:25 +02:00
Clément Bœsch e065e8a4ea lavc/gif: crop image when possible.
Increase compression when pictures are similar.

-f lavfi testsrc=300: 61M -> 21M
2013-04-18 00:24:25 +02:00
Clément Bœsch 635389ccfa Cleanse GIF muxer and encoder.
This commit removes the badly duplicated code between the encoder and
the muxer. That may sound surprising, but the encoder is now responsible
from the encoding of the picture when muxing to a .gif file. It also
does not require anymore a manual user intervention such as a -pix_fmt
rgb24 to work properly. To summarize, output gif are now easier to
generate, code is saner and simpler, and files are smaller (thanks to
the lzw encoding which was unused so far with the default .gif output).
We can certainly make things even better, but this is the first step.

FATE is updated because of the output being produced by the encoder and
not the muxer (no lzw in the muxer), and in the seek test only the size
mismatches.

Fixes Ticket #2262
2013-04-18 00:24:25 +02:00
Clément Bœsch 7ee2daed9b lavfi/interlace: remove exec permissions. 2013-04-17 19:27:33 +02:00
Clément Bœsch 4c6fa4ef45 lavfi/lut: simplify nested component stepping. 2013-04-17 19:18:08 +02:00
Clément Bœsch 45f5bf917b lavfi/lut: reindent after previous commit. 2013-04-17 19:18:08 +02:00
Clément Bœsch 3db3b278f2 lavfi/lut: add direct path. 2013-04-17 19:18:08 +02:00
Clément Bœsch a5ebd2d987 cmdutils: slightly better -filters output. 2013-04-17 11:57:37 +02:00
Clément Bœsch 9db6aaeb2c ffplay: use format title metadata to set window caption. 2013-04-17 11:08:49 +02:00
Clément Bœsch de656ea91e lavfi/drawtext: make options array more readable. 2013-04-15 21:49:18 +02:00
Clément Bœsch 34186832de doc/filters: add a curves example with psfile. 2013-04-15 21:18:17 +02:00
Clément Bœsch 9ecdd76679 lavfi/curves: fix memleak after master component dition. 2013-04-15 18:04:35 +02:00
Clément Bœsch 1cb02d4fbc lavfi/curves: add support for Photoshop curves files (.acv). 2013-04-15 11:35:46 +02:00
Clément Bœsch 99dac39339 lavfi/curves: add support for master component. 2013-04-15 11:35:06 +02:00
Clément Bœsch e66a10689b lavf/libquvi: fix error reporting. 2013-04-15 01:18:11 +02:00
Clément Bœsch da1bb21c13 lavfi/aphaser: silence uninitialized variable warnings. 2013-04-15 01:12:26 +02:00
Clément Bœsch 8de9bb6e5e lavf: remove some flushing in write_packet muxers callbacks.
Since 4f112a8e3, this is not necessary anymore. Also, it allows to
actually disable the flushing.
2013-04-14 21:16:53 +02:00
Clément Bœsch dfac37afd2 lavfi: add missing periods in filter descriptions. 2013-04-14 20:58:31 +02:00
Clément Bœsch 1e3104cd3c Add avpriv_dsputil_init() and use it in lavfi where relevant.
dsputil_init() is deprecated and not meant to be exported.
ff_dsputil_init() is internal to libavcodec and thus can not be used.
avpriv_dsputil_init() is the version shared between libraries.

This commit fixes 3 unjustified libavfilter deprecated warnings.
2013-04-14 20:15:54 +02:00
Clément Bœsch 458d956b09 doc/filters: move mpdecimate doc to a more appropriate position. 2013-04-14 15:59:37 +02:00
Clément Bœsch 7a92ec93c6 lavfi: port IVTC filters from vapoursynth. 2013-04-14 15:59:37 +02:00
Clément Bœsch ab0ad6eccf lavfi: rename decimate to mpdecimate.
The next commit will introduce a proper decimation filter to be used
along with the field matching filter. To avoid confusion with this
filter which has currently a very limited usage (and will not work
properly with the fieldmatching filter), the new decimation filter will
take the decimate name, and this filter is renamed to mpdecimate.
2013-04-14 15:59:37 +02:00
Clément Bœsch f359be96ca lavfi/smptehdbars: fix priv_class pointer.
Fix Ticket2468.
2013-04-14 10:32:35 +02:00
Clément Bœsch d9be6e69cf lavfi/testsrc: grammar fix in comment after 03e2ec32. 2013-04-14 03:27:48 +02:00
Clément Bœsch 28ac8426e6 lavu/dict: cosmetic realign. 2013-04-13 23:48:26 +02:00
Clément Bœsch 8137ea358c doc/filters: use common options introduction string. 2013-04-13 20:09:22 +02:00
Clément Bœsch 2b44195fc9 cmdutils: print if filters are sources or sinks. 2013-04-13 19:48:10 +02:00
Clément Bœsch 73180f5b0e lavfi: flag more dynamic i/o filters. 2013-04-13 19:43:17 +02:00
Clément Bœsch dcea58502c lavfi: drop now unused shorthand field from AVFilter. 2013-04-13 00:45:30 +02:00
Clément Bœsch 0bc34ef02e doc/utils: use @code markup for opencl function names. 2013-04-12 23:10:59 +02:00
Clément Bœsch 72ad0d56a1 lavfi/hue: make do while (0) form meaningful. 2013-04-12 20:10:58 +02:00
Clément Bœsch 6b5ec76283 lavfi: fix forgotten chunk in eb0f774d. 2013-04-12 14:08:04 +02:00