Commit Graph

76992 Commits

Author SHA1 Message Date
Ganesh Ajjanagadde c6bea81acf avfilter/vf_perspective: use lrint instead of floor hack
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde fa5d299496 avfilter/vsrc_mptestsrc: use lrint instead of floor hack
lrint is faster, and is more consistent across the codebase.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde 1bb7db217d avutil/crc: avoid needless space wastage of hardcoded crc table
There was no reason AFAIK for making AV_CRC_24_IEEE 12. This simply
resulted in wasted space under --enable-hardcoded-tables:
dynamic: 1318672 libavutil/libavutil.so.55
old    : 1330680 libavutil/libavutil.so.55
new    : 1326488 libavutil/libavutil.so.55

Minor version number is bumped, with ifdefry due to API breakage.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Michael Niedermayer 26379d4fdd avcodec/vp3: ensure header is parsed successfully before tables
Fixes assertion failure
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Michael Niedermayer ec7a3be11e avformat/utils: Move end_time1 AV_NOPTS_VALUE Check after rescale
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Michael Niedermayer d872643cfe avformat/utils: Check AVFormatContext->duration in compute_chapters_end() before use
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Paul B Mahol b2517b02d9 avfilter/af_compand: do not clip; allow >0dB curve points
Do not clip output samples, so that clipping can be handled by other filters.
Alow setting curve points above 0dB. This is useful when operating with floats.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-02 23:41:26 +01:00
Alex Agranovsky 259c71c199 avformat/mpjpeg: utilize MIME boundary value to detect start of new frame
This code is disabled by default so not to regress endpoints sending invalid MIME, but can be enabled via AVOption 'strict_mime_boundary'

Signed-off-by: Alex Agranovsky <alex@sighthound.com>
2015-12-02 22:39:27 +01:00
Alex Agranovsky 79103f2199 avformat/mpjpeg: allow processing of MIME parts without Content-Length header
Fixes ticket 5023

Signed-off-by: Alex Agranovsky <alex@sighthound.com>
2015-12-02 22:37:32 +01:00
Michael Niedermayer 97b8db334a avutil/rational: Test av_rescale_rnd() with combinations of "special" values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-02 21:38:11 +01:00
Michael Niedermayer f03c2ceec1 avutil/mathematics: return INT64_MIN (=AV_NOPTS_VALUE) from av_rescale_rnd() for overflows
Fixes integer overflow
Fixes: mozilla bug 1229167

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-02 21:38:11 +01:00
Michael Niedermayer cd7524fdd1 avcodec/apedec: Check length in long_filter_high_3800()
Fixes out of array read
Fixes: 0a7ff0c1d93da9cef28a315ec91b692a/asan_heap-oob_4a52e5_3604_9c56dbb20e308f4faeef7b35f688521a.ape

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-02 21:38:11 +01:00
Ronald S. Bultje 1ac89869db vp9: always keep s->bytesperpixel and ctx->pix_fmt in sync.
Fixes mozilla bug 1229128.
2015-12-02 14:53:46 -05:00
Andreas Cadhalpun fb1bf4454e git-howto: mention how to clone ffmpeg-web
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-02 20:39:18 +01:00
Tobias Rapp bc517be6b0 Makefile: add cleanup of pkg-config files created by configure to distclean
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-02 18:45:49 +01:00
Carl Eugen Hoyos d208acf2c8 lavf/rtpenc_jpeg: Less strict check for standard Huffman tables.
There can be one or more Huffman table segments DHT.

Reported-by: Andrey Utkin
2015-12-02 15:03:56 +01:00
Paul B Mahol 6670527d33 avfilter/af_stereotools: remove floor usage
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-02 12:09:06 +01:00
Paul B Mahol c4f7b8f0db avfilter: add audio pulsator filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-02 12:09:06 +01:00
Claudio Freire ca203e9985 AAC encoder: improve SF range utilization
This patch does 4 things, all of which interact and thus it
woudln't be possible to commit them separately without causing
either quality regressions or assertion failures.

Fate comparison targets don't all reflect improvements in
quality, yet listening tests show substantially improved quality
and stability.

1. Increase SF range utilization.

The spec requires SF delta values to be constrained within the
range -60..60. The previous code was applying that range to
the whole SF array and not only the deltas of consecutive values,
because doing so requires smarter code: zeroing or otherwise
skipping a band may invalidate lots of SF choices.

This patch implements that logic to allow the coders to utilize
the full dynamic range of scalefactors, increasing quality quite
considerably, and fixing delta-SF-related assertion failures,
since now the limitation is enforced rather than asserted.

2. PNS tweaks

The previous modification makes big improvements in twoloop's
efficiency, and every time that happens PNS logic needs to be
tweaked accordingly to avoid it from stepping all over twoloop's
decisions. This patch includes modifications of the sort.

3. Account for lowpass cutoff during PSY analysis

The closer PSY's allocation is to final allocation the better
the quality is, and given these modifications, twoloop is now
very efficient at avoiding holes. Thus, to compute accurate
thresholds, PSY needs to account for the lowpass applied
implicitly during twoloop (by zeroing high bands).

This patch makes twoloop set the cutoff in psymodel's context
the first time it runs, and makes PSY account for it during
threshold computation, making PE and threshold computations
closer to the final allocation and thus achieving better
subjective quality.

4. Tweaks to RC lambda tracking loop in relation to PNS

Without this tweak some corner cases cause quality regressions.
Basically, lambda needs to react faster to overall bitrate
efficiency changes since now PNS can be quite successful in
enforcing maximum bitrates, when PSY allocates too many bits
to the lower bands, suppressing the signals RC logic uses to
lower lambda in those cases and causing aggressive PNS.

This tweak makes PNS much less aggressive, though it can still
use some further tweaks.

Also update MIPS specializations and adjust fuzz

Also in lavc/mips/aacpsy_mips.h: remove trailing whitespace
2015-12-02 07:47:37 -03:00
Aaron Colwell ec83efd4d3 avformat/matroskadec: Fix sample_aspect_ratio for stereo matroska content
matroskaenc.c applies divisors to the display width/height when generating
stereo content. This patch adds the corresponding multipliers to matroskadec.c
so that the original sample aspect ratio can be recovered.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2015-12-02 11:09:07 +01:00
Chris Cunningham 5e6ce28dab avformat/mp3dec: prefer "fast_seek" to TOC seek for CBR files.
"Fast seek" uses linear interpolation to find the position of the
requested seek time. For CBR this is more direct than using the
mp3 TOC and bypassing the TOC avoids problems with TOC precision.
(see https://crbug.com/545914#c13)

For VBR, fast seek is not precise, so continue to prefer the TOC
when available (the lesser of two evils).

Also, some re-ordering of the logic in mp3_seek to simplify and
give usetoc=1 precedence over fastseek flag.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2015-12-02 11:02:27 +01:00
Michael Niedermayer e1057babdf avcodec/mpegaudio_tablegen: Add (), fix fate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-02 03:42:44 +01:00
Ganesh Ajjanagadde 8c24380537 avfilter/af_volumedetect: use log10 instead of hardcoded constant
This is likely more precise and conveys the intent better.

Reviewed-by: Mark Harris <mark.hsj@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:31:58 -05:00
Andrey Utkin 648b26acc5 doc/filters/drawtext: fix centering example
Signed-off-by: Andrey Utkin <andrey.od.utkin@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2015-12-01 15:25:17 -09:00
Ganesh Ajjanagadde 2f5075f551 avcodec/cbrt_tablegen: speed up dynamic table creation
On systems having cbrt, there is no reason to use the slow pow function.

Sample benchmark (x86-64, Haswell, GNU/Linux):
new:
5124920 decicycles in cbrt_tableinit,       1 runs,      0 skips

old:
12321680 decicycles in cbrt_tableinit,       1 runs,      0 skips

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:05:19 -05:00
Ganesh Ajjanagadde 1d0c94ddae avcodec/mpegaudio_tablegen: more dynamic table creation speedups
This further speeds up runtime initialization, with identical generated tables.

Sample benchmark (x86-64, Haswell, GNU/Linux):

old:
34441423 decicycles in mpegaudio_tableinit,    8192 runs,      0 skips

new:
10776291 decicycles in mpegaudio_tableinit,    8192 runs,      0 skips

Most low hanging fruit is taken care of here. For some idea, note that
83,064 array elements totalling 233,722 bytes need to be initialized.
Thus, with this patch, we average ~ 12.9 cycles per element or ~ 4.6
cycles per byte.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:05:19 -05:00
Ganesh Ajjanagadde 16d4c28cbb avcodec/mpegaudio_tablegen: speed up dynamic table creation
This does some miscellaneous stuff mainly avoiding the usage of pow to
achieve significant speedups. This is not speed critical, but is
unnecessary latency and cycles wasted for a user.

All tables tested and are identical to the old ones
(bit-exact even in floating point case).

Sample benchmark (x86-64, Haswell, GNU/Linux):
old:
102329530 decicycles in mpegaudio_tableinit,       1 runs,      0 skips

new:
34111900 decicycles in mpegaudio_tableinit,       1 runs,      0 skips

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:05:19 -05:00
Ganesh Ajjanagadde 538e8ab512 avutil/tablegen: add tablegen libm compatibility shims
This is useful for build-time table generation (--enable-hardcoded-tables),
by providing compat shims for hosts that have broken libms.

This file is deliberately kept minimal; functions can always be added on
an as-needed basis.

Reviewed-by: Clément Bœsch <u@pkh.me>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:05:19 -05:00
Ganesh Ajjanagadde 789ef087c6 avcodec/ppc/fdctdsp: use more accurate constants
Whoever wrote this stuff had a pretty bad libm - digits differ pretty
quickly.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:05:19 -05:00
Michael Niedermayer 736e2e2c30 avfilter/vf_shuffleframes: Assert that the case of an uninitialized ret does not occur
Fixes CID1258479

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-01 22:00:25 +01:00
Paul B Mahol cde75e3150 avfilter/vf_histogram: remove deprecated stuff
Remove all modes except levels mode.
Users should already switch to other filters with
extended funcionality: vectorscope and waveform.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-01 21:55:13 +01:00
Michael Niedermayer 25e37f5ea9 avutil/mathematics: Do not treat INT64_MIN as positive in av_rescale_rnd
The code expects actual positive numbers and gives completely wrong
results if INT64_MIN is treated as positive
Instead clip it into the valid range that is add 1 and treat it as
negative

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-01 13:26:12 +01:00
Michael Niedermayer 3a9cb18855 avutil/integer: Fix av_mod_i() with negative dividend
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-01 13:26:12 +01:00
Michael Niedermayer 8e7f452022 avformat/dump: Fix integer overflow in av_dump_format()
Fixes part of mozilla bug 1229167

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-01 13:26:03 +01:00
Ganesh Ajjanagadde 7b11eead1b avcodec/ac3: always use hardcoded tables
The table in question is a 253 byte one. In fact, it turns out that
dynamic generation of the table results in an increased binary size.

Code compiled with GCC 5.2.0, x86-64 (size in bytes), before and after
patch:
old: 62321064 libavcodec/libavcodec.so.57
new: 62320536 libavcodec/libavcodec.so.57

Thus, it always make sense to statically allocate this.

Tested with FATE with/without --enable-hardcoded-tables.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-30 18:29:57 -05:00
Ganesh Ajjanagadde 5a41a5a4f5 avfilter/af_compand: use hypot()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-30 18:29:29 -05:00
Will Kelleher 0eac93da0f qsvenc: write a53 caption data to SEI
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Previous version reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-30 23:31:12 +01:00
Michael Niedermayer a00cc2e40d ffserver: Clear avio context after closing it in rtp_new_av_stream()
Suggested-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-30 23:31:12 +01:00
Michael Niedermayer 40063a900b ffserver: Clear avio context after closing it
Fixes: ==13287== Invalid read of size 4
==13287==    at 0x45161A: flush_buffer (aviobuf.c:143)
==13287==    by 0x451971: avio_flush (aviobuf.c:200)
==13287==    by 0x512CCF: av_write_trailer (mux.c:1016)
==13287==    by 0x41A5E0: close_connection (ffserver.c:853)
==13287==    by 0x421EDC: rtsp_cmd_interrupt (ffserver.c:3245)
==13287==    by 0x420B9C: rtsp_parse_request (ffserver.c:2854)
==13287==    by 0x41A9C2: handle_connection (ffserver.c:930)
==13287==    by 0x41A04B: http_server (ffserver.c:700)
==13287==    by 0x423A60: main (ffserver.c:3897)
==13287==  Address 0xb6cd258 is 88 bytes inside a block of size 192 free'd
==13287==    at 0x4C2B5D9: free (vg_replace_malloc.c:446)
==13287==    by 0x1004DAC: av_free (mem.c:239)
==13287==    by 0x454835: avio_close_dyn_buf (aviobuf.c:1170)
==13287==    by 0x41F385: http_prepare_data (ffserver.c:2368)
==13287==    by 0x41F59B: http_send_data (ffserver.c:2416)
==13287==    by 0x41ABE2: handle_connection (ffserver.c:986)
==13287==    by 0x41A04B: http_server (ffserver.c:700)
==13287==    by 0x423A60: main (ffserver.c:3897)

Reviewed-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-30 23:31:12 +01:00
Paul B Mahol 6b978dadc6 avfilter/af_sidechaincompress: do not require writable input frames for acompressor filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-30 12:25:32 +01:00
Paul B Mahol 376a3bdb7b avfilter/af_sidechaincompress: add level_in and level_sc options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-30 12:16:57 +01:00
Michael Niedermayer a814f1d364 avcodec/vp3: always set pix_fmt in theora_decode_header()
Fixes assertion failure
Fixes: d0bb0662da342ec65f8f2a081222e6b9/signal_sigabrt_7ffff6ae7cc9_5471_82964f0a9ac2f4d3d59390c15473f6f7.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-30 04:25:00 +01:00
Michael Niedermayer 891dc8f875 avcodec/mpeg4videodec: Check available data before reading custom matrix
Fixes: out of array read
Fixes: 76c515fc3779d1b838667c61ea13ce92/asan_heap-oob_1fc0d07_8913_794a4629a264ebdb25b58d3a94ed1785.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-29 23:45:31 +01:00
Michael Niedermayer 55711e6fd0 avcodec/dnxhddec: Disable 12bit by default
The DC VLC table used is too small, fixing this requires a sample,
thus request a sample.
Some samples are said to work even though the table has the wrong size, thus
this is left enabled if the user enables experimental features.

Fixes: 2abd25478c62a675f335fac00b467023/asan_static-oob_10aff98_1227_8811480c6ef1e970a7977ceb7e5a9958.mxf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Approved-by: kurosu
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-29 21:30:37 +01:00
Carl Eugen Hoyos ec494e6c83 lavf/mxfdec: Set width to actual coded_width for AVCI50.
Fixes ticket #5029.
Reported and analyzed by videolan trac user HenkDemper in vlc ticket #15762.
2015-11-29 21:08:38 +01:00
Paul B Mahol 337b6d3b36 avfilter/af_sidechaincompress: fix output gain for rms(default) detection
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-29 19:17:05 +01:00
Claudio Freire 88e498a87e AAC encoder: make pe.min a local minimum
As noted in a comment, pe.min in the reference encoder
is centered around current pe. The bit reservoir algo
needs pe.min to be a local minimum, because it can only
account for local PE variations. If it's set to a global
minimum as was being done, bit reservoir logic doesn't
work as efficiently.

This patch tries to forget old minimums and converge to
a local minimum without losing the stability of the
previous solution. Listening tests until now suggest this
solves numerous RC issues.
2015-11-29 15:03:45 -03:00
Nicolas George 15206ffdbe ffserver: add NULL context to ff_rtsp_parse_line().
Needed after f62fe53/2c17fb6.
2015-11-29 17:02:04 +01:00
James Almer 27ce53b52d avcodec/libdcadec: require first public release
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-11-29 12:53:14 -03:00
Matt Oliver 26a84e2dae configure: Add user options to enable gcrypt/gmp for rtmp(t)e support.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-11-30 02:25:37 +11:00