Michael Niedermayer
4843227b2c
avcodec/iff: ensure that runs with insufficient input dont leave uninitialized bytes in the output
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa0dea15eae_8988_test.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b3f44eafa5
avcodec/iff: warn about truncated input to decode_byterun() and clear remaining output
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fe205e395ed_8988_test.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Anton Khirnov
4b8a194146
iff: use the AVFrame API properly.
11 years ago
Michael Niedermayer
d5ec8ba7f2
Do not leave positive values undefined when negative are defined as error
...
Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Luca Barbato
7d65e960c7
iff: Do not read over the source buffer
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
3865ba7b21
iff: K&R formatting cosmetics
12 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
3b199d29cd
lavc decoders: properly initialize AVFrame.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Piotr Bandurski
f9a8eeb08c
iff/deep: fix rle32 on big-endian
...
Fixes ticket #2197 .
Signed-off-by: Peter Ross <pross@xvid.org>
12 years ago
Paul B Mahol
07a7145d89
lavc/iff: rgbn: fix decoding on big endian
...
Fixes #2193 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
04e1249609
iff: drop ff_ prefix from a static function.
12 years ago
Paul B Mahol
25c75525bf
lavc/iff: ilbm: unbreak decoding on big endian
...
Fixes #2192 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Peter Ross
7016aa655b
iff decoder: support RGB8 and RGBN
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
Peter Ross
59fe5a339b
iff decoder: DEEP TVDC 32-bit decoder
...
Signed-off-by: Peter Ross <pross@xvid.org>
12 years ago
Piotr Bandurski
0b14c197f1
iff: mention all decoders
12 years ago
Peter Ross
f737e76026
iff decoder: reindent
...
Signed-off-by: Peter Ross <pross@xvid.org>
12 years ago
Peter Ross
929a24efff
iff decoder: merge iff ilbm and byterun1 decoders
...
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Peter Ross
fdd71cf04c
iff decoder: initialise HAM line decoder with first palette entry
...
The palette is organised into 'hold' and 'modify' pairs, hence why
the first palette entry is pal[1].
Fixes ticket #1701 .
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0efcf16a3e
replace av_log(0, by av_log(NULL,
...
The first parameter is a pointer and NULL is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
ed27ed9f4f
iff: DEEP RLE 32-bit decoder
...
Fixes ticket #1046 .
Signed-off-by: Peter Ross <pross@xvid.org>
12 years ago
Piotr Bandurski
4413a8428a
iff: decode HAM8 images with masking correctly.
...
Fixes ticket #967 .
Reviewed-by: Peter Ross
12 years ago
Michael Niedermayer
2fbb37b51b
iff/ilbm: check remaining buffer size.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fb6a72cde5
iff: avoid out of array reads, due to too many planes.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
8a4284adbf
ff: fix case where image does not have alpha channel
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
a51540d811
lavc: do not use av_pix_fmt_descriptors directly
...
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
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Michael Niedermayer
0e1925ddc4
iffdec: Fix integer overflow.
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
c9a96ec3c7
cosmetics: iff: fix typo
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Peter Ross
cc12a94c36
iff: set ham palette alpha to 0xFF
...
This addresses the problem that some HAM pictures were decoded with
complete transparency as described in the 'iff: ANIM suppport ' thread
on ffmpeg-devel. The decoder was already setting alpha correctly for
CMAP palettes, just not HAM palettes.
13 years ago
Paul B Mahol
137e80817d
lavc: build some codecs only if they are actually enabled
...
Saves few bytes if only some of them in same file are enabled.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
8f61526978
iff: check if there is extradata
...
Fixes #1368 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Michael Niedermayer
849d4b0413
iff_ilbm: fix null ptr deref
...
Fixes Ticket1362
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
41abc9da50
iff: fix null ptr dereference
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Piotr Bandurski
ddd8974008
iff: prevent a possible crash with broken/prepared IFF PBM
...
Based on fix by Peter Ross for ticket #1054 .
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
0d293880ba
Match documentation for transparency in BGR32 iff images.
13 years ago
Peter Ross
e05253bf49
iff: do not decode unsupported pbms with ham decoder
...
This prevents the segfault reported by ticket #1054
13 years ago
ami_stuff
86b6e49d92
iff: check for pbm tag
...
more robust
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Piotr Bandurski
af55a9d80a
iff: add support for IFF DEEP
...
Fixes trac #1045 .
Thanks to Peter Ross for his help with this patch.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
dda713f870
iff: Fix decode_ham_plane32() buf_size.
...
The wrong variable was passed into decode_ham_plane32()
Fixes: Ticket922
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Peter Ross
69224582da
iff: support masking plane feature
...
Fixes ticket 705.
Reported-by: ami-stuff
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
28002030f2
Support transparency in iff images.
...
Fixes ticket #707 .
Reviewed-by: Peter Ross
13 years ago
Peter Ross
52b7ed4f6e
iff: support ExtraHalfBrite (EHB) palette mode
...
Fixes ticket #663 .
Based on patch by ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago