- 06 Nov, 2015 6 commits
-
-
Paul B Mahol authored
Signed-off-by:
Paul B Mahol <onemda@gmail.com>
-
Ganesh Ajjanagadde authored
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>
-
Sebastian Dröge authored
Signed-off-by:
Sebastian Dröge <sebastian@centricular.com> Reviewed-by:
Kieran Kunhya <kierank@obe.tv> Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Sebastian Dröge authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
- 05 Nov, 2015 10 commits
-
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
- 04 Nov, 2015 8 commits
-
-
Ganesh Ajjanagadde authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
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>
-
Ganesh Ajjanagadde authored
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>
-
Michael Niedermayer authored
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>
-
Michael Niedermayer authored
Fixes: libavcodec/libzvbi-teletextdec.c:232:9: warning: unused variable ret [-Wunused-variable] Signed-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Michael Niedermayer authored
Fixes: libavcodec/vdpau.c:320:5: warning: "CONFIG_H263_VDPAU_HWACCEL" is not defined [-Wundef] It was removed in d15adeacSigned-off-by:
Michael Niedermayer <michael@niedermayer.cc>
-
Bryan Huh authored
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>
-
- 03 Nov, 2015 7 commits
-
-
Muhammad Faiz authored
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>
-
Ganesh Ajjanagadde authored
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>
-
Ganesh Ajjanagadde authored
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>
-
Ganesh Ajjanagadde authored
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>
-
James Almer authored
Signed-off-by:
James Almer <jamrial@gmail.com>
-
Paul B Mahol authored
Signed-off-by:
Paul B Mahol <onemda@gmail.com>
-
Paul B Mahol authored
Signed-off-by:
Paul B Mahol <onemda@gmail.com>
-
- 02 Nov, 2015 9 commits
-
-
Tobias Rapp authored
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>
-
Derek Buitenhuis authored
This saves a lot of muxing overhead, especially on lower bitrate segments. Signed-off-by:
Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
Ganesh Ajjanagadde authored
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>
-
Hendrik Leppkes authored
* commit '8161220e': h264_parser: Rename close() to h264_close() Merged-by:
Hendrik Leppkes <h.leppkes@gmail.com>
-
Hendrik Leppkes authored
* commit '407ac223': w32pthreads: Map MemoryBarrier to __sync_synchronize on mingw Merged-by:
Hendrik Leppkes <h.leppkes@gmail.com>
-
Hendrik Leppkes authored
* commit 'a0562e53': configure: Add a SONAME entry for the android target Merged-by:
Hendrik Leppkes <h.leppkes@gmail.com>
-
Hendrik Leppkes authored
* commit 'd35d0c72': vdpau: remove dysfunctional H.263 support Merged-by:
Hendrik Leppkes <h.leppkes@gmail.com>
-
Hendrik Leppkes authored
* commit 'f53583ea': omadec: Fix position of opening parenthesis Merged-by:
Hendrik Leppkes <h.leppkes@gmail.com>
-
Hendrik Leppkes authored
* commit 'b4a82e74': h264: Print the complete user message Merged-by:
Hendrik Leppkes <h.leppkes@gmail.com>
-