Michael Niedermayer
63b8d4146d
avcodec/bmp: Use ff_set_dimensions()
...
Fixes out of memory
Fixes: 1282/clusterfuzz-testcase-minimized-5400131681648640
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
549045254c
Fix all -Wformat warnings raised by DJGPP
8 years ago
Michael Niedermayer
0c42d0add3
avcodec/bmp: Fix runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
...
There is code checking height and width later, leaving an invalid value invalid
is thus fine.
Fixes: 635/clusterfuzz-testcase-6225161437052928
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
Diego Biurrun
67deba8a41
Use avpriv_report_missing_feature() where appropriate
8 years ago
Vittorio Giovara
3496cec433
msrle: Use AVFrame instead of AVPicture
...
Callers always use a frame and cast it to AVPicture, change
ff_msrle_decode() to accept an AVFrame directly instead.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
aec340c533
avcodec/bmp: Analyze BGRA files alpha channel to choose pixel format
...
BGRA BMPs commonly do contain an all transparent alpha channel
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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
Reimar Döffinger
d96090e7b6
Support BMP files that do not properly align lines.
...
Quite a few programs missed that detail of the spec
(including old versions of FFmpeg I believe) and when
we would otherwise fail anyway it seems worth a try
to use a simple byte-aligned stride instead.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Carl Eugen Hoyos
810294ce3d
Use os/2 palette even if it contains less than 256 entries.
...
Fixes 11Bios13.bmp.
11 years ago
Carl Eugen Hoyos
8f6a04a279
Assume that old bmps do not contain transparency information.
...
Fixes MK50TEMP.BMP that has its RGB channel bit masks on the actual image.
11 years ago
Michael Niedermayer
bd8b6ed96d
avcodec/bmp: fix integer overflow in checking header sizes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Piotr Bandurski
5f39992ed9
bmp: fix decoding of flipped rle4
...
Fixes ticket #2794
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Timothy Gu
a9bbf59be7
cosmetics: Fix "dont" "wont" "doesnt" typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
5270cb39ba
bmp: Fix warning X may be used uninitialized in this function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
633f997479
bmp: check available space when reading palette
...
Fixes out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
abcc235481
bmp: return meaningful error codes.
12 years ago
Anton Khirnov
3eab600752
bmp: cosmetics, reformat
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Michael Niedermayer
2fed05f53a
avoid more "0xFF << 24" as it is considered a integer overflow in C99
...
missed these in my previous search and replace
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
313b40efbd
bmp: unbreak non BMP_RGB compression for v4 and v5
...
Fixes CID733728 & CID733729.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
8b78c2969a
bmpdec: only initialize palette for pal8.
...
Gray8 is not considered to be paletted, so this would cause an invalid
write.
Fixes bug 367.
CC: libav-stable@libav.org
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Ronald Bultje
992f71e95d
msrle: convert MS RLE decoding function to bytestream2.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Paul B Mahol
bd36ec55be
bmpdec: proper check for alpha
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
7c4b397508
bmpdec: support various bitfields for 32 bit depth
...
Fixes #740
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
a6839c4e60
bmpdec: support for rgb444 with bitfields compression
...
Do not display garbage for invalid/unsupported bitfields values.
13 years ago
Paul B Mahol
353a2d2164
bmpdec: support for rgb444 with bitfields compression
...
Do not display garbage for invalid/unsupported bitfields values.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Carl Eugen Hoyos
3a15051aba
Always assume the bmp palette as being opaque.
13 years ago
Carl Eugen Hoyos
6f2054c589
Fix linesize for bmp with bitdepth < 8.
...
Fixes ticket #751 .
13 years ago
Carl Eugen Hoyos
9608e3a182
Support decoding 56 byte BMP Bitmap Information Header.
...
Fixes ticket #719 .
13 years ago
Carl Eugen Hoyos
1e92d58e44
bmp: fix some 1bit samples.
...
<= 8bpp BMP images always have palette.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
ami_stuff
28a11a67d2
BMP: Support BMP OS/2 v2 with RLE compression.
...
Fixes ticket #699 .
Patch also provided by Peter Ross.
13 years ago
Carl Eugen Hoyos
8b08f81949
Support transparency in 32bit bmp files.
13 years ago
Carl Eugen Hoyos
0e609d7418
Fix some 1bit bmp samples, they are palletised.
...
Fixes ticket #632 .
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Stefano Sabatini
ce5e49b0c2
replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*
14 years ago
Stefano Sabatini
975a1447f7
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Baptiste Coudurier
dbfdb288c1
Set alpha of palettes to 0xff.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago