Derek Buitenhuis
21f9468402
avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
...
Libav, for some reason, merged this as a public API function. This will
aid in future merges.
A define is left for backwards compat, just in case some person
used it, since it is in a public header.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Michael Niedermayer
4cb7cd4c84
avcodec/snow: replace unspecific error code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7517e932ff
avcodec/snow: fix support for odd dimensions
...
Fixes Ticket3914
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
dd369c9adb
avcodec/snow: Initialize spatial_decomposition_count to a valid value
...
Fixes undefined behavior
Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
721c916dd5
avcodec/snow: Free all planes and bands independent of the last count
...
Fixes memleak
Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
56c7e1059a
avcodec/snow: Fix av_malloc* failure checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
13871a95d0
avcodec/snow: Use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7ababb85f9
avcodec/snow: clear freed pointers
...
Avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3a7f9db180
avcodec/snow: Make block argumrnt of ff_snow_pred_block() const
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Michael Niedermayer
a3f752bcee
avcodec/snow: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 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