Michael Niedermayer
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>
9 years ago
Ronald S. Bultje
030b5a4f77
lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.
9 years ago
Michael Niedermayer
5c8809b45b
avcodec/error_resilience: support grayscale
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
cf880ccb6a
avcodec/error_resilience: Avoid race with updating the error_count
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
dd186b5825
avcodec/error_resilience: Fix mbskip_table==NULL codepath
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
5bc69f38c1
error_resilience: do not require mbintra/skip tables
...
h264dec does not use them at all and only allocates them for ER.
10 years ago
Anton Khirnov
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.
10 years ago
Michael Niedermayer
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>
10 years ago
Vittorio Giovara
c442190a6b
error_resilience: initialize prev_* variables
...
CC: libav-stable@libav.org
Bug-Id: CID 732293 / CID 732294
10 years ago
Michael Niedermayer
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>
10 years ago
Diego Biurrun
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.
10 years ago
Michael Niedermayer
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>
11 years ago
Michael Niedermayer
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>
11 years ago
Diego Biurrun
2d60444331
dsputil: Split motion estimation compare bits off into their own context
11 years ago
Michael Niedermayer
81d1fcf37d
avcodec: add option to make is_intra_more_likely() from error concealment return "no"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
36053aeff6
vcodec/error_resilience: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Janne Grunau
c829b35c08
lavc: er: remove unused variable size
...
The code using it was removed in d66e305bd1
.
11 years ago
Michael Niedermayer
4f22e39e65
avcodec/error_resilience: fix the case when MVs are not available
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Vittorio Giovara
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().
11 years ago
Diego Biurrun
05563ccacc
dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names
...
Also switch from "tbl" to "tab" name suffixes.
11 years ago
Ivan Kalvachev
1c63aed232
Convert XvMC to hwaccel v3
...
Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
90539cea33
avcodec/error_resilience: check that er is supported before attempting to read the status of the previous slice
...
Fixes incorrectly set error_occured and improves speed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
afb18c5578
avcodec/error_resilience: factor er_supported() check out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
19e30a58fc
Deprecate obsolete XvMC hardware decoding support
...
XvMC has long ago been superseded by newer acceleration APIs, such as
VDPAU, and few downstreams still support it. Furthermore XvMC is not
implemented within the hwaccel framework, but requires its own specific
code in the MPEG-1/2 decoder, which is a maintenance burden.
11 years ago
Anton Khirnov
f354f30836
error resilience: check error_concealment, not err_recognition.
...
err_recognition is supposed to trigger detecting and reporting errors,
not trying to fix them.
11 years ago
Anton Khirnov
346e09638c
avcodec/error_resilience check error_concealment, not err_recognition.
...
err_recognition is supposed to trigger detecting and reporting errors,
not trying to fix them.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
990bbc15b8
avcodec/error_resilience: change out commented printf() to av_log()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7d776062f9
avcodec/error_resilience: Fix handling of matrox mpeg2
...
Fixes Ticket2615
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a0c6c8e53e
Revert "Merge commit of 'vdpau: remove old-style decoders'"
...
This reverts commit bf36dc50ea
, reversing
changes made to b7fc2693c7
.
Conflicts:
libavcodec/h264.c
Keeping support for the old VDPAU API has been requested by our VDPAU maintainer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Rémi Denis-Courmont
578ea75a9e
vdpau: remove old-style decoders
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Martin Storsjö
9e0f14f16c
lavc: Make pointers to ff_cropTbl const
...
There's no point in these pointers not being const.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
21a5f5ea5d
error_resilience: fix const correctness, silence warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d244a615f6
er: set error_occured on missing slices
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
ddcca4ba07
lavc: stop setting AVFrame.motion_subsample_log2
...
It is not used inside lavc anywhere and now it makes no sense to export
it.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
5167bb2e8e
er: Fix slice threading check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Michael Niedermayer
669d50b445
ec: check that reference pictures have matching parameters before using them.
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
54974c6298
error_resilience: decouple ER from MpegEncContext
12 years ago
Michael Niedermayer
b8d6108cfc
error_resilience: assert that unsupported B frame interpolation isnt used with h264
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
c5fcdb4402
error_resilience: remove a useless if() and FIXME
...
pp_time is never set for h264
12 years ago
Michael Niedermayer
23318a5735
error_concealment: Check that the picture is not in a half setup state.
...
Fixes state becoming inconsistent
Fixes a null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e8fed4d331
error concealment: check that references are frames and not fields.
...
frames cant have field references.
Fixes a deadlock
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
9c6cf7f2c9
avcodec: Drop silly and/or broken printf debug output
12 years ago
Michael Niedermayer
16e52c86ba
error_resilience: guess_dc: check malloc failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Michael Niedermayer
2e346bdaba
ec: print picture type with concealment error message.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
89b81a1c88
mpegvideo: remove VLAs
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
24e3f44aed
EC: fix dest index for non 420 chroma.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago