summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* aarch64: h264qpel: Do vertical filtering without transposingMartin Storsjö2021-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives rather big speedups on these functions: Before: put_h264_qpel_8_mc01_8_neon: 241.0 131.5 138.7 put_h264_qpel_8_mc02_8_neon: 214.7 121.2 127.5 put_h264_qpel_8_mc03_8_neon: 242.5 131.2 135.7 put_h264_qpel_8_mc11_8_neon: 421.2 218.7 251.0 put_h264_qpel_8_mc12_8_neon: 878.0 509.5 537.5 put_h264_qpel_8_mc13_8_neon: 423.7 217.0 252.0 put_h264_qpel_8_mc21_8_neon: 858.2 479.5 514.0 put_h264_qpel_8_mc22_8_neon: 649.7 385.2 403.0 put_h264_qpel_8_mc23_8_neon: 860.2 476.5 517.7 put_h264_qpel_8_mc31_8_neon: 437.2 219.5 252.5 put_h264_qpel_8_mc32_8_neon: 892.5 510.5 546.0 put_h264_qpel_8_mc33_8_neon: 438.2 218.5 257.0 put_h264_qpel_16_mc01_8_neon: 944.2 509.7 546.7 put_h264_qpel_16_mc02_8_neon: 878.7 469.5 509.7 put_h264_qpel_16_mc03_8_neon: 945.7 510.7 557.0 put_h264_qpel_16_mc11_8_neon: 1663.2 858.5 979.5 put_h264_qpel_16_mc12_8_neon: 3510.2 2027.7 2112.7 put_h264_qpel_16_mc13_8_neon: 1664.7 857.5 980.5 put_h264_qpel_16_mc21_8_neon: 3366.2 1928.5 2030.5 put_h264_qpel_16_mc22_8_neon: 2584.7 1514.7 1590.2 put_h264_qpel_16_mc23_8_neon: 3367.7 1927.7 2035.0 put_h264_qpel_16_mc31_8_neon: 1716.7 849.7 997.0 put_h264_qpel_16_mc32_8_neon: 3564.0 2044.2 3835.2 put_h264_qpel_16_mc33_8_neon: 1717.7 863.0 989.5 After: put_h264_qpel_8_mc01_8_neon: 136.0 73.7 76.0 put_h264_qpel_8_mc02_8_neon: 108.7 65.0 64.0 put_h264_qpel_8_mc03_8_neon: 137.5 72.7 73.0 put_h264_qpel_8_mc11_8_neon: 316.2 159.0 188.5 put_h264_qpel_8_mc12_8_neon: 653.0 375.5 384.7 put_h264_qpel_8_mc13_8_neon: 318.7 165.5 189.5 put_h264_qpel_8_mc21_8_neon: 739.2 385.7 432.5 put_h264_qpel_8_mc22_8_neon: 530.7 295.5 309.5 put_h264_qpel_8_mc23_8_neon: 741.2 393.7 421.0 put_h264_qpel_8_mc31_8_neon: 332.2 162.5 190.0 put_h264_qpel_8_mc32_8_neon: 667.5 378.2 390.5 put_h264_qpel_8_mc33_8_neon: 332.7 166.5 195.5 put_h264_qpel_16_mc01_8_neon: 524.2 285.2 294.0 put_h264_qpel_16_mc02_8_neon: 454.7 252.2 250.2 put_h264_qpel_16_mc03_8_neon: 525.7 286.0 283.0 put_h264_qpel_16_mc11_8_neon: 1243.2 630.7 726.7 put_h264_qpel_16_mc12_8_neon: 2610.2 1479.7 1481.2 put_h264_qpel_16_mc13_8_neon: 1250.5 631.7 727.7 put_h264_qpel_16_mc21_8_neon: 2890.2 1571.2 1679.7 put_h264_qpel_16_mc22_8_neon: 2108.7 1177.5 1223.5 put_h264_qpel_16_mc23_8_neon: 2891.7 1578.7 1667.7 put_h264_qpel_16_mc31_8_neon: 1296.7 630.5 752.5 put_h264_qpel_16_mc32_8_neon: 2664.0 1483.2 1503.5 put_h264_qpel_16_mc33_8_neon: 1297.7 632.5 747.2 I.e. overall a 20%-60% reduction in runtime of these functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* arm/aarch64: Improve scheduling in the avg form of h264_qpelMartin Storsjö2021-10-18
| | | | | | | Don't use the loaded registers directly, avoiding stalls on in order cores. Use vrhadd.u8 with q registers where easily possible. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/speexdec: Seed should be unsigned otherwise the operations done on ↵Michael Niedermayer2021-10-17
| | | | | | | | | | | it are undefined Fixes: signed integer overflow: 1664525000 + 1013904223 cannot be represented in type 'int' Fixes: 39865/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-4979694508834816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_filter: Correct indentionLimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevc_filter: remove unneeded headersLimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevcdec: remove unused codeLimin Wang2021-10-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/av1_vaapi: improve decode qualityFei Wang2021-10-16
| | | | | | | | - quantizer delta and matrix level specific. - support loop filter delta. - support use superres. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/av1_vaapi: enable segmentation featuresFei Wang2021-10-16
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/av1_vaapi: setting 2 output surface for film grainFei Wang2021-10-16
| | | | | | | | VAAPI needs 2 output surface for film grain frame. One used for reference and the other used for applying film grain and pushing to downstream. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/vaapi: increase av1 decode pool sizeFei Wang2021-10-16
| | | | | | | | For film grain clip, vaapi_av1 decoder will cache additional 8 surfaces that will be used to store frames which apply film grain. So increase the pool size by plus 8 to avoid leak of surface. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/dxva2_av1: fix global motion paramsTong Wu2021-10-16
| | | | | | | | | Defined in spec 5.9.24/5.9.25. Since function void global_motion_params(AV1DecContext *s) already updates gm type/params, the wminvalid parameter only need to get the value from cur_frame.gm_invalid. Signed-off-by: Tong Wu <tong1.wu@intel.com>
* avcodec/av1_vaapi: add gm params valid checkFei Wang2021-10-16
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/av1dec: support setup shear processFei Wang2021-10-16
| | | | | | Defined in spec 7.11.3.6/7.11.3.7. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/av1: extend some definitions in spec section 3Fei Wang2021-10-16
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* cbs_av1: fix incorrect data typeFei Wang2021-10-16
| | | | | | | | Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be most 128. And similar return value for cbs_av1_get_relative_dist. So if plus them and use int8_t for the result may lose its precision. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/hevcdec: apply H.274 film grainNiklas Haas2021-10-15
| | | | | | | | | | | | | | | | Similar in spirit and design to 66845cffc3bbb, but slightly simpler due to the lack of interlaced frames in HEVC. See that commit for more details. For the seed value, since no specification for this appears to exist, I semi-arbitrarily decided to base it off the POC id alone, since there's no analog of the idr_pic_id in HEVC's I-frames. This design is stable across remuxes and seeks, but changes for adjacent frames with a period that's typically long enough not to be noticeable, which makes it satisfy all of the requirements that a film grain seed should have. Tested with and without threading, using a patch to insert film grain metadata artificially (for lack of real files containing film grain).
* avcodec/videotoolboxenc: use goto end for memory cleanupLimin Wang2021-10-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/avs3_parser: Fix usage of init_get_bits() and use init_get_bits8()Limin Wang2021-10-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/audiotoolboxdec: Fix usage of init_get_bits() and use init_get_bits8()Limin Wang2021-10-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* libavcodec/adts_header: add frame_length field and avpriv function to parse ↵Nachiket Tarate2021-10-13
| | | | | | | | | AAC ADTS header These will be used by HLS demuxer in case of sample decryption. Signed-off-by: Nachiket Tarate <nachiket.programmer@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avcodec/gemdec: Use ff_set_dimensions()Michael Niedermayer2021-10-11
| | | | | | | | | Fixes: OOM Fixes: 39798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5611636853964800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: Ensure 8x8 alignment for ARGO in avcodec_align_dimensions2()Michael Niedermayer2021-10-11
| | | | | | | | Fixes: out of array access Fixes: 39736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-4820016722214912 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/bitpacked: check av_buffer_ref resultLimin Wang2021-10-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* libavcodec/speexdec: fix memleak in error pathZhao Zhili2021-10-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/lagarith: return early on errorPaul B Mahol2021-10-10
| | | | Also return proper error values.
* avcodec: add native Speex decoderPaul B Mahol2021-10-10
|
* avcodec/mpeg12dec: Fix usage of init_get_bits() and use init_get_bits8()Limin Wang2021-10-09
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/h274: Fix signed left shiftMichael Niedermayer2021-10-09
| | | | | | | Fixes: 39463/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5736517629247488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_slice: Check idr_pic_idMichael Niedermayer2021-10-09
| | | | | | | | Fixes: left shift of negative value -1 Fixes: 39223/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5498831521841152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: GEM Raster image decoderPeter Ross2021-10-08
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/hevcdec: set the film grain property if presentLimin Wang2021-10-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/apedec: Use 64bit to avoid overflowMichael Niedermayer2021-10-07
| | | | | | | | Fixes: runtime error: signed integer overflow: 727298502 * 3 cannot be represented in type 'int' Fixes: 39172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-638602483033702 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()Michael Niedermayer2021-10-07
| | | | | | | | Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int' Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/amr_parser: Treat 0 channels as 1Michael Niedermayer2021-10-07
| | | | | | | | | Fixes: division by 0 Fixes: 39562/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-5448834960982016 Fixes: 39589/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-6119205334810624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aliaspixenc: Remove redundant counterAndreas Rheinhardt2021-10-07
| | | | | | Improves performance by 33.8% for BGR24 and by 26.4% for GRAY8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rasc: Fix potential use of uninitialized valueAndreas Rheinhardt2021-10-07
| | | | | | Fixes Coverity issue #1439566. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wmaprodec: Do not initialize unused variable to out of array valueMichael Niedermayer2021-10-05
| | | | | | | | | Fixes: out of array read Fixes: 39452/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-4678745030524928.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/amrnbdec: move channel_size bellow to avoid array overreadsPaul B Mahol2021-10-03
|
* avcodec/mlpdec: skip decoding substreams if their channels are not to be usedPaul B Mahol2021-10-03
|
* avcodec/mlpdec: update matrix encoding only if it changedPaul B Mahol2021-10-03
|
* avcodec/amr*dec: reindentPaul B Mahol2021-10-03
|
* avcodec/amr*dec: add multichannel supportPaul B Mahol2021-10-03
|
* avcodec: add amr parserPaul B Mahol2021-10-02
|
* avcodec/vc1_pred: Remove unused function parameterAndreas Rheinhardt2021-10-02
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegaudiodec_template: Remove unused variableAndreas Rheinhardt2021-10-02
| | | | | | | Unused since 9ab0874ea8b6774c6f5470dba2b5b4615a610d0d. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/bmpenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dnxhdenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dpxenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresenc_anatoliy: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>