summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec: Extend fft to size 2^17Michael Niedermayer2016-03-04
| | | | | | Asked-for-by: durandal_1707 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvenc: Fix H264 and HEVC vui info updateAgatha Hu2016-03-04
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/utils: Fix 'ISO C90 forbids mixed declarations and code'Michael Niedermayer2016-03-03
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dca: simplify conditionfoo862016-03-03
| | | | | Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dca: fix av_cold placement in declarationsfoo862016-03-03
| | | | | Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/videotoolboxenc: remove *_NULLABLE annotations; fixes pre-10.11 buildRodger Combs2016-03-02
| | | | | | | These macros were added in OS X 10.11, and the file compiles without warnings on both 10.10 and 10.11 with them removed. Thanks to mark4o on IRC for pointing out the failure and testing the patch.
* lavc: add VideoToolbox H.264 EncoderRick Kern2016-03-02
| | | | | | | Autodetected by default. Encode using -codec:v h264_videotoolbox. Signed-off-by: Rick Kern <kernrj@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>
* lavc/aacenc_utils: replace sqrtf(Q*sqrtf(Q)) by precomputed valueGanesh Ajjanagadde2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes no sense whatsoever to do this at each function call; we already have a table for this. Yields a 2x improvement in find_min_book (x86-64, Haswell+GCC): ffmpeg -i sin.flac -acodec aac -y sin.aac find_min_book old 605 decicycles in find_min_book, 8388453 runs, 155 skips.9x 606 decicycles in find_min_book,16776912 runs, 304 skips.9x 607 decicycles in find_min_book,33553819 runs, 613 skips.2x 607 decicycles in find_min_book,67107668 runs, 1196 skips.3x 607 decicycles in find_min_book,134215360 runs, 2368 skips3x new 359 decicycles in find_min_book, 8388552 runs, 56 skips.3x 360 decicycles in find_min_book,16777112 runs, 104 skips.1x 361 decicycles in find_min_book,33554218 runs, 214 skips.4x 361 decicycles in find_min_book,67108381 runs, 483 skips.5x 361 decicycles in find_min_book,134216725 runs, 1003 skips5x and more importantly a non-negligible speedup (~ 8%) to overall AAC encoding: old: ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_new.aac 6.82s user 0.03s system 104% cpu 6.565 total new: ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_old.aac 6.24s user 0.03s system 104% cpu 5.993 total This also improves accuracy of the expression by ~ 2 ulp in some cases. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
* Move the |die| member of FrameThreadContext to PerThreadContext.Wan-Teh Chang2016-03-01
| | | | | | | | | | | This fixes a data race warning by ThreadSanitizer. FrameThreadContext.die is read by all the worker threads but is not protected by any mutex. Move it to PerThreadContext so that each worker thread reads its own copy of |die|, which can then be protected with PerThreadContext.mutex. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* vc2enc: fix packet underallocation and minimum bitrate with interlacingRostislav Pehlivanov2016-03-01
| | | | | | | | | This was a regression introduced by commit e7345abe052 which enabled full use of the allocated packet but due to the overhead of using field coding the buffer was too small and triggered warnings and crashes. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: simplify slice cost cachingRostislav Pehlivanov2016-03-01
| | | | | | | The fact that now all quantization indices costs are cached justifies storing 20 more integers in a structure already allocated on heap. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: remove redundant put_padding() and use skip_put_bytes() insteadRostislav Pehlivanov2016-03-01
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec: Add utils testMichael Niedermayer2016-02-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/vc1dsp: Split the file into MC and loopfilterTimothy Gu2016-02-29
|
* lavc/pcxenc: Update format description link.Carl Eugen Hoyos2016-02-29
|
* avcodec/libzvbi-teletextdec: Remove unused variableMichael Niedermayer2016-02-28
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vc2enc: redistribute leftover bytesRostislav Pehlivanov2016-02-28
| | | | | | | | | | | This commit redistributes the leftover bytes amongst the top 150 slices in terms of size (in the hopes that they'll be the ones pretty bitrate starved). A more perceptual method would probably need to cut bits off from slices which don't need much, but that'll be implemented later. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: allocate the DWT context with the current plane sizeRostislav Pehlivanov2016-02-28
| | | | | | Previously used the luma size only. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* 2enc: clip and warn when user bitrate set too lowRostislav Pehlivanov2016-02-28
| | | | | | | The encoder crashed on verly low bitrates since there wasn't enough space allocated. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: clip and warn when user bitrate set too lowRostislav Pehlivanov2016-02-28
| | | | | | | The encoder crashed on verly low bitrates since there wasn't enough space allocated. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: carry over quantization index across frames as a starting pointRostislav Pehlivanov2016-02-28
| | | | | | | | Previously a global average was used. Using the previous quantizer resulted in a fairly significant speedup as slice size selection settled down quicker. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: use 32 bits for quantized coefficients LUTRostislav Pehlivanov2016-02-28
| | | | | | | 16 bits were definitely not enough and caused artifacts to appear on images at barely compressed images. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: cache bits per quantizer, calculate wasted bitsRostislav Pehlivanov2016-02-28
| | | | | | Needed for following commits, also a speed increase. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/mjpegdec: Fix decoding slightly odd progressive jpegMichael Niedermayer2016-02-28
| | | | | | Fixes: ebd58db6-dc86-11e5-91c2-59daeddf50c7.jpg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Document and validate AVFrame plane pointers.Reimar Döffinger2016-02-28
| | | | | | | | | | Check that the required plane pointers and only those are set up. Currently does not enforce anything for the palette pointer of pseudopal formats as I am unsure about the requirements. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* mjpegdec: Do not assume unused plane pointer are NULL.Reimar Döffinger2016-02-28
| | | | | | | | | | | | | We do neither document nor check such a requirement and for application-provided get_buffer2 they could contain the result of a malloc(0) or whatever value they had previously. This fixes a use-after-free in e.g. MPlayer: https://trac.mplayerhq.hu/ticket/2262 We might want to consider changing the (documented) API in addition though. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* mss2: Fix buffer overflow.Reimar Döffinger2016-02-28
| | | | | | | | | | | | | | | | | Reported as https://trac.mplayerhq.hu/ticket/2264 but have not been able to reproduce with FFmpeg-only. I have no idea what coded_height is used for here exactly, so this might not be the best fix. Fixes the following chain of events: ff_mss12_decode_init sets coded_height while not setting height. ff_mpv_decode_init then copies coded_height into MpegEncContext height. This is then used by init_context_frame to allocate the data structures. However the wmv9rects are validated/initialized based on avctx->height, not avctx->coded_height. Thus the decode_wmv9 function will try to decode a larger video that we allocated data structures for, causing out-of-bounds writes. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* lavc/aac_ac3_parser: reindentRodger Combs2016-02-27
|
* lavc/aac_ac3_parser: avoid zeroing codec parameters if we haven't read a frameRodger Combs2016-02-27
| | | | This caused issues when seeking in some unusual MPEGTS files
* lavc/Makefile: dnxhd demuxer depends on dnxhddata.oRodger Combs2016-02-27
|
* avcodec/cfhd: Add support for 12-bit RGBA.Kieran Kunhya2016-02-27
| | | | Plays all known samples
* cfhd: reallocate internal buffers on format change.Kieran Kunhya2016-02-27
| | | | Fixes some, but not all, of the threading fuzz crashes
* avcodec/utils: Check that the video data[] arrays are NULL on the input to ↵Michael Niedermayer2016-02-27
| | | | | | | | | get_buffer_internal() This should return an error to the decoder if the struct it tried to getbuffer is dirty Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: Check all data[] pointers in video_get_buffer() not just the ↵Michael Niedermayer2016-02-27
| | | | | | first Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc: reindent a few decoders after previous commitsClément Bœsch2016-02-26
|
* lavc: deprecate decoded ass subtitles with timingsClément Bœsch2016-02-26
|
* lavc/options: add ass_ro_flush_noop to flags2Clément Bœsch2016-02-26
|
* lavc: allow subtitle text format to be ASS without timingClément Bœsch2016-02-26
|
* Kill timed SSAClément Bœsch2016-02-26
|
* avcodec/utils: Merge identical if conditionsMichael Niedermayer2016-02-26
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vc2enc: calculate the minimum slice size only onceRostislav Pehlivanov2016-02-26
| | | | | | | This commit moves the minimum bits per slice calculations outside of the rate control function as it is identical for every slice. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: halve allocated table size, refactor and optimize quantizationRostislav Pehlivanov2016-02-26
| | | | | | | | | | | | | Since coefficients differ only in the last bit when writing to the bitstream it was possible to remove the sign from the tables, thus halving them. Also now all quantization is done in the unsigned domain as the sign is completely separate, which gets rid of the need to do quantization on 32 bit signed integers. Overall, this slightly speeds up the encoder depending on the machine. The commit still generates bit-identical files as before the commit. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: use FFABS() instead of abs()Rostislav Pehlivanov2016-02-26
| | | | | | Provides a minor speedup. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: correctly zero out coefficient array paddingRostislav Pehlivanov2016-02-26
| | | | | | Credit for figuring this out goes to James Darnley. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vc2enc: mark as FF_CODEC_CAP_INIT_THREADSAFE and align AVCodec entriesRostislav Pehlivanov2016-02-26
| | | | | | The encoder does not modify any global variables. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* lavc/mjpegdec: Fix decoding images with Adobe_CM tag.Carl Eugen Hoyos2016-02-25
| | | | Fixes ticket #5267.
* libavcodec:add packet level support for mastering metadataNeil Birkbeck2016-02-25
| | | | | | | | | Some containers, like webm/mkv, will contain this mastering metadata. This is analogous to the way 3D fpa data is handled (in frame and packet side data). Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'd24bd96bdd5b4bae9a9e0055fa8d1104db1283a9'Derek Buitenhuis2016-02-24
|\ | | | | | | | | | | | | * commit 'd24bd96bdd5b4bae9a9e0055fa8d1104db1283a9': build: Disentangle VC-1 decoder and parser Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * build: Disentangle VC-1 decoder and parserDiego Biurrun2016-02-19
| |
* | Merge commit '15a24614aef5836af3cd2c7cc3b2b737eee6bf3c'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit '15a24614aef5836af3cd2c7cc3b2b737eee6bf3c': build: Add vc1dsp component for more fine-grained dependencies Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>