]> git.sesse.net Git - ffmpeg/log
ffmpeg
8 years agoavcodec/lzw: ff_lzw_decode_tail() now returns the consumed bytes in lzw decompress
Ni Hui [Tue, 10 Nov 2015 14:03:36 +0000 (22:03 +0800)]
avcodec/lzw: ff_lzw_decode_tail() now returns the consumed bytes in lzw decompress

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agobrstm: reject negative sample rate
Andreas Cadhalpun [Tue, 10 Nov 2015 19:10:23 +0000 (20:10 +0100)]
brstm: reject negative sample rate

A negative sample rate causes assertion failures in av_rescale_rnd.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoavcodec/wmaprodec: XMA1 actually have packet sequence numbers
Paul B Mahol [Tue, 10 Nov 2015 20:24:30 +0000 (21:24 +0100)]
avcodec/wmaprodec: XMA1 actually have packet sequence numbers

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoaviflter/vf_waveform: speed up non-color filters
Paul B Mahol [Tue, 10 Nov 2015 18:39:23 +0000 (19:39 +0100)]
aviflter/vf_waveform: speed up non-color filters

Remove loops, output is also more interesting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavformat/wavdec: allow data chunk to be before fmt/xma2 chunk
Paul B Mahol [Sun, 8 Nov 2015 11:27:42 +0000 (12:27 +0100)]
avformat/wavdec: allow data chunk to be before fmt/xma2 chunk

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavformat/wavdec: parse XMA2 tag
Paul B Mahol [Sat, 7 Nov 2015 16:32:19 +0000 (17:32 +0100)]
avformat/wavdec: parse XMA2 tag

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoMerge commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d'
Hendrik Leppkes [Tue, 10 Nov 2015 17:42:08 +0000 (18:42 +0100)]
Merge commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d'

* commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d':
  lavf: factor out freeing an AVStream

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'
Hendrik Leppkes [Tue, 10 Nov 2015 17:25:51 +0000 (18:25 +0100)]
Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'

* commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4':
  avconv: set packet duration for CFR video streams

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'
Hendrik Leppkes [Tue, 10 Nov 2015 17:23:22 +0000 (18:23 +0100)]
Merge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'

* commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3':
  lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5'
Hendrik Leppkes [Tue, 10 Nov 2015 17:19:15 +0000 (18:19 +0100)]
Merge commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5'

* commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5':
  libopenh264enc: Set AVOption data type

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'fcc49924db6c5530a3346c45a6999244d92eaf48'
Hendrik Leppkes [Tue, 10 Nov 2015 17:18:17 +0000 (18:18 +0100)]
Merge commit 'fcc49924db6c5530a3346c45a6999244d92eaf48'

* commit 'fcc49924db6c5530a3346c45a6999244d92eaf48':
  vdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '563e6d860391bac0511984e5c0842320b5c94d2d'
Hendrik Leppkes [Tue, 10 Nov 2015 17:18:05 +0000 (18:18 +0100)]
Merge commit '563e6d860391bac0511984e5c0842320b5c94d2d'

* commit '563e6d860391bac0511984e5c0842320b5c94d2d':
  segafilm: drop the "song and dance" for cinepak

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '1e791ee3aae63122afb10cbabe86a747aea58992'
Hendrik Leppkes [Tue, 10 Nov 2015 17:17:02 +0000 (18:17 +0100)]
Merge commit '1e791ee3aae63122afb10cbabe86a747aea58992'

* commit '1e791ee3aae63122afb10cbabe86a747aea58992':
  segafilm: set video and audio stream duration

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'c012c6f1a8b34828a7870dc1854422934f14b79a'
Hendrik Leppkes [Tue, 10 Nov 2015 17:16:11 +0000 (18:16 +0100)]
Merge commit 'c012c6f1a8b34828a7870dc1854422934f14b79a'

* commit 'c012c6f1a8b34828a7870dc1854422934f14b79a':
  segafilm: implement seeking

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5'
Hendrik Leppkes [Tue, 10 Nov 2015 17:13:46 +0000 (18:13 +0100)]
Merge commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5'

* commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5':
  vf_pad: fix x, y option expression evaluation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'e2854e731f843906d9a9a5b882bed872341999fd'
Hendrik Leppkes [Tue, 10 Nov 2015 17:07:41 +0000 (18:07 +0100)]
Merge commit 'e2854e731f843906d9a9a5b882bed872341999fd'

* commit 'e2854e731f843906d9a9a5b882bed872341999fd':
  avresample: Document avresample_open() a little better

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'
Hendrik Leppkes [Tue, 10 Nov 2015 17:01:36 +0000 (18:01 +0100)]
Merge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'

* commit 'f128b8e19ac7f702adae899ab91cc1e80f238761':
  mov: detect cover art pictures by content

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '50d2a3b5f34e6f99e5ffe17f2be5eb1815555960'
Hendrik Leppkes [Tue, 10 Nov 2015 17:00:51 +0000 (18:00 +0100)]
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>
8 years agoMerge commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c'
Hendrik Leppkes [Tue, 10 Nov 2015 16:58:14 +0000 (17:58 +0100)]
Merge commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c'

* commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c':
  truemotion2: Fix the buffer check

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab'
Hendrik Leppkes [Tue, 10 Nov 2015 16:56:48 +0000 (17:56 +0100)]
Merge commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab'

* commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab':
  mimic: Always return on failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6'
Hendrik Leppkes [Tue, 10 Nov 2015 16:56:14 +0000 (17:56 +0100)]
Merge commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6'

* commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6':
  msnwc_tcp: Use the correct return values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80'
Hendrik Leppkes [Tue, 10 Nov 2015 16:55:25 +0000 (17:55 +0100)]
Merge commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80'

* commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80':
  cosmetics: msnwc_tcp: Reformat

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768'
Hendrik Leppkes [Tue, 10 Nov 2015 16:54:06 +0000 (17:54 +0100)]
Merge commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768'

* commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768':
  msnwc_tcp: Correctly report failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '60f50374f1955442dc987abc4a6c61c2109620c2'
Hendrik Leppkes [Tue, 10 Nov 2015 16:50:12 +0000 (17:50 +0100)]
Merge commit '60f50374f1955442dc987abc4a6c61c2109620c2'

* commit '60f50374f1955442dc987abc4a6c61c2109620c2':
  rpza: Check the blocks left before processing one

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '0b699920f3c0b2e30969b38ce59226653f9d80ec'
Hendrik Leppkes [Tue, 10 Nov 2015 16:43:17 +0000 (17:43 +0100)]
Merge commit '0b699920f3c0b2e30969b38ce59226653f9d80ec'

* commit '0b699920f3c0b2e30969b38ce59226653f9d80ec':
  lagarith: Correctly compute hash_shift

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '1e7ff5ac6923996f7292c82f102c68384fbc9d97'
Hendrik Leppkes [Tue, 10 Nov 2015 16:38:09 +0000 (17:38 +0100)]
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>
8 years agoavutil/softfloat: use abort() instead of av_assert0(0)
James Almer [Tue, 10 Nov 2015 02:16:17 +0000 (23:16 -0300)]
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>
8 years agoavcodec/g729postfilter: Avoid function calls in FFMAX() arguments
Michael Niedermayer [Tue, 10 Nov 2015 13:35:08 +0000 (14:35 +0100)]
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>
8 years agommaldec: send only a single EOS packet on flushing
wm4 [Tue, 10 Nov 2015 12:47:01 +0000 (13:47 +0100)]
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.

8 years agoavcodec/aacsbr_fixed: Try to initialize sum[0..1] differently to fix build with VS2012
Michael Niedermayer [Tue, 10 Nov 2015 12:33:38 +0000 (13:33 +0100)]
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>
8 years agoavformat: Add v210[x] demuxer
Timothy Gu [Sat, 7 Nov 2015 23:59:01 +0000 (15:59 -0800)]
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>
8 years agotests/fate/avformat: Fix fate-lavf
Michael Niedermayer [Tue, 10 Nov 2015 03:14:55 +0000 (04:14 +0100)]
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 c7e14a279fa7348db10ec824bb2d67858cb1c1ca

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoaacdec: don't return frames without data from aac_decode_er_frame
Andreas Cadhalpun [Mon, 9 Nov 2015 21:16:01 +0000 (22:16 +0100)]
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>
8 years agoaacps: avoid division by zero in stereo_processing
Andreas Cadhalpun [Sun, 8 Nov 2015 21:04:08 +0000 (22:04 +0100)]
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>
8 years agoffserver: fix incorrect strlcpy usage
Ganesh Ajjanagadde [Fri, 6 Nov 2015 20:47:37 +0000 (15:47 -0500)]
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>
8 years agoswresample/resample: speed up Blackman Nuttall filter
Ganesh Ajjanagadde [Mon, 9 Nov 2015 05:38:45 +0000 (00:38 -0500)]
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>
8 years agoswresample/resample: speed up upsampling by precomputing sines
Ganesh Ajjanagadde [Mon, 9 Nov 2015 02:39:32 +0000 (21:39 -0500)]
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>
8 years agodoc/ffmpeg: Clarify that the sdp_file option requires an rtp output.
Simon Thelen [Mon, 2 Nov 2015 14:57:50 +0000 (15:57 +0100)]
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>
8 years agoffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.
Simon Thelen [Mon, 2 Nov 2015 15:36:16 +0000 (16:36 +0100)]
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>
8 years agoavformat/cache: Avoid int-overflow in cache compare function
Bryan Huh [Mon, 9 Nov 2015 00:35:01 +0000 (16:35 -0800)]
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>
8 years agoavcodec/nvenc: update nvenc default parameters
Agatha Hu [Mon, 9 Nov 2015 12:05:02 +0000 (13:05 +0100)]
avcodec/nvenc: update nvenc default parameters

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
8 years agoavutil/x86/intmath: Correct intrinsic headers for older compilers.
Matt Oliver [Mon, 9 Nov 2015 10:40:33 +0000 (21:40 +1100)]
avutil/x86/intmath: Correct intrinsic headers for older compilers.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
8 years agoavformat/rsd: add XMA support
Paul B Mahol [Mon, 9 Nov 2015 09:31:24 +0000 (10:31 +0100)]
avformat/rsd: add XMA support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoswresample/resample: improve bessel function accuracy and speed
Ganesh Ajjanagadde [Mon, 2 Nov 2015 19:28:39 +0000 (14:28 -0500)]
swresample/resample: improve bessel function accuracy and speed

This improves accuracy for the bessel function at large arguments, and this in turn
should improve the quality of the Kaiser window. It also improves the
performance of the bessel function and hence build_filter by ~ 20%.
Details are given below.

Algorithm: taken from the Boost project, who have done a detailed
investigation of the accuracy of their method, as compared with e.g the
GNU Scientific Library (GSL):
http://www.boost.org/doc/libs/1_52_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html.
Boost source code (also cited and licensed in the code):
https://searchcode.com/codesearch/view/14918379/.

Accuracy: sample values may be obtained as follows. i0 denotes the old bessel code,
i0_boost the approach here, and i0_real an arbitrary precision result (truncated) from Wolfram Alpha:
type "bessel i0(6.0)" to reproduce. These are evaluation points that occur for
the default kaiser_beta = 9.

Some illustrations:
bessel(8.0)
i0      (8.000000) = 427.564115721804739678191254
i0_boost(8.000000) = 427.564115721804796521610115
i0_real (8.000000) = 427.564115721804785177396791

bessel(6.0)
i0      (6.000000) = 67.234406976477956163762428
i0_boost(6.000000) = 67.234406976477970374617144
i0_real (6.000000) = 67.234406976477975326188025

Reason for accuracy: Main accuracy benefits come at larger bessel arguments, where the
Taylor-Maclaurin method is not that good: 23+ iterations
(at large arguments, since the series is about 0) can cause
significant floating point error accumulation.

