Michael Niedermayer
77d9889821
avcodec/pixlet: Fix runtime error: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int'
...
Fixes: 1829/clusterfuzz-testcase-minimized-5527165321871360
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
Michael Niedermayer
d32ebce8fd
avcodec/pixlet: Fix reading invalid numbers of bits
...
Fixes: asertion failure
Fixes: 1664/clusterfuzz-testcase-minimized-6587801187385344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
a453f5549a
avcodec/pixlet: Fixes: runtime error: signed integer overflow: 9203954323419769657 + 29897660706736950 cannot be represented in type 'long'
...
Fixes: 1569/clusterfuzz-testcase-minimized-6328690508038144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
60765cc42e
avcodec/pixlet: Fix runtime error: signed integer overflow: 436207616 * -5160230545260541 cannot be represented in type 'long'
...
Fixes: 1462/clusterfuzz-testcase-minimized-6558894463647744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
1f5b6c7e1e
avcodec/pixlet: Fix shift exponent 4294967268 is too large for 32-bit type 'int'
...
Fixes: 1336/clusterfuzz-testcase-minimized-4761381930795008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
c94d551ea7
avcodec/pixlet: Reorder rlen check
...
This changes nothing but is nicer looking as this checks rlen
Maybe this helps coverity remove CID1397743
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
8 years ago
Vittorio Giovara
a6b1180e39
avcodec/pixlet: fix architecture-dependent code and values
...
The constants used in the decoder used floating point precision,
and this caused different values to be generated on different
architectures.
So, eradicate floating point numbers and use fixed point (32.32)
arithmetics everywhere, replacing constants with precomputed integer
values.
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
0fe50e56e9
avcodec/pixlet: use av_clip_uintp2_c explicitly
...
Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
a340987e37
avcodec/pixlet: use av_clip_uintp2()
...
Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
be46eb7101
avcodec/pixlet: clip chroma before shifting
...
Fixes artifacts.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
25c4035529
avcodec/pixlet: simplify lowpass_prediction() function
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
6cedd20b97
avcodec/pixlet: make sure scaling factors are not zero
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
ab31b46b89
avcodec/pixlet: avoid some overflows
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
43cd33be16
avcodec/pixlet: fix undefined behaviour in postprocess_chroma
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
51ed1a7dd4
avcodec/pixlet: check out of bounds pfx value
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
James Almer
41de965e31
avcodec/pixlet: remove unnecessary double to float conversion
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Paul B Mahol
73651090ca
avcodec: add Apple Pixlet decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago