OSDN Git Service
Hendrik Leppkes [Wed, 11 Nov 2015 13:45:24 +0000 (14:45 +0100)]
Merge commit '
48ff6683ba5d40b629428673b1028e8ec542a9fa'
* commit '
48ff6683ba5d40b629428673b1028e8ec542a9fa':
lavfi: add a frame_rate field to AVFilterLink.
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Hendrik Leppkes [Wed, 11 Nov 2015 13:41:49 +0000 (14:41 +0100)]
Merge commit '
79f5347a983342e2711ca8ba19ec3d8d151183f0'
* commit '
79f5347a983342e2711ca8ba19ec3d8d151183f0':
avcodec: fix doxy placement
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Hendrik Leppkes [Wed, 11 Nov 2015 13:37:48 +0000 (14:37 +0100)]
Merge commit '
8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8'
* commit '
8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8':
lavf: deprecate compute_pkt_fields2
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Hendrik Leppkes [Wed, 11 Nov 2015 13:31:10 +0000 (14:31 +0100)]
avformat/utils: re-factor freeing AVStreams
This matches the Libav signature and simplifies merging future changes.
Paul B Mahol [Tue, 10 Nov 2015 20:29:25 +0000 (21:29 +0100)]
avformat/rsd: XMA2 is actually stored, not XMA1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Michael Niedermayer [Wed, 11 Nov 2015 00:51:52 +0000 (01:51 +0100)]
ffmpeg_filter: remove redundant null ptr check
Fixes: CID1338331
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 11 Nov 2015 00:07:45 +0000 (01:07 +0100)]
avfilter/avf_showcqt: Fix uninitialized return code
Fixes CID1322329
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 10 Nov 2015 23:28:28 +0000 (00:28 +0100)]
avcodec/webvttdec: Fix uninitialized use of variable "again"
Fixes CID1338336
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Andreas Cadhalpun [Tue, 10 Nov 2015 21:14:39 +0000 (22:14 +0100)]
dvdsubdec: validate offset2 similar to offset1
If it is negative, it causes segmentation faults in decode_rle.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Matt Oliver [Tue, 10 Nov 2015 13:13:42 +0000 (00:13 +1100)]
avutil/x86/intmath: Disable use of tzcnt on older intel compilers.
ICC versions older than atleast 12.1.6 dont have the tzcnt intrinsics.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
Bryan Huh [Tue, 10 Nov 2015 19:11:26 +0000 (11:11 -0800)]
avformat/mov: Add option to ignore chapters during parsing
Chapter-indexing can be expensive since chapters may be interspersed
throughout the entire file and may require many seeks - especially
costly when consuming a video over a remote protocol like http.
Furthermore it is often unnecessary, especially when only trying to get
video info (e.g. via ffprobe).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Mon, 9 Nov 2015 13:24:26 +0000 (14:24 +0100)]
avformat/mxfenc: Only store user comment related tags when needed
Also support disabling them as they seem to cause problems to some
Users. They are also not allowed in IRT D-10 thus the default for
mxf_d10 is not to write them
This also decreases the filesize when no user comment are stored
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Ni Hui [Tue, 10 Nov 2015 14:03:36 +0000 (22:03 +0800)]
avcodec/gifdec: skip the data lzw consumed
this fixes the return code of avcodec_decode_video2 for gif decoding
and the gif frame data buffer is skipped properly
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Nicolas George [Tue, 3 Nov 2015 17:57:17 +0000 (09:57 -0800)]
lavfi: add a frame_rate field to AVFilterLink.
(cherry picked from ffmpeg commit
7b42036b3b23c85f473bf9369e37fa8da22eaf93)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Anton Khirnov [Fri, 6 Nov 2015 11:27:16 +0000 (12:27 +0100)]
avcodec: fix doxy placement
Anton Khirnov [Wed, 7 Oct 2015 13:51:11 +0000 (15:51 +0200)]
lavf: deprecate compute_pkt_fields2
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.
The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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.
Anton Khirnov [Sun, 11 Oct 2015 10:07:08 +0000 (12:07 +0200)]
avconv: set packet duration for CFR video streams
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.
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>
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>
Timothy Gu [Sun, 1 Nov 2015 11:31:22 +0000 (03:31 -0800)]
Add pixblockdsp checkasm tests
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>
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>
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.
wm4 [Fri, 6 Nov 2015 11:59:16 +0000 (12:59 +0100)]
mmaldec: add vc1 decoding support
Nicolas George [Sat, 24 Oct 2015 14:01:22 +0000 (16:01 +0200)]
lavfi/af_asyncts: remove looping on request_frame().
Nicolas George [Sat, 24 Oct 2015 13:19:11 +0000 (15:19 +0200)]
lavfi/af_amix: mostly fix scheduling.
Nicolas George [Thu, 22 Oct 2015 07:58:25 +0000 (09:58 +0200)]
lavfi/vf_framepack: fix scheduling.
Nicolas George [Thu, 22 Oct 2015 07:56:11 +0000 (09:56 +0200)]
lavfi/af_join: partially fix scheduling.
Nicolas George [Thu, 22 Oct 2015 07:57:34 +0000 (09:57 +0200)]
lavfi/fifo: do not assume request_frame() returns a frame.
Nicolas George [Fri, 23 Oct 2015 10:36:17 +0000 (12:36 +0200)]
lavfi/avf_concat: return immediately after requesting a frame on input.
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.
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.
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.
Nicolas George [Sun, 25 Oct 2015 19:40:48 +0000 (20:40 +0100)]
fate: add mpdecimate test.
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.
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>
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>