Commit Graph

157 Commits

Author SHA1 Message Date
Vittorio Giovara
65875a8b3b vp8: initialize color space and range properties 2014-10-08 18:17:50 +01:00
Gabriel Dume
f929ab0569 cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
Diego Biurrun
79793f8337 Update Fiona's name in copyright statements. 2014-07-01 03:26:51 -07:00
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>
2014-04-04 04:00:11 +02:00
Vittorio Giovara
53c20f17c7 vp8: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-03-29 16:11:09 +01:00
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>
2014-02-04 11:21:07 +01:00
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.
2014-01-09 09:41:24 +01:00
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.
2013-11-15 10:16:27 +01:00
Anton Khirnov
757d5e8ef9 vp8: stop using deprecated avcodec_set_dimensions 2013-10-31 20:14:16 +01:00
Ronald S. Bultje
93f305473f lavc: Convert some remaining strides to ptrdiff_t 2013-10-15 23:58:20 +02:00
Diego Biurrun
b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
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>
2013-09-18 14:10:05 -04:00
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>
2013-07-07 13:30:29 +03:00
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>
2013-03-30 16:08:50 +01:00
Diego Biurrun
12e25ed284 avcodec: av_log_missing_feature(1) ---> avpriv_request_sample() 2013-03-13 21:20:12 +01:00
Anton Khirnov
759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
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>
2013-01-22 18:32:56 -08:00
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>
2012-12-20 13:40:45 +01:00
Anton Khirnov
df9b956751 lavc: fix decode_frame() third parameter semantics for video decoders
It's got_frame, not data size
2012-12-04 21:45:36 +01:00
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>
2012-10-27 17:02:46 +01:00
Sami Pietila
0bf511d579 vp8: reset loopfilter delta values at keyframes.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-10-12 07:17:38 -07:00
Anton Khirnov
716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Diego Biurrun
804d7a1aa6 doxygen: Fix function parameter names to match the code 2012-08-09 20:05:55 +02:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Ronald S. Bultje
48098788c2 vp8: Replace x*155/100 by x*101581>>16.
Idea stolen from webp (by Pascal Massimino) - because it's Cool.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-07-25 14:37:03 -04:00
Martin Storsjö
25f056e6d4 vp8: Enclose pthread function calls in ifdefs
This fixes building with threads disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-15 13:55:18 +03:00
Martin Storsjö
a794600c00 vp8: Include the thread headers before using the pthread types
This was unnoticed on linux, since stdlib.h apparently includes
files declaring the pthread_mutex_t and pthread_cond_t types.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-14 19:19:33 -07:00
Daniel Kang
951455c1c1 vp8: implement sliced threading
Testing gives 25-30% gain on HD clips with two threads and
up to 50% gain with eight threads.

Sliced threading uses more memory than single or frame threading.

Frame threading and single threading keep the previous memory
layout.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-14 20:18:54 +02:00
Daniel Kang
17343e3952 vp8: move data from VP8Context->VP8Macroblock
In preparation for sliced threading.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-14 20:18:54 +02:00
Daniel Kang
337ade52de vp8: refactor decoding a single mb_row
This is in preperation for sliced threading.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-07-14 20:18:54 +02:00
Ronald S. Bultje
6163d880c0 vp8: move block coeff arithcoder on stack.
This prevents gcc from assuming that contents of it may have changed
between calls to vp56_range_get_prob(), thus preventing countless (and
unnecessary) movs. Decoding of sintel trailer goes from (avg+SG) 9.796
+/- 0.003 to 9.635 +/- 0.010.
2012-05-30 09:08:29 -07:00
Ronald S. Bultje
82a0497cf3 vp8: update frame size changes on thread context switches.
This properly synchronizes frame size changes between threads if
subsequent threads abort decoding before frame size is initialized, i.e.
it prevents the thread after that from ping-ponging back to the original
value.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-05-02 09:57:12 -07:00
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>
2012-04-06 22:37:38 +03:00
Janne Salonen
14ba7472dc vp8: fix update_lf_deltas in libavcodec/vp8.c
lf_delta.ref[i] and lf_delta.mode[i] were incorrectly reset to 0 if
specific delta value was not updated. Fixed to keep the previous value
if flag indicates that element in question is not updated.

Signed-off-by: Janne Salonen <jsalonen@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 08:22:05 -07:00
Aaron Colwell
30011bf201 vp8: avoid race condition on segment map.
This change avoids accessing the segment map of the previous frame if
segmentation is not enabled for the current frame. The caller of
decode_mb_mode() only calls ff_thread_await_progress() on the reference
segmentation index array if segmentation is enabled, so Chromium's TSAN
will report a race when accessing this data while segmentation is not
enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-19 13:49:34 -07:00
Martin Storsjö
9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Ronald S. Bultje
fb90785e98 vp8: always update next_framep[] before returning from decode_frame().
Also slightly move around code not allocate a new frame if we won't
decode it. This prevents us from putting undecoded frames in frame
pointers, which (in mt decoding) other threads will use and wait on
as references, causing a deadlock (if we skipped decoding) or a crash
(if we didn't initialized next_framep[] at all).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-07 11:29:02 -08:00
Diego Biurrun
32f3c541bc doxygen: Do not include license boilerplates in Doxygen comment blocks. 2012-02-06 19:39:24 +01:00
Aaron Colwell
e02dec25ab vp8: flush buffers on size changes. 2011-12-02 07:21:08 -08:00
Justin Ruggles
f3a29b750a avcodec: move some AVCodecContext fields to an internal struct.
A new field, AVCodecContext.internal is used to hold a new struct
AVCodecInternal, which has private fields that are not codec-specific and are
used by general libavcodec functions.

Moved internal_buffer, internal_buffer_count, and is_copy.
2011-11-19 10:01:05 -05:00
Ronald S. Bultje
bfa0f96586 vp8: fix overflow in segmentation map caching. 2011-10-28 23:48:43 -07:00
Baptiste Coudurier
76741b0e56 h264: 4:2:2 intra decoding support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-21 01:00:41 -07:00
Ronald S. Bultje
ce42a04884 vp8: fix up handling of segmentation_maps in reference frames.
Associate segmentation_map[] with reference frame, rather than
decoding instance. This fixes cases where the map would be free()'ed
on e.g. a size change in one thread, whereas the other thread was
still accessing it. Also, it fixes cases where threads overwrite data
that is still being referenced by the previous thread, who thinks that
it's part of the frame previously decoded by the next thread.
2011-10-21 00:17:58 -07:00
Ronald S. Bultje
0f0b5d6434 vp8: prevent read from uninitialized memory in decode_mvs
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Ronald S. Bultje
5653579381 vp8: force reallocation in update_thread_context after frame size change
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Ronald S. Bultje
f05c2fb6eb vp8: fix return value if update_dimensions fails
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-15 00:13:21 +02:00
Mans Rullgard
bb59156606 vp8: fix signed overflows
In addition to avoiding undefined behaviour, an unsigned type
makes more sense for packing multiple 8-bit values.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-08 20:03:55 +01:00
Anton Khirnov
ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Diego Biurrun
3c432e1186 doxygen: Fix documentation for some VP8 functions. 2011-07-04 12:54:26 +02:00
Diego Biurrun
24c9babaaf doxygen: Fix parameter names to match the function prototypes. 2011-07-03 18:30:02 +02:00