Commit Graph

76639 Commits

Author SHA1 Message Date
Michael Niedermayer ecfb076141 avutil/softfloat: Extend the av_cmp_sf() test to cover a wider range of exponents
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:55:22 +01:00
Michael Niedermayer cee3c9d29a avutil/softfloat: Fix overflows in shifts in av_cmp_sf() and av_gt_sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:54:51 +01:00
Michael Niedermayer df2a2117d2 avutil/softfloat: Add test for av_cmp_sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:39:46 +01:00
Michael Niedermayer 596dfe7d6c avutil/softfloat: Add tests for exponent underflows
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:23:38 +01:00
Michael Niedermayer 046218b212 avutil/softfloat: Fix exponent underflow in av_div_sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:23:38 +01:00
Michael Niedermayer a1e3303fc0 avutil/softfloat: Fix exponent underflow in av_mul_sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:23:38 +01:00
Michael Niedermayer 4135a2bfd6 avutil/softfloat: Fix typo in av_mul_sf() doxy
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 14:23:37 +01:00
Michael Niedermayer 4b6ad23609 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 0269fb11e3.
2015-11-08 14:23:37 +01:00
Michael Niedermayer 0269fb11e3 avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()
Otherwise the exponent could eventually underflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 13:39:06 +01:00
Michael Niedermayer 107db5abf3 avutil/softfloat: Correctly set the exponent for 0.0 in av_sqrt_sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 13:39:06 +01:00
Anton Khirnov aeda1121c9 lavf: factor out freeing an AVStream
It will be needed in other functions.
2015-11-08 11:49:23 +01:00
Anton Khirnov 3efd71b4d0 avconv: set packet duration for CFR video streams 2015-11-08 11:49:05 +01:00
Anton Khirnov a0c71a5751 lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
The reasoning for setting it to zero only applies to demuxing.
2015-11-08 11:48:47 +01:00
Michael Niedermayer dcf1cf5d24 avcodec/aacsbr: Use FLOAT_0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 11:05:48 +01:00
Michael Niedermayer a66b243d52 avutil/softfloat: FLOAT_0 should use MIN_EXP
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 03:57:02 +01:00
Timothy Gu 3d20f8e7c0 Add pixblockdsp checkasm tests 2015-11-07 18:46:55 -08:00
Timothy Gu 4b80b895a9 pixblockdsp: x86: Condense diff_pixels_* to a shared macro
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
2015-11-07 14:31:34 -08:00
Michael Niedermayer 7cea3430a5 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>
2015-11-07 21:30:07 +01:00
wm4 a55fbfa4c4 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.
2015-11-07 19:24:49 +01:00
wm4 b07cbf6724 mmaldec: add vc1 decoding support 2015-11-07 19:24:49 +01:00
Nicolas George 785ac437be lavfi/af_asyncts: remove looping on request_frame(). 2015-11-07 16:43:36 +01:00
Nicolas George a08fb3983f lavfi/af_amix: mostly fix scheduling. 2015-11-07 16:43:36 +01:00
Nicolas George f53c4b6a18 lavfi/vf_framepack: fix scheduling. 2015-11-07 16:43:36 +01:00
Nicolas George d0b82d798d lavfi/af_join: partially fix scheduling. 2015-11-07 16:43:36 +01:00
Nicolas George 67d3f5296e lavfi/fifo: do not assume request_frame() returns a frame. 2015-11-07 16:43:36 +01:00
Nicolas George 79c1be124e lavfi/avf_concat: return immediately after requesting a frame on input. 2015-11-07 16:43:36 +01:00
Nicolas George d92e0848d9 lavfi: remove astreamsync.
It was only useful for very specific testing purposes
and appears to be currently partially broken.
2015-11-07 16:43:36 +01:00
Nicolas George 47ea04ff10 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.
2015-11-07 16:04:09 +01:00
Nicolas George 7037f9430b 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.
2015-11-07 16:04:07 +01:00
Nicolas George 432e27e6e7 fate: add mpdecimate test. 2015-11-07 16:03:47 +01:00
Nicolas George b16e569312 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.
2015-11-07 16:02:48 +01:00
Ganesh Ajjanagadde 91bc4de2a4 doc/resampler: fix some trivial typos
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-07 08:32:22 -05:00
Michael Niedermayer 183720eb6e 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>
2015-11-07 14:09:17 +01:00
Andreas Cadhalpun 3e8e1a660e 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>
2015-11-07 13:15:14 +01:00
Andreas Cadhalpun db374790c7 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>
2015-11-07 13:13:35 +01:00
Will Kelleher 7f7fa90f7b hevc: extract SEI caption data
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-07 12:10:55 +01:00
Michael Niedermayer 43492ff3ab 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>
2015-11-07 02:17:04 +01:00
Michael Niedermayer c719cd6cf7 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>
2015-11-07 01:01:19 +01:00
Ronald S. Bultje 20db54906f vp9_parser: allow superframes with a single frame. 2015-11-06 17:12:03 -05:00
Michael Niedermayer daefd8ab2f 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>
2015-11-06 21:59:42 +01:00
Michael Niedermayer cc96018c79 libopenh264enc: Set AVOption data type
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Michael Niedermayer fcc49924db 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 d35d0c723e.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-06 21:55:15 +01:00
Michael Niedermayer 563e6d8603 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>
2015-11-06 21:55:15 +01:00
Paul B Mahol 1e791ee3aa segafilm: set video and audio stream duration
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Paul B Mahol c012c6f1a8 segafilm: implement seeking
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Ganesh Ajjanagadde 6f1ddc726f avdevice/dshow_enummediatypes: check return of av_malloc
Untested.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-06 09:36:57 -05:00
John Stebbins 2ec112f71c 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>
2015-11-06 15:03:51 +01:00
Paul B Mahol b456ece557 XMA1 and XMA2 stereo decoders
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-06 13:45:50 +01:00
Ganesh Ajjanagadde c8780822ba 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>
2015-11-05 21:52:40 -05:00
Sebastian Dröge 7d6a4797f1 mpegtsenc: Implement writing of Opus trim_start/trim_end control values
Signed-off-by: Sebastian Dröge <sebastian@centricular.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-06 03:33:17 +01:00