Michael Niedermayer
5231e89eb9
avcodec/pictordec: Optimize picmemset() for single plane full lines
...
Fixes: Timeout (72sec -> 1sec)
Fixes: 15512/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5663942342344704
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
838710bd6c
avcodec/pictordec: Only recalculate d when y changes in picmemset()
...
Fixes: Timeout (21->18sec)
Fixes: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
3ed360ea5c
avcodec/pictordec: avoid pointers in picmemset()
...
Improves overall speed by about 3%
Testcase: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
470700bc96
avcodec/pictordec: Error out if more than one plane is unused
...
Fixes: Timeout
Fixes: 9797/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5664441659031552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
eb3c1a94ad
pictor: Correctly check frame dimensions
...
Fixes: 559/clusterfuzz-testcase-6424225917173760
Bug-Id: CVE-2017-7862
CC: libav-stable@libav.org
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8c2ea3030a
)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years ago
Michael Niedermayer
0f34c0789f
avcodec/pictordec: runtime error: left shift of 15 by 28 places cannot be represented in type 'int'
...
Fixes: 898/clusterfuzz-testcase-6149765467209728
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
0728d9a281
avcodec/pictordec: Fix runtime error: left shift of 805306368 by 2 places cannot be represented in type 'int'
...
Fixes: 823/clusterfuzz-testcase-6727060074528768
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
01a33b835f
avcodec/pictordec: Fix runtime error: left shift of 64 by 25 places cannot be represented in type 'int'
...
Fixes: 724/clusterfuzz-testcase-6738249571631104
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
63e400a880
avcodec/pictordec: Check plane value before doing value/mask computations
...
Fixes integer overflow
Fixes: 675/clusterfuzz-testcase-6722971232108544
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
01d196a67d
avcodec/pictordec: Do not read more than nb_planes
...
Fixes undefined behavior
Fixes: 622/clusterfuzz-testcase-5745722022428672
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
8c2ea3030a
avcodec/pictordec: Fix logic error
...
Fixes: 559/clusterfuzz-testcase-6424225917173760
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
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Anton Khirnov
0f21d8b1b4
pictordec: stop using deprecated avcodec_set_dimensions
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
560612344e
avcodec/pictordec: remove y checks, which have become redundant
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8088d6f5f1
avcodec/pictordec: run av_image_check_size() unconditionally
...
This ensures that no invalid size leaks through
(This issue is hypothetical, ive no testcase)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
fe9bb61f9a
pictordec: pass correct context to avpriv_request_sample
...
Fixes invalid reads.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Anton Khirnov
5f7aecde02
pictordec: break out of both decoding loops when y drops below 0
...
Otherwise picmemset can get called with negative y, resulting in an
invalid write.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Luca Barbato
183880cfc4
pictor: use the correct logging context
...
Broken in 6d97484d72
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
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
478fc7f57b
pictordec: fix cga palette index limit
...
Fixes out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
f3298f1299
Return proper error code after av_log_ask_for_sample()
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
8b67ec77f0
pictordec: fill any unset portion of the image
...
Fixes ticket #1710
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
bf0d098a98
pictordec: decode 1bpp / 4bpp images when extra header marker is missing
...
based on 56f6628bca
samples:
http://www.datafilehost.com/download-94b5bc1b.html
Reviewed-and-Tested-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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_*
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
Laurentiu Ion
d859191322
pictordec: Use bytestream2 functions
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Paul B Mahol
ba10207bbe
Use more designated initializers.
...
Also remove some pointless NULL/0 assigments.
C++ code must be left as it is because named struct
initializers are not supported by C++ standard.
13 years ago
Peter Ross
56f6628bca
pictordec: decode 8bpp images when extra header marker is missing
...
Fixes ticket #696 .
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Peter Ross
1fd6924320
pictordec: support uncompressed images
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Peter Ross
f3f488423a
pictordec: prevent segfault when reading corrupted files
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Peter Ross
43a2a8b4a3
pictordec: use correct context for another av_log
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
9dcd8b86f9
Use correct context for av_log.
...
Fixes ticket #695 .
13 years ago
Carl Eugen Hoyos
a95906af57
Increase Pictor/PC Paint palette dynamics.
13 years ago
Carl Eugen Hoyos
7ea77a6197
Set some Pictor/PC Paint palettes opaque.
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
01042d4123
lavc: set defaults in internal codec frames
...
This is required specifically for setting frame->format to -1,
otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading
the format from the output decoded frame will get misled.
In particular fix regressions occurring with the pending vsrc_buffer
patch.
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
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Reinhard Tartler
7ffe76e540
Merge libavcore into libavutil
...
Done to keep ABI compatible. Otherwise this is just silly
14 years ago
Reinhard Tartler
737eb5976f
Merge libavcore into libavutil
...
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
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
Stefano Sabatini
b9f9e59afc
Replace deprecated CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO with the
...
corresponding AVMEDIA_TYPE_* symbols.
Originally committed as revision 25201 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago