Michael Niedermayer
d8ea7a67ba
avcodec/vqavideo: reset accounting on error
...
Fixes: Timeout (same growing chunk is decoded to failure repeatedly)
Fixes: 42582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6531195591065600
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 15:22:06 +01:00
Hao Chen
60ead5cd68
avcodec: [loongarch] Optimize vc1dsp with LASX.
...
./ffmpeg -i 11_wmv3_720p_24fps_7Mbps.wmv -f rawvideo -y /dev/null -an
before:131fps
after :229fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 12:28:54 +01:00
Jin Bo
fea299f876
avcodec: [loongarch] Optimize vp9_lpf/idct with LSX.
...
ffmpeg -i ../10_vp9_1080p_30fps_3Mbps.webm -f rawvideo -y /dev/null -an
before:294fps
after :567fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 12:28:54 +01:00
Hao Chen
2fd914e079
avcodec: [loongarch] Optimize vp9_mc/intra with LSX.
...
ffmpeg -i ../10_vp9_1080p_30fps_3Mbps.webm -f rawvideo -y /dev/null -an
before:170fps
after :294fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 12:28:54 +01:00
yuanhecai
72bcbe216e
avcodec: [loongarch] Optimize vp8_lpf/mc with LSX.
...
./ffmpeg -i ../9_vp8_1080p_30fps_2Mbps.webm -f rawvideo -y /dev/null -an
before: 210fps
after : 585fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 12:28:54 +01:00
Zhong Li
7e4747ec50
lavc/qsvenc: enable lookahead for hevc encoding
...
Update version based on the patch:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20211009015949.1510-1-haihao.xiang@intel.com/
Signed-off-by: Daniel Socek <daniel.socek@intel.com >
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com >
Signed-off-by: Zhong Li <zhongli_dev@126.com >
2021-12-23 15:49:07 +08:00
Zhong Li
0598b38e93
lavc/qsvenc: specify codec name when print profile
...
It is more clear and easily to detect the issues similar to commit
3857ecbe70
Signed-off-by: Zhong Li <zhongli_dev@126.com >
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com >
2021-12-23 15:49:07 +08:00
rcombs
4778ab2b1f
lavc/videotoolboxenc: explicitly set realtime=false
...
On some encoders, this defaults to true, which can result in encode speed
being _limited_ to only slightly above realtime (as a power-saving measure),
so we need a way to disable it.
2021-12-22 18:43:34 -06:00
rcombs
802c051506
libavcodec/videotoolboxenc: use the correct types for options
...
These are all set by AV_OPT_TYPE_INT or AV_OPT_TYPE_BOOL; the only reason
they worked before was that this is only used on little-endian.
2021-12-22 18:43:34 -06:00
rcombs
b04601ed6a
lavc/videotoolbox: set attachments on decoded buffers
...
VideoToolbox internally sets all the colorspace parameters to BT709,
regardless of what the bitstream actually indicates, so we need to
replace that with what we've parsed.
2021-12-22 18:43:34 -06:00
rcombs
9a890e49b6
lavc/proresdec: fix threaded hwaccel decode
2021-12-22 18:38:40 -06:00
rcombs
18192166e7
lavc/videotoolboxenc: add ProRes support
2021-12-22 18:38:40 -06:00
rcombs
310a1c25e8
lavc/Makefile: fix missing hevc_videotoolbox case
2021-12-22 18:38:40 -06:00
rcombs
2bb5edc38c
lavc/videotoolboxenc: add handling for non-NAL-based codecs
2021-12-22 18:38:40 -06:00
rcombs
30539394bb
lavc/videotoolboxenc: vastly simplify get_cv_pixel_info
...
No longer requires per-format switch cases.
The frame==0 path was unused (and would've crashed anyway).
2021-12-22 18:38:40 -06:00
rcombs
c8323350f4
lavc/videotoolboxenc: config-gate ATSC CC support
2021-12-22 18:38:40 -06:00
rcombs
7644c6224f
lavc/videotoolboxenc: fix RGB support
2021-12-22 18:38:40 -06:00
rcombs
e55db79612
lavc/videotoolboxenc: detect alpha more generically
...
Fixes support for alpha in hardware input frames
2021-12-22 18:38:40 -06:00
rcombs
2acb13cb93
lavc/videotoolboxenc: don't access int64_t member as int
2021-12-22 18:38:40 -06:00
rcombs
028a6ed1a1
lavc/videotoolboxenc: use common routine for pixfmt conversion
2021-12-22 18:38:40 -06:00
Limin Wang
2ac8bcec63
avcodec/v210enc: suppport frame thread for v210
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-12-22 09:27:30 +08:00
Limin Wang
8ecd7cdb46
avcodec/rawenc: suppport frame thread for rawvideo
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-12-22 09:27:30 +08:00
Andreas Rheinhardt
155dcfe2e2
avcodec/libx264: Don't unnecessarily add in-band extradata
...
The check here is meant to check for whether avcintra-class option
(default value -1) has been set; yet it checks for the x264_param_t
value where 0 is the default value (treated as "no avcintra-mode"
by x264). This meant that in-band extradata has been added unnecessarily
when using global headers; furthermore, the first output packet
had two x264 SEIs.
Reviewed-by: Limin Wang <lance.lmwang@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-21 08:35:05 +01:00
Haihao Xiang
bbe9faa01c
lavc/qsvenc: dump parameters for mjpeg encoding in verbose mode
...
Signed-off-by: Zhong Li <zhongli_dev@126.com >
2021-12-19 22:25:31 +08:00
Haihao Xiang
45801af11f
lavc/qsvenc: dump parameters for VP9 encoding in verbose mode
...
Signed-off-by: Zhong Li <zhongli_dev@126.com >
2021-12-19 22:16:39 +08:00
Haihao Xiang
2544f709ba
lavc/qsvenc: add VP9 profiles
...
Signed-off-by: Zhong Li <zhongli_dev@126.com >
2021-12-19 22:16:21 +08:00
Haihao Xiang
50c38e1a44
lavc/qsvenc: define profile array per codec
...
The SDK defines HEVC, VP9 and AV1 profiles in the same values
e.g.
MFX_PROFILE_HEVC_MAIN =1,
MFX_PROFILE_VP9_0 =1,
MFX_PROFILE_AV1_MAIN =1,
To avoid potential errors when adding VP9, AV1 profiles later,
this patch defines profile array per codec.
Signed-off-by: Zhong Li <zhongli_dev@126.com >
2021-12-19 22:14:51 +08:00
Haihao Xiang
3857ecbe70
lavc/qsvenc: remove VC1 profiles
...
The SDK doesn't support VC1 encoding. In addition, both
MFX_PROFILE_VC1_SIMPLE and MFX_PROFILE_HEVC_MAIN are 1 in the SDK, HEVC
main profile is recognized as simple profile in the verbose output if
don't remove VC1 profiles.
$ ffmpeg -v verbose -qsv_device /dev/dri/renderD129 -f lavfi -i
yuvtestsrc -c:v hevc_qsv -f null -
[hevc_qsv @ 0x55bdf7eb4eb0] profile: simple; level: 21
Signed-off-by: Zhong Li <zhongli_dev@126.com >
2021-12-19 22:13:58 +08:00
Andreas Rheinhardt
98f87c3d29
avcodec/ffv1dec: Don't copy unused field
...
The decoder always uses AVCodecContext.bits_per_raw_sample.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-19 01:18:47 +01:00
Andreas Rheinhardt
485121b92c
avcodec/ffv1, ffv1dec: Add const where appropriate
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-19 01:18:07 +01:00
Andreas Rheinhardt
17605d1a4a
avcodec/ffv1dec: Remove redundant writes, fix races
...
Every modification of the data that is copied in update_thread_context()
is a data race if it happens after ff_thread_finish_setup. ffv1dec's
update_thread_context() simply uses memcpy for updating the new context,
so that every modification of the src's context is a race.
Some of these modifications are unnecessary: picture_number is write-only
for the decoder and cur will be reset when decoding the next frame anyway.
So remove them. And while just at it, also don't set cur for the slice
contexts as this variable is write-only.
Reviewed-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-19 01:14:39 +01:00
Andreas Rheinhardt
69a45b8a49
avcodec/Makefile: Remove superfluous avformat->DNXHD dependencies
...
There is no mxfenc dependency any more since commit
b9a26b9d55 .
Also remove a dnxhddata.h inclusion in mxfenc that was forgotten
in the very same commit.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-19 00:46:16 +01:00
Paul B Mahol
a8a7c5d502
avcodec/thd: fix special stereo support
2021-12-18 10:20:24 +01:00
Paul B Mahol
8718f8cfaf
avcodec/cdgraphics: fix transparency handling
2021-12-18 10:20:24 +01:00
Paul B Mahol
1c49d74fad
avcodec/cdgraphics: unbreak rendering of vertical scrolling
2021-12-18 10:20:24 +01:00
Michael Niedermayer
68457c1e85
avcodec/alacdsp: fix integer overflow in decorrelate_stereo()
...
Fixes: signed integer overflow: -16777216 * 131 cannot be represented in type 'int'
Fixes: 23835/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5669943160078336
Fixes: 41101/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-4636330705944576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-17 16:15:20 +01:00
Anton Khirnov
b780b6db64
lavc/encode: set frame_number for encoders using receive_packet()
...
It is currently set in encode_simple_internal(), which is only called
for encoders using the "simple" encoding API.
2021-12-17 10:24:34 +01:00
Anton Khirnov
67aceaf4ad
lavc/encode: improve the empty frame check
...
Test for buf[0] rather than data[0] (which is broken for some hwaccel
formats).
2021-12-17 10:24:28 +01:00
Andreas Rheinhardt
3c9778d342
avcodec/mpegvideo_enc: Reindent after the previous commit
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
a595717d21
avcodec/mpegvideo_enc: Remove some impossible branches
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
9f906f3114
avcodec/mpegvideo_enc: Combine some checks
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
090cd1394f
avcodec/mpegvideo: Reindentation
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
f860dfe555
avcodec/h263: Remove declaration of inexistent function
...
Forgotten in c46eeae2a8 .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
9088cc6df9
avcodec/mpegvideo: Allocate several buffers jointly
...
Reduces the amount of allocations and frees.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
2ac3e32802
avcodec/mpegvideo: Don't allocate encoder-only buffers when decoding
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:52 +01:00
Andreas Rheinhardt
b72723d415
avcodec/mpegvideo_enc, vc1dec: Remove always-false check
...
Mpeg1EncContext.droppable is only nonzero for the FLV decoder.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 02:54:45 +01:00
Andreas Rheinhardt
0abdf63ae7
avcodec/mpegvideo: Don't update encoder-only fields for decoders
...
ff_mpeg_update_thread_context() is only used by decoders.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 01:53:50 +01:00
Andreas Rheinhardt
81c6b8ffe8
avcodec/mpegvideo: Move closed_gop to Mpeg1Context
...
Only used there and only by the main thread.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-17 01:53:50 +01:00
Michael Niedermayer
8e96410e1b
avcodec/speexdec: Avoid violating the vector_fmul_scalar() API
...
Fixes: out of array access
Fixes: 40054/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-6713285764841472
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-16 22:31:13 +01:00
Andreas Rheinhardt
0ab5d7e92b
avcodec/tests: Update .gitignore file
...
Forgotten in 136865413c .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-12-16 12:25:55 +01:00