Benchmarks: Obtained on x86-64, Haswell, GNU/Linux via a loop calling
build_filter 1000 times:
test: fate-swr-resample-dblp-44100-2626

new:
995894468 decicycles in build_filter(loop 1000),     256 runs,      0 skips
1029719302 decicycles in build_filter(loop 1000),     512 runs,      0 skips
984101131 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

old:
1250020763 decicycles in build_filter(loop 1000),     256 runs,      0 skips
1246353282 decicycles in build_filter(loop 1000),     512 runs,      0 skips
1220017565 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

A further ~ 5% may be squeezed by enabling -ftree-vectorize. However,
this is a separate issue from this patch.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoswresample: allow double precision beta value for the Kaiser window
Ganesh Ajjanagadde [Sat, 7 Nov 2015 15:16:27 +0000 (10:16 -0500)]
swresample: allow double precision beta value for the Kaiser window

Kaiser windows inherently don't require beta to be an integer. This was
an arbitrary restriction. Moreover, soxr does not require it, and in
fact often estimates beta to a non-integral value.

Thus, this patch allows greater flexibility for swresample clients.
Micro version is updated.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agosoftfloat: handle INT_MIN correctly in av_int2sf
Andreas Cadhalpun [Sun, 8 Nov 2015 16:19:10 +0000 (17:19 +0100)]
softfloat: handle INT_MIN correctly in av_int2sf

Otherwise v=INT_MIN doesn't get normalized and thus triggers av_assert2
in other functions.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agosoftfloat: assert when the argument of av_sqrt_sf is negative
Andreas Cadhalpun [Sun, 8 Nov 2015 14:15:24 +0000 (15:15 +0100)]
softfloat: assert when the argument of av_sqrt_sf is negative

The correct result can't be expressed in SoftFloat.
Currently it returns a random value from an out of bounds read.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoavfilter: add anoisesrc
Kyle Swanson [Sun, 8 Nov 2015 11:39:37 +0000 (12:39 +0100)]
avfilter: add anoisesrc

Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavutil/softfloat: Include negative numbers in cmp/gt tests
Michael Niedermayer [Sun, 8 Nov 2015 14:04:05 +0000 (15:04 +0100)]
avutil/softfloat: Include negative numbers in cmp/gt tests

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Fix av_gt_sf() with large exponents try #2
Michael Niedermayer [Sun, 8 Nov 2015 14:03:28 +0000 (15:03 +0100)]
avutil/softfloat: Fix av_gt_sf() with large exponents try #2

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Add test for av_gt_sf()
Michael Niedermayer [Sun, 8 Nov 2015 14:02:05 +0000 (15:02 +0100)]
avutil/softfloat: Add test for av_gt_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Extend the av_cmp_sf() test to cover a wider range of exponents
Michael Niedermayer [Sun, 8 Nov 2015 13:45:19 +0000 (14:45 +0100)]
avutil/softfloat: Extend the av_cmp_sf() test to cover a wider range of exponents

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Fix overflows in shifts in av_cmp_sf() and av_gt_sf()
Michael Niedermayer [Sun, 8 Nov 2015 13:13:42 +0000 (14:13 +0100)]
avutil/softfloat: Fix overflows in shifts in av_cmp_sf() and av_gt_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Add test for av_cmp_sf()
Michael Niedermayer [Sun, 8 Nov 2015 13:39:46 +0000 (14:39 +0100)]
avutil/softfloat: Add test for av_cmp_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Add tests for exponent underflows
Michael Niedermayer [Sun, 8 Nov 2015 13:07:22 +0000 (14:07 +0100)]
avutil/softfloat: Add tests for exponent underflows

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Fix exponent underflow in av_div_sf()
Michael Niedermayer [Sun, 8 Nov 2015 12:59:21 +0000 (13:59 +0100)]
avutil/softfloat: Fix exponent underflow in av_div_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Fix exponent underflow in av_mul_sf()
Michael Niedermayer [Sun, 8 Nov 2015 12:57:19 +0000 (13:57 +0100)]
avutil/softfloat: Fix exponent underflow in av_mul_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Fix typo in av_mul_sf() doxy
Michael Niedermayer [Sun, 8 Nov 2015 12:54:15 +0000 (13:54 +0100)]
avutil/softfloat: Fix typo in av_mul_sf() doxy

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoRevert "avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()"
Michael Niedermayer [Sun, 8 Nov 2015 12:44:27 +0000 (13:44 +0100)]
Revert "avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()"

