summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* aactab.h: fix commentRostislav Pehlivanov2015-11-27
| | | | | | Previous commit broke it. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* aactab.h: update and correct commentRostislav Pehlivanov2015-11-27
| | | | | | Tables in that file have been used by both for a long time now. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* aacenc: make threadsafeRostislav Pehlivanov2015-11-27
| | | | | | | | Since the ff_aac_tableinit() can be called by both the encoder and the decoder (in case of transcoding) this commit shares the AVOnce variable to prevent this. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/cabac: Check initial cabac decoder stateMichael Niedermayer2015-11-27
| | | | | | | | | Fixes integer overflows Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Found-by: xiedingbao (Ticket4727) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cabac_functions: Fix "left shift of negative value -31767"Michael Niedermayer2015-11-27
| | | | | | | | Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Found-by: xiedingbao (Ticket4727) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aac_tablegen: speed up table initializationGanesh Ajjanagadde2015-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This speeds up aac_tablegen to a ludicruous degree (~97%), i.e to the point where it can be argued that runtime initialization can always be done instead of hard-coded tables. The only cost is essentially a trivial increase in the stack size. Even if one does not care about this, the patch also improves accuracy as detailed below. Performance: Benchmark obtained by looping 10^4 times over ff_aac_tableinit. Sample benchmark (x86-64, Haswell, GNU/Linux): old: 1295292 decicycles in ff_aac_tableinit, 512 runs, 0 skips 1275981 decicycles in ff_aac_tableinit, 1024 runs, 0 skips 1272932 decicycles in ff_aac_tableinit, 2048 runs, 0 skips 1262164 decicycles in ff_aac_tableinit, 4096 runs, 0 skips 1256720 decicycles in ff_aac_tableinit, 8192 runs, 0 skips new: 21112 decicycles in ff_aac_tableinit, 511 runs, 1 skips 21269 decicycles in ff_aac_tableinit, 1023 runs, 1 skips 21352 decicycles in ff_aac_tableinit, 2043 runs, 5 skips 21386 decicycles in ff_aac_tableinit, 4080 runs, 16 skips 21299 decicycles in ff_aac_tableinit, 8173 runs, 19 skips Accuracy: The previous code was resulting in needless loss of accuracy due to the pow being called in succession. As an illustration of this: ff_aac_pow34sf_tab[3] old : 0.000000000007598092294225 new : 0.000000000007598091426864 real: 0.000000000007598091778545 truncated to float old : 0.000000000007598092294225 new : 0.000000000007598091426864 real: 0.000000000007598091426864 showing that the old value was not correctly rounded. This affects a large number of elements of the array. Patch tested with FATE. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavf/utils: avoid decoding a frame to get the codec parametersMatthieu Bouron2015-11-26
| | | | | | | Avoid decoding a frame to get the codec parameters while the codec supports FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM. This is particulary useful to avoid decoding twice images (once in avformat_find_stream_info and once when the actual decode is made).
* aac_ltp: actually signal LTP as off during EIGHT_SHORT windowsRostislav Pehlivanov2015-11-26
| | | | | | | | This hugely reduces the echo which was introduced with the previous commit (though likely because previously everything was broken). Makes LTP actually worthwhile now. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* aac_ltp: split, reorder and improve prediction algorithmRostislav Pehlivanov2015-11-26
| | | | | This commit attempts to mirror what the decoder does more closely in addition to fixing some shortcomings.
* avcodec/faandct: remove L suffixes for floating point literalGanesh Ajjanagadde2015-11-26
| | | | | | | Should fix issues with ppc, tested by bug reporter. Reported-by: John Warburton <john@johnwarburton.net> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* fate: add FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM testsMatthieu Bouron2015-11-26
|
* avfilter/vsrc_mptestsrc: use hypot()Ganesh Ajjanagadde2015-11-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/af_dynaudnorm: remove wasteful powGanesh Ajjanagadde2015-11-26
| | | | | | | | This removes wasteful pow(x, 2.0) that although not terribly important for speed, is still useless. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/af_afade: improve accuracy and speed of gain computationGanesh Ajjanagadde2015-11-26
| | | | | | | | | | | | | | | | | | | Gain computation for various curves was being done in a needlessly inaccurate fashion. Of course these are all subjective curves, but when a curve is advertised to the user, it should be matched as closely as possible within the limitations of libm. In particular, the constants kept here were pretty inaccurate for double precision. Speed improvements are mainly due to the avoidance of pow, the most notorious of the libm functions in terms of performance. To be fair, it is the GNU libm that is among the worst, but it is not really GNU libm's fault since others simply yield a higher error as measured in ULP. "Magic" constants are also accordingly documented, since they take at least a minute of thought for a casual reader. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/lls: speed up performance of solve_llsGanesh Ajjanagadde2015-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a trivial rewrite of the loops that results in better prefetching and associated cache efficiency. Essentially, the problem is that modern prefetching logic is based on finite state Markov memory, a reasonable assumption that is used elsewhere in CPU's in for instance branch predictors. Surrounding loops all iterate forward through the array, making the predictor think of prefetching in the forward direction, but the intermediate loop is unnecessarily in the backward direction. Speedup is nontrivial. Benchmarks obtained by 10^6 iterations within solve_lls, with START/STOP_TIMER. File is tests/data/fate/flac-16-lpc-cholesky.err. Hardware: x86-64, Haswell, GNU/Linux. new: 17291 decicycles in solve_lls, 2096706 runs, 446 skips 17255 decicycles in solve_lls, 4193657 runs, 647 skips 17231 decicycles in solve_lls, 8384997 runs, 3611 skips 17189 decicycles in solve_lls,16771010 runs, 6206 skips 17132 decicycles in solve_lls,33544757 runs, 9675 skips 17092 decicycles in solve_lls,67092404 runs, 16460 skips 17058 decicycles in solve_lls,134188213 runs, 29515 skips old: 18009 decicycles in solve_lls, 2096665 runs, 487 skips 17805 decicycles in solve_lls, 4193320 runs, 984 skips 17779 decicycles in solve_lls, 8386855 runs, 1753 skips 18289 decicycles in solve_lls,16774280 runs, 2936 skips 18158 decicycles in solve_lls,33548104 runs, 6328 skips 18420 decicycles in solve_lls,67091793 runs, 17071 skips 18310 decicycles in solve_lls,134187219 runs, 30509 skips Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_stack: make it possible to stop with shortest streamPaul B Mahol2015-11-26
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* aaccoder_twoloop: Mark sfdiff as av_unusedTimothy Gu2015-11-26
| | | | | | Silences warning when building without assertions Signed-off-by: Claudio Freire <klaussfreire@gmail.com>
* AAC encoder: fix wrong gain sacalefactor being setClaudio Freire2015-11-26
| | | | | | | | | In some conditions, where the first band was being zeroed mainly, the wrong global gain scalefactor would be written to the stream since it's always taken from the first band regardless of whether it's been marked as zero or not. So, always make sure it contians something useful.
* AAC encoder: Fix application of M/S with PNSClaudio Freire2015-11-26
| | | | | | | | When both M/S coding and PNS are enabled, scalefactors and coding books would be mistakenly clobbered when setting the M/S flag on PNS'd bands. The flag needs to be set to signal the generation of correlated noise, but the scalefactors, coefficients and the coding books need to be kept intact.
* fate-run: Fix indentationTimothy Gu2015-11-25
|
* lavf/http: fix incorrect warning in range requestsRodger Combs2015-11-25
|
* avcodec/pthread_slice: Remove rets_countMichael Niedermayer2015-11-26
| | | | | | It appears rets_count is redundant Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: fix typo on a warningJames Almer2015-11-25
|
* avfilter: add '.' at and of long filter description where it is missingPaul B Mahol2015-11-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: do not leak frame if ff_get_audio_buffer() failsPaul B Mahol2015-11-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_alimiter: make description a bit longerPaul B Mahol2015-11-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* doc/indevs: fix x11grab options consistencyStefano Sabatini2015-11-25
|
* avfilter/af_sidechaincompress: add forgotten optionPaul B Mahol2015-11-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avutil/libm: fix isnan compatibility hackGanesh Ajjanagadde2015-11-24
| | | | | | | | | | | | | Commit 14ea4151d7c3c26500193f11ac661ed20c7c2b9c had a bug in that the conversion of the uint64_t result to an int (the return signature) would lead to implementation defined behavior, and in this case simply returned 0 for NAN. A fix via AND'ing the result with 1 does the trick, simply by ensuring a 0 or 1 return value. Patch tested with FATE on x86-64, GNU/Linux by forcing the compatibility code via an ifdef hack suggested by Michael. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* doc/indevs: Fix GermanTimothy Gu2015-11-24
|
* configure: Fix pseudo-GermanTimothy Gu2015-11-24
|
* avfilter/vsrc_mandelbrot: change sin to sinf for color computationGanesh Ajjanagadde2015-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | lrintf is anyway used, suggesting we only care up to floating precision. Rurthermore, there is a compat hack in avutil/libm for this function, and it is used in avcodec/aacps_tablegen.h. This yields a non-negligible speedup. Sample benchmark: x86-64, Haswell, GNU/Linux: old (draw_mandelbrot): 274635709 decicycles in draw_mandelbrot, 256 runs, 0 skips 300287046 decicycles in draw_mandelbrot, 512 runs, 0 skips 371819935 decicycles in draw_mandelbrot, 1024 runs, 0 skips 336663765 decicycles in draw_mandelbrot, 2048 runs, 0 skips 581851016 decicycles in draw_mandelbrot, 4096 runs, 0 skips new (draw_mandelbrot): 269882717 decicycles in draw_mandelbrot, 256 runs, 0 skips 296359285 decicycles in draw_mandelbrot, 512 runs, 0 skips 370076599 decicycles in draw_mandelbrot, 1024 runs, 0 skips 331478354 decicycles in draw_mandelbrot, 2048 runs, 0 skips 571904318 decicycles in draw_mandelbrot, 4096 runs, 0 skips Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculationGanesh Ajjanagadde2015-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This rewrites into a similar expression avoiding sqrt. Similarity is assured since sqrt(x^2 + y^2)/(x+y) lies in [1/sqrt(2), 1] for x, y > 0. Tested on x86-64, Haswell, GNU/Linux. Command: ffmpeg -f lavfi -i mandelbrot -f null - old (draw_mandelbrot): 277625266 decicycles in draw_mandelbrot, 256 runs, 0 skips 304527322 decicycles in draw_mandelbrot, 512 runs, 0 skips 377593582 decicycles in draw_mandelbrot, 1024 runs, 0 skips 338539499 decicycles in draw_mandelbrot, 2048 runs, 0 skips 583630357 decicycles in draw_mandelbrot, 4096 runs, 0 skips new (draw_mandelbrot): 274635709 decicycles in draw_mandelbrot, 256 runs, 0 skips 300287046 decicycles in draw_mandelbrot, 512 runs, 0 skips 371819935 decicycles in draw_mandelbrot, 1024 runs, 0 skips 336663765 decicycles in draw_mandelbrot, 2048 runs, 0 skips 581851016 decicycles in draw_mandelbrot, 4096 runs, 0 skips Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/aacps_tablegen: use hypot()Ganesh Ajjanagadde2015-11-24
| | | | | Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/aacps_tablegen_template: replace #define by typedefGanesh Ajjanagadde2015-11-24
| | | | | | | See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/aac_defines: replace #define by typedefGanesh Ajjanagadde2015-11-24
| | | | | | | See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* vsrc_mandelbrot: Don't use German in commentsTimothy Gu2015-11-24
|
* lavfi/select: add support for concatdec_select optionMarton Balint2015-11-25
| | | | | | | | | This option can be used to select useful frames from an ffconcat file which is using inpoints and outpoints but where the source files are not intra frame only. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: add option for adding segment start time and duration metadataMarton Balint2015-11-25
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: simplify duration calculation in open_next_fileMarton Balint2015-11-25
| | | | | | | | If duration is still AV_NOPTS_VALUE when opening the next file, we can assume that outpoint is not set. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* concatdec: calculate duration early if outpoint is knownMarton Balint2015-11-25
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/h264_slice: Limit max_contexts when slice_context_count is initializedMichael Niedermayer2015-11-24
| | | | | | | | Fixes out of array access Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2049_f2192b6829ab6e0eefcb035329c03c60.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'fb8753ada23189076bdf903c1c001c0ca8287fae'Derek Buitenhuis2015-11-24
|\ | | | | | | | | | | | | * commit 'fb8753ada23189076bdf903c1c001c0ca8287fae': qsvenc: factor out common options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * qsvenc: factor out common optionsAnton Khirnov2015-11-20
| |
* | avformat/v210: Check width and heightTimothy Gu2015-11-23
| | | | | | | | | | Fixes a floating point exception when width and height are not supplied (and therefore are zero).
* | avformat/rawvideodec: Rework packet size calculationTimothy Gu2015-11-23
| | | | | | | | | | | | Calculate packet size only once, and propagate errors earlier in the chain. Also remove use of the deprecated av_image_get_buffer_size().
* | imgutils: Use designated initializers for AVClassTimothy Gu2015-11-23
| | | | | | | | More readable and less breakable.
* | avfilter/vsrc_mandelbrot: Fix speed regressionMichael Niedermayer2015-11-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/rawenc: Recognize more extensions to encode raw hevc.Carl Eugen Hoyos2015-11-24
| | | | | | | | Requested-by: Mike Brown, brown at mrvideo vidiot com
* | avcodec/mpegvideo_enc: Remove slice structured mode from H.263 as well as ↵Michael Niedermayer2015-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | the code automatically enabing it There is no such thing as a slice structured mode in the original version 1 H.263, that mode was added in H.263+ in 1998. Also the headers for slice structured mode are not part of the older version 1 and this would result in unplayable files An alternative to this patch would be to merge the H263 and H263P AVCodecs and use other means to distinguish the older and newer versions. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>