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