Michael Niedermayer
9a162146ca
avcodec/snow: fix null pointer dereference in cleanup after allocation failure
...
Fixes: snowf.avi
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a3f752bcee
avcodec/snow: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
aa1d096d02
avcodec/snow: only allocate space for edges when encoding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8156e036e5
avcodec/snowdec: remove mpegvideoencdsp dependency
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b96c9513f3
avcodec/snow: factor ff_snow_get_buffer() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e059ac59ef
avcodec/snow: ensure the buffers have allocated edges
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e868f84e83
avcodec/snow: fix 1 pixel block sizes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0dadbbbfd1
avcodec/snow: use FF_ALLOC(Z)_ARRAY_OR_GOTO
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
71f8cdcc16
avcodec/snow: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
24b4e6c373
snow: Check av_frame_alloc() failures
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c4224fff1b
avcodec/snow: gray support
...
Fixes Ticket839
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
cf06dee58d
libavcodec/snow: change AVFrame to pointers to AVFrame for ABI stability
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f13e733145
avcodec/snow: check for malloc* failures
...
Also return and pass on error codes where needed for this
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
12 years ago
Michael Niedermayer
8cdf95d9b8
snow: add av_cold where appropriate
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
64819bfc7a
snow: Fix off by 1 error in reference picture management
...
Fixes out of array accesses
No release is affected by this bug
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e9d3b40052
snow: drop commented out asserts
...
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
Ronald S. Bultje
771ba8f206
snow: use hpeldsp instead of dsputil for half-pel functions.
12 years ago
Michael Niedermayer
c536253854
snow: set frame defaults
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
d5ce725cb3
Fix a few "its" vs "it's" typo.
12 years ago
Michael Niedermayer
0ddca7d416
dsputil: fixup half a dozen bugs with ptrdiff vs int linesize
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
30981a966f
lavc: split snow and dirac DWTs
...
There is only about 4 lines of common code, so it alot cleaner
when seperated.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
a0c5917f86
Drop Snow codec
...
Snow is a toy codec with no real-world use and horrible code.
12 years ago
Luca Barbato
d615da60c1
snow: use VideoDSPContext
...
It was left over from the initial conversion.
12 years ago
Anton Khirnov
380232fac3
snow: fix build after 594d4d5df3
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
26452e24ed
snow: fix edge emu switch
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5eb4af6c59
snow: move init code that depends on picture paramaters to after these parameters are known.
...
This should fix debug 2048 amongth other things
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
3389545157
snow: remove a VLA used for edge emulation
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Ronald S. Bultje
cbd9b2f918
snow: remove the runs[] VLA.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
4d8516fdb1
snow: Check mallocs at init
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Mans Rullgard
58e57c3052
snow: remove VLA in mc_block()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
be64d5f520
snow.c: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
69971410f9
ff_snow_common_end: assert() that the last buffer freed differs from the current.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
68c845cdba
snow: yuv444 support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
d9669eab0b
dwt: remove variable-length arrays
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
b92ecda2c9
snow: zero scratchbuf.
...
This should fix some valgrind warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
35e02a3d0e
snow: Add ff_ prefix to nonstatic symbols
...
This allows getting rid of a hack for conflicting symbol/define
names.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
9cf0841ef3
dsputil: Add ff_ prefix to the dsputil*_init* functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Diego Biurrun
418f066f8c
snow: Restore three mistakenly removed casts.
13 years ago
Diego Biurrun
44b0edda3f
Drop some pointless void* return value casts from av_malloc() invocations.
13 years ago
Mans Rullgard
ff6d9cc558
snow: fix signed overflow in byte to 32-bit replication
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Luca Barbato
7f1b427018
snow: split snow in snowdec and snowenc
...
The common non inlined code goes in snow.c, the common inlined code in
snow.h, tables move in snowdata.h (included only by snow.c)
13 years ago
Reimar Döffinger
371e165443
Try to set AVFrame.reference to correct values.
...
I am not sure these new values are correct, not am I sure
the semantics are a good idea since we do not seem to make any
use of them but they caused a lot of confusion, but this
seems to make things closer to matching the documentation.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Michael Niedermayer
8fa97302e0
snow: do not draw_edge if emu_edge is set
...
Fix segfault on emu edge, to reproduce
make fate-vsynth1-snow
avplay -flags emu_edge tests/data/vsynth1/snow.avi
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Michael Niedermayer
4416931fc0
snow: emu edge support
...
Fixes Ticket592
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago