Michael Niedermayer
8754ccd3b3
avcodec/pixlet: Fixes: undefined shift in av_mod_uintp2()
...
Fixes: runtime error: shift exponent 4294967289 is too large for 32-bit type 'int'
Fixes: 3030/clusterfuzz-testcase-minimized-4649809254285312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-20 21:14:47 +02:00
Michael Niedermayer
cadab5a2a7
avcodec/pixlet: fixes integer overflow in read_highpass()
...
Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 2879/clusterfuzz-testcase-minimized-6317542639403008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-18 11:34:01 +02:00
Michael Niedermayer
aeddb3607b
avcodec/pixlet: Simplify nbits computation
...
Fixes multiple integer overflows
Fixes: runtime error: signed integer overflow: 1 + 2147483647 cannot be represented in type 'int'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-07-28 03:35:22 +02:00
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 >
2017-05-27 13:04:23 +02:00
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 >
2017-05-18 18:08:23 +02:00
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 >
2017-05-14 17:03:30 +02:00
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 >
2017-05-11 00:02:41 +02:00
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 >
2017-05-05 13:36:52 +02:00
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 >
2017-04-10 13:11:15 +02:00
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
2017-03-29 14:49:29 +02:00
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 >
2017-03-07 14:04:01 +01:00
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 >
2017-01-19 13:32:21 +01:00
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 >
2017-01-19 13:19:10 +01:00
Paul B Mahol
be46eb7101
avcodec/pixlet: clip chroma before shifting
...
Fixes artifacts.
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2017-01-19 12:49:41 +01:00
Paul B Mahol
25c4035529
avcodec/pixlet: simplify lowpass_prediction() function
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-12-24 16:42:00 +01:00
Paul B Mahol
6cedd20b97
avcodec/pixlet: make sure scaling factors are not zero
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-12-24 10:31:43 +01:00
Paul B Mahol
ab31b46b89
avcodec/pixlet: avoid some overflows
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-12-24 10:26:27 +01:00
Paul B Mahol
43cd33be16
avcodec/pixlet: fix undefined behaviour in postprocess_chroma
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-12-24 10:22:39 +01:00
Paul B Mahol
51ed1a7dd4
avcodec/pixlet: check out of bounds pfx value
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-12-23 09:41:06 +01:00
James Almer
41de965e31
avcodec/pixlet: remove unnecessary double to float conversion
...
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-23 09:19:34 +01:00
Paul B Mahol
73651090ca
avcodec: add Apple Pixlet decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-12-22 22:47:06 +01:00