Commit Graph

76753 Commits

Author SHA1 Message Date
Paul B Mahol 9c66428016 avcodec/wmaprodec: XMA1 actually have packet sequence numbers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-10 21:24:30 +01:00
Martin Storsjö 59e8ec0aa8 movenc: Add an API unit test for fragmenting options/calls
Contrary to the normal fate tests that run via avconv, this tests
nontrivial call sequences that are only doable via the API
(mainly for different corner cases when using the muxer for
segmenting).

The test muxes fake packet data (with extradata that looks
enough like proper data to make the file be viewable with e.g.
boxdumper) and checks the hash of the produced files. The test also
verifies that fragments produced via different call sequences remain
identical (to avoid e.g. updating the output hashes and suddenly
having fragments that used to be identical suddenly diverging), for
fragments written with frag_discont and/or delay_moov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:50:25 +02:00
Martin Storsjö 8ad5124b7e movenc: Automatically flush after writing the initial moov
In most other cases when writing fragmented mp4 files, the output
IO context is flushed after each fragment. Also flush it after
writing the initial moov, to have it behave in the same way.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:46:03 +02: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
Paul B Mahol 4e583eda5f avformat/wavdec: allow data chunk to be before fmt/xma2 chunk
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-10 19:42:21 +01:00
Paul B Mahol a0f75c46d3 avformat/wavdec: parse XMA2 tag
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-10 19:42:21 +01:00
Hendrik Leppkes 3df9ec5ce7 Merge commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d'
* commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d':
  lavf: factor out freeing an AVStream

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:42:08 +01:00
Hendrik Leppkes d3d4bc4784 Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'
* commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4':
  avconv: set packet duration for CFR video streams

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:37:25 +01:00
Hendrik Leppkes de0e219a8a Merge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'
* commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3':
  lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:23:22 +01:00
Hendrik Leppkes 23277aa24c Merge commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5'
* commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5':
  libopenh264enc: Set AVOption data type

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:19:15 +01:00
Hendrik Leppkes 947447bfdc Merge commit 'fcc49924db6c5530a3346c45a6999244d92eaf48'
* commit 'fcc49924db6c5530a3346c45a6999244d92eaf48':
  vdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:18:17 +01:00
Hendrik Leppkes 42a088784b Merge commit '563e6d860391bac0511984e5c0842320b5c94d2d'
* commit '563e6d860391bac0511984e5c0842320b5c94d2d':
  segafilm: drop the "song and dance" for cinepak

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:18:05 +01:00
Hendrik Leppkes 0e29820cd1 Merge commit '1e791ee3aae63122afb10cbabe86a747aea58992'
* commit '1e791ee3aae63122afb10cbabe86a747aea58992':
  segafilm: set video and audio stream duration

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:17:02 +01:00
Hendrik Leppkes b3453f44ed Merge commit 'c012c6f1a8b34828a7870dc1854422934f14b79a'
* commit 'c012c6f1a8b34828a7870dc1854422934f14b79a':
  segafilm: implement seeking

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:16:11 +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
Hendrik Leppkes 240ac53a5c Merge commit 'e2854e731f843906d9a9a5b882bed872341999fd'
* commit 'e2854e731f843906d9a9a5b882bed872341999fd':
  avresample: Document avresample_open() a little better

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:07:41 +01:00
Hendrik Leppkes df06cb5611 Merge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'
* commit 'f128b8e19ac7f702adae899ab91cc1e80f238761':
  mov: detect cover art pictures by content

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:01:36 +01:00
Hendrik Leppkes 3a8b37c590 Merge commit '50d2a3b5f34e6f99e5ffe17f2be5eb1815555960'
* commit '50d2a3b5f34e6f99e5ffe17f2be5eb1815555960':
  flashsv: Initialize the block array

Not merged, blocks are already zeroed when appropriate.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:00:51 +01:00
Hendrik Leppkes 0c1a6f577b Merge commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c'
* commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c':
  truemotion2: Fix the buffer check

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:58:14 +01:00
Hendrik Leppkes 446ac80ea5 Merge commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab'
* commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab':
  mimic: Always return on failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:56:48 +01:00
Hendrik Leppkes b40e43c5c4 Merge commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6'
* commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6':
  msnwc_tcp: Use the correct return values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:56:14 +01:00
Hendrik Leppkes 618817b6a8 Merge commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80'
* commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80':
  cosmetics: msnwc_tcp: Reformat

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:55:25 +01:00
Hendrik Leppkes 2e82d51714 Merge commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768'
* commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768':
  msnwc_tcp: Correctly report failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:54:06 +01:00
Hendrik Leppkes 8600fef123 Merge commit '60f50374f1955442dc987abc4a6c61c2109620c2'
* commit '60f50374f1955442dc987abc4a6c61c2109620c2':
  rpza: Check the blocks left before processing one

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:50:51 +01:00
Hendrik Leppkes 2503aa6bd9 Merge commit '0b699920f3c0b2e30969b38ce59226653f9d80ec'
* commit '0b699920f3c0b2e30969b38ce59226653f9d80ec':
  lagarith: Correctly compute hash_shift

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:43:17 +01:00
Hendrik Leppkes d786cdff1c Merge commit '1e7ff5ac6923996f7292c82f102c68384fbc9d97'
* commit '1e7ff5ac6923996f7292c82f102c68384fbc9d97':
  nut: Use the correct codec_tag when multiple are available

Not merged since ffnutenc handles the codec_tag differently

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 17:38:09 +01:00
James Almer 9f4a41bf99 avutil/softfloat: use abort() instead of av_assert0(0)
Fixes compilation of host tool aacps_fixed_tablegen.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-11-10 13:37:24 -03:00
Michael Niedermayer 6e3244fb09 avcodec/g729postfilter: Avoid function calls in FFMAX() arguments
This avoid double calling functions

Found-by: Muhammad Faiz <mfcc64@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 15:44:46 +01:00
wm4 dafe4cd29c mmaldec: send only a single EOS packet on flushing
Fixes apparent mmal_port_disable() freezes in ffmmal_stop_decoder() when
calling ffmmal_decode() with flush semantics a large number of times in
a row.
2015-11-10 13:47:37 +01:00
Michael Niedermayer 8a024f6a43 avcodec/aacsbr_fixed: Try to initialize sum[0..1] differently to fix build with VS2012
Found-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 13:34:27 +01:00
Timothy Gu 480bad7c6d avformat: Add v210[x] demuxer
Allows one to do:

    ffmpeg -s 1920x1080          -i blah.v210 ...
    ffmpeg -s 1920x1080 -f v210x -i blah.yuv10 ...

Fixes #1869.

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
2015-11-09 20:44:25 -08:00
Michael Niedermayer b83c849e87 tests/fate/avformat: Fix fate-lavf
The CMP variable seems to have been inherited from fate-api-seek which set it to null

the mxf reference needed a change due to c7e14a279f

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 04:53:47 +01:00
Andreas Cadhalpun d7f29bfa69 aacdec: don't return frames without data from aac_decode_er_frame
This is similar to commit ec38a1b for aac_decode_frame_int.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 02:12:38 +00:00
Andreas Cadhalpun ef7fe9851e aacps: avoid division by zero in stereo_processing
This fixes a SIGFPE crash in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-10 01:33:24 +00:00
Ganesh Ajjanagadde 6c2dbff7f0 ffserver: fix incorrect strlcpy usage
Somewhat ironic that this "safe" interface is actually being used
unsafely here. This fixes the usage preventing potential null pointer
dereference, where the old code was doubly broken: ctime can return
NULL, and ctime can return an arbitrarily long buffer.

