summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* add libaribb24 ARIB STD-B24 caption decoderJan Ekström2019-02-10
| | | | | | | | | | | | | | | | | | | | | | | | * Outputs ASS lines with basic coloring and font scaling for each given region. * Sets the default style to the resolution of the subtitle plane (for example, 960x540 / 36pt font for profile A). * Has options to: * Disable ruby text (which is coded as regions which have half-height text in libaribb24). Enabled by default as without positioning ruby text only confuses as it is usually coded in the beginning of the decoded subtitle line. * Set the working directory, in which libaribb24 will read configuration as well as into which it may save broadcast extra symbols as PNG. Unset by default. The unconventional library check can be explained by the library's current master branch being licensed as LGPLv3, but at the time of writing the latest official release is still licensed under GPLv3. Thus, one either has to wait for the following release, or enable GPLv3.
* avcodec/sbrdsp_fixed.c: remove input value limit for sbr_sum_square_c()Michael Niedermayer2019-02-09
| | | | | | | Fixes: 1377/clusterfuzz-testcase-minimized-5487049807233024 Fixes: assertion failure in sbr_sum_square_c() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_parse: Clear ref_list[1] if only [0] is usedMichael Niedermayer2019-02-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_parse: no need check ref list1 for P slices.Decai Lin2019-02-08
| | | | | | | | This is robust for some corner case there is incorrect list1 count in pps header, but it's a P slice and can be decoded well. Signed-off-by: Decai Lin <decai.lin@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpegvideo_enc: Use av_assert1() instead of assert() in ↵Michael Niedermayer2019-02-07
| | | | | | merge_context_after_encode() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ac3: Explicitly return to discard large amounts of nonsense bytesMichael Niedermayer2019-02-07
| | | | | | | | | | | Changes 19sec to 10ms (12559) runtime, 17sec to 177ms (12570) Fixes: Timeout Fixes: 12559/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_fuzzer-5666516266123264 Fixes: 12561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-5682923041193984 Fixes: 12570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5194734308425728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4_unpack_bframes_bsf: Use avpriv_find_start_codeAndreas Rheinhardt2019-02-04
| | | | | | | | | | | instead of an ad-hoc function to search for start codes in order to remove code duplication and to improve performance. Improved performance of finding startcodes from 52606 decicycles to 9543 decicycles based upon 262144 runs for a 1 Mb/s MPEG4 video. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pgssubdec: Check for duplicate display segmentsMichael Niedermayer2019-02-03
| | | | | | | | | | In such a duplication the previous gets overwritten and leaks Fixes: memleak Fixes: 12510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGSSUB_fuzzer-5694439226343424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: [loongson] optimize put_hevc_qpel_h_8 with mmi.Shiyou Yin2019-02-02
| | | | | | | Optimize put_hevc_qpel_h_8 with mmi in the case width=4/8/12/16/24/32/48/64. This optimization improved HEVC decoding performance 2%(2.39x to 2.44x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: [loongson] optimize put_hevc_qpel_bi_h_8 with mmi.Shiyou Yin2019-02-02
| | | | | | | Optimize put_hevc_qpel_bi_h_8 with mmi in the case width=4/8/12/16/24/32/48/64. This optimization improved HEVC decoding performance 2.1%(2.34x to 2.39x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: [loongson] optimize put_hevc_epel_bi_hv_8 with mmi.Shiyou Yin2019-02-02
| | | | | | | Optimize put_hevc_epel_bi_hv_8 with mmi in the case width=4/8/12/16/24/32. This optimization improved HEVC decoding performance 1.7%(2.30x to 2.34x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: [loongson] optimize put_hevc_qpel_uni_hv_8 with mmi.Shiyou Yin2019-02-02
| | | | | | | Optimize put_hevc_qpel_uni_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64. This optimization improved HEVC decoding performance 2.7%(2.24x to 2.30x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/aarch64/vp8dsp: Fix the include guard.Carl Eugen Hoyos2019-01-31
| | | | Fixes fate-source.
* libavcodec: vp8 neon optimizations for aarch64Magnus Röös2019-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partial port of the ARM Neon for aarch64. Benchmarks from fate: benchmarking with Linux Perf Monitoring API nop: 58.6 checkasm: using random seed 1760970128 NEON: - vp8dsp.idct [OK] - vp8dsp.mc [OK] - vp8dsp.loopfilter [OK] checkasm: all 21 tests passed vp8_idct_add_c: 201.6 vp8_idct_add_neon: 83.1 vp8_idct_dc_add_c: 107.6 vp8_idct_dc_add_neon: 33.8 vp8_idct_dc_add4y_c: 426.4 vp8_idct_dc_add4y_neon: 59.4 vp8_loop_filter8uv_h_c: 688.1 vp8_loop_filter8uv_h_neon: 216.3 vp8_loop_filter8uv_inner_h_c: 649.3 vp8_loop_filter8uv_inner_h_neon: 195.3 vp8_loop_filter8uv_inner_v_c: 544.8 vp8_loop_filter8uv_inner_v_neon: 131.3 vp8_loop_filter8uv_v_c: 706.1 vp8_loop_filter8uv_v_neon: 141.1 vp8_loop_filter16y_h_c: 668.8 vp8_loop_filter16y_h_neon: 242.8 vp8_loop_filter16y_inner_h_c: 647.3 vp8_loop_filter16y_inner_h_neon: 224.6 vp8_loop_filter16y_inner_v_c: 647.8 vp8_loop_filter16y_inner_v_neon: 128.8 vp8_loop_filter16y_v_c: 721.8 vp8_loop_filter16y_v_neon: 154.3 vp8_loop_filter_simple_h_c: 387.8 vp8_loop_filter_simple_h_neon: 187.6 vp8_loop_filter_simple_v_c: 384.1 vp8_loop_filter_simple_v_neon: 78.6 vp8_put_epel8_h4v4_c: 3971.1 vp8_put_epel8_h4v4_neon: 855.1 vp8_put_epel8_h4v6_c: 5060.1 vp8_put_epel8_h4v6_neon: 989.6 vp8_put_epel8_h6v4_c: 4320.8 vp8_put_epel8_h6v4_neon: 1007.3 vp8_put_epel8_h6v6_c: 5449.3 vp8_put_epel8_h6v6_neon: 1158.1 vp8_put_epel16_h6_c: 6683.8 vp8_put_epel16_h6_neon: 831.8 vp8_put_epel16_h6v6_c: 11110.8 vp8_put_epel16_h6v6_neon: 2214.8 vp8_put_epel16_v6_c: 7024.8 vp8_put_epel16_v6_neon: 799.6 vp8_put_pixels8_c: 112.8 vp8_put_pixels8_neon: 78.1 vp8_put_pixels16_c: 131.3 vp8_put_pixels16_neon: 129.8 Signed-off-by: Magnus Röös <mla2.roos@gmail.com>
* avcodec/ffv1: Simplify update_vlc_state()Michael Niedermayer2019-01-31
| | | | | | About 0.5% faster Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1: Simplify fold()Michael Niedermayer2019-01-31
| | | | | | | No speed difference, or slightly faster (the difference is too small so it may be noise that this appears faster) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/rscc.c: add missing semicolonMateusz2019-01-31
| | | | | | Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rasc: Move ff_get_buffer() after frame checksMichael Niedermayer2019-01-31
| | | | | | If the frame1/2 checks fail this avoids doing the allocation of a new frame Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rasc: Check uncompressed dlta sizeMichael Niedermayer2019-01-31
| | | | | | | | | | | We assume that if the compressed size is bigger than if each byte is encoded in a single raw packet that the data is invalid. Fixes: Out of memory Fixes: 12208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5648916473708544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fic: Check that there is input left in fic_decode_block()Michael Niedermayer2019-01-31
| | | | | | | | Fixes: Timeout Fixes: 12450/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5661984622641152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/arbc: clear decoder state when seekingJames Almer2019-01-28
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/motion_est: remove duplicate functionMarton Balint2019-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/rscc: Avoid returning frames that have nearly no undamaged pixels in ↵Michael Niedermayer2019-01-28
| | | | | | | | | | | | | them Fixes: Timeout Fixes: 12192/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6279038004363264 Before: clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6279038004363264 in 15423 ms After: clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6279038004363264 in 190 ms Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: Add discard_sample_percentageMichael Niedermayer2019-01-28
| | | | | Suggested-by: BBB Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/huffyuvdec: Check slice_offset/sizeMichael Niedermayer2019-01-28
| | | | | | | | | Fixes: out of array access Fixes: 12447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5201623956062208 Fixes: 12458/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5705567736168448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ilbcdec: Fix undefined integer overflow lsf2poly()Michael Niedermayer2019-01-28
| | | | | | | | | | | The addition is moved up into the context where the variable is unsigned avoiding the undefined behavior Fixes: runtime error: signed integer overflow: 2147481972 + 4096 cannot be represented in type 'int' Fixes: 12444/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5755706244857856 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ilbcdec: Fix integer overflow in construct_vector()Michael Niedermayer2019-01-28
| | | | | | | | | | webrtc contains explicit code to ignore the undefined behavior (RTC_NO_SANITIZE / OverflowingAddS32S32ToS32()) Probably fixes: Integer overflow (unreproducable here) Probably fixes: 12215/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5767142427852800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vaapi_encode_h265: Ensure that ref pics are always in the RPSMark Thompson2019-01-27
| | | | | | | | | | | | When making a new P-frame when B-frames are present the previous P-frame is normally in the DPB because it will be referred to by subsequent B-frames. However, this is not true if there are no B-frames, or in edge cases where a GOP ends with two P-frames. Fix this by adding the direct ref pics to the RPS explicitly. Fixes #7699. Tested-by: Ullysses A Eoff <ullysses.a.eoff@intel.com>
* avcodec: add ARBC decoderPaul B Mahol2019-01-27
| | | | Thanks Kostya for great help in reversing binary.
* avcodec/vp6: select idct based (loosely) on number of coefficients decodedPeter Ross2019-01-26
| | | | | | | | | | | The VP3/4/5/6 reference decoders all use three IDCT versions: one for the DC-only case, another for blocks with more than 10 coefficients, and an optimised one for blocks with up to 10 AC coefficents. VP6 relies on the sparse 10 coefficient version, and without it, IDCT drift occurs. Fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/vp6: use ff_vp3dsp_[hv]_loop_filter_12Peter Ross2019-01-26
| | | | | | Partially fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/vp6: use rounded shift for chroma motion vector calculationPeter Ross2019-01-26
| | | | | | Partially fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/vp3dsp: add 10 coefficient version of the VP3 IDCTPeter Ross2019-01-26
| | | | | | This version of the IDCT is used by the VP6 decoder. Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/vp3dsp: add 12 pixel loop filter functionsPeter Ross2019-01-26
| | | | Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/vp3dsp: move vp3 init loop filter function to vp3dspPeter Ross2019-01-26
| | | | | | This is also used by the VP6 decoder. Signed-off-by: Peter Ross <pross@xvid.org>
* lavc/qsvenc: enable QVBR modeZhong Li2019-01-25
| | | | | | | | | | | | | | | | | QVBR mode is to use the variable bitrate control algorithm with constant quality. mfxExtCodingOption3 should be supported to enable QVBR mode. It is neccesary to specify a max_rate for QVBR, else it may be ICQ mode. Example usage: ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -c:v h264_qsv -global_quality 25 -maxrate 2M test_qvbr.mp4 -v verbose Clip QVBR quality range to be [0, 51] as Mark's commments. It is similar to qp range of CQP but possibly should be updated when VP8/VP9 encoding can be supported. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Zhong Li <zhong.li@intel.com>
* avcodec/libx265: add support for ROI-based encodingGuo, Yejun2019-01-24
| | | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* vaapi_encode_vp9: Support more complex reference structuresMark Thompson2019-01-23
|
* vaapi_encode_h265: Support more complex reference structuresMark Thompson2019-01-23
| | | | | The reference picture sets are now constructed directly from the DPB information.
* vaapi_encode_h264: Support more complex reference structuresMark Thompson2019-01-23
|
* vaapi_encode: Let the reconstructed frame pool be sized dynamicallyMark Thompson2019-01-23
| | | | | No supported encode driver requires the pool to be fixed-size, so just remove this constraint.
* vaapi_encode: Convert to send/receive APIMark Thompson2019-01-23
| | | | | | | | | | | | | This attaches the logic of picking the mode of for the next picture to the output, which simplifies some choices by removing the concept of the picture for which input is not yet available. At the same time, we allow more complex reference structures and track more reference metadata (particularly the contents of the DPB) for use in the codec-specific code. It also adds flags to explicitly track the available features of the different codecs. The new structure also allows open-GOP support, so that is now available for codecs which can do it.
* vaapi_encode: Allocate picture-private data in generic codeMark Thompson2019-01-23
|
* cbs_h2645: Avoid memcpy when splitting fragment #2Andreas Rheinhardt2019-01-23
| | | | | | | | | | | Now memcpy can be avoided for NAL units containing escapes, too. Particularly improves performance for files with hardcoded black bars. For such a file, time spent in cbs_h2645_split_fragment went down from 369410 decicycles to 327677 decicycles. (It were 379114 decicycles when every NAL unit was copied.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
* h2645_parse: Make ff_h2645_packet_split reference-compatibleAndreas Rheinhardt2019-01-23
| | | | | | | This is in preparation for a patch for cbs_h2645. Now the packet's rbsp_buffer can be owned by an AVBuffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
* lavc/g723_1enc: Set the default bitrate to 6300.Carl Eugen Hoyos2019-01-23
|
* lavc/qsvenc: set BRCParamMultiplier to aviod BRC overflowZhong Li2019-01-22
| | | | | | | | Fix ticket #7663 Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* avcodec/mips: [loongson] optimize put_hevc_qpel_bi_hv_8 with mmi.Shiyou Yin2019-01-22
| | | | | | | Optimize put_hevc_qpel_bi_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64. This optimization improved HEVC decoding performance 11.4%(2.01x to 2.24x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: [loongson] optimize put_hevc_qpel_hv_8 with mmi.Shiyou Yin2019-01-22
| | | | | | | Optimize put_hevc_qpel_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64. This optimization improved HEVC decoding performance 11%(1.81x to 2.01x, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tests: Add codec_desc to .gitignoreFeRD (Frank Dana)2019-01-22
| | | | | | | | | The compiled libavcodec/tests/codec_desc was left out of that dir's .gitignore when the test was added, so it shows up in 'git status' as an untracked file if it's been built. Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>