This case should not be possible if the input has a exponent within
the valid range

This reverts commit 0269fb11e3de17375f86d9120599af8c87cdfa0a.

8 years agoavutil/softfloat: Check for MIN_EXP in av_sqrt_sf()
Michael Niedermayer [Sun, 8 Nov 2015 12:25:54 +0000 (13:25 +0100)]
avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()

Otherwise the exponent could eventually underflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Correctly set the exponent for 0.0 in av_sqrt_sf()
Michael Niedermayer [Sun, 8 Nov 2015 12:25:21 +0000 (13:25 +0100)]
avutil/softfloat: Correctly set the exponent for 0.0 in av_sqrt_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavf: factor out freeing an AVStream
Anton Khirnov [Sun, 20 Jul 2014 08:40:35 +0000 (08:40 +0000)]
lavf: factor out freeing an AVStream

It will be needed in other functions.

8 years agoavconv: set packet duration for CFR video streams
Anton Khirnov [Sun, 11 Oct 2015 10:07:08 +0000 (12:07 +0200)]
avconv: set packet duration for CFR video streams

8 years agolavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
Anton Khirnov [Wed, 7 Oct 2015 09:48:28 +0000 (11:48 +0200)]
lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing

The reasoning for setting it to zero only applies to demuxing.

8 years agoavcodec/aacsbr: Use FLOAT_0
Michael Niedermayer [Sun, 8 Nov 2015 10:05:48 +0000 (11:05 +0100)]
avcodec/aacsbr: Use FLOAT_0

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: FLOAT_0 should use MIN_EXP
Michael Niedermayer [Sun, 8 Nov 2015 02:04:33 +0000 (03:04 +0100)]
avutil/softfloat: FLOAT_0 should use MIN_EXP

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoAdd pixblockdsp checkasm tests
Timothy Gu [Sun, 1 Nov 2015 11:31:22 +0000 (03:31 -0800)]
Add pixblockdsp checkasm tests

8 years agopixblockdsp: x86: Condense diff_pixels_* to a shared macro
Timothy Gu [Sun, 1 Nov 2015 11:12:45 +0000 (03:12 -0800)]
pixblockdsp: x86: Condense diff_pixels_* to a shared macro

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
8 years agoavcodec/takdec: Use memove, avoid undefined memcpy() use
Michael Niedermayer [Sat, 7 Nov 2015 19:05:27 +0000 (20:05 +0100)]
avcodec/takdec: Use memove, avoid undefined memcpy() use

Fixes: e214333cbd94c91228e624ff39329ce6/asan_generic_4a5159_6412_96cda2530e80607210ab41ccae3d456d.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agommaldec: correct package buffering accounting
wm4 [Fri, 6 Nov 2015 12:02:16 +0000 (13:02 +0100)]
mmaldec: correct package buffering accounting

The assert in ffmmal_stop_decoder() could trigger sometimes. The
packets_buffered counter was indeed not correctly maintained, and
packets were not subtracted from it if they were still in the waiting
queue.

For some reason, this happened especially with VC-1.

8 years agommaldec: add vc1 decoding support
wm4 [Fri, 6 Nov 2015 11:59:16 +0000 (12:59 +0100)]
mmaldec: add vc1 decoding support

8 years agolavfi/af_asyncts: remove looping on request_frame().
Nicolas George [Sat, 24 Oct 2015 14:01:22 +0000 (16:01 +0200)]
lavfi/af_asyncts: remove looping on request_frame().

8 years agolavfi/af_amix: mostly fix scheduling.
Nicolas George [Sat, 24 Oct 2015 13:19:11 +0000 (15:19 +0200)]
lavfi/af_amix: mostly fix scheduling.

