Michael Niedermayer
c49fa2a514
avcodec/dds: Fix runtime error: left shift of 145 by 24 places cannot be represented in type 'int'
...
Fixes: 1891/clusterfuzz-testcase-minimized-6274417925554176
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
afb4632cc3
avcodec/dds: Fix runtime error: left shift of 210 by 24 places cannot be represented in type 'int'
...
Fixes: 1510/clusterfuzz-testcase-minimized-5826231746428928
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
8a8335de03
avcodec/dds: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
...
Fixes: 1380/clusterfuzz-testcase-minimized-650122545122508
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
Clément Bœsch
67e370ee52
lavc: fix usages of av_get_codec_tag_string()
8 years ago
Andreas Cadhalpun
90ebf3c428
dds: limit 4 bpp handling to AV_PIX_FMT_PAL8
...
This fixes NULL pointer dereferencing for formats, where frame->data[1]
is not allocated.
The problem was introduced in commit
257fbc3af4
.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Paul B Mahol
257fbc3af4
avcodec/dds: add support for 4bpp format
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Vittorio Giovara
4b2e69397b
dds: Add support for monochrome images
9 years ago
Vittorio Giovara
6eb2505855
dds: Drop gray-alpha swapping
...
The original sample was generated with invalid software.
9 years ago
Carl Eugen Hoyos
139cbeb75e
lavc/dds: Fix GRAY8A decoding.
...
Fixes ticket #4667 .
9 years ago
Vittorio Giovara
22e49e6ede
dds: Simplify postprocessing check
9 years ago
Vittorio Giovara
0253863626
dds: Add support for alpha-only files
...
Due to how pixel format conversion is done, they behave the same way
as gray files.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
9a9fb710bc
dds: Add support for rgb555 files
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Ganesh Ajjanagadde
5979c740f5
lavc/dds: replace rint by lrint
...
avoids float to int cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Andreas Cadhalpun
603ebab8d7
dds: disable palette flag for compressed dds
...
Having both is not valid and can cause a NULL pointer dereference of
frame->data[1] later.
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
0a8bff788b
dds: disable palette flag for compressed images
...
Having both is not valid and can cause a NULL pointer dereference of
frame->data[1] later.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Andreas Cadhalpun
7b2211bfc4
dds: add missing newline to log messages
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
29b1752861
dds: validate compressed source buffer size
...
A too small buffer will cause segfaults somewhere below
decompress_texture_thread.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
e6459c655e
dds: validate source buffer size before copying
...
If it is too small av_image_copy_plane segfaults.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
edd0c1d78a
dds: add missing newline to log messages
...
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
9a37d47644
dds: validate compressed source buffer size
...
A too small buffer will cause segfaults somewhere below
decompress_texture_thread.
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
1675809d2d
dds: validate source buffer size before copying
...
If it is too small av_image_copy_plane segfaults.
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.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
Martin Storsjö
44f7df0c98
dds: Write the palette in the native endian form
...
This fixes the palette on big endian, broken (or, differing from
little endian) since 57214b2f7
.
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years ago
Tom Butterworth
ebe8b5d947
dds: Fix the slice size computation
...
A bug was introduced in 6b2b26e7af
whereby when
frame height wasn't divisible by the number of threads, pixels would be omitted
from the bottom rows during decode.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Michael Niedermayer
d08d8b61aa
dds: Fix 32bpp bitmaps decoding
...
Found-By: ami_stuff
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
57214b2f7f
dds: Fix palette decoding
...
Red and blue channels were decoded in the wrong order.
Found-By: ami_stuff
9 years ago
Vittorio Giovara
ea4d46e729
dds: Fix enum declaration
...
Drop the global variables with anonymous enum type.
9 years ago
Luca Barbato
6b2b26e7af
dds: Decode using optimal slices sizes
...
Enjoy some cache locality and use less threads.
About the same speedup provided to HAP.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Michael Niedermayer
5c583b1419
avcodec/dds: Flip more R<->B cases
...
Fixes Ticket4665
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
36a87c2dc7
avcodec/dds: fix paletted files
...
Fixes Ticket4664
The changed fate tests lack red/blue shades and thus look correct
either way
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Luca Barbato
4d55484391
dds: Fix palette mode on big endian
...
Found-By: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
21d2e3d602
avcodec/dds: Fix palettes on big endian
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
5c018ee188
DirectDraw Surface image decoder
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago