summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* lavc/mjpegenc_common: Remove an unused variable.Carl Eugen Hoyos2017-02-10
|
* avcodec/mjpegenc: Simplify by moving assert into ff_mjpeg_encode_huffman_close()Michael Niedermayer2017-02-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not ↵Michael Niedermayer2017-02-10
| | | | | | | | | | requested This limits the bugs, speedloss and extra memory allocation to the case when optimal tables are needed. Fixes regressions with slice multi-threading Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative ↵Michael Niedermayer2017-02-10
| | | | | | | | to pre optimal huffman The changes are not needed anymore and the return code was never used Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc_huffman: remove unneeded header includeMichael Niedermayer2017-02-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tests/mjpegenc_huffman: Remove static in main() tableMichael Niedermayer2017-02-10
| | | | | | Avoids false positives when greping for non constant statics Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: Drop i_tex misuse, set itex/header bits correctly, fix ↵Michael Niedermayer2017-02-10
| | | | | | 2pass encoding Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: Remove non functional huffman reallocation and error handlingMichael Niedermayer2017-02-10
| | | | | | | If this is wanted iam not against it but it must be designed to work with all cases like slice threads, and a single growing buffer does not work very well with slices. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tests/mjpegenc_huffman: align static tablesRostislav Pehlivanov2017-02-09
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* mjpegenc: use s->avctx as a context for av_log rather than NULLRostislav Pehlivanov2017-02-09
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* tests/mjpegenc_huffman: replace assert() with av_assert0()Rostislav Pehlivanov2017-02-09
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* mjpegenc_common: add missing ff_ prefix to init_uni_ac_vlcRostislav Pehlivanov2017-02-09
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* vaapi_encode: Add VP8 supportMark Thompson2017-02-08
| | | | | | Fixes ticket #6116. (cherry picked from commit ca62236a89f47bd871eaf69d8d9e837c93c55a6c)
* vaapi_encode: Pass framerate parameters to driverMark Thompson2017-02-08
| | | | | | | | | Only do this when building for a recent VAAPI version - initial driver implementations were confused about the interpretation of the framerate field, but hopefully this will be consistent everywhere once 0.40.0 is released. (cherry picked from commit ff35aa8ca4069bf1543adeec4c28e51e4a012eee)
* vaapi_h264: Enable VBR modeMark Thompson2017-02-08
| | | | | | | | | | Default to using VBR when a target bitrate is set, unless the max rate is also set and matches the target. Changes to the Intel driver mean that min_qp is also respected in this case, so set a codec default to unset the value rather than using the current default inherited from the MPEG-4 part 2 encoder. (cherry picked from commit eddfb57210298a0a94472794485400a3a6c76196)
* vaapi_encode: Support VBR modeMark Thompson2017-02-08
| | | | | | | | This includes a backward-compatibility hack to choose CBR anyway on old drivers which have no CBR support, so that existing programs will continue to work their options now map to VBR. (cherry picked from commit f033ba470fbab1ff6838666d4d86411effa97b27)
* vaapi_encode: Add MPEG-2 supportMark Thompson2017-02-08
| | | | (cherry picked from commit ca6ae3b77a7e6600e517723b90e57527a47809de)
* vaapi_h264: Scale log2_max_pic_order_cnt_lsb with max_b_framesMark Thompson2017-02-08
| | | | | | | | | Before this change, it was possible to overflow pic_order_cnt_lsb and generate a stream with invalid POC numbering. This makes sure that the field is large enough that a single IDR B* P sequence uses fewer than half the available POC lsb values. (cherry picked from commit 89725a8512721fffd190021ded2d3f5b42e20e2a)
* vaapi_encode: Support forcing IDR frames via AVFrame.pict_typeMark Thompson2017-02-08
| | | | (cherry picked from commit a3c3a5eac20a51d402c332cdf5220fff40a7943f)
* vaapi_encode: Fix GOP sizingMark Thompson2017-02-08
| | | | | | | | This change makes the configured GOP size be respected exactly - previously the value could be exceeded slightly due to flaws in the frame type selection logic. (cherry picked from commit 37fab0661a760b2a9d727939d72e629acee1a6ef)
* vaapi_h265: Fix CFR mode with framerate set in AVCodecContextMark Thompson2017-02-08
| | | | | | Same issue as 17a0f9481cf07af0feb3838ca315b970117e8000. (cherry picked from commit 7d81698b89172d2dcf1b78d4b42ba86262360559)
* vaapi_h265: Add main 10 encode supportMark Thompson2017-02-08
| | | | | (cherry picked from commit 5a5df90d9c05d86d9b0564b8b40b6d64a324df5e) (cherry picked from commit d08e02d929ff8be5f56bb1da0e439bf1ae557552)
* avcodec/h264_slice: Clear ref_counts on redundant slicesMichael Niedermayer2017-02-08
| | | | | | | | Fixes reading freed memory Fixes: 568/clusterfuzz-testcase-6107186067406848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Implement optimal huffman encoding for (M)JPEG.Jerry Jiang2017-02-08
| | | | | | | > seems to break > make fate-vsynth1-mjpeg-444 Fixed.
* libavcodec/cinepak.c: fix a wrong (inverted) misleading commentRl2017-02-07
| | | | Make the comment message understandable and correct.
* avcodec: Mark some codecs with threadsafe init as suchDerek Buitenhuis2017-02-07
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pictordec: Fix logic errorMichael Niedermayer2017-02-07
| | | | | | | Fixes: 559/clusterfuzz-testcase-6424225917173760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/movtextdec: Fix decode_styl() cleanupMichael Niedermayer2017-02-06
| | | | | | | | Fixes: null pointer dereference Fixes: 555/clusterfuzz-testcase-5986646595993600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pthread_frame: Check av_packet_ref() for failureMichael Niedermayer2017-02-06
| | | | Fixes CID1396242
* avcodec/pngdec: Check trns more completelyMichael Niedermayer2017-02-04
| | | | | | | | Fixes out of array access Fixes: 546/clusterfuzz-testcase-4809433909559296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opus_rc: rename total_bits_used to total_bits and #define some constantsRostislav Pehlivanov2017-02-04
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/interplayvideo: Move parameter change check upMichael Niedermayer2017-02-04
| | | | | | | Fixes out of array read Fixes: 544/clusterfuzz-testcase-5936536407244800.f8bd9b24_8ba77916_70c2c7be_3df6a2ea_96cd9f14 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/flacdsp: Avoid undefined operations in non debug buildsMichael Niedermayer2017-02-04
| | | | | | | | | | | | | | | | | | | | | This fixes ubsan warnings in non debug builds by using unsigned operations in debug builds the correct signed operations are retained so that overflows (which should not occur in valid files and may indicate problems in the DSP code or decoder) can be detected. Alternatively they can be changed to unsigned unconditionally, then its not possible though to detect overflows easily if someone wants to test the DSP code for overflows. The 2nd alternative would be to leave the code as it is and accept that there are undefined operations in the DSP code and that ubsan output is full of them in some cases. Similar changes would be needed in some other DSP routines Suggested-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/flacdec: Check for invalid vlcsMichael Niedermayer2017-02-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: use init_get_bits8()Paul B Mahol2017-02-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/metasound: use init_get_bits8()Paul B Mahol2017-02-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/xsubdec: use init_get_bits8()Paul B Mahol2017-02-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/mpc7: use init_get_bits8()Paul B Mahol2017-02-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/mpc7: return meaningful error valuesPaul B Mahol2017-02-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/mpc8: use init_get_bits8()Paul B Mahol2017-02-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/ituh263dec: Implement U263s interpretation of H.263 B framesMichael Niedermayer2017-02-03
| | | | | | Fixes Ticket1536 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: Fix memleak with subtitles and sidedataMichael Niedermayer2017-02-03
| | | | | | | Fixes: 454/fuzz-3-ffmpeg_SUBTITLE_AV_CODEC_ID_MOV_TEXT_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/rv34dsp: add ff_rv34_idct_dc_add_sse2James Almer2017-02-02
| | | | | | | Also disable ff_rv34_idct_dc_add_mmx on x86_64 as the presence of sse2 is guaranteed in such builds. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/vp8dsp: add ff_vp8_idct_dc_add_sse2James Almer2017-02-02
| | | | | | | Also disable ff_vp8_idct_dc_add_mmx on x86_64 as the presence of sse2 is guaranteed in such builds. Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/cinepakenc.c: comments cleanup (contents)addr-see-the-website@aetey.se2017-02-02
| | | | | | | | Change the encoding of the original developer name from ISO-8859-1 to UTF-8. Remove the stale/completed TODO list. Fix two small typos. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dca_lbr: Fix off by 1 error in freq checkMichael Niedermayer2017-02-02
| | | | | | | | Fixes out of array read Fixes: 510/clusterfuzz-testcase-5737865715646464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* speedhq: fix out-of-bounds writeSteinar H. Gunderson2017-02-02
| | | | | | | | | | | | | Certain alpha run lengths (for SHQ1/SHQ3/SHQ5) could be stored in both long and short versions, and we would only accept the short version, returning -1 (invalid code) for the others. This could cause an out-of-bounds write on malicious input, as discovered by Andreas Cadhalpun during fuzzing. Fix by simply allowing both versions, leaving no invalid codes in the alpha VLC. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/ituh263dec: Correct timestamp recovery for B framesMichael Niedermayer2017-02-01
| | | | | | Improves u263_b-frames_5.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmalosslessdec: remove warning message as bug is fixedPaul B Mahol2017-02-01
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/atrac3: Add multichannel joint stereo ATRAC3bnnm2017-02-01
| | | | | | | | | | | | | | | | | | | | | | Multichannel joint stereo simply interleaves stereo pairs (6ch: 2ch + 2ch + 2ch), so each pair is decoded separatedly. *** To test my changes, I converted examples to wav with ffmpeg.exe (old and new), and compared them to see they are byte-exact. Regular 2ch files (JS and normal) were straightforward to test. For multichannel, to check each JS pair is correctly decoded separatedly I did: - manually demux 6ch.msf into 3 pairs and convert them (2ch_1.wav + 2ch_2.wav + 2ch_3.wav) - convert the 6ch.msf file to wav (with my changes) - manually demux the 6ch.wav into 3 pairs (6ch_d1.wav + 6ch_d2.wav + 6ch_d3.wav) - compare each pair (ex. 2ch_3.wav vs 6ch_d3.wav): all pairs are byte-exact. The new code just processes each JS pair separatedly, there are no algorithm changes. It could be improved a bit but I'm not sure about typical styles. I've only seen 6ch .MSF (probably the AT3 spec only supports 2ch audio). Signed-off-by: bnnm <bananaman255@gmail.com>