8 years agolavfi/vf_framepack: fix scheduling.
Nicolas George [Thu, 22 Oct 2015 07:58:25 +0000 (09:58 +0200)]
lavfi/vf_framepack: fix scheduling.

8 years agolavfi/af_join: partially fix scheduling.
Nicolas George [Thu, 22 Oct 2015 07:56:11 +0000 (09:56 +0200)]
lavfi/af_join: partially fix scheduling.

8 years agolavfi/fifo: do not assume request_frame() returns a frame.
Nicolas George [Thu, 22 Oct 2015 07:57:34 +0000 (09:57 +0200)]
lavfi/fifo: do not assume request_frame() returns a frame.

8 years agolavfi/avf_concat: return immediately after requesting a frame on input.
Nicolas George [Fri, 23 Oct 2015 10:36:17 +0000 (12:36 +0200)]
lavfi/avf_concat: return immediately after requesting a frame on input.

8 years agolavfi: remove astreamsync.
Nicolas George [Sat, 24 Oct 2015 14:13:32 +0000 (16:13 +0200)]
lavfi: remove astreamsync.

It was only useful for very specific testing purposes
and appears to be currently partially broken.

8 years agolavu/opt: enhance printing durations.
Nicolas George [Mon, 26 Oct 2015 20:07:33 +0000 (21:07 +0100)]
lavu/opt: enhance printing durations.

Trim unneeded leading components and trailing zeros.
Move the formating code in a separate function.
Use the function also to format the default value, it was currently
printed as plain integer, inconsistent to the way it is parsed.

8 years agolavfi: add realtime filter.
Nicolas George [Sun, 25 Oct 2015 16:31:58 +0000 (17:31 +0100)]
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.

8 years agofate: add mpdecimate test.
Nicolas George [Sun, 25 Oct 2015 19:40:48 +0000 (20:40 +0100)]
fate: add mpdecimate test.

8 years agolavfi: add testsrc2 test source.
Nicolas George [Sun, 25 Oct 2015 15:31:00 +0000 (16:31 +0100)]
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.

8 years agodoc/resampler: fix some trivial typos
Ganesh Ajjanagadde [Thu, 5 Nov 2015 03:37:10 +0000 (22:37 -0500)]
doc/resampler: fix some trivial typos

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavformat/segafilm: Only add index entries when the stream exists
Michael Niedermayer [Sat, 7 Nov 2015 12:35:10 +0000 (13:35 +0100)]
avformat/segafilm: Only add index entries when the stream exists

Fixes null pointer dereference
Fixes: cb02dfb163ac833c04cace3d7e35b160/signal_sigsegv_e55c49_6326_8f25619fc86a00b303c57b7778baf70a.cpk
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoapng: use correct size for output buffer
Andreas Cadhalpun [Fri, 6 Nov 2015 22:44:01 +0000 (23:44 +0100)]
apng: use correct size for output buffer

The buffer needs s->bpp bytes, at maximum currently 10.
Assert that s->bpp is not larger.

This fixes a stack buffer overflow.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agojvdec: avoid unsigned overflow in comparison
Andreas Cadhalpun [Fri, 6 Nov 2015 20:04:34 +0000 (21:04 +0100)]
jvdec: avoid unsigned overflow in comparison

The return type of strlen is size_t, i.e. unsigned, so if pd->buf_size
is 3, the right side overflows leading to a wrong result of the
comparison and subsequently a heap buffer overflow.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agohevc: extract SEI caption data
Will Kelleher [Fri, 6 Nov 2015 20:48:46 +0000 (14:48 -0600)]
hevc: extract SEI caption data

Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/jpeg2000dec: Clip all tile coordinates
Michael Niedermayer [Sat, 7 Nov 2015 01:16:11 +0000 (02:16 +0100)]
avcodec/jpeg2000dec: Clip all tile coordinates

Fixes out of array access
Fixes: b877a6b788a25c70e8b1d014f8628549/asan_heap-oob_1da2c3f_2324_5a1b329b0b3c4bb6b1d775660ac56717.r3d
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/microdvddec: Check for string end in 'P' case
Michael Niedermayer [Fri, 6 Nov 2015 21:24:23 +0000 (22:24 +0100)]
avcodec/microdvddec: Check for string end in 'P' case

