Fei Wang
84c73102d9
avcodec/av1_vaapi: improve decode quality
...
- quantizer delta and matrix level specific.
- support loop filter delta.
- support use superres.
Signed-off-by: Fei Wang <fei.w.wang@intel.com >
2021-10-16 19:00:44 -03:00
Fei Wang
dc94f2eaaf
avcodec/av1_vaapi: enable segmentation features
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com >
2021-10-16 19:00:44 -03:00
Fei Wang
7871144cf8
avcodec/av1_vaapi: setting 2 output surface for film grain
...
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 >
2021-10-16 19:00:44 -03:00
Fei Wang
53403158cc
avcodec/vaapi: increase av1 decode pool size
...
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 >
2021-10-16 19:00:44 -03:00
Tong Wu
4e7a7d75e3
avcodec/dxva2_av1: fix global motion params
...
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 >
2021-10-16 19:00:44 -03:00
Fei Wang
0d0ea70e7b
avcodec/av1_vaapi: add gm params valid check
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com >
2021-10-16 19:00:44 -03:00
Fei Wang
de7475b111
avcodec/av1dec: support setup shear process
...
Defined in spec 7.11.3.6/7.11.3.7.
Signed-off-by: Fei Wang <fei.w.wang@intel.com >
2021-10-16 19:00:44 -03:00
Fei Wang
75de7fe262
avcodec/av1: extend some definitions in spec section 3
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com >
2021-10-16 19:00:44 -03:00
Fei Wang
e7ff5722b1
cbs_av1: fix incorrect data type
...
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 >
2021-10-16 19:00:43 -03:00
Niklas Haas
3cc3f5de2a
avcodec/hevcdec: apply H.274 film grain
...
Similar in spirit and design to 66845cffc3 , 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).
2021-10-15 11:55:45 -03:00
Limin Wang
871fee82e1
avcodec/videotoolboxenc: use goto end for memory cleanup
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-13 20:12:30 +08:00
Limin Wang
f25871d790
avcodec/avs3_parser: Fix usage of init_get_bits() and use init_get_bits8()
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-13 20:12:30 +08:00
Limin Wang
ba03e4ed33
avcodec/audiotoolboxdec: Fix usage of init_get_bits() and use init_get_bits8()
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-13 20:12:30 +08:00
Nachiket Tarate
343c03c61c
libavcodec/adts_header: add frame_length field and avpriv function to parse 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 >
2021-10-13 11:23:37 +08:00
Michael Niedermayer
1902a60dda
avcodec/gemdec: Use ff_set_dimensions()
...
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 >
2021-10-11 20:07:35 +02:00
Michael Niedermayer
17e36fac0b
avcodec/utils: Ensure 8x8 alignment for ARGO in avcodec_align_dimensions2()
...
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 >
2021-10-11 20:07:35 +02:00
Limin Wang
617cf44c8c
avcodec/bitpacked: check av_buffer_ref result
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-11 23:27:08 +08:00
Zhao Zhili
a742ba60f1
libavcodec/speexdec: fix memleak in error path
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-11 15:24:41 +02:00
Paul B Mahol
5133f4c2c1
avcodec/lagarith: return early on error
...
Also return proper error values.
2021-10-10 22:05:54 +02:00
Paul B Mahol
148ada5577
avcodec: add native Speex decoder
2021-10-10 17:44:41 +02:00
Limin Wang
c0d38beac0
avcodec/mpeg12dec: Fix usage of init_get_bits() and use init_get_bits8()
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-09 21:26:21 +08:00
Michael Niedermayer
98aec8c1b8
avcodec/h274: Fix signed left shift
...
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 >
2021-10-09 11:42:16 +02:00
Michael Niedermayer
f054871a65
avcodec/h264_slice: Check idr_pic_id
...
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 >
2021-10-09 11:42:16 +02:00
Peter Ross
60a9d3778f
avcodec: GEM Raster image decoder
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Peter Ross <pross@xvid.org >
2021-10-08 20:37:36 +11:00
Limin Wang
00ec682a70
avcodec/hevcdec: set the film grain property if present
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-08 10:11:59 +08:00
Michael Niedermayer
f059b56195
avcodec/apedec: Use 64bit to avoid overflow
...
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 >
2021-10-07 23:38:57 +02:00
Michael Niedermayer
ad517ee6e4
avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
...
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 >
2021-10-07 23:38:57 +02:00
Michael Niedermayer
cc721fc292
avcodec/amr_parser: Treat 0 channels as 1
...
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 >
2021-10-07 19:37:05 +02:00
Andreas Rheinhardt
5e1b5b52fe
avcodec/aliaspixenc: Remove redundant counter
...
Improves performance by 33.8% for BGR24 and by 26.4% for GRAY8.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-07 11:57:23 +02:00
Andreas Rheinhardt
c9b44a79d1
avcodec/rasc: Fix potential use of uninitialized value
...
Fixes Coverity issue #1439566 .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-07 11:34:20 +02:00
Michael Niedermayer
07e4669053
avcodec/wmaprodec: Do not initialize unused variable to out of array value
...
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 >
2021-10-05 20:06:42 +02:00
Paul B Mahol
a97cad8b0b
avcodec/amrnbdec: move channel_size bellow to avoid array overreads
2021-10-03 12:13:53 +02:00
Paul B Mahol
17130321f3
avcodec/mlpdec: skip decoding substreams if their channels are not to be used
2021-10-03 11:46:53 +02:00
Paul B Mahol
114634a51a
avcodec/mlpdec: update matrix encoding only if it changed
2021-10-03 11:46:53 +02:00
Paul B Mahol
d2cf2cb0bd
avcodec/amr*dec: reindent
2021-10-03 11:42:15 +02:00
Paul B Mahol
f282c34c00
avcodec/amr*dec: add multichannel support
2021-10-03 11:42:15 +02:00
Paul B Mahol
1f447fd954
avcodec: add amr parser
2021-10-02 18:49:40 +02:00
Andreas Rheinhardt
8ae0ef5327
avcodec/vc1_pred: Remove unused function parameter
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 18:35:35 +02:00
Andreas Rheinhardt
98f52efbfa
avcodec/mpegaudiodec_template: Remove unused variable
...
Unused since 9ab0874ea8 .
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 18:35:16 +02:00
Andreas Rheinhardt
a412b5e792
avcodec/bmpenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
eec5a45f05
avcodec/dnxhdenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
30c802f3ae
avcodec/dpxenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
39d28ea4d5
avcodec/magicyuvenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
c10a2959c0
avcodec/proresenc_anatoliy: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
be6da2f252
avcodec/snowenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
4b1aa74de3
avcodec/magicyuvenc: Use immediate when known
...
It allows the compiler to optimize the bytestream2 checks away.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Michael Niedermayer
1ad4782d2a
avcodec/siren: Improve the bits left threshold in decode_envelope()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-29 19:52:10 +02:00
Michael Niedermayer
109113b54f
avcodec/siren: Check available bits in decode_envelope()
...
Fixes: Timeout
Fixes: 39089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSNSIREN_fuzzer-6677219854909440
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-29 19:52:10 +02:00
Andreas Rheinhardt
d619e82e97
avcodec/zmbvenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-29 17:02:03 +02:00
Limin Wang
c5f3143090
avcodec/libsvtav1: properly enforce CQP mode when set in wrapper
...
SVT-AV1 seems to have switched their default from CQP to CRF in February,
so enforce the controlling option accordingly.
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-29 18:01:16 +08:00