Reviewed-by: Mark Harris <mark.hsj@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-09 19:30:26 -05:00
Ganesh Ajjanagadde cf491a925e swresample/resample: speed up Blackman Nuttall filter
This may be a slightly surprising optimization, but is actually based on
an understanding of how math libraries compute trigonometric functions.
Explanation is given here so that future development uses libm more effectively
across the codebase.

All libm's essentially compute transcendental functions via some kind of
polynomial approximation, be it Taylor-Maclaurin or Chebyshev.
Correction terms are added via polynomial correction factors when needed
to squeeze out the last bits of accuracy. Lookup tables are also
inserted strategically.

In the case of trigonometric functions, periodicity is exploited via
first doing a range reduction to an interval around zero, and then using
some polynomial approximation.

This range reduction is the most natural way of doing things - else one
would need polynomials for ranges in different periods which makes no
sense whatsoever.

To avoid the need for the range reduction, it is helpful to feed in
arguments as close to the origin as possible for the trigonometric
functions. In fact, this also makes sense from an accuracy point of view:
IEEE floating point has far more resolution for small numbers than big ones.

This patch does this for the Blackman-Nuttall filter, and yields a
non-negligible speedup.

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-2626-44100
old:
18893514 decicycles in build_filter (loop 1000),     256 runs,      0 skips
18599863 decicycles in build_filter (loop 1000),     512 runs,      0 skips
18445574 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

new:
16290697 decicycles in build_filter (loop 1000),     256 runs,      0 skips
16267172 decicycles in build_filter (loop 1000),     512 runs,      0 skips
16251105 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-09 18:41:32 -05:00
Ganesh Ajjanagadde b87ca4bf25 swresample/resample: speed up upsampling by precomputing sines
When upsampling, factor is set to 1 and sines need to be evaluated only
once for each phase, and the complexity should not depend on the number
of filter taps. This does the desired precomputation, yielding
significant speedups. Hard guarantees on the gain are not possible, but gains
themselves are obvious and are illustrated below.

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-2626-44100
old:
29161085 decicycles in build_filter (loop 1000),     256 runs,      0 skips
28821467 decicycles in build_filter (loop 1000),     512 runs,      0 skips
28668201 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

new:
14351936 decicycles in build_filter (loop 1000),     256 runs,      0 skips
14306652 decicycles in build_filter (loop 1000),     512 runs,      0 skips
14299923 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

Note that this does not statically allocate the sin lookup table. This
may be done for the default 1024 phases, yielding a 512*8 = 4kB array
which should be small enough.
This should yield a small improvement. Nevertheless, this is separate from
this patch, is more ambiguous due to the binary increase, and requires a
lut to be generated offline.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-09 18:41:03 -05:00
Simon Thelen b02201efb5 doc/ffmpeg: Clarify that the sdp_file option requires an rtp output.
Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-09 23:43:11 +01:00
Simon Thelen 70fb5eadc5 ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.
Fixes a segfault when trying to write nonexistent rtp information.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-09 23:43:11 +01:00
Bryan Huh 72f9a6349c avformat/cache: Avoid int-overflow in cache compare function
cache protocol indexes its cache using AVTreeNodes which require a cmp
function for inserting and searching new cache-entries. This cmp
function expects a 32-bit int return value (negative, zero, or positive)
but the cache cmp function returns an int64_t which can overflow the
int, giving negative numbers for when it should be positive, vice versa.
This manifests itself only for very large files (e.g. 4GB+)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-09 19:25:05 +01:00
Agatha Hu ddbad15898 avcodec/nvenc: update nvenc default parameters
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-11-09 13:05:02 +01:00
Matt Oliver f984174512 avutil/x86/intmath: Correct intrinsic headers for older compilers.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-11-09 21:40:33 +11:00
Paul B Mahol 0cfd4a993f avformat/rsd: add XMA support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-09 10:41:38 +01:00
John Stebbins db9b7321d5 vsrc_color: implement frame rate
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:15:26 +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
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 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
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