Fixes out of array read
Fixes: a9502b60f4cecc19475382aee255f73c/asan_heap-oob_1e87fba_2548_a8ad47f6dde36644fe9cdc444d4632d0.sub
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agovp9_parser: allow superframes with a single frame.
Ronald S. Bultje [Fri, 6 Nov 2015 16:57:07 +0000 (11:57 -0500)]
vp9_parser: allow superframes with a single frame.

8 years agoavcodec/dirac_parser: Fix undefined memcpy() use
Michael Niedermayer [Fri, 6 Nov 2015 20:58:42 +0000 (21:58 +0100)]
avcodec/dirac_parser: Fix undefined memcpy() use

Fixes: 9d375e415486edd1a0c826f2307d89a4/asan_generic_4a5159_1577_faa333e83dacdd9e4dd322380aeed537.iss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolibopenh264enc: Set AVOption data type
Michael Niedermayer [Thu, 5 Nov 2015 11:04:31 +0000 (12:04 +0100)]
libopenh264enc: Set AVOption data type

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agovdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL
Michael Niedermayer [Thu, 5 Nov 2015 11:04:43 +0000 (12:04 +0100)]
vdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL

Fixes libavcodec/vdpau.c:282:5: warning:
    "CONFIG_H263_VDPAU_HWACCEL" is not defined [-Wundef]

Removed in d35d0c723e3c8fc8cde76bf677f67928f5e179a8.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agosegafilm: drop the "song and dance" for cinepak
Michael Niedermayer [Tue, 7 Jan 2014 13:38:49 +0000 (14:38 +0100)]
segafilm: drop the "song and dance" for cinepak

This seems not to do anything any more since a long time, and removing
it avoids using uninitialized memory. Also change the error value
forwarding as done everywhere else.

Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosegafilm: set video and audio stream duration
Paul B Mahol [Thu, 5 Nov 2015 11:04:52 +0000 (12:04 +0100)]
segafilm: set video and audio stream duration

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosegafilm: implement seeking
Paul B Mahol [Thu, 5 Nov 2015 11:04:51 +0000 (12:04 +0100)]
segafilm: implement seeking

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoavdevice/dshow_enummediatypes: check return of av_malloc
Ganesh Ajjanagadde [Mon, 26 Oct 2015 18:49:21 +0000 (14:49 -0400)]
avdevice/dshow_enummediatypes: check return of av_malloc

Untested.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agovf_pad: fix x, y option expression evaluation
John Stebbins [Sun, 25 Oct 2015 18:36:10 +0000 (11:36 -0700)]
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>
8 years agoXMA1 and XMA2 stereo decoders
Paul B Mahol [Sun, 1 Nov 2015 12:15:36 +0000 (13:15 +0100)]
XMA1 and XMA2 stereo decoders

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoswresample/resample: speed up build_filter for Blackman-Nuttall filter
Ganesh Ajjanagadde [Thu, 5 Nov 2015 03:02:13 +0000 (22:02 -0500)]
swresample/resample: speed up build_filter for Blackman-Nuttall filter

This uses the trigonometric double and triple angle formulae to avoid
repeated (expensive) evaluation of libc's cos().

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-44100-2626
old:
1104466600 decicycles in build_filter(loop 1000),     256 runs,      0 skips
1096765286 decicycles in build_filter(loop 1000),     512 runs,      0 skips
1070479590 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

new:
588861423 decicycles in build_filter(loop 1000),     256 runs,      0 skips
591262754 decicycles in build_filter(loop 1000),     512 runs,      0 skips
577355145 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

This results in small differences with the old expression:
difference (worst case on [0, 2*M_PI]), argmax 0.008:
max diff (relative): 0.000000000000157289807188
blackman_old(0.008): 0.000363951585488813192382
blackman_new(0.008): 0.000363951585488755946507

These are judged to be insignificant for the performance gain. PSNR to
reference file is unchanged up to second decimal point for instance.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>