summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lavfi/avf_concat: return immediately after requesting a frame on input.Nicolas George2015-11-071-3/+2
|
* lavfi: remove astreamsync.Nicolas George2015-11-075-282/+0
| | | | | It was only useful for very specific testing purposes and appears to be currently partially broken.
* lavu/opt: enhance printing durations.Nicolas George2015-11-072-9/+47
| | | | | | | 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.
* lavfi: add realtime filter.Nicolas George2015-11-075-0/+153
| | | | | Similar to the -re option in ffmpeg that only works for input files. Can be used at any place in the filter graph.
* fate: add mpdecimate test.Nicolas George2015-11-072-0/+24
|
* lavfi: add testsrc2 test source.Nicolas George2015-11-077-0/+495
| | | | | | | | 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.
* doc/resampler: fix some trivial typosGanesh Ajjanagadde2015-11-071-2/+2
| | | | Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avformat/segafilm: Only add index entries when the stream existsMichael Niedermayer2015-11-071-5/+6
| | | | | | | | 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>
* apng: use correct size for output bufferAndreas Cadhalpun2015-11-071-1/+3
| | | | | | | | | | | 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>
* jvdec: avoid unsigned overflow in comparisonAndreas Cadhalpun2015-11-071-1/+1
| | | | | | | | | 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>
* hevc: extract SEI caption dataWill Kelleher2015-11-073-0/+93
| | | | | Signed-off-by: Will Kelleher <wkelleher@gogoair.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Clip all tile coordinatesMichael Niedermayer2015-11-071-4/+4
| | | | | | | | 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>
* avcodec/microdvddec: Check for string end in 'P' caseMichael Niedermayer2015-11-071-0/+2
| | | | | | | | 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>
* vp9_parser: allow superframes with a single frame.Ronald S. Bultje2015-11-061-1/+1
|
* avcodec/dirac_parser: Fix undefined memcpy() useMichael Niedermayer2015-11-061-1/+1
| | | | | | | Fixes: 9d375e415486edd1a0c826f2307d89a4/asan_generic_4a5159_1577_faa333e83dacdd9e4dd322380aeed537.iss Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/dshow_enummediatypes: check return of av_mallocGanesh Ajjanagadde2015-11-061-0/+2
| | | | | | | Untested. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* XMA1 and XMA2 stereo decodersPaul B Mahol2015-11-0610-21/+164
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* swresample/resample: speed up build_filter for Blackman-Nuttall filterGanesh Ajjanagadde2015-11-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mpegtsenc: Implement writing of Opus trim_start/trim_end control valuesSebastian Dröge2015-11-061-3/+40
| | | | | | Signed-off-by: Sebastian Dröge <sebastian@centricular.com> Reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpegtsenc: Add support for muxing Opus in MPEG-TSSebastian Dröge2015-11-061-1/+179
| | | | | | Signed-off-by: Sebastian Dröge <sebastian@centricular.com> Previous version reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/xmv: Discard remainder of packet on errorMichael Niedermayer2015-11-061-1/+4
| | | | | | | | Fixes infinite loop Fixes: 9c48ae2680c5f23bca3d20ff0f325fd8/asan_generic_4c254d_1374_993f1e5967dd6f844b8d72f978ce2a6c.pss Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/xmv: factor return check out of if/elseMichael Niedermayer2015-11-061-5/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg12dec: Do not call show_bits() with invalid bitsMichael Niedermayer2015-11-061-1/+1
| | | | | | | | Fixes assertion failure Fixes: 63e50545709a6440d3d59f6426d58db9/signal_sigabrt_7ffff6ae7cc9_8189_3272a3010fd98ddf947c662bbde1ac13.ts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dnxhddec: Make mb_scan_index a fixed length arrayMichael Niedermayer2015-11-061-10/+2
| | | | | | | | Fixes null pointer dereference Fixes: 5c9d1a6f74a12763fc7c9dd7834022b9/signal_sigsegv_11f78d9_1461_ecee3c5e7205457498e79b3ffaf21d0c.mxf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/faxcompr: Add missing runs check in decode_uncompressed()Michael Niedermayer2015-11-051-0/+4
| | | | | | | | Fixes out of array access Fixes: 54e488b9da4abbceaf405d6492515697/asan_heap-oob_32769b0_160_a8755eb08ee8f9579348501945a33955.TIF Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil/channel_layout: Check strtol*() for failureMichael Niedermayer2015-11-051-2/+5
| | | | | | | | Fixes assertion failure Fixes: 4f5814bb15d2dda6fc18ef9791b13816/signal_sigabrt_7ffff6ae7cc9_65_7209d160d168b76f311be6cd64a548eb.wv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegts: Only start probing data streams within probe_packetsMichael Niedermayer2015-11-051-0/+1
| | | | | | | | Fixes assertion failure Fixes: 4321db8ac331f5967ebfbfe80ce5eb78/signal_sigabrt_7ffff6ae7cc9_7213_0d6457b9d6897fa7c78507fa5de53510.ts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: Check chroma_format_idcMichael Niedermayer2015-11-051-0/+4
| | | | | | | | Fixes out of array access Fixes: 24d05e8b84676799c735c9e27d97895e/asan_heap-oob_1b70f6a_2955_7c3652a7f370f9f3ef40642bc2c99bb2.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/truemotion1: Initialize mb_change_byte only when neededMichael Niedermayer2015-11-051-1/+2
| | | | | | | | Fixes out of array read Fixes: d92114d8c2a019b8a6e50cd2a7301b54/asan_heap-oob_26bf563_60_1d3420277533de9dbf8aba3f93af346f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Print an error if the quant table count is invalidMichael Niedermayer2015-11-051-1/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Free tables on init failureMichael Niedermayer2015-11-051-0/+1
| | | | | | | | Fixes memleak Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Check for 0 quant tablesMichael Niedermayer2015-11-051-1/+1
| | | | | | | | Fixes assertion failure Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swresample/resample: speed up build_filter by 50%Ganesh Ajjanagadde2015-11-041-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This speeds up build_filter by ~ 50%. This gain should be pretty consistent across all architectures and platforms. Essentially, this relies on a observation that the filters have some even/odd symmetry that may be exploited during the construction of the polyphase filter bank. In particular, phases (scaled to [0, 1]) in [0.5, 1] are easily derived from [0, 0.5] and expensive reevaluation of function points are unnecessary. This requires some rather annoying even/odd bookkeeping as can be seen from the patch. I vaguely recall from signal processing theory more general symmetries allowing even greater optimization of the construction. At a high level, "even functions" correspond to 2, and one can imagine variations. Nevertheless, for the sake of some generality and because of existing filters, this is all that is being exploited. Currently, this patch relies on phase_count being even or (trivially) 1, though this is not an inherent limitation to the approach. This assumption is safe as phase_count is 1 << phase_bits, and is hence a power of two. There is no way for user API to set it to a nontrivial odd number. This assumption has been placed as an assert in the code. To repeat, this assumes even symmetry of the filters, which is the most common way to get generalized linear phase anyway and is true of all currently supported filters. As a side note, accuracy should be identical or perhaps slightly better due to this "forcing" filter symmetries leading to a better phase characteristic. As before, I can't test this claim easily, though it may be of interest. Patch tested with FATE. Sample benchmark (x86-64, Haswell, GNU/Linux): test: swr-resample-dblp-44100-2626 new: 527376779 decicycles in build_filter(loop 1000), 256 runs, 0 skips 524361765 decicycles in build_filter(loop 1000), 512 runs, 0 skips 516552574 decicycles in build_filter(loop 1000), 1024 runs, 0 skips old: 974178658 decicycles in build_filter(loop 1000), 256 runs, 0 skips 972794408 decicycles in build_filter(loop 1000), 512 runs, 0 skips 954350046 decicycles in build_filter(loop 1000), 1024 runs, 0 skips Note that lower level optimizations are entirely possible, I focussed on getting the high level semantics correct. In any case, this should provide a good foundation. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/mjpegdec: Reinitialize IDCT on BPP changesMichael Niedermayer2015-11-041-4/+15
| | | | | | | | Fixes misaligned access Fixes: dc9262a469f6f315f74c087a7b3a7f35/signal_sigsegv_2e95bcd_9_9c0f9f4a9ba82aa9b3ab2b91ce4d5277.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Check index in ljpeg_decode_yuv_scan() before using itMichael Niedermayer2015-11-041-2/+8
| | | | | | | | Fixes: 04715144ba237443010554be0d05343f/asan_heap-oob_1eafc76_1737_c685b48041a563461839e4e7ab97abb8.jpg Fixes out of array access Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacsbr_template: replace qsort with AV_QSORTGanesh Ajjanagadde2015-11-041-6/+8
| | | | | | | | | | | | | | When sbr->reset is set in encode_frame, a bunch of qsort calls might get made. Thus, there is the potential of calling qsort whenever the spectral contents change. AV_QSORT is substantially faster due to the inlining of the comparison callback. Thus, the increase in performance should be worth the increase in binary size. Tested with FATE. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/rawenc: Cast argument for av_image_copy_to_buffer() to constMichael Niedermayer2015-11-041-1/+1
| | | | | | Fixes: libavcodec/rawenc.c:64:40: warning: passing argument 3 of av_image_copy_to_buffer from incompatible pointer type [enabled by default] Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libzvbi-teletextdec: Remove unused variable retMichael Niedermayer2015-11-041-1/+0
| | | | | | Fixes: libavcodec/libzvbi-teletextdec.c:232:9: warning: unused variable ret [-Wunused-variable] Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vdpau: Remove CONFIG_H263_VDPAU_HWACCELMichael Niedermayer2015-11-041-1/+1
| | | | | | | | Fixes: libavcodec/vdpau.c:320:5: warning: "CONFIG_H263_VDPAU_HWACCEL" is not defined [-Wundef] It was removed in d15adeacf3e61cd8d2169c090bf06f6d8fc62f8b Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cache: Use int64_t to avoid int overflow in cache_readBryan Huh2015-11-041-1/+1
| | | | | | | | | | | | Fixes an issue where an int64_t ffurl_seek return-value was being stored in an int (32-bit) "r" variable, leading to integer overflow when seeking into a large file (>2GB), and ultimately a "Failed to perform internal seek" error mesage. To test, try running `ffprobe 'cache:http://<something>'` on a file that is ~3GB large, whose moov atom is at the end of the file Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/showcqt: remove yuv offsetMuhammad Faiz2015-11-031-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | this makes draw_bar faster slightly different result with old version check result (with ~3 minutes audio file): old: real 0m49.611s user 0m49.260s sys 0m0.073s new: real 0m47.606s user 0m47.378s sys 0m0.068s PSNR between old and new: yuv444p PSNR y:109.519298 u:107.506485 v:104.746878 average:106.816074 min:99.167305 max:inf yuv422p PSNR y:109.519298 u:108.025801 v:104.489734 average:107.279817 min:98.007467 max:inf yuv420p PSNR y:109.519298 u:108.363875 v:105.290200 average:108.261511 min:97.461812 max:inf Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* all: use FFDIFFSIGN to resolve possible undefined behavior in comparatorsGanesh Ajjanagadde2015-11-038-21/+13
| | | | | | | | | | | | | | | | | | | FFDIFFSIGN was created explicitly for this purpose, since the common return a - b idiom is unsafe regarding overflow on signed integers. It optimizes to branchless code on common compilers. FFDIFFSIGN also has the subjective benefit of being easier to read due to lack of ternary operators. Tested with FATE. Things not covered by this are unsigned integers, for which overflows are well defined, and also places where overflow is clearly impossible, e.g an instance where the a - b was being done on 24 bit values. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/common: add FFDIFFSIGN macroGanesh Ajjanagadde2015-11-031-0/+11
| | | | | | | | | | | This is of use for defining comparator callbacks. Common approaches like return x-y are not safe due to the risks of overflow. Furthermore, the (x > y) - (x < y) trick is optimized to branchless code. This also documents this macro accordingly. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_rotate: correct log messageGanesh Ajjanagadde2015-11-031-2/+2
| | | | | | | There seems to be some typos in the log messages that are fixed by this. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* fate: update fate-source ref fileJames Almer2015-11-031-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: add acm demuxerPaul B Mahol2015-11-036-1/+81
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec: add Interplay ACM decoderPaul B Mahol2015-11-037-2/+628
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avutil/file_open: avoid file handle inheritance on WindowsTobias Rapp2015-11-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.rapp@noa-audio.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hlsenc: Only write PAT/PMT once per segmentDerek Buitenhuis2015-11-021-1/+9
| | | | | | | This saves a lot of muxing overhead, especially on lower bitrate segments. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avfilter/vf_frei0r: use av_strtod instead of strtod for added flexibilityGanesh Ajjanagadde2015-11-021-1/+2
| | | | | | | | | This converts the usage of strtod to av_strtod in order to unify and make number parsing more consistent. This also adds support for SI postfixes. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
OpenPOWER on IntegriCloud