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

75904 Commits

Author SHA1 Message Date
Michael Niedermayer
14573b9b7c Revert "Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'" (avconv: Do not try to configure filter outputs without streams)
FFmpeg already tests for this case in configure_output_filter() and printed a
clearer error message

example:
./ffmpeg -f lavfi -i color -f lavfi -i color -filter_complex "[1]null[x],[0][1]overlay" -f null -
before the merge / after the revert:
Filter null has a unconnected output

after the merge / before the revert:
Output pad "default" with type video of the filter instance "Parsed_null_0" of null not connected to any destination
Error configuring complex filters.
Invalid argument

This reverts commit 3e3779cd51, reversing
changes made to 0b28039a44.

Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
2015-10-11 12:24:43 +02:00
Michael Niedermayer
2a4d1a66e8 avutil/intmath: Change debruijn_ctz64 to use 8bit elements
This reduces the memory & cache need from 256 to 64 bytes
the code also seems faster with this change

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-11 04:21:01 +02:00
Ganesh Ajjanagadde
971d12b7f9 avutil/mathematics: speed up av_gcd by using Stein's binary GCD algorithm
This uses Stein's binary GCD algorithm:
https://en.wikipedia.org/wiki/Binary_GCD_algorithm
to get a roughly 4x speedup over Euclidean GCD on standard architectures
with a compiler intrinsic for ctzll, and a roughly 2x speedup otherwise.
At the moment, the compiler intrinsic is used on GCC and Clang due to
its easy availability.

Quick note regarding overflow: yes, subtractions on int64_t can, but the
llabs takes care of that. The llabs is also guaranteed to be safe, with
no annoying INT64_MIN business since INT64_MIN being a power of 2, is
shifted down before being sent to llabs.

The binary GCD needs ff_ctzll, an extension of ff_ctz for long long (int64_t). On
GCC, this is provided by a built-in. On Microsoft, there is a
BitScanForward64 analog of BitScanForward that should work; but I can't confirm.
Apparently it is not available on 32 bit builds; so this may or may not
work correctly. On Intel, per the documentation there is only an
intrinsic for _bit_scan_forward and people have posted on forums
regarding _bit_scan_forward64, but often their documentation is
woeful. Again, I don't have it, so I can't test.

As such, to be safe, for now only the GCC/Clang intrinsic is added, the rest
use a compiled version based on the De-Bruijn method of Leiserson et al:
http://supertech.csail.mit.edu/papers/debruijn.pdf.

Tested with FATE, sample benchmark (x86-64, GCC 5.2.0, Haswell)
with a START_TIMER and STOP_TIMER in libavutil/rationsl.c, followed by a
make fate.

aac-am00_88.err:
builtin:
714 decicycles in av_gcd,    4095 runs,      1 skips

de-bruijn:
1440 decicycles in av_gcd,    4096 runs,      0 skips

previous:
2889 decicycles in av_gcd,    4096 runs,      0 skips

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-11 04:08:41 +02:00
Michael Niedermayer
1e7e4f13f9 avcodec/pngdec: Check blend_op.
Fixes CID1322359, CID1322358

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-11 03:46:44 +02:00
Ganesh Ajjanagadde
f3fc103c6a doc/resampler, swresample/options: use proper capitalization
Proper names should be capitalized in all user facing API as far as
possible. The option names themselves have not been changed since:
1. We consistently keep option names in lower case.
2. Changing them would break existing scripts.
3. I suspect that we want to be similar to Sox and its relevant options.

The converse is also true: improper names should not be capitalized
generally.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 20:49:54 +02:00
Ganesh Ajjanagadde
07c60684a7 gitignore: ignore object file temporaries
During a build, a lot of *.o.-hash files are created - had not noticed
this as they are usually dumped in tmpfs on Linux. However, they
sometimes are present during a long build in the project directory, making it
annoying to commit while the project is being built.

These have been observed with Clang, -fsanitize-undefined on Arch Linux,
though other configurations may also generate such temporaries.

The solution here is on lines with the Linux kernel's .gitignore:
https://github.com/torvalds/linux/blob/master/.gitignore.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 20:30:41 +02:00
Ganesh Ajjanagadde
3b2000c2bf doc/scaler, swscale/options: use proper capitalization
Proper names should be capitalized in all user facing API as far as
possible. The option names themselves have not been changed since:
1. We consistently keep option names in lower case.
2. Changing them would break existing scripts.

The converse is also true: improper names should not be capitalized
generally.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 19:32:56 +02:00
Zhang Rui
810fbd8933 fate/async: test error code from underlying protocol
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 17:58:45 +02:00
Zhang Rui
7dc42c9e65 avformat/async: pass internal I/O error
av_fifo_generic_write() does not return any error code.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 17:58:45 +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
Rodger Combs
0d53a6f5b4 lavc: move bitstream filter args to the bsf ctx 2015-10-10 10:41:10 -05: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
Ganesh Ajjanagadde
0281ef9075 doc/developer: minor typo and consistency fixes
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-10 15:52:15 +02:00
Ganesh Ajjanagadde
8881b035d9 doc/build_system: miscellaneous typo and consistency fixes
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-10 15:49:08 +02:00
Ganesh Ajjanagadde
979572365f avcodec/ac3enc: fix undefined negative left shift
This should fix the undefined behavior reported in:
https://trac.ffmpeg.org/ticket/4727.

I can reproduce this at runtime: simply stick in an abort call in
asym_quant to check if c < 0 and run FATE. I don't know ac3 so I can't
confirm if negative coefficients are intentional, but at the moment they
clearly are according to FATE.

This resolves the undefined behavior. Tested with FATE.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 14:43:22 +02:00
Hendrik Leppkes
c4e23ca853 Merge commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60'
* commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60':
  libopenh264enc: Added max_nal_size option

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:58:42 +02:00
Hendrik Leppkes
80fd622590 Merge commit '00cc10aee380f882507bac994ac469d8358d12e8'
* commit '00cc10aee380f882507bac994ac469d8358d12e8':
  asfdec: do not skip padding if offset is above packet size - padding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:56:29 +02:00
Hendrik Leppkes
8b1007ead8 Merge commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828'
* commit 'a8956eca1ff3b5b7f9aadbe6eb46536efeb2f828':
  cabac: Make CABAC states hardcoded

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:56:14 +02:00
Anton Khirnov
8a73b8c5b4 cabac: Make cabac starts hardcoded
There's not much reason to generate such a small table at runtime.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-10 09:52:18 +02:00
Derek Buitenhuis
9692fd7622 Revert "cabac: Allow hardcoding CABAC table."
This becomes unuseful in the following commit.

This reverts commit 092d1977cc.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-10 09:52:13 +02:00
Hendrik Leppkes
9d6873a43d Merge commit '2830bce47e2eb29c76202f19017031ddc1f95dd3'
* commit '2830bce47e2eb29c76202f19017031ddc1f95dd3':
  w32pthreads: Load dynamically loaded functions on demand

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:45:44 +02:00
Hendrik Leppkes
89da893c88 Merge commit 'b22693b06d1e5d73454a65c203b4d31c1ca5b69a'
* commit 'b22693b06d1e5d73454a65c203b4d31c1ca5b69a':
  w32pthreads: Add pthread_once emulation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:45:16 +02:00
Hendrik Leppkes
3e3779cd51 Merge commit '8b830ee9a26d47b138f12a82085cdb372f407f1e'
* commit '8b830ee9a26d47b138f12a82085cdb372f407f1e':
  avconv: Do not try to configure filter outputs without streams

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:43:47 +02:00
Hendrik Leppkes
0b28039a44 Merge commit 'd7a5a178c252b625537adc046392624ad543dea7'
* commit 'd7a5a178c252b625537adc046392624ad543dea7':
  configure: When disabling a library disable all the related components

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:37:51 +02:00
Hendrik Leppkes
a71fff213d Merge commit '58b42345b38b46d11c32e11d9c57517f99d6a601'
* commit '58b42345b38b46d11c32e11d9c57517f99d6a601':
  dcadec: reorganise context data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:32:59 +02:00
Hendrik Leppkes
d3952510d2 Merge commit '3a4d369ea4ded91b1178ae6e2ff0ab9ea470e344'
* commit '3a4d369ea4ded91b1178ae6e2ff0ab9ea470e344':
  g2m: Relax resolution change constraints

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:13:32 +02:00
James Almer
dab5f65b25 x86/takdsp: use arithmetic shift instructions
p1 and p2 are int32_t.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-09 23:52:39 -03:00
Rodger Combs
4ab5666759 lavf/mov: add support for sidx fragment indexes
Fixes trac #3842
2015-10-09 21:18:28 -05:00
赵宇龙
cd847839f3 h264_mp4toannexb: fix the pps offset when there are more than one sps in avcc
the pps offset is used to locate pps in the spspps_buf; however, the
current calc method is wrong because it is the offset of the original
avctx->extradata;
when there is only one sps in the avcc; the value is correct by
coincidence, however, it will fail in avcc with multi sps

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 01:37:00 +02:00
Michael Niedermayer
3d126ef188 avcodec/h264_mp4toannexb_bsf: Use av_freep() to free spspps_buf
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 01:29:22 +02:00
Ganesh Ajjanagadde
9953038728 avcodec/xvmc: apply attribute_deprecated correctly
This fixes a warning observed on Clang 3.7:
"warning: attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]"
and thus enables deprecation warning for the relevant struct.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2015-10-09 19:01:08 -04:00
Ganesh Ajjanagadde
3be27e07d3 avcodec/mpegvideoenc: fix undefined negative left shift
This should fix the first undefined behavior reported in:
https://trac.ffmpeg.org/ticket/4727.

I can't reproduce the runtime behavior reported in the ticket, hence I
can't confirm that this actually fixes the exact issue reported in the
ticket.

Regardless, I can confirm that this is a genuine issue, and that
negative shifts can (and do) occur, fixed by this.

Tested with FATE.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 23:01:55 +02:00
Christophe Gisquet
25d3013e36 fate: add DNxHD/HR tests
Currently only 2 profiles are evaluated because they are the only 2
with distributed test sequences.
- CID 1260: YUV 4:2:2 10 bits with block-adaptive interlace coding,
  from ticket 4876;
- CID 1270: YUV 4:4:4 10 bits (HR), 1920x839, from ticket 4581.

They were generated from the ticket sequences by running the
following kind of command-line;
ffmpeg -i $INPUT -an -sn -vcodec copy -vframes 1 -y $OUTPUT.mov

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 22:36:05 +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
35af7add6f avcodec/takdec: add x86 SIMD for rest of decorrelation modes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-09 21:38:15 +02:00
Ganesh Ajjanagadde
2f4374fae1 ffmpeg: avoid possible undefined behavior
On lines 1633,1634 FFABS(pts) is performed. However, if av_stream_get_end_pts
returns AV_NOPTS_VALUE always, pts remains stuck at INT64_MIN, leading
to undefined behavior on FFABS.

One could conceive of a solution using FFNABS. However, such a solution
has to deal with the implementation defined rounding of integer division
with at least one negative operand in ANSI C89. C99 forces truncation to
zero, but I am not sure that all of our platforms compile with full C99
support, and in particular whether we can safely assume a fixed
rounding behavior across all platforms.

This solution is simple, and I doubt changing INT64_MIN to INT64_MIN + 1
has any practical loss - if it is stuck at its initial value, the stream
is messed up anyway.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 21:19:39 +02:00
Carl Eugen Hoyos
d6cfbcd621 lavc/mjpegenc: Add an option to force outputting chroma matrix.
RFC 2435 suggests that mjpeg over rtp uses both two tables.
2015-10-09 20:58:07 +02:00
Mario Gasparoni
c3e5c47bda libopenh264enc: Added max_nal_size option
Also added dynamic slice_mode option, needed for the max_nal_size.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-09 16:53:44 +02:00
Ganesh Ajjanagadde
1e81fd3710 avcodec/pthread_frame: update doxygen for update_context_from_thread
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2015-10-09 09:56:08 -04:00
Christophe Gisquet
1896ac4abf build system: fix dependency generation
When trying to build the binary dct-test under MSYS2/Win64, the
makefile rule does not have the SUBDIR in the target for its
object file.

Consequently, modifications to various include files (e.g. C ones)
do not trigger a recompilation.

When tracing the dependency generating, the dependency generation
has this strange content (linebreak inserted):
sed -e "/^#.*/d" -e "s,^[[:space:]]*dct\\.o,libavcodec/dct.o," \
 > libavcodec/dct-test.d

For some reason, the $(*F) has weird content. It looks simpler to
use $(@F) instead of $(*F)\\.o, although this was tested on one
single version of make.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 13:17:34 +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
Rodger Combs
f00ec7eb1b lavf/hls: don't convert NULL options to empty strings; fixes HTTP CRLF warnings 2015-10-09 04:12:57 -05:00
Rodger Combs
0562f95902 lavu/opt: add flag to return NULL when applicable in av_opt_get
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 04:12:57 -05:00
Rodger Combs
f36baeebc5 lavu/opt: switch AV_OPT flags to shift-based formatting 2015-10-09 04:12:57 -05:00
Clément Bœsch
8f6f357fde build: restore videotoolbox compilation on iOS 2015-10-09 10:59:31 +02:00
Clément Bœsch
40d9d6de90 avformat/srtdec: make sure we probe a number
Fixes regression since 7218352e02: WebVTT
files were matching the SRT probing.
2015-10-09 10:53:21 +02:00
Rodger Combs
4f7d9b7706 lavf/matroskadec: drop indexes that appear broken
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 04:43:49 +02:00
wm4
b3f8d871ee avcodec/ass: fix doxygen typo 2015-10-08 23:29:18 +02:00
Ganesh Ajjanagadde
65e2a5bb32 doc/faq: use https instead of http
Change to https for FFmpeg websites.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-08 23:11:32 +02:00
Justin Greer
9c168f9a22 avfilter/af_afade: fix start of fade out
Fixes #4919
2015-10-08 23:09:25 +02:00