e4289cb253
avcodec/error_resilience: Use a symmetric check for skipping MV estimation
...
This speeds up the testcase by a factor of 4
Fixes: Timeout
Fixes: 13100/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5767533905313792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-02-25 18:03:24 +01:00
bd27a9364c
avcodec/mpeg4videodec: Remove use of FF_PROFILE_MPEG4_SIMPLE_STUDIO as indicator of studio profile
...
The profile field is changed by code inside and outside the decoder,
its not a reliable indicator of the internal codec state.
Maintaining it consistency with studio_profile is messy.
Its easier to just avoid it and use only studio_profile
Fixes: assertion failure
Fixes: ffmpeg_crash_9.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-07-04 12:11:36 +02:00
1c97035e3b
avcodec/error_resilience: Fix integer overflow in filter181()
...
Fixes: runtime error: signed integer overflow: 197710 * 10923 cannot be represented in type 'int'
Fixes: 7010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5667127596941312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-04-25 23:09:47 +02:00
f9d3841ae6
mpeg4video: Add support for MPEG-4 Simple Studio Profile.
...
This is a profile supporting > 8-bit video and has a higher quality DCT
2018-04-02 13:06:23 +01:00
dcbf034a0f
avcodec/error_resilience: remove unused header
...
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-05 14:04:02 -03:00
3701d499f8
error_resilience: remove avpriv_atomic usage
...
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com >
2017-11-26 02:17:23 +00:00
c68a3ab96e
Merge commit '7b917041184874e7d7cba4450813de7e0bb28a33'
...
* commit '7b917041184874e7d7cba4450813de7e0bb28a33':
lavc: Drop deprecated VDPAU codec capability
Merged-by: James Almer <jamrial@gmail.com >
2017-10-21 23:40:03 -03:00
d36a423445
Merge commit '6b52762951fa138eef59e2628dabb389e0500e40'
...
* commit '6b52762951fa138eef59e2628dabb389e0500e40':
error_resilience: Change type of array stride parameters to ptrdiff_t
Merged-by: Clément Bœsch <u@pkh.me >
2017-03-20 11:10:46 +01:00
8365c1a15c
avcodec/error_resilience: Fix "assignment from incompatible pointer type" warning
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-02-16 13:20:27 +01:00
aecdb14ad9
lavc/error_resilience: Remove two unused variables.
2017-02-01 17:51:59 +01:00
a0341b4d74
avcodec/error_resilience: update indention after last commit
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-22 21:43:06 +01:00
d9d9fd9446
avcodec/error_resilience: Optimize motion recovery code by using blcok lists
...
This makes the code 7 times faster with the testcase from libfuzzer
and should reduce the amount of timeouts we hit in automated fuzzing.
(for example 438/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_RV40_fuzzer)
The code is also faster with more realistic input though the difference
is small here as that is far from the worst cases the fuzzers pick out
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-22 21:39:43 +01:00
6e26b6e43f
avcodec/error_resilience: Move variable initialization down, remove unneeded inits
...
This makes the code faster and easier to read
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-25 22:58:52 +01:00
d5ecffbac6
avcodec/error_resilience: Merge surrounding status checks
...
Simplifies code and is also faster
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-25 21:04:32 +01:00
cafc72bd7b
avcodec/error_resilience: Factor block parity check out
...
This makes the code noticably faster when there are lots of blocks
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-25 21:04:32 +01:00
6b52762951
error_resilience: Change type of array stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
2016-09-07 11:30:17 +02:00
0491d6993a
lavc/error_resilience: remove unused skip_last_mv label
...
Unused since a7b8a6e704
2016-06-22 11:07:54 +02:00
8ef57a0d61
Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
...
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
cosmetics: Fix spelling mistakes
Merged-by: Clément Bœsch <u@pkh.me >
2016-06-21 21:55:34 +02:00
763d69bfb2
Add some more deprecation guards
...
Avoids unused function/label/variable warnings after the next version bump.
2016-05-11 12:22:49 +02:00
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2016-05-04 18:16:21 +02:00
df820af2c5
avcodec/error_resilience: Improve missing slice handling for mpeg2
...
Fixes: m702_2.avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-05-03 01:07:24 +02:00
a7b8a6e704
avcodec/error_resilience: remove unneeded and disabled code
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-03-18 03:11:16 +01:00
5694b28211
avcodec/error_resilience: wait for previous frame to be available
...
This is possibly redundant but its more correct
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-03-18 03:10:16 +01:00
a105f52855
avcodec/error_resilience: avoid accessing previous or next frames tables beyond height
...
The height of tables can be rounded up for MBAFF but this does not imply that is also true
for the previous frames
Fixes out of array reads
Fixes: c106b36fa36db8ff8f3ed0c82be7bea2/asan_heap-oob_32699f0_6321_467b9a1d7e03d7cfd310b7e65dc53bcc.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-11-14 22:51:30 +01:00
030b5a4f77
lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.
2015-08-18 15:57:19 -04:00
444e9874a7
Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
...
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
lavc: AV-prefix all codec capabilities
Conflicts:
cmdutils.c
ffmpeg.c
ffplay.c
libavcodec/8svx.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/adpcm.c
libavcodec/alac.c
libavcodec/atrac3plusdec.c
libavcodec/bink.c
libavcodec/dnxhddec.c
libavcodec/dvdec.c
libavcodec/dvenc.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/fic.c
libavcodec/flacdec.c
libavcodec/flacenc.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/hevc.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopenjpegdec.c
libavcodec/libvo-aacenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpegaudiodec_float.c
libavcodec/msmpeg4dec.c
libavcodec/mxpegdec.c
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
libavcodec/pngdec.c
libavcodec/qpeg.c
libavcodec/ra288.c
libavcodec/rv10.c
libavcodec/s302m.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tiff.c
libavcodec/tta.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/vp9.c
libavcodec/wavpack.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc >
2015-07-27 22:50:18 +02:00
5c8809b45b
avcodec/error_resilience: support grayscale
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-09 02:42:47 +02:00
cf880ccb6a
avcodec/error_resilience: Avoid race with updating the error_count
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-04-05 13:32:09 +02:00
dd186b5825
avcodec/error_resilience: Fix mbskip_table==NULL codepath
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-03-21 19:24:03 +01:00
b37b0a58e3
Merge commit '5bc69f38c1af71fbcbfb4b5efa77d0aeb5424c04'
...
* commit '5bc69f38c1af71fbcbfb4b5efa77d0aeb5424c04':
error_resilience: do not require mbintra/skip tables
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-03-21 19:03:10 +01:00
5bc69f38c1
error_resilience: do not require mbintra/skip tables
...
h264dec does not use them at all and only allocates them for ER.
2015-03-21 11:27:15 +01:00
3d04117078
Merge commit 'cf1e0786ed64e69614760bfb4ecd7adbde8e6094'
...
* commit 'cf1e0786ed64e69614760bfb4ecd7adbde8e6094':
error_resilience: move the MECmpContext initialization into ER code
Conflicts:
libavcodec/error_resilience.c
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-01-27 14:56:52 +01:00
cf1e0786ed
error_resilience: move the MECmpContext initialization into ER code
...
Currently, it needs to be initialized by the ER caller (which is
currently either a mpegvideo decoder or h264dec). However, since none of
those decoders use MECmpContext for anything except ER, it makes more
sense to handle it purely inside ER.
2015-01-27 09:07:59 +01:00
8b13a4d6f0
avcodec/error_resilience: Remove special case for H.264 from is_intra_more_likely
...
This should not be needed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-01-11 17:30:02 +01:00
e1bcbca998
Merge commit 'c442190a6bfd8036f6c32b78e1e96ff3b830f8f0'
...
* commit 'c442190a6bfd8036f6c32b78e1e96ff3b830f8f0':
error_resilience: initialize prev_* variables
Note, these variables are not used without initialization prior
to the change
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-11-04 21:28:48 +01:00
c442190a6b
error_resilience: initialize prev_* variables
...
CC: libav-stable@libav.org
Bug-Id: CID 732293 / CID 732294
2014-11-03 12:45:09 -05:00
20df02680c
avcodec/error_resilience: avoid pointer arithmetic with NULL
...
move the code after the existing NULL check
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-10-12 04:49:08 +02:00
7cb66ebc0b
error_resilience: Drop asserts from guess_mv()
...
The asserts check struct members that are not referenced in guess_mv()
and one of them fails to compile.
2014-08-21 04:18:23 -07:00
c103c48525
avcodec/error_resilience: make error an local variable where possible
...
This makes the code easier to understand as the scope of the variable is
smaller.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-02 22:04:08 +02:00
459996325d
avcodec/error_resilience: comment out unused assignment
...
Its not removed as the code which uses this is out-commented too.
Found-by: CSA
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-02 22:01:59 +02:00
3a2d1465c8
Merge commit '2d60444331fca1910510038dd3817bea885c2367'
...
* commit '2d60444331fca1910510038dd3817bea885c2367':
dsputil: Split motion estimation compare bits off into their own context
Conflicts:
configure
libavcodec/Makefile
libavcodec/arm/Makefile
libavcodec/dvenc.c
libavcodec/error_resilience.c
libavcodec/h264.h
libavcodec/h264_slice.c
libavcodec/me_cmp.c
libavcodec/me_cmp.h
libavcodec/motion_est.c
libavcodec/motion_est_template.c
libavcodec/mpeg4videoenc.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/x86/Makefile
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-07-17 23:27:40 +02:00
2d60444331
dsputil: Split motion estimation compare bits off into their own context
2014-07-17 09:07:10 -07:00
81d1fcf37d
avcodec: add option to make is_intra_more_likely() from error concealment return "no"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-05-12 22:55:39 +02:00
36053aeff6
vcodec/error_resilience: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-04-12 15:33:55 +02:00
c829b35c08
lavc: er: remove unused variable size
...
The code using it was removed in d66e305bd1
.
2014-03-18 13:07:52 +01:00
9517900bef
Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'
...
* commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b':
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
Conflicts:
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_mvpred.h
libavcodec/svq1enc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-03-17 12:36:48 +01:00
4f22e39e65
avcodec/error_resilience: fix the case when MVs are not available
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-03-17 05:36:17 +01:00
533bc4c0a3
Merge commit 'd66e305bd1b4f3e91ae4e7e549148509d0811672'
...
* commit 'd66e305bd1b4f3e91ae4e7e549148509d0811672':
er: move relevant fields from Picture to ERPicture
Conflicts:
libavcodec/error_resilience.c
libavcodec/h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-03-17 05:08:46 +01:00
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
2014-03-16 23:04:41 +01:00
d66e305bd1
er: move relevant fields from Picture to ERPicture
...
This is done to disentangle ER from mpegvideo. In order to use a
classic Picture, callers can use ff_mpeg_set_erpic() or use a custom function
to set the fields. Please note that buffers need to be allocated before
calling ff_er_frame_end().
2014-03-16 23:01:00 +01:00