Andreas Rheinhardt
a247ac640d
avcodec: Constify AVCodecs
...
Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Andreas Rheinhardt
14be39e44a
avcodec/ivi: Make initializing VLCs thread-safe
...
This automatically makes indeo4/5 init-threadsafe.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Michael Niedermayer
7592e88bfe
avcodec/indeo4: Check dimensions in decode_pic_hdr()
...
Fixes: Timeout
Fixes: 9654/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-6289863463665664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
267ba2aa96
avcodec/indeo4: Check for end of bitstream in decode_mb_info()
...
Fixes: Timeout
Fixes: 8776/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5361788798369792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
10c8521265
indeo4: Decode all or nothing of a band header.
...
This avoids inconsistent value combinations.
Alternatively it would be possible to add more checks and careful use of
temporary variables, but my try of this quickly seemed to become
a rather large change.
The disadvantage of this, is that the struct is copied back and forth.
Fixes: index 6 out of bounds for type 'const uint16_t [5][16]'
Fixes: 6557/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-4787296550256640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
a824685140
avcodec/ivi: Use av_image_check_size2()
...
Fixes OOM
Fixes: 1514/clusterfuzz-testcase-minimized-6437666243477504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
a3b5b60bdf
avcodec/indeo4: Check remaining data in Pic hdr extension parsing code
...
Fixes: Timeout
Fixes: 2115/clusterfuzz-testcase-minimized-6594111748440064
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Luca Barbato
73fc82f343
vlc: Add header #include when the types are used
...
Do not rely on indirectly including it from bitstream.h.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Alexandra Hájková
c3defda0d8
indeo: Convert to the new bitstream reader
8 years ago
Diego Biurrun
b668662939
get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
...
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.
Also sort headers into canonical order where appropriate.
9 years ago
Vittorio Giovara
64250d94b7
indeo4: Consistently initialize variables
...
Avoid using multiple variables for the same purpose.
9 years ago
Vittorio Giovara
6202e2fede
indeo4: Rework stream analysis report
...
* Change log level from error to debug
* Print report after the first decoded frame, not at the end of decoding
* Drop macro guard and use a context variable instead
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Diego Biurrun
23944d29a2
indeo: Give Indeo4/5 shared code a more consistent name
10 years ago
Dirk Ausserhaus
5ec6d152e2
indeo4: B-frames decoding
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Dirk Ausserhaus
e121ac634b
indeo45: use is_indeo4 context flag instead of checking codec ID
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Dirk Ausserhaus
f76e3669bb
Decode both parts of Indeo4 IP frames
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Dirk Ausserhaus
3df0d20028
Move Indeo4 frametypes into common header.
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Dirk Ausserhaus
8bfb4d72dd
avcodec/indeo4: Decode both parts of IP frames
...
Fixes part of Ticket845
av_frame_move_ref() idea by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Dirk Ausserhaus
d24673a2c8
avcodec/indeo4: Move frametypes into common header.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c3d5cd1ebf
Revert "Merge remote-tracking branch 'qatar/master'" ( 43dec5ef9a
)
...
Fixes out of array accesses
Fixes asan_static-oob_eb9812_5961_iv41.avi
This reverts the merge of c9ef6b0932
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11 years ago
Luca Barbato
c9ef6b0932
indeo4: Check the inherited quant_mat
...
Invalidate it if not supported.
Sample-Id: 00000262-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Luca Barbato
0cb83c5638
indeo4: Check the block size if reusing the band configuration
...
Sample-Id: 00000287-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Thilo Borgmann
d814a839ac
Reinstate proper FFmpeg license for all files.
11 years ago
Luca Barbato
28dda8a691
indeo: Sanitize ff_ivi_init_planes fail paths
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Michael Niedermayer
febbddbdd5
indeo4: print an error message if ref_mb is needed but unavailable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
76d0a6656b
indeo: print errors if transform and block size mismatch
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
dc79685195
indeo: Bound-check before applying transform
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
cd78e934c2
indeo4: Validate scantable dimension
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
6255ccf7d5
indeo4: Check the quantization matrix index
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
8435bca087
indeo4: Do not access missing reference MV
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Kostya Shishkov
2cf5d29110
indeo4: reuse context block VLC for band instead of defaulting
...
Currently if no custom block VLC is specified for band, a default block VLC
will be used, while the global block VLC stored in the context should be used
instead.
This fixes decoding of one sample I have.
12 years ago
Kostya Shishkov
6647aa0426
indeo4: add missing Haar and slanted transforms
...
That involves fixing INV_HAAR4() macro and changing it to work with different
input and output like INV_HAAR8() instead of in-place transform.
12 years ago
Michael Niedermayer
de9fbf3dc4
indeo4: implement haar 8x1 and 1x8 transforms
...
Fixes Ticket1984
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Michael Niedermayer
66daebc9d5
indeo4: check for invalid transform_size blk_size combinations
...
The checks existing previously where not sufficient
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7ab690bf5f
indeo4: more complete check for the scan vs block sizes.
...
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
f174fbac3c
lavc: add CODEC_CAP_DR1 to all video decoders missing them
12 years ago
Michael Niedermayer
23b203014f
indeo4: prevent printing uninitialized variable
...
Fixes CID703822
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Kostya Shishkov
e1a3fa5d3a
indeo4: handle frame type 1 properly
...
It turns out that this frame type is actually intra and should be used as
a reference for interframes too.
13 years ago
Kostya Shishkov
aa372cf470
factor out common decoding code for Indeo 4 and Indeo 5
13 years ago
Michael Niedermayer
2954574126
indeo4: check quant_mat more fully.
...
quant_mats valid range depends on the block size.
This fixes a global array overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
884efd4e09
indeo4: avoid storing invalid values in quant_mat.
...
Fixes a global array overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0846719dd1
indeo4: check transform size.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
01bf2ad735
indeo4: setup width/height properly.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago