Michael Niedermayer
599d746e07
avcodec/vp8: Check buffer size in vp8_decode_frame_header()
...
avoids null pointer dereference
Fixes: signal_sigsegv_d5de40_964_vp80-00-comprehensive-010.ivf with memlimit of 1048576
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
a84f0e8d8f
avcodec/vp8: Fix null pointer dereference in ff_vp8_decode_free()
...
Fixes: signal_sigsegv_d5de23_967_vp80_00_comprehensive_010.ivf with memlimit 524288
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Andreas Cadhalpun
6fdbaa2b7f
vp8: change mv_{min,max}.{x,y} type to int
...
If one of the dimensions is larger than 8176, s->mb_width or
s->mb_height is larger than 511, leading to an int16_t overflow of
s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax.
Changing the type to int avoids the overflow and has no negative
effect, because s->mv_max is only used in clamp_mv for clipping.
Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't
increase the absolute value. The input to av_clip is an int16_t, and
thus the output fits into int16_t as well.
For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range
before use.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
10 years ago
Michael Niedermayer
0a6b410edf
avcodec/vp8: Suppress empty body warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
3814f92fd7
lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
...
The later may yield incorrect code for on-stack variables.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9b2a964cee
avcodec/vp8: Fix undefined shifts in vp8_mc_luma()
...
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Clément Bœsch
4d028bf202
avcodec/vp8: remove double ;;
10 years ago
Vittorio Giovara
014b6b416f
vp8: improve memory allocation checks
...
Check memory earlier, check one more allocation and clean up on error.
CC: libav-stable@libav.org
Bug-Id: CID 1257773
10 years ago
Vittorio Giovara
85dc006b1a
lavc: fix bitshifts amount bigger than the type
...
CC: libav-stable@libav.org
Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
10 years ago
Michael Niedermayer
29234f5681
vp7: fix checking vp7_feature_value_size()
...
CC: libav-stable@libav.org
Bug-Id: CID 1197061
10 years ago
Vittorio Giovara
65875a8b3b
vp8: initialize color space and range properties
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
79793f8337
Update Fiona's name in copyright statements.
11 years ago
Michael Niedermayer
8c22bea574
avcodec/vp8: Fix multiple ff_thread_finish_setup() calls
...
Fixes Ticket3725
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c89be82c98
avcodec/vp8: fix () in macros
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Matt Oliver
cef99e12bc
Use rac_get_prob branchy version when used within a conditional branch.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
836b60ce2b
Fix standalone compilation of vp7 and vp8 decoder.
...
Fixes ticket #3536 .
11 years ago
Michael Niedermayer
28f8114bd2
avcodec/vp8: fix checking vp7_feature_value_size
...
Fixes CID1197061
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
26e70fd5ba
avcodec/vp8: fix name of copy_luma()
...
This function was introduced by ac4b32df71
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
ac4b32df71
On2 VP7 decoder
...
Further performance improvements and security fixes by
Vittorio Giovara, Luca Barbato and Diego Biurrun.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Vittorio Giovara
53c20f17c7
vp8: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
46f72ea507
avcodec/vp7: check buffer size
...
Fixes overread
Fixes Ticket 3501
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
57e939d963
avcodec/vp7: Fix null pointer dereference in vp7_decode_frame_header()
...
This simply copies the "interframe without a prior keyframe" check
thats done later into vp7_decode_frame_header()
Found-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
89f2f5dbd7
On2 VP7 decoder
...
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: BBB
previous patch reviewed by jason
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
7d4c0220f1
avcodec/vp8: vp8_find_free_buffer
...
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
b8664c9294
avcodec/vp8dsp: add VP7 idct and loop filter
...
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
e46ad30a80
vp8: use a fixed-size edge emu buffer
...
The reason is the same as for e588615d93
Based on a patch by Ronald S. Bultje <rsbultje@gmail.com>
11 years ago
Peter Ross
f29cdbe1b5
vp8: remove redundant "equals 1" test
...
mb_layout is either zero or non-zero.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
ef8c93e2f1
vp8: drop support for real (non-emulated) edges
...
They are not measurably faster on x86, they might be somewhat faster on
other platforms due to missing emu edge SIMD, but the gain is not large
enough to justify the added complexity.
11 years ago
Ronald S. Bultje
458446acfa
lavc: Edge emulation with dst/src linesize
...
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
11 years ago
Michael Niedermayer
1836a42c29
avcodec/vp8: remove unused webp_decode_frame()
...
See: libavcodec/webp.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
757d5e8ef9
vp8: stop using deprecated avcodec_set_dimensions
11 years ago
Ronald S. Bultje
93f305473f
lavc: Convert some remaining strides to ptrdiff_t
11 years ago
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Ronald S. Bultje
face578d56
Rewrite emu_edge functions to have separate src/dst_stride arguments.
...
This allows supporting files for which the image stride is smaller than
the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file
or a 16x16 VP8 file with -fflags +emu_edge.
11 years ago
Ronald S. Bultje
c341f734e5
Convert multiplier for MV from int to ptrdiff_t.
...
This prevents emulated_edge_mc from not undoing mvy*stride-related
integer overflows.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Justin Ruggles
c4bfa09807
Add a WebP decoder
...
Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org>
Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
11 years ago
Ronald S. Bultje
46d208e1e0
vp8: Wait for prev_frame to parse segment_map before reading it
...
This fixes occasional failures of vp8-test-vector-010 with frame-level
multithreading enabled.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Ronald S. Bultje
c329713de7
vp8: wait for prev_frame to parse segment_map before reading it.
...
This fixes occasional failures of vp8-test-vector-010 with frame-level
multithreading enabled.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Matt Wolenetz
1d6e618939
vp8: Fix pthread_cond and pthread_mutex leaks
...
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Matt Wolenetz
65340c976c
Fix pthread_cond and pthread_mutex leaks in vp8
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
076c1c956c
vp8: WebP decoding support
...
VP8L, padding and bounds checks by Pascal Massimino
Reviewed-by: Pascal Massimino <pascal.massimino@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> 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
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Ronald S. Bultje
8c53d39e7f
lavc: introduce VideoDSPContext
...
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
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
Mans Rullgard
4471a24207
vp8: fix memset() crossing array boundary
...
Indexing across array boundaries is not allowed by C99.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago