Paul B Mahol
5350e0fc97
avcodec/iff: rewrite out of bounds checking in writer
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
51a1c1c6ac
avcodec/iff: check for end of buffer in input for delta_l decompression
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
01ead2a639
avcodec/iff: implement 3rd delta ANIM decompression
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
17ea1cd559
avcodec/iff: change delta l offset to uint32_t
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
cb928fc448
lavc: add IFF ANIM decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Andreas Cadhalpun
ec0275843d
avcodec: remove leftover iff_byterun1 decoder
...
It was merged with the iff_ilbm decoder in commit
929a24efff
.
Define AV_CODEC_ID_IFF_BYTERUN1 as AV_CODEC_ID_IFF_ILBM for API
compatibility.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.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
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
3539d6c63a
avcodec/iff: check pixfmt for rgb8 / rgbn
...
Fixes out of array access
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9bcdb98839
avcodec/iff: Factorize av_pix_fmt_desc_get() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
12 years ago
Paul B Mahol
c9a96ec3c7
cosmetics: iff: fix typo
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 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.
12 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